From 338c94e557c0288955925a912c365a115219bf89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Sat, 14 Sep 2024 18:47:34 +0100 Subject: [PATCH 01/19] CP-51479: [maintenance]: synchronize api_version.ml and api_version.ml.in MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ./configure generates api_version.ml from api_version.ml.in, but their comments didn't match. Synchronize them, such that running ./configure doesn't result in committable changes. Also ignore the api_version.ml.in2 file that gets created. Signed-off-by: Edwin Török --- .gitignore | 1 + ocaml/idl/api_version.ml | 3 +-- ocaml/idl/api_version.ml.in | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b519eb9cb39..27ed892007d 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,7 @@ ocaml/xenopsd/scripts/xen-backend.rules ocaml/xenopsd/xentoollog_flags ocaml/idl/gen_lifecycle.exe +ocaml/idl/api_version.ml.in2 # hugo .hugo_build.lock diff --git a/ocaml/idl/api_version.ml b/ocaml/idl/api_version.ml index 297be24bc25..23028c50796 100644 --- a/ocaml/idl/api_version.ml +++ b/ocaml/idl/api_version.ml @@ -12,8 +12,7 @@ * GNU Lesser General Public License for more details. *) -(* This file is only needed for building xapi with local make, now the - api_version_major and api_version_minor are defined in xapi.spec and this +(* Now the api_version_major and api_version_minor are defined in xapi.spec and this file will be regenerated from api_version.ml.in by configure.ml during koji build. *) diff --git a/ocaml/idl/api_version.ml.in b/ocaml/idl/api_version.ml.in index 984d207c7f6..07de45fbcaf 100644 --- a/ocaml/idl/api_version.ml.in +++ b/ocaml/idl/api_version.ml.in @@ -12,6 +12,10 @@ * GNU Lesser General Public License for more details. *) +(* Now the api_version_major and api_version_minor are defined in xapi.spec and this + file will be regenerated from api_version.ml.in by configure.ml during koji + build. *) + let api_version_major = @APIVERMAJ@L let api_version_minor = @APIVERMIN@L From e9427b4f9b4a467af13405d6cbf35b55be7df548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Sat, 14 Sep 2024 09:59:50 +0100 Subject: [PATCH 02/19] CP-51479: [maintenance]: do not install cmxs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We cannot prevent dune from building them at the moment (`nodynlink` is disabled, and doesn't work with PIE executables). However disable installing all these files to avoid the .spec file complaining about additional cmxs files appearing when opam packages are reorganized. Signed-off-by: Edwin Török --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 337e4dad88c..d4c2bd25d5f 100644 --- a/Makefile +++ b/Makefile @@ -274,6 +274,7 @@ install: build doc sdk doc-json mkdir -p $(DESTDIR)$(SDKDIR) cp -r $(XAPISDK)/* $(DESTDIR)$(SDKDIR) find $(DESTDIR)$(SDKDIR) -type f -exec chmod 644 {} \; + find $(DESTDIR) -name '*.cmxs' -delete uninstall: # only removes what was installed with `dune install` From 5184c6e02fd5f2fc361a73988770002e21d2298a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Mon, 16 Sep 2024 09:16:06 +0100 Subject: [PATCH 03/19] CP-51479: [maintenance]: reduce scope of dune aliases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 'update-dm-lifecycle' and 'python' only exists in a single directory, tell 'dune' exactly where to look. This speeds up incremental builds: ``` dune build @ocaml/xapi-storage/python/xapi/storage/api/v5/python --profile=release ran 3.41 ± 0.18 times faster than dune build @python --profile=release dune build @ocaml/idl/update-dm-lifecycle -j 8 --profile=release ran 2.13 ± 0.19 times faster than dune build @update-dm-lifecycle -j 8 --profile=release --auto-promote ``` ``` Benchmark 2: dune build @ocaml/xapi-storage/python/xapi/storage/api/v5/python --profile=release Time (mean ± σ): 288.7 ms ± 3.7 ms [User: 229.5 ms, System: 58.9 ms] Range (min … max): 282.5 ms … 293.5 ms 10 runs Benchmark 2: dune build @ocaml/idl/update-dm-lifecycle -j 8 --profile=release Time (mean ± σ): 581.4 ms ± 15.8 ms [User: 442.5 ms, System: 175.8 ms] Range (min … max): 550.5 ms … 602.2 ms 10 runs ``` Signed-off-by: Edwin Török --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d4c2bd25d5f..7d56b541300 100644 --- a/Makefile +++ b/Makefile @@ -12,9 +12,9 @@ OPTMANDIR ?= $(OPTDIR)/man/man1/ # this is typically used when we're not building from a git repo build: [ -z "${XAPI_VERSION}" ] || (sed -i '/(version.*)/d' dune-project && echo "(version ${XAPI_VERSION})" >> dune-project) - dune build @update-dm-lifecycle -j $(JOBS) --profile=$(PROFILE) --auto-promote || dune build @update-dm-lifecycle -j $(JOBS) --profile=$(PROFILE) --auto-promote + dune build @ocaml/idl/update-dm-lifecycle -j $(JOBS) --profile=$(PROFILE) --auto-promote || dune build @ocaml/idl/update-dm-lifecycle -j $(JOBS) --profile=$(PROFILE) --auto-promote dune build @install -j $(JOBS) --profile=$(PROFILE) - dune build @python --profile=$(PROFILE) + dune build @ocaml/xapi-storage/python/xapi/storage/api/v5/python --profile=$(PROFILE) # Quickly verify that the code compiles, without actually building it check: From 53bcd6104643e89347771d008aefc4ef891822ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Sun, 15 Sep 2024 22:40:28 +0100 Subject: [PATCH 04/19] CP-51479: [maintenance]: fix opam dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use `opam-dune-lint`. This will make it easier to later merge opam packages and keep the merged package updated correctly. Although `opam-dune-lint` doesn't find all problems yet, see: https://github.com/ocurrent/opam-dune-lint/issues/71 Signed-off-by: Edwin Török --- clock.opam | 1 + cohttp-posix.opam | 2 +- cohttp-posix.opam.template | 2 +- dune-project | 77 +++++++++++++++++++++++++++- ezxenstore.opam | 4 +- ezxenstore.opam.template | 4 +- forkexec.opam | 2 + gzip.opam | 2 +- gzip.opam.template | 2 +- http-lib.opam | 6 +++ message-switch-async.opam | 8 ++- message-switch-async.opam.template | 8 ++- message-switch-cli.opam | 2 +- message-switch-cli.opam.template | 2 +- message-switch-core.opam | 2 + message-switch-lwt.opam | 2 +- message-switch-lwt.opam.template | 2 +- message-switch.opam | 2 +- message-switch.opam.template | 2 +- pciutil.opam | 2 +- pciutil.opam.template | 2 +- rrd-transport.opam | 3 ++ rrd2csv.opam | 3 +- rrd2csv.opam.template | 3 +- rrdd-plugin.opam | 1 + rrdd-plugins.opam | 7 ++- rrdd-plugins.opam.template | 7 ++- rrddump.opam | 2 +- rrddump.opam.template | 2 +- safe-resources.opam | 2 +- safe-resources.opam.template | 2 +- sexpr.opam | 4 +- sexpr.opam.template | 4 +- stunnel.opam | 2 +- stunnel.opam.template | 2 +- uuid.opam | 3 +- uuid.opam.template | 3 +- varstored-guard.opam | 6 +++ varstored-guard.opam.template | 6 +++ vhd-format-lwt.opam | 4 ++ vhd-format.opam | 2 + vhd-format.opam.template | 2 + vhd-tool.opam | 9 ++++ xapi-cli-protocol.opam | 3 +- xapi-cli-protocol.opam.template | 3 +- xapi-client.opam | 3 +- xapi-client.opam.template | 3 +- xapi-compression.opam | 2 +- xapi-compression.opam.template | 2 +- xapi-consts.opam | 2 +- xapi-consts.opam.template | 2 +- xapi-datamodel.opam | 4 +- xapi-datamodel.opam.template | 4 +- xapi-expiry-alerts.opam | 2 +- xapi-expiry-alerts.opam.template | 2 +- xapi-idl.opam | 10 +++- xapi-idl.opam.template | 10 +++- xapi-inventory.opam | 2 +- xapi-inventory.opam.template | 2 +- xapi-log.opam | 7 ++- xapi-log.opam.template | 7 ++- xapi-nbd.opam | 4 +- xapi-nbd.opam.template | 4 +- xapi-networkd.opam | 5 ++ xapi-open-uri.opam | 3 +- xapi-open-uri.opam.template | 3 +- xapi-rrd.opam | 2 +- xapi-rrd.opam.template | 2 +- xapi-rrdd-plugin.opam | 2 +- xapi-rrdd-plugin.opam.template | 2 +- xapi-rrdd.opam | 10 ++++ xapi-schema.opam | 2 +- xapi-schema.opam.template | 2 +- xapi-sdk.opam | 2 + xapi-squeezed.opam | 3 +- xapi-squeezed.opam.template | 3 +- xapi-stdext-threads.opam | 2 + xapi-stdext-unix.opam | 2 + xapi-storage-cli.opam | 2 +- xapi-storage-cli.opam.template | 2 +- xapi-storage-script.opam | 2 +- xapi-storage-script.opam.template | 2 +- xapi-storage.opam | 4 +- xapi-storage.opam.template | 4 +- xapi-tracing-export.opam | 4 ++ xapi-tracing.opam | 1 + xapi-types.opam | 2 +- xapi-types.opam.template | 2 +- xapi-xenopsd-cli.opam | 7 ++- xapi-xenopsd-cli.opam.template | 7 ++- xapi-xenopsd-simulator.opam | 2 +- xapi-xenopsd-simulator.opam.template | 2 +- xapi-xenopsd-xc.opam | 10 +++- xapi-xenopsd-xc.opam.template | 10 +++- xapi-xenopsd.opam | 4 +- xapi-xenopsd.opam.template | 4 +- xapi.opam | 23 ++++++++- xe.opam | 8 ++- xe.opam.template | 8 ++- xen-api-client-async.opam | 6 ++- xen-api-client-async.opam.template | 6 ++- xen-api-client-lwt.opam | 5 +- xen-api-client-lwt.opam.template | 5 +- xml-light2.opam | 2 +- xml-light2.opam.template | 2 +- zstd.opam | 2 +- zstd.opam.template | 2 +- 107 files changed, 382 insertions(+), 96 deletions(-) diff --git a/clock.opam b/clock.opam index 73192316295..705f280d2b9 100644 --- a/clock.opam +++ b/clock.opam @@ -11,6 +11,7 @@ depends: [ "ocaml" {>= "4.12"} "alcotest" {with-test} "astring" + "fmt" "mtime" "ptime" "xapi-log" {= version} diff --git a/cohttp-posix.opam b/cohttp-posix.opam index 82bd187a844..e4aba962fa3 100644 --- a/cohttp-posix.opam +++ b/cohttp-posix.opam @@ -11,7 +11,7 @@ build: [[ "dune" "build" "-p" name "-j" jobs ]] available: [ os = "linux" ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "cohttp" ] synopsis: "Library required by xapi" diff --git a/cohttp-posix.opam.template b/cohttp-posix.opam.template index 62e5a3961d3..4660d0c1f58 100644 --- a/cohttp-posix.opam.template +++ b/cohttp-posix.opam.template @@ -9,7 +9,7 @@ build: [[ "dune" "build" "-p" name "-j" jobs ]] available: [ os = "linux" ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "cohttp" ] synopsis: "Library required by xapi" diff --git a/dune-project b/dune-project index 94a885046a7..fa6e37a749b 100644 --- a/dune-project +++ b/dune-project @@ -27,6 +27,7 @@ (ocaml (>= 4.12)) (alcotest :with-test) astring + fmt mtime ptime (xapi-log (= :version)) @@ -50,9 +51,11 @@ (depends (alcotest :with-test) astring + (fmt :with-test) mustache (xapi-datamodel (= :version)) (xapi-stdext-unix (and (= :version) :with-test)) + (xapi-test-utils :with-test) ) (allow_empty) ) @@ -115,6 +118,7 @@ ocaml dune (alcotest :with-test) + (fmt :with-test) re uri (uuid :with-test) @@ -132,8 +136,12 @@ cohttp-posix dune cohttp + ptime + result + rresult rpclib ppx_deriving_rpc + uri (xapi-log (= :version)) (xapi-open-uri (= :version)) (xapi-stdext-threads (= :version)) @@ -180,6 +188,7 @@ (xapi-stdext-threads (= :version)) (xapi-stdext-unix (= :version)) (xapi-idl (= :version)) + xenstore xenstore_transport ) ) @@ -192,13 +201,18 @@ (ocaml (>= "4.02.0")) (alcotest :with-test) astring + cmdliner + (fmt :with-test) (gzip (= :version)) (http-lib (= :version)) inotify io-page + ipaddr mtime + polly ppx_deriving_rpc rpclib + uri (ezxenstore (= :version)) (uuid (= :version)) xapi-backtrace @@ -207,6 +221,11 @@ (xapi-stdext-threads (= :version)) (xapi-stdext-unix (= :version)) xapi-tracing + xenctrl + xenstore + xenstore_transport + xmlm + yojson ) ) @@ -238,10 +257,14 @@ base-threads (forkexec (= :version)) (http-lib (= :version)) + integers mtime netlink re + result + rresult rpclib + uri (xapi-idl (= :version)) xapi-inventory (xapi-stdext-pervasives (= :version)) @@ -250,6 +273,7 @@ (xapi-stdext-unix (= :version)) xapi-test-utils (xen-api-client (= :version)) + yojson ) ) @@ -308,19 +332,27 @@ (depends alcotest ; needed for the quicktest binary angstrom + astring base-threads base64 + (bos :with-test) cdrom + cmdliner + cohttp conf-pam (crowbar :with-test) + cstruct ctypes ctypes-foreign domain-name (ezxenstore (= :version)) - (fmt :with-test) + fmt hex (http-lib (and :with-test (= :version))) ; the public library is only used for testing + integers ipaddr + logs + magic-mime mirage-crypto mirage-crypto-pk (mirage-crypto-rng (>= "0.11.0")) @@ -329,21 +361,31 @@ opentelemetry-client-ocurl pci (pciutil (= :version)) + polly ppx_deriving_rpc ppx_sexp_conv ppx_deriving psq + ptime qcheck-alcotest + qcheck-core + re + result rpclib (rrdd-plugin (= :version)) rresult sexpr + sexplib + sexplib0 sha (stunnel (= :version)) tar tar-unix + uri (uuid (= :version)) + uuidm x509 + xapi-backtrace (xapi-client (= :version)) (xapi-cli-protocol (= :version)) (xapi-consts (= :version)) @@ -362,6 +404,9 @@ (xapi-tracing (= :version)) (xapi-types (= :version)) (xapi-xenopsd (= :version)) + xenctrl ; for quicktest + xenstore_transport + xmlm (xml-light2 (= :version)) yojson (zstd (= :version)) @@ -391,6 +436,10 @@ (tags ("org.mirage" "org:xapi-project")) (depends (alcotest-lwt :with-test) + astring + bigarray-compat + cmdliner + cohttp cohttp-lwt conf-libssl (cstruct (>= "3.0.0")) @@ -398,13 +447,18 @@ (forkexec (= :version)) io-page lwt + lwt_ssl + nbd nbd-unix ppx_cstruct ppx_deriving_rpc re + result rpclib + ssl sha tar + uri (vhd-format (= :version)) (vhd-format-lwt (= :version)) (xapi-idl (= :version)) @@ -438,9 +492,13 @@ This package provides an Lwt compatible interface to the library.") (ocaml (and (>= "4.02.3") (< "5.0.0"))) (alcotest :with-test) (alcotest-lwt :with-test) + bigarray-compat (cstruct (< "6.1.0")) + cstruct-lwt + (fmt :with-test) (lwt (>= "3.2.0")) (mirage-block (>= "2.0.1")) + rresult (vhd-format (= :version)) (io-page (and :with-test (>= "2.4.0"))) ) @@ -486,8 +544,11 @@ This package provides an Lwt compatible interface to the library.") (depends (alcotest :with-test) astring + bigarray-compat cstruct crc + (fmt :with-test) + rpclib yojson (xapi-idl (= :version)) (xapi-rrd (= :version)) @@ -518,6 +579,8 @@ This package provides an Lwt compatible interface to the library.") ppx_sexp_conv rpclib sexplib + sexplib0 + uri (xapi-log (= :version)) (xapi-stdext-threads (= :version)) (odoc :with-doc) @@ -554,10 +617,16 @@ This package provides an Lwt compatible interface to the library.") (alcotest :with-test) astring (base64 (>= "3.1.0")) + fmt + ipaddr + mtime + ppx_deriving_rpc + (qcheck-core :with-test) rpclib (safe-resources(= :version)) sha (stunnel (= :version)) + uri (uuid (= :version)) xapi-backtrace (xapi-idl (= :version)) @@ -580,11 +649,13 @@ This package provides an Lwt compatible interface to the library.") (synopsis "Process-spawning library") (description "Client and server library to spawn processes.") (depends + astring base-threads (fd-send-recv (>= "2.0.0")) ppx_deriving_rpc rpclib (uuid (= :version)) + xapi-backtrace (xapi-log (= :version)) (xapi-stdext-pervasives (= :version)) (xapi-stdext-unix (= :version)) @@ -661,6 +732,8 @@ This package provides an Lwt compatible interface to the library.") (depends base-threads base-unix + (alcotest :with-test) + (fmt :with-test) (odoc :with-doc) (xapi-stdext-pervasives (= :version)) (mtime :with-test) @@ -675,10 +748,12 @@ This package provides an Lwt compatible interface to the library.") (depends (ocaml (>= 4.12.0)) (alcotest :with-test) + astring base-unix (bisect_ppx :with-test) (fd-send-recv (>= 2.0.0)) fmt + integers (mtime (and (>= 2.0.0) :with-test)) (logs :with-test) (qcheck-core (and (>= 0.21.2) :with-test)) diff --git a/ezxenstore.opam b/ezxenstore.opam index 5d88113b816..d5a1ff58de2 100644 --- a/ezxenstore.opam +++ b/ezxenstore.opam @@ -10,8 +10,8 @@ dev-repo: "git+https://github.com/xapi-project/xen-api.git" build: [[ "dune" "build" "-p" name "-j" jobs ]] depends: [ "ocaml" - "dune" {>= "1.4"} - "cmdliner" {with-test & >= "1.1.0"} + "dune" {>= "3.15"} + "cmdliner" "logs" "uuidm" "xapi-stdext-unix" diff --git a/ezxenstore.opam.template b/ezxenstore.opam.template index 1a3283178aa..4f7eb3447fa 100644 --- a/ezxenstore.opam.template +++ b/ezxenstore.opam.template @@ -8,8 +8,8 @@ dev-repo: "git+https://github.com/xapi-project/xen-api.git" build: [[ "dune" "build" "-p" name "-j" jobs ]] depends: [ "ocaml" - "dune" {>= "1.4"} - "cmdliner" {with-test & >= "1.1.0"} + "dune" {>= "3.15"} + "cmdliner" "logs" "uuidm" "xapi-stdext-unix" diff --git a/forkexec.opam b/forkexec.opam index 6d6d2504488..68ca75e06df 100644 --- a/forkexec.opam +++ b/forkexec.opam @@ -9,11 +9,13 @@ homepage: "https://xapi-project.github.io/" bug-reports: "https://github.com/xapi-project/xen-api/issues" depends: [ "dune" {>= "3.15"} + "astring" "base-threads" "fd-send-recv" {>= "2.0.0"} "ppx_deriving_rpc" "rpclib" "uuid" {= version} + "xapi-backtrace" "xapi-log" {= version} "xapi-stdext-pervasives" {= version} "xapi-stdext-unix" {= version} diff --git a/gzip.opam b/gzip.opam index 59901c80ee6..7a04554f2a9 100644 --- a/gzip.opam +++ b/gzip.opam @@ -11,7 +11,7 @@ build: [[ "dune" "build" "-p" name "-j" jobs ]] available: [ os = "linux" ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "xapi-compression" ] synopsis: "Library required by xapi" diff --git a/gzip.opam.template b/gzip.opam.template index 8e7be0f3783..7c960776d88 100644 --- a/gzip.opam.template +++ b/gzip.opam.template @@ -9,7 +9,7 @@ build: [[ "dune" "build" "-p" name "-j" jobs ]] available: [ os = "linux" ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "xapi-compression" ] synopsis: "Library required by xapi" diff --git a/http-lib.opam b/http-lib.opam index e8a5de4ddc9..df1b7735eb7 100644 --- a/http-lib.opam +++ b/http-lib.opam @@ -13,10 +13,16 @@ depends: [ "alcotest" {with-test} "astring" "base64" {>= "3.1.0"} + "fmt" + "ipaddr" + "mtime" + "ppx_deriving_rpc" + "qcheck-core" {with-test} "rpclib" "safe-resources" {= version} "sha" "stunnel" {= version} + "uri" "uuid" {= version} "xapi-backtrace" "xapi-idl" {= version} diff --git a/message-switch-async.opam b/message-switch-async.opam index 1192cb6cb9e..ac53e522c21 100644 --- a/message-switch-async.opam +++ b/message-switch-async.opam @@ -14,9 +14,15 @@ build: [ ] depends: [ "ocaml" - "dune" {build & >= "1.4"} + "dune" {>= "3.15"} "odoc" {with-doc} "async" {>= "v0.9.0"} + "async_kernel" + "async_unix" + "base" + "core" + "core_kernel" + "core_unix" "cohttp-async" {>= "1.0.2"} "message-switch-core" ] diff --git a/message-switch-async.opam.template b/message-switch-async.opam.template index a6828673032..aaa69dc257e 100644 --- a/message-switch-async.opam.template +++ b/message-switch-async.opam.template @@ -12,9 +12,15 @@ build: [ ] depends: [ "ocaml" - "dune" {build & >= "1.4"} + "dune" {>= "3.15"} "odoc" {with-doc} "async" {>= "v0.9.0"} + "async_kernel" + "async_unix" + "base" + "core" + "core_kernel" + "core_unix" "cohttp-async" {>= "1.0.2"} "message-switch-core" ] diff --git a/message-switch-cli.opam b/message-switch-cli.opam index d576f9f3a42..ccbea62e0b2 100644 --- a/message-switch-cli.opam +++ b/message-switch-cli.opam @@ -14,7 +14,7 @@ build: [ ] depends: [ "ocaml" - "dune" {build & >= "1.4"} + "dune" {>= "3.15"} "odoc" {with-doc} "cmdliner" "message-switch-unix" diff --git a/message-switch-cli.opam.template b/message-switch-cli.opam.template index dbf5de7d80c..0d9d0a1ec6d 100644 --- a/message-switch-cli.opam.template +++ b/message-switch-cli.opam.template @@ -12,7 +12,7 @@ build: [ ] depends: [ "ocaml" - "dune" {build & >= "1.4"} + "dune" {>= "3.15"} "odoc" {with-doc} "cmdliner" "message-switch-unix" diff --git a/message-switch-core.opam b/message-switch-core.opam index 2fd00d31457..a6b183bdd7f 100644 --- a/message-switch-core.opam +++ b/message-switch-core.opam @@ -16,6 +16,8 @@ depends: [ "ppx_sexp_conv" "rpclib" "sexplib" + "sexplib0" + "uri" "xapi-log" {= version} "xapi-stdext-threads" {= version} "odoc" {with-doc} diff --git a/message-switch-lwt.opam b/message-switch-lwt.opam index a52b3eca124..3688d40a188 100644 --- a/message-switch-lwt.opam +++ b/message-switch-lwt.opam @@ -14,7 +14,7 @@ build: [ ] depends: [ "ocaml" - "dune" {build & >= "1.4"} + "dune" {>= "3.15"} "odoc" {with-doc} "cohttp-lwt-unix" "lwt" {>= "3.0.0"} diff --git a/message-switch-lwt.opam.template b/message-switch-lwt.opam.template index 766fbbceaa2..b038e76b867 100644 --- a/message-switch-lwt.opam.template +++ b/message-switch-lwt.opam.template @@ -12,7 +12,7 @@ build: [ ] depends: [ "ocaml" - "dune" {build & >= "1.4"} + "dune" {>= "3.15"} "odoc" {with-doc} "cohttp-lwt-unix" "lwt" {>= "3.0.0"} diff --git a/message-switch.opam b/message-switch.opam index b09cec4ca7c..4ee77fdca5d 100644 --- a/message-switch.opam +++ b/message-switch.opam @@ -15,7 +15,7 @@ build: [ ] depends: [ "ocaml" - "dune" {build & >= "1.4"} + "dune" {>= "3.15"} "odoc" {with-doc} "cmdliner" "cohttp-async" {with-test} diff --git a/message-switch.opam.template b/message-switch.opam.template index 793c8aceaa5..8a898c41747 100644 --- a/message-switch.opam.template +++ b/message-switch.opam.template @@ -13,7 +13,7 @@ build: [ ] depends: [ "ocaml" - "dune" {build & >= "1.4"} + "dune" {>= "3.15"} "odoc" {with-doc} "cmdliner" "cohttp-async" {with-test} diff --git a/pciutil.opam b/pciutil.opam index e4c52c1629a..4e93f06fccf 100644 --- a/pciutil.opam +++ b/pciutil.opam @@ -11,7 +11,7 @@ build: [[ "dune" "build" "-p" name "-j" jobs ]] available: [ os = "linux" ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "xapi-stdext-unix" ] synopsis: "Library required by xapi" diff --git a/pciutil.opam.template b/pciutil.opam.template index fb0823e55c7..48f9d097162 100644 --- a/pciutil.opam.template +++ b/pciutil.opam.template @@ -9,7 +9,7 @@ build: [[ "dune" "build" "-p" name "-j" jobs ]] available: [ os = "linux" ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "xapi-stdext-unix" ] synopsis: "Library required by xapi" diff --git a/rrd-transport.opam b/rrd-transport.opam index 07fe41dd8cc..441dbeebbd9 100644 --- a/rrd-transport.opam +++ b/rrd-transport.opam @@ -12,8 +12,11 @@ depends: [ "dune" {>= "3.15"} "alcotest" {with-test} "astring" + "bigarray-compat" "cstruct" "crc" + "fmt" {with-test} + "rpclib" "yojson" "xapi-idl" {= version} "xapi-rrd" {= version} diff --git a/rrd2csv.opam b/rrd2csv.opam index cb36ed57a70..4d71ee4468b 100644 --- a/rrd2csv.opam +++ b/rrd2csv.opam @@ -14,13 +14,14 @@ build: [ ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "http-lib" "xapi-client" "xapi-idl" "xapi-rrd" "xapi-stdext-std" "xapi-stdext-threads" + "xmlm" ] synopsis: "Convert XenServer RRD data into CSV format" url { diff --git a/rrd2csv.opam.template b/rrd2csv.opam.template index 0f598244249..e86d004589e 100644 --- a/rrd2csv.opam.template +++ b/rrd2csv.opam.template @@ -12,13 +12,14 @@ build: [ ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "http-lib" "xapi-client" "xapi-idl" "xapi-rrd" "xapi-stdext-std" "xapi-stdext-threads" + "xmlm" ] synopsis: "Convert XenServer RRD data into CSV format" url { diff --git a/rrdd-plugin.opam b/rrdd-plugin.opam index 5b113952b04..f59d26a365e 100644 --- a/rrdd-plugin.opam +++ b/rrdd-plugin.opam @@ -20,6 +20,7 @@ depends: [ "xapi-stdext-threads" {= version} "xapi-stdext-unix" {= version} "xapi-idl" {= version} + "xenstore" "xenstore_transport" "odoc" {with-doc} ] diff --git a/rrdd-plugins.opam b/rrdd-plugins.opam index e0a4ac91af9..4ca427e4561 100644 --- a/rrdd-plugins.opam +++ b/rrdd-plugins.opam @@ -12,18 +12,23 @@ build: [[ "dune" "build" "-p" name "-j" jobs ]] synopsis: "Plugins registering to the RRD daemon and exposing various metrics" depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} + "astring" "base-threads" "base-unix" + "cstruct" "cstruct-unix" "ezxenstore" "inotify" + "ppx_cstruct" "rrdd-plugin" + "stringext" "uuid" "xapi-stdext-std" "xapi-stdext-unix" "xenctrl" "xenstore" + "xenstore_transport" "mtime" ] url { diff --git a/rrdd-plugins.opam.template b/rrdd-plugins.opam.template index 9db3f7e4a75..218b5f3c7bc 100644 --- a/rrdd-plugins.opam.template +++ b/rrdd-plugins.opam.template @@ -10,18 +10,23 @@ build: [[ "dune" "build" "-p" name "-j" jobs ]] synopsis: "Plugins registering to the RRD daemon and exposing various metrics" depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} + "astring" "base-threads" "base-unix" + "cstruct" "cstruct-unix" "ezxenstore" "inotify" + "ppx_cstruct" "rrdd-plugin" + "stringext" "uuid" "xapi-stdext-std" "xapi-stdext-unix" "xenctrl" "xenstore" + "xenstore_transport" "mtime" ] url { diff --git a/rrddump.opam b/rrddump.opam index b52fb1cb46b..84464b418d3 100644 --- a/rrddump.opam +++ b/rrddump.opam @@ -8,7 +8,7 @@ authors: "John Else" tags: "org:xapi-project" homepage: "https://github.com/xapi-project/xen-api" bug-reports: "https://github.com/xapi-project/xen-api/issues" -depends: ["rrd-transport" "xapi-rrd" "xmlm"] +depends: ["rrd-transport" "xapi-rrd" "xmlm" "dune" {>= "3.15"}] build: ["dune" "build" "-p" name "-j" jobs] dev-repo: "git+https://github.com/xapi-project/xen-api.git" url { diff --git a/rrddump.opam.template b/rrddump.opam.template index c97c7947e05..1237bb624d5 100644 --- a/rrddump.opam.template +++ b/rrddump.opam.template @@ -6,7 +6,7 @@ authors: "John Else" tags: "org:xapi-project" homepage: "https://github.com/xapi-project/xen-api" bug-reports: "https://github.com/xapi-project/xen-api/issues" -depends: ["rrd-transport" "xapi-rrd" "xmlm"] +depends: ["rrd-transport" "xapi-rrd" "xmlm" "dune" {>= "3.15"}] build: ["dune" "build" "-p" name "-j" jobs] dev-repo: "git+https://github.com/xapi-project/xen-api.git" url { diff --git a/safe-resources.opam b/safe-resources.opam index 18c9270b966..b8f0e5b615b 100644 --- a/safe-resources.opam +++ b/safe-resources.opam @@ -13,7 +13,7 @@ build: [ available: [ os = "linux" | os = "macos" ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "fmt" "logs" "xapi-backtrace" diff --git a/safe-resources.opam.template b/safe-resources.opam.template index b02f53a13fb..ae64f0c2d53 100644 --- a/safe-resources.opam.template +++ b/safe-resources.opam.template @@ -11,7 +11,7 @@ build: [ available: [ os = "linux" | os = "macos" ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "fmt" "logs" "xapi-backtrace" diff --git a/sexpr.opam b/sexpr.opam index aded988a188..daa33dc6619 100644 --- a/sexpr.opam +++ b/sexpr.opam @@ -11,8 +11,10 @@ build: [[ "dune" "build" "-p" name "-j" jobs ]] available: [ os = "linux" | os = "macos" ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} + "alcotest" {with-test} "astring" + "rresult" {with-test} "qcheck-core" {with-test} "xapi-stdext-threads" ] diff --git a/sexpr.opam.template b/sexpr.opam.template index d83e0f2a493..392b2e77c07 100644 --- a/sexpr.opam.template +++ b/sexpr.opam.template @@ -9,8 +9,10 @@ build: [[ "dune" "build" "-p" name "-j" jobs ]] available: [ os = "linux" | os = "macos" ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} + "alcotest" {with-test} "astring" + "rresult" {with-test} "qcheck-core" {with-test} "xapi-stdext-threads" ] diff --git a/stunnel.opam b/stunnel.opam index 3831cdec076..d28894c4d8c 100644 --- a/stunnel.opam +++ b/stunnel.opam @@ -11,7 +11,7 @@ build: [[ "dune" "build" "-p" name "-j" jobs ]] available: [ os = "linux" ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "astring" "forkexec" "safe-resources" diff --git a/stunnel.opam.template b/stunnel.opam.template index 1e96c54c8d8..be9d1ca0764 100644 --- a/stunnel.opam.template +++ b/stunnel.opam.template @@ -9,7 +9,7 @@ build: [[ "dune" "build" "-p" name "-j" jobs ]] available: [ os = "linux" ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "astring" "forkexec" "safe-resources" diff --git a/uuid.opam b/uuid.opam index fa7da3a7317..c13b0c5ecfc 100644 --- a/uuid.opam +++ b/uuid.opam @@ -14,8 +14,9 @@ build: [ available: [ os = "linux" | os = "macos" ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "alcotest" {with-test} + "fmt" {with-test} "uuidm" ] synopsis: "Library required by xapi" diff --git a/uuid.opam.template b/uuid.opam.template index daa9cee8dfe..aacc8f63c2b 100644 --- a/uuid.opam.template +++ b/uuid.opam.template @@ -12,8 +12,9 @@ build: [ available: [ os = "linux" | os = "macos" ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "alcotest" {with-test} + "fmt" {with-test} "uuidm" ] synopsis: "Library required by xapi" diff --git a/varstored-guard.opam b/varstored-guard.opam index 2e794c9309b..d98b387a69b 100644 --- a/varstored-guard.opam +++ b/varstored-guard.opam @@ -9,10 +9,16 @@ bug-reports: "https://github.com/xapi-project/xen-api" build: [["dune" "build" "-p" name "-j" jobs]] run-test: [[ "dune" "runtest" "-p" name "-j" jobs ]] depends: [ + "dune" {>= "3.15"} "cmdliner" + "alcotest" {with-test} "cohttp-lwt" + "fmt" {with-test} + "lwt" {with-test} "message-switch-lwt" + "rpclib" "rpclib-lwt" + "uri" {with-test} "xapi-idl" "xen-api-client-lwt" "alcotest-lwt" {with-test} diff --git a/varstored-guard.opam.template b/varstored-guard.opam.template index d58715bcc50..ea9ccf6aa68 100644 --- a/varstored-guard.opam.template +++ b/varstored-guard.opam.template @@ -7,10 +7,16 @@ bug-reports: "https://github.com/xapi-project/xen-api" build: [["dune" "build" "-p" name "-j" jobs]] run-test: [[ "dune" "runtest" "-p" name "-j" jobs ]] depends: [ + "dune" {>= "3.15"} "cmdliner" + "alcotest" {with-test} "cohttp-lwt" + "fmt" {with-test} + "lwt" {with-test} "message-switch-lwt" + "rpclib" "rpclib-lwt" + "uri" {with-test} "xapi-idl" "xen-api-client-lwt" "alcotest-lwt" {with-test} diff --git a/vhd-format-lwt.opam b/vhd-format-lwt.opam index e89b1cfdc7c..b2140a2d07e 100644 --- a/vhd-format-lwt.opam +++ b/vhd-format-lwt.opam @@ -20,9 +20,13 @@ depends: [ "ocaml" {>= "4.02.3" & < "5.0.0"} "alcotest" {with-test} "alcotest-lwt" {with-test} + "bigarray-compat" "cstruct" {< "6.1.0"} + "cstruct-lwt" + "fmt" {with-test} "lwt" {>= "3.2.0"} "mirage-block" {>= "2.0.1"} + "rresult" "vhd-format" {= version} "io-page" {with-test & >= "2.4.0"} "odoc" {with-doc} diff --git a/vhd-format.opam b/vhd-format.opam index 896d90139a9..59c7d8122a8 100644 --- a/vhd-format.opam +++ b/vhd-format.opam @@ -18,7 +18,9 @@ doc: "https://mirage.github.io/ocaml-vhd/" bug-reports: "https://github.com/mirage/ocaml-vhd/issues" depends: [ "ocaml" {>= "4.03.0"} + "bigarray-compat" "cstruct" {>= "1.9" & < "6.1.0"} + "dune" {>= "3.15"} "io-page" "rresult" {>= "0.3.0"} "uuidm" {>= "0.9.6"} diff --git a/vhd-format.opam.template b/vhd-format.opam.template index 77a5c6ad585..382124b10dd 100644 --- a/vhd-format.opam.template +++ b/vhd-format.opam.template @@ -16,7 +16,9 @@ doc: "https://mirage.github.io/ocaml-vhd/" bug-reports: "https://github.com/mirage/ocaml-vhd/issues" depends: [ "ocaml" {>= "4.03.0"} + "bigarray-compat" "cstruct" {>= "1.9" & < "6.1.0"} + "dune" {>= "3.15"} "io-page" "rresult" {>= "0.3.0"} "uuidm" {>= "0.9.6"} diff --git a/vhd-tool.opam b/vhd-tool.opam index f0135ab7a41..14f0c3c30c3 100644 --- a/vhd-tool.opam +++ b/vhd-tool.opam @@ -10,6 +10,10 @@ bug-reports: "https://github.com/xapi-project/xen-api/issues" depends: [ "dune" {>= "3.15"} "alcotest-lwt" {with-test} + "astring" + "bigarray-compat" + "cmdliner" + "cohttp" "cohttp-lwt" "conf-libssl" "cstruct" {>= "3.0.0"} @@ -17,13 +21,18 @@ depends: [ "forkexec" {= version} "io-page" "lwt" + "lwt_ssl" + "nbd" "nbd-unix" "ppx_cstruct" "ppx_deriving_rpc" "re" + "result" "rpclib" + "ssl" "sha" "tar" + "uri" "vhd-format" {= version} "vhd-format-lwt" {= version} "xapi-idl" {= version} diff --git a/xapi-cli-protocol.opam b/xapi-cli-protocol.opam index ba721dfa943..31150003aa5 100644 --- a/xapi-cli-protocol.opam +++ b/xapi-cli-protocol.opam @@ -12,8 +12,9 @@ build: [ ] depends: [ "ocaml" - "dune" {build & >= "1.4"} + "dune" {>= "3.15"} "base-threads" + "alcotest" {with-test} "xapi-consts" "xapi-datamodel" "xapi-stdext-std" diff --git a/xapi-cli-protocol.opam.template b/xapi-cli-protocol.opam.template index 65ba997bf48..6234f36c294 100644 --- a/xapi-cli-protocol.opam.template +++ b/xapi-cli-protocol.opam.template @@ -10,8 +10,9 @@ build: [ ] depends: [ "ocaml" - "dune" {build & >= "1.4"} + "dune" {>= "3.15"} "base-threads" + "alcotest" {with-test} "xapi-consts" "xapi-datamodel" "xapi-stdext-std" diff --git a/xapi-client.opam b/xapi-client.opam index e440122eba8..9d54de2cf11 100644 --- a/xapi-client.opam +++ b/xapi-client.opam @@ -12,10 +12,11 @@ build: [ ] depends: [ "ocaml" - "dune" {build & >= "1.4"} + "dune" {>= "3.15"} "mtime" "sexpr" "base-threads" + "rpclib" "uuid" "xapi-consts" "xapi-datamodel" diff --git a/xapi-client.opam.template b/xapi-client.opam.template index 090922e0c00..2844dc8a60b 100644 --- a/xapi-client.opam.template +++ b/xapi-client.opam.template @@ -10,10 +10,11 @@ build: [ ] depends: [ "ocaml" - "dune" {build & >= "1.4"} + "dune" {>= "3.15"} "mtime" "sexpr" "base-threads" + "rpclib" "uuid" "xapi-consts" "xapi-datamodel" diff --git a/xapi-compression.opam b/xapi-compression.opam index 5395517c034..a6db319460b 100644 --- a/xapi-compression.opam +++ b/xapi-compression.opam @@ -11,7 +11,7 @@ build: [[ "dune" "build" "-p" name "-j" jobs ]] available: [ os = "linux" ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "forkexec" "safe-resources" "xapi-log" diff --git a/xapi-compression.opam.template b/xapi-compression.opam.template index 6947af885ac..437d84b2e3c 100644 --- a/xapi-compression.opam.template +++ b/xapi-compression.opam.template @@ -9,7 +9,7 @@ build: [[ "dune" "build" "-p" name "-j" jobs ]] available: [ os = "linux" ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "forkexec" "safe-resources" "xapi-log" diff --git a/xapi-consts.opam b/xapi-consts.opam index 506569a982f..2b4726399e5 100644 --- a/xapi-consts.opam +++ b/xapi-consts.opam @@ -12,7 +12,7 @@ build: [ ] depends: [ "ocaml" - "dune" {build & >= "1.4"} + "dune" {>= "3.15"} "dune-build-info" "xapi-inventory" ] diff --git a/xapi-consts.opam.template b/xapi-consts.opam.template index 90271150f6a..4d7ad8652db 100644 --- a/xapi-consts.opam.template +++ b/xapi-consts.opam.template @@ -10,7 +10,7 @@ build: [ ] depends: [ "ocaml" - "dune" {build & >= "1.4"} + "dune" {>= "3.15"} "dune-build-info" "xapi-inventory" ] diff --git a/xapi-datamodel.opam b/xapi-datamodel.opam index d31a2178b78..4bc3b8ab90f 100644 --- a/xapi-datamodel.opam +++ b/xapi-datamodel.opam @@ -12,11 +12,13 @@ build: [ ] depends: [ "ocaml" - "dune" {build & >= "1.4"} + "dune" {>= "3.15"} "mustache" "ppx_deriving_rpc" "rpclib" "base-threads" + "sexplib0" + "xapi-backtrace" "xapi-consts" "xapi-schema" "xapi-stdext-date" diff --git a/xapi-datamodel.opam.template b/xapi-datamodel.opam.template index b3ee146ed81..aa34087cffc 100644 --- a/xapi-datamodel.opam.template +++ b/xapi-datamodel.opam.template @@ -10,11 +10,13 @@ build: [ ] depends: [ "ocaml" - "dune" {build & >= "1.4"} + "dune" {>= "3.15"} "mustache" "ppx_deriving_rpc" "rpclib" "base-threads" + "sexplib0" + "xapi-backtrace" "xapi-consts" "xapi-schema" "xapi-stdext-date" diff --git a/xapi-expiry-alerts.opam b/xapi-expiry-alerts.opam index 178652b00dc..a9dea20e278 100644 --- a/xapi-expiry-alerts.opam +++ b/xapi-expiry-alerts.opam @@ -16,7 +16,7 @@ bug-reports: "https://github.com/xapi-project/xen-api/issues" depends: [ "alcotest" {with-test} "ocaml" - "dune" + "dune" {>= "3.15"} "astring" "xapi-client" "xapi-consts" diff --git a/xapi-expiry-alerts.opam.template b/xapi-expiry-alerts.opam.template index f952588f237..e5f08f213d0 100644 --- a/xapi-expiry-alerts.opam.template +++ b/xapi-expiry-alerts.opam.template @@ -14,7 +14,7 @@ bug-reports: "https://github.com/xapi-project/xen-api/issues" depends: [ "alcotest" {with-test} "ocaml" - "dune" + "dune" {>= "3.15"} "astring" "xapi-client" "xapi-consts" diff --git a/xapi-idl.opam b/xapi-idl.opam index afe181351fd..c1fff027077 100644 --- a/xapi-idl.opam +++ b/xapi-idl.opam @@ -11,7 +11,7 @@ build: [["dune" "build" "-p" name "-j" jobs]] run-test: [[ "dune" "runtest" "-p" name "-j" jobs ]] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "alcotest" {with-test} "fmt" {with-test} "astring" @@ -27,13 +27,19 @@ depends: [ "message-switch-unix" "mtime" "ppx_deriving_rpc" + "ppx_deriving" "ppx_sexp_conv" "re" - "xapi-rrd" + "result" + "rpclib" + "rresult" "sexplib" + "sexplib0" "uri" + "uuidm" "xapi-backtrace" "xapi-open-uri" + "xapi-rrd" "xapi-stdext-date" "xapi-stdext-pervasives" "xapi-stdext-std" diff --git a/xapi-idl.opam.template b/xapi-idl.opam.template index 02a5c85a08f..beea3845af6 100644 --- a/xapi-idl.opam.template +++ b/xapi-idl.opam.template @@ -9,7 +9,7 @@ build: [["dune" "build" "-p" name "-j" jobs]] run-test: [[ "dune" "runtest" "-p" name "-j" jobs ]] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "alcotest" {with-test} "fmt" {with-test} "astring" @@ -25,13 +25,19 @@ depends: [ "message-switch-unix" "mtime" "ppx_deriving_rpc" + "ppx_deriving" "ppx_sexp_conv" "re" - "xapi-rrd" + "result" + "rpclib" + "rresult" "sexplib" + "sexplib0" "uri" + "uuidm" "xapi-backtrace" "xapi-open-uri" + "xapi-rrd" "xapi-stdext-date" "xapi-stdext-pervasives" "xapi-stdext-std" diff --git a/xapi-inventory.opam b/xapi-inventory.opam index 3783ff02467..c54eaf68746 100644 --- a/xapi-inventory.opam +++ b/xapi-inventory.opam @@ -16,7 +16,7 @@ build: [ depends: [ "ocaml" "ocamlfind" {build} - "dune" {build} + "dune" {>= "3.15"} "base-threads" "astring" "xapi-stdext-unix" diff --git a/xapi-inventory.opam.template b/xapi-inventory.opam.template index 7d6338dc108..f9504007f19 100644 --- a/xapi-inventory.opam.template +++ b/xapi-inventory.opam.template @@ -14,7 +14,7 @@ build: [ depends: [ "ocaml" "ocamlfind" {build} - "dune" {build} + "dune" {>= "3.15"} "base-threads" "astring" "xapi-stdext-unix" diff --git a/xapi-log.opam b/xapi-log.opam index 416fb3894b4..d83f9bec7c6 100644 --- a/xapi-log.opam +++ b/xapi-log.opam @@ -13,7 +13,12 @@ build: [ available: [ os = "linux" ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} + "astring" + "fmt" + "logs" + "mtime" + "xapi-backtrace" "xapi-stdext-pervasives" ] synopsis: "Library required by xapi" diff --git a/xapi-log.opam.template b/xapi-log.opam.template index 502e26940cf..00b5cce6fd5 100644 --- a/xapi-log.opam.template +++ b/xapi-log.opam.template @@ -11,7 +11,12 @@ build: [ available: [ os = "linux" ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} + "astring" + "fmt" + "logs" + "mtime" + "xapi-backtrace" "xapi-stdext-pervasives" ] synopsis: "Library required by xapi" diff --git a/xapi-nbd.opam b/xapi-nbd.opam index b42a11f00e0..da583e6cbd8 100644 --- a/xapi-nbd.opam +++ b/xapi-nbd.opam @@ -12,11 +12,11 @@ build: [ ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "alcotest" {with-test} "alcotest-lwt" {with-test} "cmdliner" - "lwt" {>= "3.0.0"} + "lwt" {>= "3.0.0" & with-test} "lwt_log" "mirage-block-unix" "nbd-unix" diff --git a/xapi-nbd.opam.template b/xapi-nbd.opam.template index ef77689eecd..8e3b5c0dd40 100644 --- a/xapi-nbd.opam.template +++ b/xapi-nbd.opam.template @@ -10,11 +10,11 @@ build: [ ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "alcotest" {with-test} "alcotest-lwt" {with-test} "cmdliner" - "lwt" {>= "3.0.0"} + "lwt" {>= "3.0.0" & with-test} "lwt_log" "mirage-block-unix" "nbd-unix" diff --git a/xapi-networkd.opam b/xapi-networkd.opam index ef37bd16486..a7df883bc7d 100644 --- a/xapi-networkd.opam +++ b/xapi-networkd.opam @@ -13,10 +13,14 @@ depends: [ "base-threads" "forkexec" {= version} "http-lib" {= version} + "integers" "mtime" "netlink" "re" + "result" + "rresult" "rpclib" + "uri" "xapi-idl" {= version} "xapi-inventory" "xapi-stdext-pervasives" {= version} @@ -25,6 +29,7 @@ depends: [ "xapi-stdext-unix" {= version} "xapi-test-utils" "xen-api-client" {= version} + "yojson" "odoc" {with-doc} ] build: [ diff --git a/xapi-open-uri.opam b/xapi-open-uri.opam index 31da3b42244..bb080d75499 100644 --- a/xapi-open-uri.opam +++ b/xapi-open-uri.opam @@ -14,9 +14,10 @@ available: [ os = "linux" | os = "macos" ] depends: [ "ocaml" "cohttp" - "dune" + "dune" {>= "3.15"} "stunnel" "uri" + "xapi-backtrace" "xapi-stdext-pervasives" ] synopsis: "Library required by xapi" diff --git a/xapi-open-uri.opam.template b/xapi-open-uri.opam.template index 1542395adc5..4e3ec18d413 100644 --- a/xapi-open-uri.opam.template +++ b/xapi-open-uri.opam.template @@ -12,9 +12,10 @@ available: [ os = "linux" | os = "macos" ] depends: [ "ocaml" "cohttp" - "dune" + "dune" {>= "3.15"} "stunnel" "uri" + "xapi-backtrace" "xapi-stdext-pervasives" ] synopsis: "Library required by xapi" diff --git a/xapi-rrd.opam b/xapi-rrd.opam index abc1e4bb28c..3c5613224fb 100644 --- a/xapi-rrd.opam +++ b/xapi-rrd.opam @@ -16,7 +16,7 @@ build: [ ] depends: [ "ocaml" {>= "4.14"} - "dune" {>= "2.0.0"} + "dune" {>= "3.15"} "base-bigarray" "base-unix" "ppx_deriving_rpc" {>= "6.1.0"} diff --git a/xapi-rrd.opam.template b/xapi-rrd.opam.template index 8185db9f7aa..4397c184eb5 100644 --- a/xapi-rrd.opam.template +++ b/xapi-rrd.opam.template @@ -14,7 +14,7 @@ build: [ ] depends: [ "ocaml" {>= "4.14"} - "dune" {>= "2.0.0"} + "dune" {>= "3.15"} "base-bigarray" "base-unix" "ppx_deriving_rpc" {>= "6.1.0"} diff --git a/xapi-rrdd-plugin.opam b/xapi-rrdd-plugin.opam index b01d85a6da5..e102355bf9c 100644 --- a/xapi-rrdd-plugin.opam +++ b/xapi-rrdd-plugin.opam @@ -20,7 +20,7 @@ authors: "xen-api@lists.xen.org" homepage: "https://xapi-project.github.io/" bug-reports: "https://github.com/xapi-project/xen-api/issues" dev-repo: "git+https://github.com/xapi-project/xen-api.git" -depends: ["ocaml" "rrdd-plugin"] +depends: ["ocaml" "rrdd-plugin" "xenstore" "xenstore_transport" "dune" {>= "3.15"}] synopsis: "A plugin library for the xapi performance monitoring daemon" description: """ This library allows one to expose a datasource which can then be diff --git a/xapi-rrdd-plugin.opam.template b/xapi-rrdd-plugin.opam.template index 432db33bc02..0eaa9df6f8f 100644 --- a/xapi-rrdd-plugin.opam.template +++ b/xapi-rrdd-plugin.opam.template @@ -4,7 +4,7 @@ authors: "xen-api@lists.xen.org" homepage: "https://xapi-project.github.io/" bug-reports: "https://github.com/xapi-project/xen-api/issues" dev-repo: "git+https://github.com/xapi-project/xen-api.git" -depends: ["ocaml" "rrdd-plugin"] +depends: ["ocaml" "rrdd-plugin" "xenstore" "xenstore_transport" "dune" {>= "3.15"}] synopsis: "A plugin library for the xapi performance monitoring daemon" description: """ This library allows one to expose a datasource which can then be diff --git a/xapi-rrdd.opam b/xapi-rrdd.opam index 89b2d827a69..62d448f2869 100644 --- a/xapi-rrdd.opam +++ b/xapi-rrdd.opam @@ -13,13 +13,18 @@ depends: [ "ocaml" {>= "4.02.0"} "alcotest" {with-test} "astring" + "cmdliner" + "fmt" {with-test} "gzip" {= version} "http-lib" {= version} "inotify" "io-page" + "ipaddr" "mtime" + "polly" "ppx_deriving_rpc" "rpclib" + "uri" "ezxenstore" {= version} "uuid" {= version} "xapi-backtrace" @@ -28,6 +33,11 @@ depends: [ "xapi-stdext-threads" {= version} "xapi-stdext-unix" {= version} "xapi-tracing" + "xenctrl" + "xenstore" + "xenstore_transport" + "xmlm" + "yojson" "odoc" {with-doc} ] build: [ diff --git a/xapi-schema.opam b/xapi-schema.opam index f4303e871a2..9a3b702fcd0 100644 --- a/xapi-schema.opam +++ b/xapi-schema.opam @@ -12,7 +12,7 @@ build: [ ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "ppx_sexp_conv" "sexpr" "xapi-log" diff --git a/xapi-schema.opam.template b/xapi-schema.opam.template index 60e1dc71ad9..f6b9f276789 100644 --- a/xapi-schema.opam.template +++ b/xapi-schema.opam.template @@ -10,7 +10,7 @@ build: [ ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "ppx_sexp_conv" "sexpr" "xapi-log" diff --git a/xapi-sdk.opam b/xapi-sdk.opam index b09d4c60808..8adccdf2932 100644 --- a/xapi-sdk.opam +++ b/xapi-sdk.opam @@ -10,9 +10,11 @@ depends: [ "dune" {>= "3.15"} "alcotest" {with-test} "astring" + "fmt" {with-test} "mustache" "xapi-datamodel" {= version} "xapi-stdext-unix" {= version & with-test} + "xapi-test-utils" {with-test} "odoc" {with-doc} ] build: [ diff --git a/xapi-squeezed.opam b/xapi-squeezed.opam index 52dd6fdc3dc..7b2de24dd18 100644 --- a/xapi-squeezed.opam +++ b/xapi-squeezed.opam @@ -12,9 +12,10 @@ build: [ ] depends: [ "ocaml" + "alcotest" {with-test} "astring" "cohttp" {>= "0.11.0"} - "dune" + "dune" {>= "3.15"} "re" "rpclib" "uri" diff --git a/xapi-squeezed.opam.template b/xapi-squeezed.opam.template index 84ad0840a82..9641c69858a 100644 --- a/xapi-squeezed.opam.template +++ b/xapi-squeezed.opam.template @@ -9,9 +9,10 @@ build: [ ] depends: [ "ocaml" + "alcotest" {with-test} "astring" "cohttp" {>= "0.11.0"} - "dune" + "dune" {>= "3.15"} "re" "rpclib" "uri" diff --git a/xapi-stdext-threads.opam b/xapi-stdext-threads.opam index eba91836d0f..ae64e906b29 100644 --- a/xapi-stdext-threads.opam +++ b/xapi-stdext-threads.opam @@ -10,6 +10,8 @@ depends: [ "dune" {>= "3.15"} "base-threads" "base-unix" + "alcotest" {with-test} + "fmt" {with-test} "odoc" {with-doc} "xapi-stdext-pervasives" {= version} "mtime" {with-test} diff --git a/xapi-stdext-unix.opam b/xapi-stdext-unix.opam index 4daa2eb9326..41760ac6a8e 100644 --- a/xapi-stdext-unix.opam +++ b/xapi-stdext-unix.opam @@ -10,10 +10,12 @@ depends: [ "dune" {>= "3.15"} "ocaml" {>= "4.12.0"} "alcotest" {with-test} + "astring" "base-unix" "bisect_ppx" {with-test} "fd-send-recv" {>= "2.0.0"} "fmt" + "integers" "mtime" {>= "2.0.0" & with-test} "logs" {with-test} "qcheck-core" {>= "0.21.2" & with-test} diff --git a/xapi-storage-cli.opam b/xapi-storage-cli.opam index 4b9314babe8..c58a06832eb 100644 --- a/xapi-storage-cli.opam +++ b/xapi-storage-cli.opam @@ -11,7 +11,7 @@ dev-repo: "git+https://github.com/xapi-project/xen-api.git" build: [[ "dune" "build" "-p" name "-j" jobs ]] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "base-threads" "re" "rpclib" diff --git a/xapi-storage-cli.opam.template b/xapi-storage-cli.opam.template index b8201d62b34..3ffbe86d8a3 100644 --- a/xapi-storage-cli.opam.template +++ b/xapi-storage-cli.opam.template @@ -9,7 +9,7 @@ dev-repo: "git+https://github.com/xapi-project/xen-api.git" build: [[ "dune" "build" "-p" name "-j" jobs ]] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "base-threads" "re" "rpclib" diff --git a/xapi-storage-script.opam b/xapi-storage-script.opam index 87fce518a89..a8df41ef405 100644 --- a/xapi-storage-script.opam +++ b/xapi-storage-script.opam @@ -12,7 +12,7 @@ tags: [ "org:xapi-project" ] build: [[ "dune" "build" "-p" name "-j" jobs ]] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "conf-python-3" {with-test} "xapi-idl" {>= "0.10.0"} "xapi-storage" diff --git a/xapi-storage-script.opam.template b/xapi-storage-script.opam.template index 01f859d7b36..b40cc0880b5 100644 --- a/xapi-storage-script.opam.template +++ b/xapi-storage-script.opam.template @@ -10,7 +10,7 @@ tags: [ "org:xapi-project" ] build: [[ "dune" "build" "-p" name "-j" jobs ]] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "conf-python-3" {with-test} "xapi-idl" {>= "0.10.0"} "xapi-storage" diff --git a/xapi-storage.opam b/xapi-storage.opam index c6d5ae2a086..f71b424c430 100644 --- a/xapi-storage.opam +++ b/xapi-storage.opam @@ -12,11 +12,13 @@ build: [ ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "conf-python-3" "alcotest" {with-test} "lwt" {with-test} "rpclib" {with-test} + "result" + "rresult" "ppx_deriving_rpc" "rpclib" "xmlm" diff --git a/xapi-storage.opam.template b/xapi-storage.opam.template index 91a35266e5e..779e459a78c 100644 --- a/xapi-storage.opam.template +++ b/xapi-storage.opam.template @@ -10,11 +10,13 @@ build: [ ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "conf-python-3" "alcotest" {with-test} "lwt" {with-test} "rpclib" {with-test} + "result" + "rresult" "ppx_deriving_rpc" "rpclib" "xmlm" diff --git a/xapi-tracing-export.opam b/xapi-tracing-export.opam index fb00c67bc06..e17845a1d0f 100644 --- a/xapi-tracing-export.opam +++ b/xapi-tracing-export.opam @@ -13,8 +13,12 @@ depends: [ "cohttp-posix" "dune" {>= "3.15"} "cohttp" + "ptime" + "result" + "rresult" "rpclib" "ppx_deriving_rpc" + "uri" "xapi-log" {= version} "xapi-open-uri" {= version} "xapi-stdext-threads" {= version} diff --git a/xapi-tracing.opam b/xapi-tracing.opam index a2ae1016cea..b9cac8ba0dd 100644 --- a/xapi-tracing.opam +++ b/xapi-tracing.opam @@ -12,6 +12,7 @@ depends: [ "ocaml" "dune" {>= "3.15"} "alcotest" {with-test} + "fmt" {with-test} "re" "uri" "uuid" {with-test} diff --git a/xapi-types.opam b/xapi-types.opam index 9f69f9d3983..a62e4c8fca3 100644 --- a/xapi-types.opam +++ b/xapi-types.opam @@ -13,7 +13,7 @@ build: [ depends: [ "ocaml" - "dune" {build & >= "1.4"} + "dune" {>= "3.15"} "astring" "ppx_deriving_rpc" "rpclib" diff --git a/xapi-types.opam.template b/xapi-types.opam.template index c3a998e5004..41e667d7fa2 100644 --- a/xapi-types.opam.template +++ b/xapi-types.opam.template @@ -11,7 +11,7 @@ build: [ depends: [ "ocaml" - "dune" {build & >= "1.4"} + "dune" {>= "3.15"} "astring" "ppx_deriving_rpc" "rpclib" diff --git a/xapi-xenopsd-cli.opam b/xapi-xenopsd-cli.opam index ee20d166b3b..dfd3eab41f8 100644 --- a/xapi-xenopsd-cli.opam +++ b/xapi-xenopsd-cli.opam @@ -12,15 +12,20 @@ build: [ ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} + "astring" "base-threads" "cmdliner" + "ppx_deriving_rpc" "re" + "result" "rpclib" "rresult" "uuid" + "uuidm" "xapi-idl" "xenstore_transport" {with-test} + "yojson" ] synopsis: "A simple command-line tool for interacting with xenopsd" description: """ diff --git a/xapi-xenopsd-cli.opam.template b/xapi-xenopsd-cli.opam.template index f5166466189..da363888e1b 100644 --- a/xapi-xenopsd-cli.opam.template +++ b/xapi-xenopsd-cli.opam.template @@ -10,15 +10,20 @@ build: [ ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} + "astring" "base-threads" "cmdliner" + "ppx_deriving_rpc" "re" + "result" "rpclib" "rresult" "uuid" + "uuidm" "xapi-idl" "xenstore_transport" {with-test} + "yojson" ] synopsis: "A simple command-line tool for interacting with xenopsd" description: """ diff --git a/xapi-xenopsd-simulator.opam b/xapi-xenopsd-simulator.opam index 1ad22ebd290..45cffcfc82a 100644 --- a/xapi-xenopsd-simulator.opam +++ b/xapi-xenopsd-simulator.opam @@ -13,7 +13,7 @@ build: [ ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "base-unix" "xapi-xenopsd" ] diff --git a/xapi-xenopsd-simulator.opam.template b/xapi-xenopsd-simulator.opam.template index af6746862bd..b23fb7ea5fa 100644 --- a/xapi-xenopsd-simulator.opam.template +++ b/xapi-xenopsd-simulator.opam.template @@ -11,7 +11,7 @@ build: [ ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "base-unix" "xapi-xenopsd" ] diff --git a/xapi-xenopsd-xc.opam b/xapi-xenopsd-xc.opam index 9a355cd3fb4..53eb84adf96 100644 --- a/xapi-xenopsd-xc.opam +++ b/xapi-xenopsd-xc.opam @@ -14,15 +14,19 @@ build: [ ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "astring" "base-threads" "base-unix" + "base64" + "bos" + "cmdliner" "conf-xen" "ezxenstore" "fd-send-recv" "fmt" "forkexec" + "inotify" "mtime" "polly" "ppx_deriving_rpc" @@ -33,7 +37,10 @@ depends: [ "rpclib" "rresult" "sexplib0" + "uri" "uuid" + "uuidm" + "uutf" "xapi-backtrace" "xapi-idl" "xapi-rrd" @@ -46,6 +53,7 @@ depends: [ "xenctrl" "xenstore" "xenstore_transport" + "xenmmap" ] synopsis: "A xenops plugin which knows how to use xenstore, xenctrl and xenguest to manage" diff --git a/xapi-xenopsd-xc.opam.template b/xapi-xenopsd-xc.opam.template index a0490712875..ef97615d427 100644 --- a/xapi-xenopsd-xc.opam.template +++ b/xapi-xenopsd-xc.opam.template @@ -12,15 +12,19 @@ build: [ ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "astring" "base-threads" "base-unix" + "base64" + "bos" + "cmdliner" "conf-xen" "ezxenstore" "fd-send-recv" "fmt" "forkexec" + "inotify" "mtime" "polly" "ppx_deriving_rpc" @@ -31,7 +35,10 @@ depends: [ "rpclib" "rresult" "sexplib0" + "uri" "uuid" + "uuidm" + "uutf" "xapi-backtrace" "xapi-idl" "xapi-rrd" @@ -44,6 +51,7 @@ depends: [ "xenctrl" "xenstore" "xenstore_transport" + "xenmmap" ] synopsis: "A xenops plugin which knows how to use xenstore, xenctrl and xenguest to manage" diff --git a/xapi-xenopsd.opam b/xapi-xenopsd.opam index c5f5c34474c..f255a13cc30 100644 --- a/xapi-xenopsd.opam +++ b/xapi-xenopsd.opam @@ -14,7 +14,7 @@ build: [ ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "base-threads" "alcotest" {with-test} "astring" @@ -32,6 +32,7 @@ depends: [ "sexplib0" "uri" "uuid" + "uuidm" "uutf" "xapi-backtrace" "xapi-idl" @@ -39,6 +40,7 @@ depends: [ "xapi-stdext-pervasives" "xapi-stdext-threads" "xapi-stdext-unix" + "xapi-test-utils" {with-test} "xapi-tracing" "xapi-tracing-export" "xenstore_transport" {with-test} diff --git a/xapi-xenopsd.opam.template b/xapi-xenopsd.opam.template index 39b101a724e..93961549f71 100644 --- a/xapi-xenopsd.opam.template +++ b/xapi-xenopsd.opam.template @@ -12,7 +12,7 @@ build: [ ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "base-threads" "alcotest" {with-test} "astring" @@ -30,6 +30,7 @@ depends: [ "sexplib0" "uri" "uuid" + "uuidm" "uutf" "xapi-backtrace" "xapi-idl" @@ -37,6 +38,7 @@ depends: [ "xapi-stdext-pervasives" "xapi-stdext-threads" "xapi-stdext-unix" + "xapi-test-utils" {with-test} "xapi-tracing" "xapi-tracing-export" "xenstore_transport" {with-test} diff --git a/xapi.opam b/xapi.opam index 16dcc46d2b4..4179ebc22ed 100644 --- a/xapi.opam +++ b/xapi.opam @@ -12,19 +12,27 @@ depends: [ "dune" {>= "3.15"} "alcotest" "angstrom" + "astring" "base-threads" "base64" + "bos" {with-test} "cdrom" + "cmdliner" + "cohttp" "conf-pam" "crowbar" {with-test} + "cstruct" "ctypes" "ctypes-foreign" "domain-name" "ezxenstore" {= version} - "fmt" {with-test} + "fmt" "hex" "http-lib" {with-test & = version} + "integers" "ipaddr" + "logs" + "magic-mime" "mirage-crypto" "mirage-crypto-pk" "mirage-crypto-rng" {>= "0.11.0"} @@ -33,21 +41,31 @@ depends: [ "opentelemetry-client-ocurl" "pci" "pciutil" {= version} + "polly" "ppx_deriving_rpc" "ppx_sexp_conv" "ppx_deriving" "psq" + "ptime" "qcheck-alcotest" + "qcheck-core" + "re" + "result" "rpclib" "rrdd-plugin" {= version} "rresult" "sexpr" + "sexplib" + "sexplib0" "sha" "stunnel" {= version} "tar" "tar-unix" + "uri" "uuid" {= version} + "uuidm" "x509" + "xapi-backtrace" "xapi-client" {= version} "xapi-cli-protocol" {= version} "xapi-consts" {= version} @@ -66,6 +84,9 @@ depends: [ "xapi-tracing" {= version} "xapi-types" {= version} "xapi-xenopsd" {= version} + "xenctrl" + "xenstore_transport" + "xmlm" "xml-light2" {= version} "yojson" "zstd" {= version} diff --git a/xe.opam b/xe.opam index eb83012f600..0e3953ccd29 100644 --- a/xe.opam +++ b/xe.opam @@ -12,16 +12,20 @@ build: [ ] depends: [ "ocaml" - "dune" {build & >= "1.4"} + "dune" {>= "3.15"} + "astring" + "base-threads" "fpath" "stunnel" - "base-threads" + "uri" + "xapi-backtrace" "xapi-cli-protocol" "xapi-consts" "xapi-datamodel" "xapi-stdext-pervasives" "xapi-stdext-std" "xapi-stdext-unix" + "yojson" ] synopsis: "The xapi toolstack daemon which implements the XenAPI" description: """ diff --git a/xe.opam.template b/xe.opam.template index 8884529da4d..fb95826fa60 100644 --- a/xe.opam.template +++ b/xe.opam.template @@ -10,16 +10,20 @@ build: [ ] depends: [ "ocaml" - "dune" {build & >= "1.4"} + "dune" {>= "3.15"} + "astring" + "base-threads" "fpath" "stunnel" - "base-threads" + "uri" + "xapi-backtrace" "xapi-cli-protocol" "xapi-consts" "xapi-datamodel" "xapi-stdext-pervasives" "xapi-stdext-std" "xapi-stdext-unix" + "yojson" ] synopsis: "The xapi toolstack daemon which implements the XenAPI" description: """ diff --git a/xen-api-client-async.opam b/xen-api-client-async.opam index c53b756b7c8..c283cb6d1e8 100644 --- a/xen-api-client-async.opam +++ b/xen-api-client-async.opam @@ -16,12 +16,16 @@ build: [ ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "async" {>= "v0.9.0"} + "async_kernel" "async_unix" + "base" "base-threads" "cohttp" {>= "0.22.0"} "core" + "core_kernel" + "core_unix" "rpclib" "uri" "xen-api-client" diff --git a/xen-api-client-async.opam.template b/xen-api-client-async.opam.template index 6aa8a312052..8224d441c1d 100644 --- a/xen-api-client-async.opam.template +++ b/xen-api-client-async.opam.template @@ -14,12 +14,16 @@ build: [ ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "async" {>= "v0.9.0"} + "async_kernel" "async_unix" + "base" "base-threads" "cohttp" {>= "0.22.0"} "core" + "core_kernel" + "core_unix" "rpclib" "uri" "xen-api-client" diff --git a/xen-api-client-lwt.opam b/xen-api-client-lwt.opam index 3ac1592eca0..d1c25f04f3a 100644 --- a/xen-api-client-lwt.opam +++ b/xen-api-client-lwt.opam @@ -16,7 +16,9 @@ build: [ ] depends: [ "ocaml" - "dune" {>= "1.4"} + "dune" {>= "3.15"} + "astring" + "bigarray-compat" "cohttp" {>= "0.22.0"} "cohttp-lwt-unix" "cstruct" {>= "1.0.1"} @@ -24,6 +26,7 @@ depends: [ "lwt_ssl" "re" "rpclib" + "ssl" "uri" "xen-api-client" "xmlm" diff --git a/xen-api-client-lwt.opam.template b/xen-api-client-lwt.opam.template index 81633c40c2e..20b7069791c 100644 --- a/xen-api-client-lwt.opam.template +++ b/xen-api-client-lwt.opam.template @@ -14,7 +14,9 @@ build: [ ] depends: [ "ocaml" - "dune" {>= "1.4"} + "dune" {>= "3.15"} + "astring" + "bigarray-compat" "cohttp" {>= "0.22.0"} "cohttp-lwt-unix" "cstruct" {>= "1.0.1"} @@ -22,6 +24,7 @@ depends: [ "lwt_ssl" "re" "rpclib" + "ssl" "uri" "xen-api-client" "xmlm" diff --git a/xml-light2.opam b/xml-light2.opam index da5264648de..5d2cadac09c 100644 --- a/xml-light2.opam +++ b/xml-light2.opam @@ -11,7 +11,7 @@ build: [[ "dune" "build" "-p" name "-j" jobs ]] available: [ os = "linux" ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "xmlm" ] synopsis: "Library required by xapi" diff --git a/xml-light2.opam.template b/xml-light2.opam.template index 1c6db3e0ca1..04fabda6a1a 100644 --- a/xml-light2.opam.template +++ b/xml-light2.opam.template @@ -9,7 +9,7 @@ build: [[ "dune" "build" "-p" name "-j" jobs ]] available: [ os = "linux" ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "xmlm" ] synopsis: "Library required by xapi" diff --git a/zstd.opam b/zstd.opam index 59901c80ee6..7a04554f2a9 100644 --- a/zstd.opam +++ b/zstd.opam @@ -11,7 +11,7 @@ build: [[ "dune" "build" "-p" name "-j" jobs ]] available: [ os = "linux" ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "xapi-compression" ] synopsis: "Library required by xapi" diff --git a/zstd.opam.template b/zstd.opam.template index 8e7be0f3783..7c960776d88 100644 --- a/zstd.opam.template +++ b/zstd.opam.template @@ -9,7 +9,7 @@ build: [[ "dune" "build" "-p" name "-j" jobs ]] available: [ os = "linux" ] depends: [ "ocaml" - "dune" + "dune" {>= "3.15"} "xapi-compression" ] synopsis: "Library required by xapi" From cee8ed67dc3960680b3226168dfab6f5608dd4f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Wed, 4 Sep 2024 18:14:07 +0100 Subject: [PATCH 05/19] CP-51479: [maintenance]: make install.sh more quiet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `set -x` is only needed when debugging the script. Don't flood 'make install' output. Signed-off-by: Edwin Török --- scripts/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install.sh b/scripts/install.sh index bd3afe9a665..4b0dc0f8dd6 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -18,7 +18,7 @@ # @LIBEXECDIR@ # @SCRIPTSDIR@ -set -x +#set -x MODE=${1} NUM_FILES=$(($#-2)) From f465a5550a964f872e32800fb5bbf7651e56b692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Wed, 4 Sep 2024 18:17:44 +0100 Subject: [PATCH 06/19] CP-51479: [maintenance]: running make install twice in a row should succeed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously it failed because the symlink already existed. Signed-off-by: Edwin Török --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7d56b541300..be3cb1a05bf 100644 --- a/Makefile +++ b/Makefile @@ -239,7 +239,7 @@ install: build doc sdk doc-json install -D ./ocaml/xenopsd/scripts/tap $(DESTDIR)/$(XENOPSD_LIBEXECDIR)/tap install -D ./ocaml/xenopsd/scripts/setup-vif-rules $(DESTDIR)/$(XENOPSD_LIBEXECDIR)/setup-vif-rules install -D ./_build/install/default/bin/pvs-proxy-ovs-setup $(DESTDIR)/$(XENOPSD_LIBEXECDIR)/pvs-proxy-ovs-setup - (cd $(DESTDIR)/$(XENOPSD_LIBEXECDIR) && ln -s pvs-proxy-ovs-setup setup-pvs-proxy-rules) + (cd $(DESTDIR)/$(XENOPSD_LIBEXECDIR) && ln -sf pvs-proxy-ovs-setup setup-pvs-proxy-rules) install -D ./ocaml/xenopsd/scripts/common.py $(DESTDIR)/$(XENOPSD_LIBEXECDIR)/common.py install -D ./ocaml/xenopsd/scripts/igmp_query_injector.py $(DESTDIR)/$(XENOPSD_LIBEXECDIR)/igmp_query_injector.py install -D ./ocaml/xenopsd/scripts/qemu-wrapper $(DESTDIR)/$(QEMU_WRAPPER_DIR)/qemu-wrapper From 735338edaed2fac474bc4be80a2ec781e7074952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Fri, 13 Sep 2024 14:59:27 +0100 Subject: [PATCH 07/19] CP-51479: [maintenance]: ocaml/sdk-gen should create directories before writing files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When run inside Dune's sandbox you cannot rely on another rule having created the empty directories for you. Ensure that we create parent directories before we write a new file, otherwise we fail with a `Sys_error` about `No such file or directory`. Signed-off-by: Edwin Török --- ocaml/sdk-gen/common/CommonFunctions.ml | 3 +++ ocaml/sdk-gen/common/dune | 1 + ocaml/sdk-gen/java/dune | 1 + ocaml/sdk-gen/java/main.ml | 4 +++- 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ocaml/sdk-gen/common/CommonFunctions.ml b/ocaml/sdk-gen/common/CommonFunctions.ml index 5f1b5b3a560..e8004e140cf 100644 --- a/ocaml/sdk-gen/common/CommonFunctions.ml +++ b/ocaml/sdk-gen/common/CommonFunctions.ml @@ -32,6 +32,7 @@ let string_of_file filename = ~finally:(fun () -> close_in in_channel) let with_output filename f = + Xapi_stdext_unix.Unixext.mkdir_rec (Filename.dirname filename) 0o755 ; let io = open_out filename in Fun.protect (fun () -> f io) ~finally:(fun () -> close_out io) @@ -264,6 +265,7 @@ and get_published_info_field field cls = and render_template template_file json output_file = let templ = string_of_file template_file |> Mustache.of_string in let rendered = Mustache.render templ json in + Xapi_stdext_unix.Unixext.mkdir_rec (Filename.dirname output_file) 0o755 ; let out_chan = open_out output_file in Fun.protect (fun () -> output_string out_chan rendered) @@ -272,6 +274,7 @@ and render_template template_file json output_file = let render_file (infile, outfile) json templates_dir dest_dir = let input_path = Filename.concat templates_dir infile in let output_path = Filename.concat dest_dir outfile in + Xapi_stdext_unix.Unixext.mkdir_rec (Filename.dirname output_path) 0o755 ; render_template input_path json output_path let json_releases = diff --git a/ocaml/sdk-gen/common/dune b/ocaml/sdk-gen/common/dune index 777d29b16ce..ea0011e71ce 100644 --- a/ocaml/sdk-gen/common/dune +++ b/ocaml/sdk-gen/common/dune @@ -7,6 +7,7 @@ xapi-datamodel mustache xapi-stdext-std + xapi-stdext-unix ) (modules_without_implementation license) ) diff --git a/ocaml/sdk-gen/java/dune b/ocaml/sdk-gen/java/dune index a1daac834b0..e83e9fea097 100644 --- a/ocaml/sdk-gen/java/dune +++ b/ocaml/sdk-gen/java/dune @@ -8,6 +8,7 @@ mustache str xapi-datamodel + xapi-stdext-unix ) ) diff --git a/ocaml/sdk-gen/java/main.ml b/ocaml/sdk-gen/java/main.ml index 58254d3517b..ea70c20673c 100644 --- a/ocaml/sdk-gen/java/main.ml +++ b/ocaml/sdk-gen/java/main.ml @@ -817,5 +817,7 @@ let _ = populate_types types templdir class_dir ; let uncommented_license = string_of_file "LICENSE" in - let class_license = open_out "autogen/xen-api/src/main/resources/LICENSE" in + let filename = "autogen/xen-api/src/main/resources/LICENSE" in + Xapi_stdext_unix.Unixext.mkdir_rec (Filename.dirname filename) 0o755 ; + let class_license = open_out filename in output_string class_license uncommented_license From 5ae36481ca3023a72af7d92b1d734b839a1df9c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Fri, 13 Sep 2024 15:00:50 +0100 Subject: [PATCH 08/19] CP-51479: [maintenance]: add @sdkgen rule for convenience in dune MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also add an 'alias generate' for the csharp/autogen/LICENSE file. All other sdk subdirs have a 'generate' alias in 'autogen', except for 'csharp', and without it 'make sdk' would fail to build due to the missing file. Signed-off-by: Edwin Török --- Makefile | 13 +------------ ocaml/sdk-gen/csharp/autogen/dune | 1 + ocaml/sdk-gen/dune | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index be3cb1a05bf..6c7a7f8cab0 100644 --- a/Makefile +++ b/Makefile @@ -97,18 +97,7 @@ doc: sdk: cp $(SHAREDIR)/sm/XE_SR_ERRORCODES.xml ocaml/sdk-gen/csharp/XE_SR_ERRORCODES.xml - dune build --profile=$(PROFILE) \ - ocaml/sdk-gen/c/gen_c_binding.exe \ - ocaml/sdk-gen/csharp/gen_csharp_binding.exe \ - ocaml/sdk-gen/java/main.exe \ - ocaml/sdk-gen/powershell/gen_powershell_binding.exe \ - ocaml/sdk-gen/go/gen_go_binding.exe - dune build --profile=$(PROFILE) -f\ - @ocaml/sdk-gen/c/generate \ - @ocaml/sdk-gen/csharp/generate \ - @ocaml/sdk-gen/java/generate \ - @ocaml/sdk-gen/powershell/generate \ - @ocaml/sdk-gen/go/generate + dune build --profile=$(PROFILE) -f @sdkgen rm -rf $(XAPISDK) mkdir -p $(XAPISDK)/c mkdir -p $(XAPISDK)/csharp diff --git a/ocaml/sdk-gen/csharp/autogen/dune b/ocaml/sdk-gen/csharp/autogen/dune index 61e1f86a0a4..738e07d974f 100644 --- a/ocaml/sdk-gen/csharp/autogen/dune +++ b/ocaml/sdk-gen/csharp/autogen/dune @@ -1,4 +1,5 @@ (rule + (alias generate) (targets LICENSE) (deps ../../LICENSE diff --git a/ocaml/sdk-gen/dune b/ocaml/sdk-gen/dune index 49140147129..4d10d554e4e 100644 --- a/ocaml/sdk-gen/dune +++ b/ocaml/sdk-gen/dune @@ -1 +1,17 @@ (data_only_dirs component-test) + +(alias + (name sdkgen) + (deps + c/gen_c_binding.exe + csharp/gen_csharp_binding.exe + java/main.exe + powershell/gen_powershell_binding.exe + go/gen_go_binding.exe + (alias_rec c/generate) + (alias_rec csharp/generate) + (alias_rec java/generate) + (alias_rec powershell/generate) + (alias_rec go/generate) + ) +) From 9a89dec2e145f0b9efdab1360e28047c9e413d71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Fri, 13 Sep 2024 16:12:36 +0100 Subject: [PATCH 09/19] CP-51479: [maintenance]: install SDK files using dune rules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoid copying twice, get dune to install the files to the correct destination in one go. Also add a copy of XE_SR_ERRORCODES.xml, by default 'make install' would look for this in /opt/xensource, and writing there requires root. (This can be overriden with `./configure --share`). Since we are using `dune` to install the files now we need the file to always be present. Had to adjust the paths used by the CI. Uses dune directory targets, and the directory must be entirely under the control of these rules. There are some static files in autogen/ though, so move the generated ones to autogen-out, and then use 'cp -r' to copy over the static ones (there is no builtin dune action for the copy, there are individual copy actions, or a copy_files rule, but neither is suitable here) Signed-off-by: Edwin Török --- .github/workflows/generate-and-build-sdks.yml | 14 +- .github/workflows/go-ci/action.yml | 6 +- .github/workflows/sdk-ci/action.yml | 2 +- .gitignore | 3 - Makefile | 32 +- dune | 6 + dune-project | 1 + ocaml/doc/README.md | 6 +- ocaml/sdk-gen/c/dune | 14 +- ocaml/sdk-gen/c/gen_c_binding.ml | 2 +- ocaml/sdk-gen/component-test/README.md | 2 +- ocaml/sdk-gen/csharp/XE_SR_ERRORCODES.xml | 914 ++++++++++++++++++ ocaml/sdk-gen/csharp/autogen/dune | 9 +- ocaml/sdk-gen/csharp/dune | 29 +- ocaml/sdk-gen/csharp/friendly_error_names.ml | 2 +- ocaml/sdk-gen/csharp/gen_csharp_binding.ml | 2 +- ocaml/sdk-gen/dune | 1 + ocaml/sdk-gen/go/dune | 14 +- ocaml/sdk-gen/java/autogen/dune | 1 + ocaml/sdk-gen/java/dune | 13 +- ocaml/sdk-gen/java/main.ml | 6 +- ocaml/sdk-gen/powershell/autogen/dune | 5 + ocaml/sdk-gen/powershell/dune | 18 +- .../powershell/gen_powershell_binding.ml | 2 +- ocaml/sdk-gen/windows-line-endings.sh | 0 25 files changed, 1034 insertions(+), 70 deletions(-) create mode 100644 ocaml/sdk-gen/csharp/XE_SR_ERRORCODES.xml mode change 100644 => 100755 ocaml/sdk-gen/windows-line-endings.sh diff --git a/.github/workflows/generate-and-build-sdks.yml b/.github/workflows/generate-and-build-sdks.yml index 9c263900f77..a439c969b50 100644 --- a/.github/workflows/generate-and-build-sdks.yml +++ b/.github/workflows/generate-and-build-sdks.yml @@ -32,34 +32,34 @@ jobs: with: name: SDK_Source_C path: | - _build/install/default/xapi/sdk/c/* - !_build/install/default/xapi/sdk/c/dune + _build/install/default/share/c/* + !_build/install/default/share/c/dune - name: Store C# SDK source uses: actions/upload-artifact@v4 with: name: SDK_Source_CSharp - path: _build/install/default/xapi/sdk/csharp/* + path: _build/install/default/share/csharp/* - name: Store PowerShell SDK source uses: actions/upload-artifact@v4 with: name: SDK_Source_PowerShell - path: _build/install/default/xapi/sdk/powershell/* + path: _build/install/default/share/powershell/* - name: Store Go SDK Artifacts uses: actions/upload-artifact@v4 with: name: SDK_Artifacts_Go path: | - _build/install/default/xapi/sdk/go/* - !_build/install/default/xapi/sdk/go/dune + _build/install/default/share/go/* + !_build/install/default/share/go/dune - name: Store Java SDK source uses: actions/upload-artifact@v4 with: name: SDK_Source_Java - path: _build/install/default/xapi/sdk/java/* + path: _build/install/default/share/java/* - name: Trim dune cache run: opam exec -- dune cache trim --size=2GiB diff --git a/.github/workflows/go-ci/action.yml b/.github/workflows/go-ci/action.yml index 6dc66224fe0..c1b2df7f1e1 100644 --- a/.github/workflows/go-ci/action.yml +++ b/.github/workflows/go-ci/action.yml @@ -11,12 +11,12 @@ runs: uses: golangci/golangci-lint-action@v4 with: version: v1.57.2 - working-directory: ${{ github.workspace }}/_build/install/default/xapi/sdk/go/src + working-directory: ${{ github.workspace }}/_build/install/default/share/go/src args: --config=${{ github.workspace }}/.golangci.yml - name: Run CI for Go SDK shell: bash run: | cd ./ocaml/sdk-gen/component-test/ - cp -r ${{ github.workspace }}/_build/install/default/xapi/sdk/go/src jsonrpc-client/go/goSDK - bash run-tests.sh \ No newline at end of file + cp -r ${{ github.workspace }}/_build/install/default/share/go/src jsonrpc-client/go/goSDK + bash run-tests.sh diff --git a/.github/workflows/sdk-ci/action.yml b/.github/workflows/sdk-ci/action.yml index f20b59ee8d6..6781b6a8644 100644 --- a/.github/workflows/sdk-ci/action.yml +++ b/.github/workflows/sdk-ci/action.yml @@ -17,4 +17,4 @@ runs: - name: Run CI for Go SDK uses: ./.github/workflows/go-ci - # Run other tests here \ No newline at end of file + # Run other tests here diff --git a/.gitignore b/.gitignore index 27ed892007d..2c90d7261d3 100644 --- a/.gitignore +++ b/.gitignore @@ -21,9 +21,6 @@ python3/examples/XenAPI.egg-info/ python3/examples/build/ python3/examples/dist/ -# ignore file needed for building the SDK -ocaml/sdk-gen/csharp/XE_SR_ERRORCODES.xml - # configure-generated files ocaml/xenopsd/scripts/vif ocaml/xenopsd/scripts/xen-backend.rules diff --git a/Makefile b/Makefile index 6c7a7f8cab0..3dd3947f2eb 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ include config.mk -XAPIDOC=_build/install/default/xapi/doc -XAPISDK=_build/install/default/xapi/sdk +XAPIDOC=_build/install/default/usr/share/xapi/doc +XAPISDK=_build/install/default/usr/share/xapi/sdk JOBS = $(shell getconf _NPROCESSORS_ONLN) PROFILE=release OPTMANDIR ?= $(OPTDIR)/man/man1/ @@ -12,6 +12,8 @@ OPTMANDIR ?= $(OPTDIR)/man/man1/ # this is typically used when we're not building from a git repo build: [ -z "${XAPI_VERSION}" ] || (sed -i '/(version.*)/d' dune-project && echo "(version ${XAPI_VERSION})" >> dune-project) +# if available use external file, otherwise use built-in, this allows building XAPI without being root + ! test -f $(SHAREDIR)/sm/XE_SR_ERRORCODES.xml || cp $(SHAREDIR)/sm/XE_SR_ERRORCODES.xml ocaml/sdk-gen/csharp/XE_SR_ERRORCODES.xml dune build @ocaml/idl/update-dm-lifecycle -j $(JOBS) --profile=$(PROFILE) --auto-promote || dune build @ocaml/idl/update-dm-lifecycle -j $(JOBS) --profile=$(PROFILE) --auto-promote dune build @install -j $(JOBS) --profile=$(PROFILE) dune build @ocaml/xapi-storage/python/xapi/storage/api/v5/python --profile=$(PROFILE) @@ -96,33 +98,17 @@ doc: dune build --profile=$(PROFILE) -f @man sdk: - cp $(SHAREDIR)/sm/XE_SR_ERRORCODES.xml ocaml/sdk-gen/csharp/XE_SR_ERRORCODES.xml - dune build --profile=$(PROFILE) -f @sdkgen - rm -rf $(XAPISDK) - mkdir -p $(XAPISDK)/c - mkdir -p $(XAPISDK)/csharp - mkdir -p $(XAPISDK)/java - mkdir -p $(XAPISDK)/powershell - mkdir -p $(XAPISDK)/python - mkdir -p $(XAPISDK)/go - cp -r _build/default/ocaml/sdk-gen/c/autogen/* $(XAPISDK)/c - cp -r _build/default/ocaml/sdk-gen/csharp/autogen/* $(XAPISDK)/csharp - cp -r _build/default/ocaml/sdk-gen/java/autogen/* $(XAPISDK)/java - cp -r _build/default/ocaml/sdk-gen/powershell/autogen/* $(XAPISDK)/powershell - cp -r _build/default/ocaml/sdk-gen/go/autogen/* $(XAPISDK)/go - cp python3/examples/XenAPI/XenAPI.py $(XAPISDK)/python - sh ocaml/sdk-gen/windows-line-endings.sh $(XAPISDK)/csharp - sh ocaml/sdk-gen/windows-line-endings.sh $(XAPISDK)/powershell + dune build --profile=$(PROFILE) @sdkgen xapi-sdk.install @ocaml/sdk-gen/install .PHONY: sdk-build-c sdk-build-c: sdk - cd _build/install/default/xapi/sdk/c && make clean && make -j $(JOBS) + cd _build/install/default/share/c && make clean && make -j $(JOBS) .PHONY: sdk-build-java sdk-build-java: sdk - cd _build/install/default/xapi/sdk/java && mvn -f xen-api/pom.xml -B clean package install -Drevision=0.0 + cd _build/install/default/share/java && mvn -f xen-api/pom.xml -B clean package install -Drevision=0.0 python: $(MAKE) -C python3/examples build @@ -260,9 +246,7 @@ install: build doc sdk doc-json cp -r $(XAPIDOC)/markdown $(DESTDIR)$(DOCDIR) cp $(XAPIDOC)/*.dot $(XAPIDOC)/doc-convert.sh $(DESTDIR)$(DOCDIR) # sdk - mkdir -p $(DESTDIR)$(SDKDIR) - cp -r $(XAPISDK)/* $(DESTDIR)$(SDKDIR) - find $(DESTDIR)$(SDKDIR) -type f -exec chmod 644 {} \; + dune install --destdir=$(DESTDIR) --datadir=$(SDKDIR) xapi-sdk find $(DESTDIR) -name '*.cmxs' -delete uninstall: diff --git a/dune b/dune index 2a094a073a9..ac7f4810205 100644 --- a/dune +++ b/dune @@ -17,3 +17,9 @@ ; Can still be used for dependencies, but dune won't scan these dirs ; for dune files (data_only_dirs doc scripts python3 .vscode) + +(install + (package xapi-sdk) + (section share_root) + (files (python3/examples/XenAPI/XenAPI.py as python/XenAPI.py)) +) diff --git a/dune-project b/dune-project index fa6e37a749b..fc627bc550d 100644 --- a/dune-project +++ b/dune-project @@ -2,6 +2,7 @@ (formatting (enabled_for ocaml)) (using menhir 2.0) +(using directory-targets 0.1) (cram enable) (implicit_transitive_deps false) diff --git a/ocaml/doc/README.md b/ocaml/doc/README.md index b30f65d6a2b..ec8cda0dcc9 100644 --- a/ocaml/doc/README.md +++ b/ocaml/doc/README.md @@ -1,11 +1,11 @@ # A note on generating locally the API reference Run `make doc` in the repo root. This will output the API reference in html and -markdown formats in `_build/install/default/xapi/doc`. +markdown formats in `_build/install/default/usr/share/xapi/doc`. Both html and markdown reference images which need to be generated as a separate step from the `.dot` files. This requires `graphviz` to be installed. To generate the images, run `sh doc-convert.sh` in -`_build/install/default/xapi/doc`. Now you can view the API reference by opening -`_build/install/default/xapi/doc/html/index.html` in your browser. +`_build/install/default/usr/share/xapi/doc`. Now you can view the API reference by opening +`_build/install/default/usr/share/xapi/doc/html/index.html` in your browser. diff --git a/ocaml/sdk-gen/c/dune b/ocaml/sdk-gen/c/dune index ca7f44dee18..adbea6905fa 100644 --- a/ocaml/sdk-gen/c/dune +++ b/ocaml/sdk-gen/c/dune @@ -12,11 +12,23 @@ (rule (alias generate) + (package xapi-sdk) + (targets (dir autogen-out)) (deps (:x gen_c_binding.exe) (source_tree templates) + (source_tree autogen) ) - (action (run %{x})) + (action (concurrent + (bash "cp -r autogen/ autogen-out/") + (run %{x}) + )) ) (data_only_dirs templates) + +(install + (package xapi-sdk) + (section share_root) + (dirs (autogen-out as c)) +) diff --git a/ocaml/sdk-gen/c/gen_c_binding.ml b/ocaml/sdk-gen/c/gen_c_binding.ml index 757046ac336..6c9be258967 100644 --- a/ocaml/sdk-gen/c/gen_c_binding.ml +++ b/ocaml/sdk-gen/c/gen_c_binding.ml @@ -16,7 +16,7 @@ module TypeSet = Set.Make (struct let compare = compare end) -let destdir = "autogen" +let destdir = "autogen-out" let templates_dir = "templates" diff --git a/ocaml/sdk-gen/component-test/README.md b/ocaml/sdk-gen/component-test/README.md index 8e68e3e8a6a..3aa563bc60b 100644 --- a/ocaml/sdk-gen/component-test/README.md +++ b/ocaml/sdk-gen/component-test/README.md @@ -51,7 +51,7 @@ jsonrpc-client is a client that imports the SDK and runs the functions, followin 5. To support the SDK component test, it recommended to move the SDK generated to a sub directory as a local module for import purposes, eg: ``` -cp -r ${{ github.workspace }}/_build/install/default/xapi/sdk/go/src jsonrpc-client/go/goSDK +cp -r ${{ github.workspace }}/_build/install/default/share/go/src jsonrpc-client/go/goSDK ``` then, import the local module. ``` diff --git a/ocaml/sdk-gen/csharp/XE_SR_ERRORCODES.xml b/ocaml/sdk-gen/csharp/XE_SR_ERRORCODES.xml new file mode 100644 index 00000000000..725d14feb78 --- /dev/null +++ b/ocaml/sdk-gen/csharp/XE_SR_ERRORCODES.xml @@ -0,0 +1,914 @@ + + + + + + SRInUse + The SR device is currently in use + 16 + + + VDIInUse + The VDI is currently in use + 24 + + + LockErr + The lock/unlock request failed + 37 + + + Unimplemented + The requested method is not supported/implemented + 38 + + + SRNotEmpty + The SR is not empty + 39 + + + + ConfigLUNMissing + The request is missing the LUNid parameter + 87 + + + ConfigSCSIid + The SCSIid parameter is missing or incorrect + 107 + + + + + ISODconfMissingLocation + 'Location' parameter must be specified in Device Configuration + 220 + + + ISOMustHaveISOExtension + ISO name must have .iso extension + 221 + + + ISOMountFailure + Could not mount the directory specified in Device Configuration + 222 + + + ISOUnmountFailure + Could not unmount the directory specified in Device Configuration + 223 + + + ISOSharenameFailure + Could not locate the ISO sharename on the target, or the access permissions may be incorrect. + 224 + + + ISOLocationStringError + Incorrect Location string format. String must be in the format SERVER:PATH for NFS targets, or \\SERVER\PATH for CIFS targets + 225 + + + ISOLocalPath + Invalid local path + 226 + + + ISOInvalidSMBversion + Given SMB version is not allowed. Choose either 1.0 or 3.0 + 227 + + + ISOInvalidXeMountOptions + Require "-o" along with xe-mount-iso-sr + 228 + + + + + InvalidArg + Invalid argument + 1 + + + BadCharacter + A bad character was detected in the dconf string + 2 + + + InvalidDev + No such device + 19 + + + InvalidSecret + No such secret. + 20 + + + + + SRScan + The SR scan failed + 40 + + + SRLog + The SR log operation failed + 41 + + + SRExists + The SR already exists + 42 + + + VDIExists + The VDI already exists + 43 + + + SRNoSpace + There is insufficient space + 44 + + + + VDIUnavailable + The VDI is not available + 46 + + + SRUnavailable + The SR is not available + 47 + + + SRUnknownType + Unknown repository type + 48 + + + SRBadXML + Malformed XML string + 49 + + + LVMCreate + Logical Volume creation error + 50 + + + LVMDelete + Logical Volume deletion error + 51 + + + LVMMount + Logical Volume mount/activate error + 52 + + + LVMUnMount + Logical Volume unmount/deactivate error + 53 + + + LVMWrite + Logical Volume write error + 54 + + + LVMPartCreate + Logical Volume partition creation error + 55 + + + LVMPartInUse + Logical Volume partition in use + 56 + + + LVMFilesystem + Logical Volume filesystem creation error + 57 + + + LVMMaster + Logical Volume request must come from master + 58 + + + LVMResize + Logical Volume resize failed + 59 + + + LVMSize + Logical Volume invalid size + 60 + + + FileSRCreate + File SR creation error + 61 + + + FileSRRmDir + File SR failed to remove directory + 62 + + + FileSRDelete + File SR deletion error + 63 + + + VDIRemove + Failed to remove VDI + 64 + + + VDILoad + Failed to load VDI + 65 + + + VDIType + Invalid VDI type + 66 + + + ISCSIDevice + ISCSI device failed to appear + 67 + + + ISCSILogin + ISCSI login failed - check access settings for the initiator on the storage, if CHAP is used verify CHAP credentials + 68 + + + ISCSILogout + ISCSI logout failed + 69 + + + ISCSIInitiator + Failed to set ISCSI initiator + 70 + + + ISCSIDaemon + Failed to start ISCSI daemon + 71 + + + NFSVersion + Required NFS server version unsupported + 72 + + + NFSMount + NFS mount error + 73 + + + NFSUnMount + NFS unmount error + 74 + + + NFSAttached + NFS mount point already attached + 75 + + + NFSDelete + Failed to remove NFS mount point + 76 + + + NFSTarget + Unable to detect an NFS service on this target. + 108 + + + LVMGroupCreate + Logical Volume group creation failed + 77 + + + VDICreate + VDI Creation failed + 78 + + + VDISize + VDI Invalid size + 79 + + + VDIDelete + Failed to mark VDI hidden + 80 + + + VDIClone + Failed to clone VDI + 81 + + + VDISnapshot + Failed to snapshot VDI + 82 + + + ISCSIDiscovery + ISCSI discovery failed + 83 + + + ISCSIIQN + ISCSI target and received IQNs differ + 84 + + + ISCSIDetach + ISCSI detach failed + 85 + + + ISCSIQueryDaemon + Failed to query the iscsi daemon + 86 + + + + NFSCreate + NFS SR creation error + 88 + + + ConfigLUNIDMissing + The request is missing the LUNid parameter + 89 + + + ConfigDeviceMissing + The request is missing the device parameter + 90 + + + ConfigDeviceInvalid + The device is not a valid path + 91 + + + VolNotFound + The volume cannot be found + 92 + + + PVSfailed + pvs failed + 93 + + + ConfigLocationMissing + The request is missing the location parameter + 94 + + + ConfigTargetMissing + The request is missing the target parameter + 95 + + + ConfigTargetIQNMissing + The request is missing or has an incorrect target IQN parameter + 96 + + + ConfigISCSIIQNMissing + Unable to retrieve the host configuration ISCSI IQN parameter + 97 + + + ConfigLUNSerialMissing + The request is missing the LUN serial number + 98 + + + LVMOneLUN + Only 1 LUN may be used with shared LVM + 99 + + + LVMNoVolume + Cannot find volume + 100 + + + ConfigServerPathMissing + The request is missing the serverpath parameter + 101 + + + ConfigServerMissing + The request is missing the server parameter + 102 + + + ConfigServerPathBad + The serverpath argument is not valid + 103 + + + LVMRefCount + Unable to open the refcount file + 104 + + + Rootdev + Root system device, cannot be used for VM storage + 105 + + + NoRootDev + Root system device not found + 118 + + + InvalidIQN + The IQN provided is an invalid format + 106 + + + SnapshotChainTooLong + The snapshot chain is too long + 109 + + + VDIResize + VDI resize failed + 110 + + + SMBMount + SMB mount error + 111 + + + SMBUnMount + SMB unmount error + 112 + + + SMBAttached + SMB mount point already attached + 113 + + + SMBDelete + Failed to remove SMB mount point + 114 + + + ConfigParamsMissing + Not all required parameters specified. + 115 + + + SMBCreate + Failed to create SMB SR. + 116 + + + + + LVMRead + Logical Volume read error + 117 + + + + + APISession + Failed to initialize XMLRPC connection + 150 + + + APILocalhost + Failed to query Local Control Domain + 151 + + + APIPBDQuery + A Failure occurred querying the PBD entries + 152 + + + APIFailure + A Failure occurred accessing an API object + 153 + + + + + NAPPTarget + Netapp Target parameter missing in Dconf string + 120 + + + NAPPUsername + Netapp Username parameter missing in Dconf string + 121 + + + NAPPPassword + Netapp Password parameter missing in Dconf string + 122 + + + NAPPAggregate + Netapp Aggregate parameter missing in Dconf string + 123 + + + NAPPTargetFailed + Failed to connect to Netapp target + 124 + + + NAPPAuthFailed + Authentication credentials incorrect + 125 + + + NAPPInsufficientPriv + Auth credentials have insufficient access privileges + 126 + + + NAPPFVolNum + Max number of flexvols reached on target. Unable to allocate requested resource. + 127 + + + NAPPSnapLimit + Max number of Snapshots reached on target Volume. Unable to create snapshot. + 128 + + + NAPPSnapNoMem + Insufficient space, unable to create snapshot. + 129 + + + NAPPUnsupportedVersion + Netapp Target version unsupported + 130 + + + NAPPTargetIQN + Unable to retrieve target IQN + 131 + + + NAPPNoISCSIService + ISCSI service not running on the Netapp target. + 132 + + + NAPPAsisLicense + Failed to enable A-SIS for the SR. Requires valid license on the filer. + 133 + + + NAPPAsisError + The filer will not support A-SIS on this aggregate. The license is valid however on some filers A-SIS is limited to smaller aggregates, e.g. FAS3020 max supported aggregate is 1TB. See filer support documentation for details on your model. You must either disable A-SIS support, or re-configure your aggregate to the max supported size. + 134 + + + NAPPExclActivate + Failed to acquire an exclusive lock on the LUN. + 135 + + + DNSError + Incorrect DNS name, unable to resolve. + 140 + + + ISCSITarget + Unable to connect to ISCSI service on target + 141 + + + ISCSIPort + Incorrect value for iSCSI port, must be a number between 1 and 65535 + 142 + + + + BadRequest + Failed to parse the request + 143 + + + VDIMissing + VDI could not be found + 144 + + + + EQLTarget + Equallogic Target parameter missing in Dconf string + 160 + + + EQLUsername + Equallogic Username parameter missing in Dconf string + 161 + + + EQLPassword + Equallogic Password parameter missing in Dconf string + 162 + + + EQLStoragePool + Equallogic StoragePool parameter missing in Dconf string + 163 + + + EQLConnectfail + Failed to connect to Equallogic Array; maximum SSH CLI sessions reached + 164 + + + EQLInvalidSnapReserve + Invalid snap-reserver-percentage value, must be an integer indicating the amount of space, as a percentage of the VDI size, to reserve for snapshots. + 165 + + + EQLInvalidSnapDepletionKey + Invalid snap-depletion value, must be one of 'delete-oldest' or 'volume-offline' + 166 + + + EQLVolOutofSpace + Volume out of space, probably due to insufficient snapshot reserve allocation. + 167 + + + EQLSnapshotOfSnapshot + Cannot create Snapshot of a Snapshot VDI, operation unsupported + 168 + + + EQLPermDenied + Failed to connect to Equallogic Array, Permission denied;username/password invalid + 169 + + + EQLUnsupportedVersion + Equallogic Target version unsupported + 170 + + + EQLTargetPort + Unable to logon to Array. Check IP settings. + 171 + + + EQLInvalidStoragePool + Equallogic StoragePool parameter specified in Dconf string is Invalid + 172 + + + EQLInvalidTargetIP + Equallogic Target parameter specified in Dconf string is Invalid, please specify the correct Group IPaddress + 173 + + + EQLInvalidSNMPResp + Invalid SNMP response received for a CLI command + 174 + + + EQLInvalidVolMetaData + Volume metadata stored in the 'Description' field is invalid, this field contains encoded data and is not user editable + 175 + + + EQLInvalidEOFRecv + Invalid EOF response received for a CLI command + 176 + + + LVMProvisionAttach + Volume Group out of space. The SR is over-provisioned, and out of space. Unable to grow the underlying volume to accommodate the virtual size of the disk. + 180 + + + MetadataError + Error in Metadata volume operation for SR. + 181 + + + ISCSIDelete + ISCSI delete failed + 182 + + + + EIO + General IO error + 200 + + + EGAIN + Currently unavailable, try again + 201 + + + SMGeneral + General backend error + 202 + + + FistPoint + An active FIST point was reached that causes the process to exit abnormally + 203 + + + LeafGCSkip + Gave up on leaf coalesce after leaf grew bigger than before snapshot taken + 204 + + + VBDListNotStable + LVHDRT: found a non-stable VBD + 205 + + + + XMLParse + Unable to parse XML + 413 + + + MultipathdCommsFailure + Failed to communicate with the multipath daemon + 430 + + + MultipathGenericFailure + Multipath generic failure + 431 + + + MultipathMapperPathMissing + Device Mapper path missing + 432 + + + + MultipathDeviceNotAppeared + Device Mapper path not appeared yet + 433 + + + MultipathDeviceNoScsiid + Device Mapper path no SCSI ID supplied + 434 + + + TapdiskAlreadyRunning + The tapdisk is already running + 445 + + + + CIFSExtendedCharsNotSupported + XenServer does not support extended characters in CIFS paths, usernames, passwords, and file names. + 446 + + + + IllegalXMLChar + Illegal XML character. + 447 + + + + UnsupportedKernel + Unsupported kernel: neither 2.6 nor 3.x. + 448 + + + OCFSOneLUN + Only 1 LUN may be used with shared OCFS + 449 + + + OCFSMount + OCFS mount error + 450 + + + OCFSUnMount + OCFS unmount error + 451 + + + OCFSFilesystem + OCFS filesystem creation error + 452 + + + + TapdiskFailed + tapdisk experienced an error + 453 + + + + NoSMBLicense + SMB SR is not licensed on this host + 454 + + + + VGReg + VG Registration failure + 455 + + + + TapdiskDriveEmpty + Unable to attach empty optical drive to VM. + 456 + + + + CBTActivateFailed + Unable to activate changed block tracking. + 457 + + + + CBTDeactivateFailed + Unable to deactivate changed block tracking. + 458 + + + + CBTMetadataInconsistent + Changed block tracking log is in an inconsistent state. + 459 + + + + CBTChangedBlocksError + Failed to calculate changed blocks for given VDIs. + 460 + + + + SharedFileSystemNoWrite + The file system for SR cannot be written to. + 461 + + + + GenericException + SM has thrown a generic python exception + 1200 + + + + diff --git a/ocaml/sdk-gen/csharp/autogen/dune b/ocaml/sdk-gen/csharp/autogen/dune index 738e07d974f..2a9744e4ae6 100644 --- a/ocaml/sdk-gen/csharp/autogen/dune +++ b/ocaml/sdk-gen/csharp/autogen/dune @@ -7,12 +7,5 @@ (action (copy %{deps} %{targets})) ) -(alias - (name generate) - (deps - LICENSE - (source_tree .) - ) -) - (data_only_dirs src) + diff --git a/ocaml/sdk-gen/csharp/dune b/ocaml/sdk-gen/csharp/dune index df6856bfc22..07e2fd42950 100644 --- a/ocaml/sdk-gen/csharp/dune +++ b/ocaml/sdk-gen/csharp/dune @@ -28,22 +28,33 @@ (rule (alias generate) + (targets (dir autogen-out)) (deps (:x gen_csharp_binding.exe) (source_tree templates) - ) - (action (run %{x})) -) - -(rule - (alias generate) - (deps - (:x friendly_error_names.exe) + (:sh ../windows-line-endings.sh) + (source_tree autogen) + (:x2 friendly_error_names.exe) FriendlyErrorNames.resx (:y XE_SR_ERRORCODES.xml) (source_tree templates) ) - (action (run %{x} -s %{y})) + (action + (progn + (concurrent + (bash "cp -r autogen/ autogen-out/") + (run %{x}) + (run %{x2} -s %{y}) + ) + (bash "rm autogen-out/.gitignore") + (bash "%{sh} autogen-out/") + )) ) (data_only_dirs templates) + +(install + (package xapi-sdk) + (section share_root) + (dirs (autogen-out as csharp)) +) diff --git a/ocaml/sdk-gen/csharp/friendly_error_names.ml b/ocaml/sdk-gen/csharp/friendly_error_names.ml index 2cb6a3f9de9..74e4a80995d 100644 --- a/ocaml/sdk-gen/csharp/friendly_error_names.ml +++ b/ocaml/sdk-gen/csharp/friendly_error_names.ml @@ -20,7 +20,7 @@ let _ = let sr_xml = !sr_xml' -let destdir = "autogen/src" +let destdir = "autogen-out/src" let templdir = "templates" diff --git a/ocaml/sdk-gen/csharp/gen_csharp_binding.ml b/ocaml/sdk-gen/csharp/gen_csharp_binding.ml index edaa3a7c7f9..aa65b99b4c3 100644 --- a/ocaml/sdk-gen/csharp/gen_csharp_binding.ml +++ b/ocaml/sdk-gen/csharp/gen_csharp_binding.ml @@ -25,7 +25,7 @@ let get_deprecated_attribute message = | Some versionString -> "[Deprecated(\"" ^ get_release_branding versionString ^ "\")]" -let destdir = "autogen/src" +let destdir = "autogen-out/src" let templdir = "templates" diff --git a/ocaml/sdk-gen/dune b/ocaml/sdk-gen/dune index 4d10d554e4e..76bdaaab2ca 100644 --- a/ocaml/sdk-gen/dune +++ b/ocaml/sdk-gen/dune @@ -2,6 +2,7 @@ (alias (name sdkgen) + (package xapi-sdk) (deps c/gen_c_binding.exe csharp/gen_csharp_binding.exe diff --git a/ocaml/sdk-gen/go/dune b/ocaml/sdk-gen/go/dune index de55ec5cee8..a126ee856bd 100644 --- a/ocaml/sdk-gen/go/dune +++ b/ocaml/sdk-gen/go/dune @@ -27,11 +27,18 @@ (rule (alias generate) + (targets (dir autogen-out)) (deps (:x gen_go_binding.exe) (source_tree templates) + (source_tree autogen) + ) + (action + (concurrent + (bash "cp -r autogen/ autogen-out/") + (run %{x} --destdir autogen-out) + ) ) - (action (run %{x} --destdir autogen)) ) (test @@ -46,3 +53,8 @@ ) (data_only_dirs test_data templates) +(install + (package xapi-sdk) + (section share_root) + (dirs (autogen-out as go)) +) diff --git a/ocaml/sdk-gen/java/autogen/dune b/ocaml/sdk-gen/java/autogen/dune index 0d4efe16d03..da324f0b9d0 100644 --- a/ocaml/sdk-gen/java/autogen/dune +++ b/ocaml/sdk-gen/java/autogen/dune @@ -6,3 +6,4 @@ ) (data_only_dirs xen-api) + diff --git a/ocaml/sdk-gen/java/dune b/ocaml/sdk-gen/java/dune index e83e9fea097..07167296b84 100644 --- a/ocaml/sdk-gen/java/dune +++ b/ocaml/sdk-gen/java/dune @@ -22,12 +22,23 @@ (rule (alias generate) + (targets (dir autogen-out)) (deps LICENSE (:x main.exe) (source_tree templates) + (source_tree autogen) ) - (action (run %{x})) + (action (concurrent + (bash "cp -r autogen/ autogen-out/") + (run %{x}) + )) ) (data_only_dirs templates) + +(install + (package xapi-sdk) + (section share_root) + (dirs (autogen-out as java)) +) diff --git a/ocaml/sdk-gen/java/main.ml b/ocaml/sdk-gen/java/main.ml index ea70c20673c..b025e434964 100644 --- a/ocaml/sdk-gen/java/main.ml +++ b/ocaml/sdk-gen/java/main.ml @@ -292,7 +292,7 @@ let generate_snapshot_hack = ) ) ^ {| - default: + default: throw new RuntimeException("Internal error in auto-generated code whilst unmarshalling event snapshot"); } record.snapshot = b;|} @@ -811,13 +811,13 @@ let populate_class cls templdir class_dir = let _ = let templdir = "templates" in - let class_dir = "autogen/xen-api/src/main/java/com/xensource/xenapi" in + let class_dir = "autogen-out/xen-api/src/main/java/com/xensource/xenapi" in populate_releases templdir class_dir ; List.iter (fun cls -> populate_class cls templdir class_dir) classes ; populate_types types templdir class_dir ; let uncommented_license = string_of_file "LICENSE" in - let filename = "autogen/xen-api/src/main/resources/LICENSE" in + let filename = "autogen-out/xen-api/src/main/resources/LICENSE" in Xapi_stdext_unix.Unixext.mkdir_rec (Filename.dirname filename) 0o755 ; let class_license = open_out filename in output_string class_license uncommented_license diff --git a/ocaml/sdk-gen/powershell/autogen/dune b/ocaml/sdk-gen/powershell/autogen/dune index 61e1f86a0a4..c4c2a5f8633 100644 --- a/ocaml/sdk-gen/powershell/autogen/dune +++ b/ocaml/sdk-gen/powershell/autogen/dune @@ -15,3 +15,8 @@ ) (data_only_dirs src) +(install + (package xapi-sdk) + (section doc) + (files (glob_files_rec (autogen/* with_prefix powershell))) +) diff --git a/ocaml/sdk-gen/powershell/dune b/ocaml/sdk-gen/powershell/dune index 826885af543..7eb4d3e56d6 100644 --- a/ocaml/sdk-gen/powershell/dune +++ b/ocaml/sdk-gen/powershell/dune @@ -12,11 +12,27 @@ (rule (alias generate) + (targets (dir autogen-out)) (deps (:x gen_powershell_binding.exe) (source_tree templates) + (:sh ../windows-line-endings.sh) + (source_tree autogen) ) - (action (run %{x})) + (action + (progn + (concurrent + (bash "cp -r autogen/ autogen-out/") + (run %{x}) + ) + (bash "rm autogen-out/.gitignore") + (bash "%{sh} autogen-out/") + )) ) (data_only_dirs templates) +(install + (package xapi-sdk) + (section share_root) + (dirs (autogen-out as powershell)) +) diff --git a/ocaml/sdk-gen/powershell/gen_powershell_binding.ml b/ocaml/sdk-gen/powershell/gen_powershell_binding.ml index 7fe02d07003..f7184672397 100644 --- a/ocaml/sdk-gen/powershell/gen_powershell_binding.ml +++ b/ocaml/sdk-gen/powershell/gen_powershell_binding.ml @@ -17,7 +17,7 @@ module TypeSet = Set.Make (struct let compare = compare end) -let destdir = "autogen/src" +let destdir = "autogen-out/src" let templdir = "templates" diff --git a/ocaml/sdk-gen/windows-line-endings.sh b/ocaml/sdk-gen/windows-line-endings.sh old mode 100644 new mode 100755 From 2c9253dfd40c1751fa0cf8d2f70c7154f987d80b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Sat, 14 Sep 2024 10:12:57 +0100 Subject: [PATCH 10/19] CP-51479: [maintenance]: make xapi-xenopsd, and rrd-plugins.lib internal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To avoid the .spec build complaining about newly installed files. These aren't used outside of XAPI anyway. Remove test on xenopsd.cmxs, which is no longer built (there is still a test on the simulator and main XAPI). Signed-off-by: Edwin Török --- dune-project | 7 +-- ocaml/tests/dune | 2 +- ocaml/xapi/dune | 2 +- ocaml/xcp-rrdd/bin/read-blktap-stats/dune | 2 +- ocaml/xcp-rrdd/bin/rrdd/dune | 4 +- ocaml/xcp-rrdd/bin/rrdp-dcmi/dune | 2 +- ocaml/xcp-rrdd/bin/rrdp-iostat/dune | 2 +- ocaml/xcp-rrdd/bin/rrdp-squeezed/dune | 2 +- ocaml/xcp-rrdd/bin/rrdp-xenpm/dune | 2 +- ocaml/xcp-rrdd/lib/blktap/lib/dune | 1 - ocaml/xcp-rrdd/lib/rrdd/dune | 1 - ocaml/xenopsd/c_stubs/dune | 6 +-- ocaml/xenopsd/dbgring/dune | 2 +- ocaml/xenopsd/lib/dune | 5 +- ocaml/xenopsd/simulator/dune | 2 +- ocaml/xenopsd/suspend_image_viewer/dune | 2 +- ocaml/xenopsd/test/dune | 13 +---- ocaml/xenopsd/xc/dune | 12 ++--- xapi-xenopsd-simulator.opam | 18 ++++++- xapi-xenopsd-simulator.opam.template | 18 ++++++- xapi-xenopsd-xc.opam | 6 ++- xapi-xenopsd-xc.opam.template | 6 ++- xapi-xenopsd.opam | 58 ----------------------- xapi-xenopsd.opam.template | 56 ---------------------- xapi.opam | 3 +- 25 files changed, 72 insertions(+), 162 deletions(-) delete mode 100644 xapi-xenopsd.opam delete mode 100644 xapi-xenopsd.opam.template diff --git a/dune-project b/dune-project index fc627bc550d..45875bb4565 100644 --- a/dune-project +++ b/dune-project @@ -105,10 +105,6 @@ (name xapi-xenopsd-cli) ) -(package - (name xapi-xenopsd) -) - (package (name xapi-types) ) @@ -348,6 +344,7 @@ domain-name (ezxenstore (= :version)) fmt + fd-send-recv hex (http-lib (and :with-test (= :version))) ; the public library is only used for testing integers @@ -384,6 +381,7 @@ tar-unix uri (uuid (= :version)) + uutf uuidm x509 xapi-backtrace @@ -404,7 +402,6 @@ (xapi-test-utils :with-test) (xapi-tracing (= :version)) (xapi-types (= :version)) - (xapi-xenopsd (= :version)) xenctrl ; for quicktest xenstore_transport xmlm diff --git a/ocaml/tests/dune b/ocaml/tests/dune index 9a08b1ea6d2..818d9288e70 100644 --- a/ocaml/tests/dune +++ b/ocaml/tests/dune @@ -50,7 +50,7 @@ xapi-tracing xapi-types xapi-stdext-pervasives - xapi-xenopsd + xapi_xenopsd xml-light2 ) (deps diff --git a/ocaml/xapi/dune b/ocaml/xapi/dune index e83dc8cd784..acf3cb5ae66 100644 --- a/ocaml/xapi/dune +++ b/ocaml/xapi/dune @@ -198,7 +198,7 @@ xapi-tracing xapi-tracing-export xapi_version - xapi-xenopsd + xapi_xenopsd xenstore_transport.unix xml-light2 xmlm diff --git a/ocaml/xcp-rrdd/bin/read-blktap-stats/dune b/ocaml/xcp-rrdd/bin/read-blktap-stats/dune index 9c6e2315d6f..72861b33506 100644 --- a/ocaml/xcp-rrdd/bin/read-blktap-stats/dune +++ b/ocaml/xcp-rrdd/bin/read-blktap-stats/dune @@ -5,7 +5,7 @@ (public_name xcp-rrdd-read-blktap-stats) (libraries cstruct - rrdd-plugins.libs + rrdd_plugins_libs unix ) ) diff --git a/ocaml/xcp-rrdd/bin/rrdd/dune b/ocaml/xcp-rrdd/bin/rrdd/dune index e01e010a77f..9b0dbbbab29 100644 --- a/ocaml/xcp-rrdd/bin/rrdd/dune +++ b/ocaml/xcp-rrdd/bin/rrdd/dune @@ -27,7 +27,7 @@ xapi-log xapi-rrd xapi-rrd.unix - xapi-rrdd + rrdd_libs xapi-stdext-threads xapi-stdext-unix xmlm @@ -64,7 +64,7 @@ xapi-idl.rrd xapi-log xapi-rrd - xapi-rrdd + rrdd_libs xapi-stdext-pervasives xapi-stdext-threads xapi-stdext-unix diff --git a/ocaml/xcp-rrdd/bin/rrdp-dcmi/dune b/ocaml/xcp-rrdd/bin/rrdp-dcmi/dune index 6e422954c79..a6e092c3843 100644 --- a/ocaml/xcp-rrdd/bin/rrdp-dcmi/dune +++ b/ocaml/xcp-rrdd/bin/rrdp-dcmi/dune @@ -6,7 +6,7 @@ (libraries rrdd-plugin - rrdd-plugins.libs + rrdd_plugins_libs xapi-idl.rrd xapi-log xapi-rrd diff --git a/ocaml/xcp-rrdd/bin/rrdp-iostat/dune b/ocaml/xcp-rrdd/bin/rrdp-iostat/dune index 7933a9a3fdc..1bf3c8ed4f0 100644 --- a/ocaml/xcp-rrdd/bin/rrdp-iostat/dune +++ b/ocaml/xcp-rrdd/bin/rrdp-iostat/dune @@ -12,7 +12,7 @@ mtime mtime.clock.os rrdd-plugin - rrdd-plugins.libs + rrdd_plugins_libs str stringext threads.posix diff --git a/ocaml/xcp-rrdd/bin/rrdp-squeezed/dune b/ocaml/xcp-rrdd/bin/rrdp-squeezed/dune index 955b2bdecb9..acad6c3dfe9 100644 --- a/ocaml/xcp-rrdd/bin/rrdp-squeezed/dune +++ b/ocaml/xcp-rrdd/bin/rrdp-squeezed/dune @@ -6,7 +6,7 @@ (libraries rrdd-plugin - rrdd-plugins.libs + rrdd_plugins_libs xapi-stdext-std ezxenstore ezxenstore.watch diff --git a/ocaml/xcp-rrdd/bin/rrdp-xenpm/dune b/ocaml/xcp-rrdd/bin/rrdp-xenpm/dune index f28b84ef511..86340e6796e 100644 --- a/ocaml/xcp-rrdd/bin/rrdp-xenpm/dune +++ b/ocaml/xcp-rrdd/bin/rrdp-xenpm/dune @@ -6,7 +6,7 @@ (libraries rrdd-plugin - rrdd-plugins.libs + rrdd_plugins_libs str xapi-idl.rrd xapi-log diff --git a/ocaml/xcp-rrdd/lib/blktap/lib/dune b/ocaml/xcp-rrdd/lib/blktap/lib/dune index a96846c1fc8..bc79ab629d0 100644 --- a/ocaml/xcp-rrdd/lib/blktap/lib/dune +++ b/ocaml/xcp-rrdd/lib/blktap/lib/dune @@ -1,6 +1,5 @@ (library (name rrdd_plugins_libs) - (public_name rrdd-plugins.libs) (wrapped false) (preprocess (pps ppx_cstruct)) (libraries diff --git a/ocaml/xcp-rrdd/lib/rrdd/dune b/ocaml/xcp-rrdd/lib/rrdd/dune index 72e87db40bd..dd63ed88761 100644 --- a/ocaml/xcp-rrdd/lib/rrdd/dune +++ b/ocaml/xcp-rrdd/lib/rrdd/dune @@ -1,6 +1,5 @@ (library (name rrdd_libs) - (public_name xapi-rrdd) (modules constants stats) (flags (:standard -bin-annot)) (libraries diff --git a/ocaml/xenopsd/c_stubs/dune b/ocaml/xenopsd/c_stubs/dune index 7b2de7bf421..f22b2ea896c 100644 --- a/ocaml/xenopsd/c_stubs/dune +++ b/ocaml/xenopsd/c_stubs/dune @@ -1,6 +1,5 @@ (library - (name c_stubs) - (public_name xapi-xenopsd.c_stubs) + (name xapi_xenopsd_c_stubs) (wrapped false) (foreign_stubs (language c) @@ -9,8 +8,7 @@ ) (library - (name xc_stubs) - (public_name xapi-xenopsd-xc.c_stubs) + (name xapi_xenopsd_xc_c_stubs) (wrapped false) (libraries xenctrl) (foreign_stubs diff --git a/ocaml/xenopsd/dbgring/dune b/ocaml/xenopsd/dbgring/dune index 3d95198039f..c3d29f9e5be 100644 --- a/ocaml/xenopsd/dbgring/dune +++ b/ocaml/xenopsd/dbgring/dune @@ -4,7 +4,7 @@ (package xapi-xenopsd-xc) (libraries - xapi-xenopsd + xapi_xenopsd xenctrl xenmmap xenstore diff --git a/ocaml/xenopsd/lib/dune b/ocaml/xenopsd/lib/dune index 85377322942..2810eb88ef3 100644 --- a/ocaml/xenopsd/lib/dune +++ b/ocaml/xenopsd/lib/dune @@ -1,10 +1,9 @@ (library - (name xenopsd) - (public_name xapi-xenopsd) + (name xapi_xenopsd) (wrapped false) (libraries astring - c_stubs + xapi_xenopsd_c_stubs cohttp cohttp_posix fd-send-recv diff --git a/ocaml/xenopsd/simulator/dune b/ocaml/xenopsd/simulator/dune index 740b6d9b9e0..9274834e964 100644 --- a/ocaml/xenopsd/simulator/dune +++ b/ocaml/xenopsd/simulator/dune @@ -5,7 +5,7 @@ (libraries xapi-idl.xen.interface - xapi-xenopsd + xapi_xenopsd ) ) diff --git a/ocaml/xenopsd/suspend_image_viewer/dune b/ocaml/xenopsd/suspend_image_viewer/dune index afe650c6a6e..47b8ced2a92 100644 --- a/ocaml/xenopsd/suspend_image_viewer/dune +++ b/ocaml/xenopsd/suspend_image_viewer/dune @@ -11,6 +11,6 @@ xapi-idl xapi-log xapi-stdext-unix - xapi-xenopsd + xapi_xenopsd ) ) diff --git a/ocaml/xenopsd/test/dune b/ocaml/xenopsd/test/dune index a71ad643db9..2d3d34cc709 100644 --- a/ocaml/xenopsd/test/dune +++ b/ocaml/xenopsd/test/dune @@ -1,7 +1,7 @@ (test (name test) (modes exe) - (package xapi-xenopsd) + (package xapi-xenopsd-xc) (libraries alcotest cpuid @@ -16,7 +16,7 @@ xapi-log xapi-stdext-pervasives xapi-test-utils - xapi-xenopsd + xapi_xenopsd xenstore_transport.unix ) (preprocess @@ -24,15 +24,6 @@ ) ) -(rule - (alias runtest) - (package xapi-xenopsd) - (deps - (:x ../lib/xenopsd.cmxs) - ) - (action (run ./check-no-xenctrl.sh %{x})) -) - (rule (alias runtest) (package xapi-xenopsd-simulator) diff --git a/ocaml/xenopsd/xc/dune b/ocaml/xenopsd/xc/dune index b841da23fbc..06ba1a676e5 100644 --- a/ocaml/xenopsd/xc/dune +++ b/ocaml/xenopsd/xc/dune @@ -51,9 +51,9 @@ xapi-stdext-std xapi-stdext-threads xapi-stdext-unix - xapi-xenopsd - xapi-xenopsd.c_stubs - xapi-xenopsd-xc.c_stubs + xapi_xenopsd + xapi_xenopsd_c_stubs + xapi_xenopsd_xc_c_stubs xenctrl xenstore xenstore_transport.unix @@ -81,7 +81,7 @@ xapi-idl.xen.interface xapi-inventory xapi-stdext-unix - xapi-xenopsd + xapi_xenopsd xenctrl xenstore_transport.unix xenopsd_xc @@ -115,7 +115,7 @@ xapi-stdext-date xapi-stdext-unix - xapi-xenopsd + xapi_xenopsd xenctrl ) ) @@ -141,7 +141,7 @@ ezxenstore.core threads.posix xapi-idl.xen.interface - xapi-xenopsd + xapi_xenopsd xenctrl xenopsd_xc xenstore_transport.unix diff --git a/xapi-xenopsd-simulator.opam b/xapi-xenopsd-simulator.opam index 45cffcfc82a..16017fb218a 100644 --- a/xapi-xenopsd-simulator.opam +++ b/xapi-xenopsd-simulator.opam @@ -15,7 +15,23 @@ depends: [ "ocaml" "dune" {>= "3.15"} "base-unix" - "xapi-xenopsd" + "astring" + "cohttp" + "fd-send-recv" + "fmt" + "ppx_deriving_rpc" + "ppx_sexp_conv" + "re" + "result" + "rpclib" + "rresult" + "sexplib" + "sexplib0" + "uri" + "uuidm" + "uutf" + "xapi-backtrace" + "xmlm" ] synopsis: "Simulation backend allowing testing of the higher-level xenops logic" diff --git a/xapi-xenopsd-simulator.opam.template b/xapi-xenopsd-simulator.opam.template index b23fb7ea5fa..a11d9c74c19 100644 --- a/xapi-xenopsd-simulator.opam.template +++ b/xapi-xenopsd-simulator.opam.template @@ -13,7 +13,23 @@ depends: [ "ocaml" "dune" {>= "3.15"} "base-unix" - "xapi-xenopsd" + "astring" + "cohttp" + "fd-send-recv" + "fmt" + "ppx_deriving_rpc" + "ppx_sexp_conv" + "re" + "result" + "rpclib" + "rresult" + "sexplib" + "sexplib0" + "uri" + "uuidm" + "uutf" + "xapi-backtrace" + "xmlm" ] synopsis: "Simulation backend allowing testing of the higher-level xenops logic" diff --git a/xapi-xenopsd-xc.opam b/xapi-xenopsd-xc.opam index 53eb84adf96..1ebd0e0073c 100644 --- a/xapi-xenopsd-xc.opam +++ b/xapi-xenopsd-xc.opam @@ -15,12 +15,14 @@ build: [ depends: [ "ocaml" "dune" {>= "3.15"} + "alcotest" {with-test} "astring" "base-threads" "base-unix" "base64" "bos" "cmdliner" + "cohttp" "conf-xen" "ezxenstore" "fd-send-recv" @@ -36,6 +38,7 @@ depends: [ "result" "rpclib" "rresult" + "sexplib" "sexplib0" "uri" "uuid" @@ -49,11 +52,12 @@ depends: [ "xapi-stdext-std" "xapi-stdext-threads" "xapi-stdext-unix" - "xapi-xenopsd" + "xapi-test-utils" {with-test} "xenctrl" "xenstore" "xenstore_transport" "xenmmap" + "xmlm" ] synopsis: "A xenops plugin which knows how to use xenstore, xenctrl and xenguest to manage" diff --git a/xapi-xenopsd-xc.opam.template b/xapi-xenopsd-xc.opam.template index ef97615d427..e0dd497cde1 100644 --- a/xapi-xenopsd-xc.opam.template +++ b/xapi-xenopsd-xc.opam.template @@ -13,12 +13,14 @@ build: [ depends: [ "ocaml" "dune" {>= "3.15"} + "alcotest" {with-test} "astring" "base-threads" "base-unix" "base64" "bos" "cmdliner" + "cohttp" "conf-xen" "ezxenstore" "fd-send-recv" @@ -34,6 +36,7 @@ depends: [ "result" "rpclib" "rresult" + "sexplib" "sexplib0" "uri" "uuid" @@ -47,11 +50,12 @@ depends: [ "xapi-stdext-std" "xapi-stdext-threads" "xapi-stdext-unix" - "xapi-xenopsd" + "xapi-test-utils" {with-test} "xenctrl" "xenstore" "xenstore_transport" "xenmmap" + "xmlm" ] synopsis: "A xenops plugin which knows how to use xenstore, xenctrl and xenguest to manage" diff --git a/xapi-xenopsd.opam b/xapi-xenopsd.opam deleted file mode 100644 index f255a13cc30..00000000000 --- a/xapi-xenopsd.opam +++ /dev/null @@ -1,58 +0,0 @@ -# This file is generated by dune, edit dune-project instead -license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" -opam-version: "2.0" -name: "xapi-xenopsd" -maintainer: "xen-api@lists.xen.org" -authors: "xen-api@lists.xen.org" -homepage: "https://github.com/xapi-project/xen-api" -dev-repo: "git+https://github.com/xapi-project/xen-api.git" -bug-reports: "https://github.com/xapi-project/xen-api/issues" -build: [ - ["./configure"] - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] -depends: [ - "ocaml" - "dune" {>= "3.15"} - "base-threads" - "alcotest" {with-test} - "astring" - "cohttp" - "fd-send-recv" - "fmt" { >= "0.8.8" } - "forkexec" - "ppx_deriving_rpc" - "ppx_sexp_conv" - "re" - "result" - "rpclib" - "rresult" - "sexplib" - "sexplib0" - "uri" - "uuid" - "uuidm" - "uutf" - "xapi-backtrace" - "xapi-idl" - "xapi-stdext-date" - "xapi-stdext-pervasives" - "xapi-stdext-threads" - "xapi-stdext-unix" - "xapi-test-utils" {with-test} - "xapi-tracing" - "xapi-tracing-export" - "xenstore_transport" {with-test} - "xmlm" - "zstd" -] -synopsis: "A single-host domain/VM manager for the Xen hypervisor" -description: """ -The xenopsd daemon allows a set of VMs on a single host to be controlled -via a simple API. The API has been tailored to suit the needs of xapi, -which manages clusters of hosts running Xen, but it can also be used -standalone.""" -url { - src: "https://github.com/xapi-project/xen-api/archive/master.tar.gz" -} diff --git a/xapi-xenopsd.opam.template b/xapi-xenopsd.opam.template deleted file mode 100644 index 93961549f71..00000000000 --- a/xapi-xenopsd.opam.template +++ /dev/null @@ -1,56 +0,0 @@ -opam-version: "2.0" -name: "xapi-xenopsd" -maintainer: "xen-api@lists.xen.org" -authors: "xen-api@lists.xen.org" -homepage: "https://github.com/xapi-project/xen-api" -dev-repo: "git+https://github.com/xapi-project/xen-api.git" -bug-reports: "https://github.com/xapi-project/xen-api/issues" -build: [ - ["./configure"] - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] -depends: [ - "ocaml" - "dune" {>= "3.15"} - "base-threads" - "alcotest" {with-test} - "astring" - "cohttp" - "fd-send-recv" - "fmt" { >= "0.8.8" } - "forkexec" - "ppx_deriving_rpc" - "ppx_sexp_conv" - "re" - "result" - "rpclib" - "rresult" - "sexplib" - "sexplib0" - "uri" - "uuid" - "uuidm" - "uutf" - "xapi-backtrace" - "xapi-idl" - "xapi-stdext-date" - "xapi-stdext-pervasives" - "xapi-stdext-threads" - "xapi-stdext-unix" - "xapi-test-utils" {with-test} - "xapi-tracing" - "xapi-tracing-export" - "xenstore_transport" {with-test} - "xmlm" - "zstd" -] -synopsis: "A single-host domain/VM manager for the Xen hypervisor" -description: """ -The xenopsd daemon allows a set of VMs on a single host to be controlled -via a simple API. The API has been tailored to suit the needs of xapi, -which manages clusters of hosts running Xen, but it can also be used -standalone.""" -url { - src: "https://github.com/xapi-project/xen-api/archive/master.tar.gz" -} diff --git a/xapi.opam b/xapi.opam index 4179ebc22ed..e533b5127eb 100644 --- a/xapi.opam +++ b/xapi.opam @@ -27,6 +27,7 @@ depends: [ "domain-name" "ezxenstore" {= version} "fmt" + "fd-send-recv" "hex" "http-lib" {with-test & = version} "integers" @@ -63,6 +64,7 @@ depends: [ "tar-unix" "uri" "uuid" {= version} + "uutf" "uuidm" "x509" "xapi-backtrace" @@ -83,7 +85,6 @@ depends: [ "xapi-test-utils" {with-test} "xapi-tracing" {= version} "xapi-types" {= version} - "xapi-xenopsd" {= version} "xenctrl" "xenstore_transport" "xmlm" From ffef021b8b34a31abb630df147bb3a1f927a1090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Wed, 11 Sep 2024 16:13:42 +0100 Subject: [PATCH 11/19] CP-51479: [maintenance]: install some more files using dune, add @xapi-doc rule MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit More efficient than install.sh. Also enables merging opam packages more easily, as it makes it clearer which package installs files where. 'xapi' and 'xe' are special cases because they install to /opt/xensource, so add a separate line with a different --prefix for them. We need a new xapi-debug package to install to /opt/xensource/debug which is a non-FHS compliant path, and we override its bindir to be /opt/xensource/debug. `vhd-tool` is special too, since it installs some files to /usr/libexec/xapi, but xapi itself is in /opt/xensource and its libexec would be /opt/xensource/libexec. Dune doesn't support installing to arbitrary directories, there is a 'misc' rule for that, but it is deprecated so I wouldn't start using it now. These rules generate multiple files in a directory, use dune's directory target support. Previously we would've copied the files multiple times. This is quite difficult to review, I suggest reviewing the outcome of the PR: On b1238325aa622c3e07ff7429af5672d7914aacca (do not installs cmxs commit): ``` rm /tmp/inst/1 -rf; make build install DESTDIR=/tmp/inst/1 && (cd /tmp/inst/1 && find ! -type d -printf '%p %M\n' ) >|ref ``` On the final commit of this PR: ``` rm /tmp/inst/2 -rf; make build install DESTDIR=/tmp/inst/2 && (cd /tmp/inst/2 && find ! -type d -printf '%p %M\n' ) >|this && sort -u ref >|refs && sort -u this >|thiss && diff -wu refs thiss ``` Signed-off-by: Edwin Török --- Makefile | 124 +++--------------- dune-project | 61 ++++++++- ocaml/alerts/certificate/dune | 7 +- ocaml/cdrommon/dune | 7 +- ocaml/database/dune | 8 +- ocaml/doc/dune | 26 +++- ocaml/events/dune | 2 +- ocaml/gencert/dune | 8 +- .../management-api.md | 0 ocaml/idl/autogen/dune | 6 - ocaml/idl/dune | 20 ++- ocaml/license/dune | 7 +- ocaml/networkd/bin/dune | 19 ++- ocaml/perftest/dune | 2 +- ocaml/quicktest/dune | 3 +- ocaml/rrd2csv/src/dune | 3 +- ocaml/squeezed/src/dune | 8 +- ocaml/vhd-tool/cli/dune | 30 ++++- ocaml/vncproxy/dune | 2 +- ocaml/wsproxy/cli/dune | 4 + ocaml/xapi/dune | 5 +- ocaml/xcp-rrdd/bin/read-blktap-stats/dune | 5 +- ocaml/xcp-rrdd/bin/rrdd/dune | 7 +- ocaml/xcp-rrdd/bin/rrdp-dcmi/dune | 7 +- ocaml/xcp-rrdd/bin/rrdp-iostat/dune | 7 +- ocaml/xcp-rrdd/bin/rrdp-squeezed/dune | 7 +- ocaml/xcp-rrdd/bin/rrdp-xenpm/dune | 7 +- ocaml/xe-cli/dune | 1 - ocaml/xenopsd/cli/dune | 8 +- ocaml/xenopsd/dbgring/dune | 4 +- ocaml/xenopsd/dune | 1 - ocaml/xenopsd/pvs/dune | 10 +- ocaml/xenopsd/scripts/dune | 13 ++ ocaml/xenopsd/simulator/dune | 8 +- ocaml/xenopsd/suspend_image_viewer/dune | 2 +- ocaml/xenopsd/tools/dune | 8 +- ocaml/xenopsd/xc/dune | 8 +- ocaml/xenopsd/xc/fence/dune | 8 +- ocaml/xs-trace/dune | 13 +- rrd2csv.opam | 29 ---- rrd2csv.opam.template | 27 ---- xapi-debug.opam | 76 +++++++++++ xapi-squeezed.opam | 2 +- xapi-squeezed.opam.template | 2 +- xapi-xenopsd-xc.opam | 10 +- xapi-xenopsd-xc.opam.template | 10 +- xapi.opam | 2 +- 47 files changed, 386 insertions(+), 248 deletions(-) rename ocaml/idl/{autogen => autogen-static}/management-api.md (100%) delete mode 100644 ocaml/idl/autogen/dune delete mode 100644 ocaml/xenopsd/dune create mode 100644 ocaml/xenopsd/scripts/dune delete mode 100644 rrd2csv.opam delete mode 100644 rrd2csv.opam.template create mode 100644 xapi-debug.opam diff --git a/Makefile b/Makefile index 3dd3947f2eb..64397752bdf 100644 --- a/Makefile +++ b/Makefile @@ -80,22 +80,7 @@ schema: dune runtest ocaml/idl doc: -#html - dune build --profile=$(PROFILE) -f @ocaml/doc/jsapigen - mkdir -p $(XAPIDOC)/html - cp -r _build/default/ocaml/doc/api $(XAPIDOC)/html - cp _build/default/ocaml/doc/branding.js $(XAPIDOC)/html - cp ocaml/doc/*.js ocaml/doc/*.html ocaml/doc/*.css $(XAPIDOC)/html -#markdown - dune build --profile=$(PROFILE) -f @ocaml/idl/markdowngen - mkdir -p $(XAPIDOC)/markdown - cp -r _build/default/ocaml/idl/autogen/*.md $(XAPIDOC)/markdown - cp -r _build/default/ocaml/idl/autogen/*.yml $(XAPIDOC)/markdown - find ocaml/doc -name "*.md" -not -name "README.md" -exec cp {} $(XAPIDOC)/markdown/ \; -#other - cp ocaml/doc/*.dot ocaml/doc/doc-convert.sh $(XAPIDOC) -# Build manpages, networkd generated these - dune build --profile=$(PROFILE) -f @man + dune build --profile=$(PROFILE) @xapi-doc sdk: dune build --profile=$(PROFILE) @sdkgen xapi-sdk.install @ocaml/sdk-gen/install @@ -113,8 +98,7 @@ sdk-build-java: sdk python: $(MAKE) -C python3/examples build -doc-json: - dune exec --profile=$(PROFILE) -- ocaml/idl/json_backend/gen_json.exe -destdir $(XAPIDOC)/jekyll +doc-json: doc format: dune build @fmt --auto-promote @@ -134,120 +118,51 @@ install: build doc sdk doc-json mkdir -p $(DESTDIR)/etc mkdir -p $(DESTDIR)/etc/bash_completion.d # ocaml/xapi - make -C scripts install - make -C python3 install - cp -f _build/install/default/bin/xapi $(DESTDIR)$(OPTDIR)/bin/xapi + $(MAKE) -C scripts install + $(MAKE) -C python3 install scripts/install.sh 755 ocaml/quicktest/quicktest $(DESTDIR)$(OPTDIR)/debug - cp -f _build/install/default/bin/quicktestbin $(DESTDIR)$(OPTDIR)/debug/quicktestbin - scripts/install.sh 644 _build/install/default/share/xapi/rbac_static.csv $(DESTDIR)$(OPTDIR)/debug -# ocaml/xsh - cp -f _build/install/default/bin/xsh $(DESTDIR)$(OPTDIR)/bin/xsh # ocaml/xe-cli - scripts/install.sh 755 _build/install/default/bin/xe $(DESTDIR)$(OPTDIR)/bin/xe ln -sf $(OPTDIR)/bin/xe $(DESTDIR)/usr/bin/xe scripts/install.sh 755 ocaml/xe-cli/bash-completion $(DESTDIR)/etc/bash_completion.d/xe -# ocaml/vncproxy - scripts/install.sh 755 _build/install/default/bin/vncproxy $(DESTDIR)$(OPTDIR)/debug/vncproxy -# ocaml/perftest - scripts/install.sh 755 _build/install/default/bin/perftest $(DESTDIR)$(OPTDIR)/debug/perftest -# ocaml/suspend-image-viewer - scripts/install.sh 755 _build/install/default/bin/suspend-image-viewer $(DESTDIR)$(OPTDIR)/debug/suspend-image-viewer -# ocaml/mpathalert - scripts/install.sh 755 _build/install/default/bin/mpathalert $(DESTDIR)$(OPTDIR)/bin/mpathalert -# ocaml/license - scripts/install.sh 755 _build/install/default/bin/daily-license-check $(DESTDIR)$(LIBEXECDIR)/daily-license-check -# ocaml/alerts/certificate - scripts/install.sh 755 _build/install/default/bin/alert-certificate-check $(DESTDIR)$(LIBEXECDIR)/alert-certificate-check -# ocaml/events - scripts/install.sh 755 _build/install/default/bin/event_listen $(DESTDIR)$(OPTDIR)/debug/event_listen -# ocaml/db_process - scripts/install.sh 755 _build/install/default/bin/xapi-db-process $(DESTDIR)$(OPTDIR)/bin/xapi-db-process -# ocaml/cdrommon - scripts/install.sh 755 _build/install/default/bin/cdrommon $(DESTDIR)$(LIBEXECDIR)/cdrommon -# ocaml/database - scripts/install.sh 755 _build/install/default/bin/block_device_io $(DESTDIR)$(LIBEXECDIR)/block_device_io -# ocaml/gencert - scripts/install.sh 755 _build/install/default/bin/gencert $(DESTDIR)$(LIBEXECDIR)/gencert -# ocaml/rrd2csv - scripts/install.sh 755 _build/install/default/bin/rrd2csv $(DESTDIR)$(OPTDIR)/bin/rrd2csv +# rrd2csv scripts/install.sh 644 ocaml/rrd2csv/man/rrd2csv.1.man $(DESTDIR)$(OPTMANDIR)/rrd2csv.1 -# ocaml/xs-trace - scripts/install.sh 755 _build/install/default/bin/xs-trace $(DESTDIR)/usr/bin/xs-trace -# xcp-rrdd - install -D _build/install/default/bin/xcp-rrdd $(DESTDIR)/usr/sbin/xcp-rrdd - install -D _build/install/default/bin/rrddump $(DESTDIR)/usr/bin/rrddump -# rrd-cli - install -D _build/install/default/bin/rrd-cli $(DESTDIR)/usr/bin/rrd-cli -# rrd-transport - install -D _build/install/default/bin/rrdreader $(DESTDIR)/usr/bin/rrdreader - install -D _build/install/default/bin/rrdwriter $(DESTDIR)/usr/bin/rrdwriter # rrdd-plugins - install -D -m 755 _build/install/default/bin/xcp-rrdd-iostat $(DESTDIR)$(LIBEXECDIR)/xcp-rrdd-plugins/xcp-rrdd-iostat - install -D -m 755 _build/install/default/bin/xcp-rrdd-squeezed $(DESTDIR)$(LIBEXECDIR)/xcp-rrdd-plugins/xcp-rrdd-squeezed - install -D -m 755 _build/install/default/bin/xcp-rrdd-xenpm $(DESTDIR)$(LIBEXECDIR)/xcp-rrdd-plugins/xcp-rrdd-xenpm - install -D -m 755 _build/install/default/bin/xcp-rrdd-dcmi $(DESTDIR)$(LIBEXECDIR)/xcp-rrdd-plugins/xcp-rrdd-dcmi install -D -m 644 ocaml/xcp-rrdd/bugtool-plugin/rrdd-plugins.xml $(DESTDIR)$(ETCXENDIR)/bugtool/xcp-rrdd-plugins.xml install -D -m 644 ocaml/xcp-rrdd/bugtool-plugin/rrdd-plugins/stuff.xml $(DESTDIR)$(ETCXENDIR)/bugtool/xcp-rrdd-plugins/stuff.xml install -D -m 755 ocaml/xcp-rrdd/bin/rrdp-scripts/sysconfig-rrdd-plugins $(DESTDIR)/etc/sysconfig/xcp-rrdd-plugins install -D -m 644 ocaml/xcp-rrdd/bin/rrdp-scripts/logrotate-rrdd-plugins $(DESTDIR)/etc/logrotate.d/xcp-rrdd-plugins # vhd-tool - install -m 755 _build/install/default/bin/sparse_dd $(DESTDIR)/usr/libexec/xapi/sparse_dd - install -m 755 _build/install/default/bin/vhd-tool $(DESTDIR)/usr/bin/vhd-tool install -m 644 ocaml/vhd-tool/cli/sparse_dd.conf $(DESTDIR)/etc/sparse_dd.conf - install -m 755 _build/install/default/bin/get_vhd_vsize $(DESTDIR)/usr/libexec/xapi/get_vhd_vsize - install -m 755 ocaml/vhd-tool/scripts/get_nbd_extents.py $(DESTDIR)$(LIBEXECDIR)/get_nbd_extents.py - install -m 644 ocaml/vhd-tool/scripts/python_nbd_client.py $(DESTDIR)$(LIBEXECDIR)/python_nbd_client.py # xenopsd - install -D _build/install/default/bin/xenopsd-simulator $(DESTDIR)/$(SBINDIR)/xenopsd-simulator - install -D _build/install/default/man/man1/xenopsd-simulator.1.gz $(DESTDIR)/$(MANDIR)/man1/xenopsd-simulator.1.gz - install -D _build/install/default/bin/xenopsd-xc $(DESTDIR)/$(SBINDIR)/xenopsd-xc - install -D _build/install/default/bin/fence.bin $(DESTDIR)/$(LIBEXECDIR)/fence.bin - install -D _build/install/default/man/man1/xenopsd-xc.1.gz $(DESTDIR)/$(MANDIR)/man1/xenopsd-xc.1.gz - install -D _build/install/default/bin/set-domain-uuid $(DESTDIR)/$(XENOPSD_LIBEXECDIR)/set-domain-uuid - install -D _build/install/default/bin/xenops-cli $(DESTDIR)/$(SBINDIR)/xenops-cli - install -D _build/install/default/man/man1/xenops-cli.1.gz $(DESTDIR)/$(MANDIR)/man1/xenops-cli.1.gz - install -D _build/install/default/bin/list_domains $(DESTDIR)/$(BINDIR)/list_domains - install -D ./ocaml/xenopsd/scripts/vif $(DESTDIR)/$(XENOPSD_LIBEXECDIR)/vif - install -D ./ocaml/xenopsd/scripts/vif-real $(DESTDIR)/$(XENOPSD_LIBEXECDIR)/vif-real - install -D ./ocaml/xenopsd/scripts/block $(DESTDIR)/$(XENOPSD_LIBEXECDIR)/block install -D ./ocaml/xenopsd/scripts/xen-backend.rules $(DESTDIR)/$(ETCDIR)/udev/rules.d/xen-backend.rules - install -D ./ocaml/xenopsd/scripts/tap $(DESTDIR)/$(XENOPSD_LIBEXECDIR)/tap - install -D ./ocaml/xenopsd/scripts/setup-vif-rules $(DESTDIR)/$(XENOPSD_LIBEXECDIR)/setup-vif-rules - install -D ./_build/install/default/bin/pvs-proxy-ovs-setup $(DESTDIR)/$(XENOPSD_LIBEXECDIR)/pvs-proxy-ovs-setup - (cd $(DESTDIR)/$(XENOPSD_LIBEXECDIR) && ln -sf pvs-proxy-ovs-setup setup-pvs-proxy-rules) - install -D ./ocaml/xenopsd/scripts/common.py $(DESTDIR)/$(XENOPSD_LIBEXECDIR)/common.py - install -D ./ocaml/xenopsd/scripts/igmp_query_injector.py $(DESTDIR)/$(XENOPSD_LIBEXECDIR)/igmp_query_injector.py install -D ./ocaml/xenopsd/scripts/qemu-wrapper $(DESTDIR)/$(QEMU_WRAPPER_DIR)/qemu-wrapper install -D ./ocaml/xenopsd/scripts/swtpm-wrapper $(DESTDIR)/$(QEMU_WRAPPER_DIR)/swtpm-wrapper install -D ./ocaml/xenopsd/scripts/pygrub-wrapper $(DESTDIR)/$(QEMU_WRAPPER_DIR)/pygrub-wrapper DESTDIR=$(DESTDIR) SBINDIR=$(SBINDIR) QEMU_WRAPPER_DIR=$(QEMU_WRAPPER_DIR) XENOPSD_LIBEXECDIR=$(XENOPSD_LIBEXECDIR) ETCDIR=$(ETCDIR) ./ocaml/xenopsd/scripts/make-custom-xenopsd.conf -# squeezed - install -D _build/install/default/bin/squeezed $(DESTDIR)/$(SBINDIR)/squeezed -# xcp-networkd - install -m 755 _build/install/default/bin/xapi-networkd $(DESTDIR)/usr/sbin/xcp-networkd - install -m 755 _build/install/default/bin/networkd_db $(DESTDIR)/usr/bin/networkd_db - install -m 644 _build/default/ocaml/networkd/bin/xcp-networkd.1 $(DESTDIR)/usr/share/man/man1/xcp-networkd.1 -# wsproxy - install -m 755 _build/install/default/bin/wsproxy $(DESTDIR)$(LIBEXECDIR)/wsproxy # dune can install libraries and several other files into the right locations dune install --destdir=$(DESTDIR) --prefix=$(PREFIX) --libdir=$(LIBDIR) --mandir=$(MANDIR) \ + --libexecdir=$(XENOPSD_LIBEXECDIR) \ xapi-client xapi-schema xapi-consts xapi-cli-protocol xapi-datamodel xapi-types \ xen-api-client xen-api-client-lwt xen-api-client-async rrdd-plugin rrd-transport \ gzip http-lib pciutil sexpr stunnel uuid xml-light2 zstd xapi-compression safe-resources \ message-switch message-switch-async message-switch-cli message-switch-core message-switch-lwt \ message-switch-unix xapi-idl forkexec xapi-forkexecd xapi-storage xapi-storage-script xapi-storage-cli \ xapi-nbd varstored-guard xapi-log xapi-open-uri xapi-tracing xapi-tracing-export xapi-expiry-alerts cohttp-posix \ - xapi-rrd xapi-inventory clock \ + xapi-rrd xapi-inventory clock xapi-rrdd rrddump xapi-rrd-transport-utils wsproxy xapi-networkd xapi-squeezed xapi-xenopsd-simulator xapi-xenopsd-cli xapi-xenopsd-xc\ xapi-stdext-date xapi-stdext-encodings xapi-stdext-pervasives xapi-stdext-std xapi-stdext-threads xapi-stdext-unix xapi-stdext-zerocheck -# docs - mkdir -p $(DESTDIR)$(DOCDIR) - cp -r $(XAPIDOC)/jekyll $(DESTDIR)$(DOCDIR) - cp -r $(XAPIDOC)/html $(DESTDIR)$(DOCDIR) - cp -r $(XAPIDOC)/markdown $(DESTDIR)$(DOCDIR) - cp $(XAPIDOC)/*.dot $(XAPIDOC)/doc-convert.sh $(DESTDIR)$(DOCDIR) + dune install --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(OPTDIR)/libexec --datadir=$(DOCDIR) xapi xe rrdd-plugins + dune install --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(OPTDIR)/libexec --bindir=$(OPTDIR)/debug --datadir=$(OPTDIR)/debug xapi-debug + dune install --destdir=$(DESTDIR) --prefix=$(PREFIX) --libdir=$(LIBDIR) --libexecdir=/usr/libexec --mandir=$(MANDIR) vhd-tool + +# wsproxy + mv $(DESTDIR)/usr/bin/wsproxy $(DESTDIR)$(LIBEXECDIR)/wsproxy + (cd $(DESTDIR)/$(XENOPSD_LIBEXECDIR) && ln -sf pvs-proxy-ovs-setup setup-pvs-proxy-rules) # sdk dune install --destdir=$(DESTDIR) --datadir=$(SDKDIR) xapi-sdk + chmod +x $(DESTDIR)$(DOCDIR)/doc-convert.sh + # backward compat with existing specfile, to be removed after it is updated find $(DESTDIR) -name '*.cmxs' -delete + for pkg in rrdd-plugins xapi-debug xapi xe xapi-networkd xapi-xenopsd-cli xapi-xenopsd-simulator xapi-xenopsd-xc xapi-squeezed xapi-rrdd xapi-rrd-transport-utils rrddump wsproxy vhd-tool; do for f in CHANGELOG LICENSE README.markdown; do rm $(DESTDIR)$(OPTDIR)/doc/$$pkg/$$f $(DESTDIR)$(PREFIX)/doc/$$pkg/$$f -f; done; for f in META dune-package opam; do rm $(DESTDIR)$(LIBDIR)/$$pkg/$$f; done; done; uninstall: # only removes what was installed with `dune install` @@ -258,8 +173,11 @@ uninstall: message-switch message-switch-async message-switch-cli message-switch-core message-switch-lwt \ message-switch-unix xapi-idl forkexec xapi-forkexecd xapi-storage xapi-storage-script xapi-log \ xapi-open-uri xapi-tracing xapi-tracing-export xapi-expiry-alerts cohttp-posix \ - xapi-rrd xapi-inventory clock \ + xapi-rrd xapi-inventory clock xapi-rrdd rrddump xapi-rrd-transport-utils wsproxy xapi-networkd xapi-squeezed xapi-xenopsd-simulator xapi-xenopsd-cli\ xapi-stdext-date xapi-stdext-encodings xapi-stdext-pervasives xapi-stdext-std xapi-stdext-threads xapi-stdext-unix xapi-stdext-zerocheck + dune uninstall --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) xapi xe rrdd-plugins + dune uninstall --destdir=$(DESTDIR) --prefix=$(PREFIX) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(XENOPSD_LIBEXECDIR) xapi-xenopsd-xc + dune uninstall --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(OPTDIR)/libexec --bindir=$(OPTDIR)/debug --datadir=$(OPTDIR)/debug xapi-debug compile_flags.txt: Makefile (ocamlc -config-var ocamlc_cflags;\ diff --git a/dune-project b/dune-project index 45875bb4565..8aca9cfd45b 100644 --- a/dune-project +++ b/dune-project @@ -322,12 +322,67 @@ (name xapi-cli-protocol) ) +(package + (name xapi-debug) + (synopsis "Debugging tools for XAPI") + (description "Tools installed into the non-standard /opt/xensource/debug location") + (depends + alcotest + angstrom + astring + base64 + cmdliner + cohttp + cstruct + ctypes + domain-name + fd-send-recv + fmt + hex + integers + ipaddr + logs + magic-mime + mirage-crypto + mirage-crypto-pk + mirage-crypto-rng + mtime + pci + polly + ppx_deriving + ppx_deriving_rpc + ppx_sexp_conv + psq + ptime + qcheck-alcotest + qcheck-core + re + result + rpclib + rresult + sexplib + sexplib0 + sha + tar + tar-unix + uri + uuidm + uutf + x509 + xapi-backtrace + xenctrl + xenstore_transport + xmlm + yojson + ) +) + (package (name xapi) (synopsis "The toolstack daemon which implements the XenAPI") (description "This daemon exposes the XenAPI and is used by clients such as 'xe' and 'XenCenter' to manage clusters of Xen-enabled hosts.") (depends - alcotest ; needed for the quicktest binary + (alcotest :with-test) angstrom astring base-threads @@ -530,10 +585,6 @@ This package provides an Lwt compatible interface to the library.") (name rrdd-plugins) ) -(package - (name rrd2csv) -) - (package (name rrd-transport) (synopsis "Shared-memory protocols for exposing system metrics") diff --git a/ocaml/alerts/certificate/dune b/ocaml/alerts/certificate/dune index 137b23d265e..4bd05643b0e 100644 --- a/ocaml/alerts/certificate/dune +++ b/ocaml/alerts/certificate/dune @@ -15,8 +15,6 @@ (executable (modes exe) (name certificate_check_main) - (public_name alert-certificate-check) - (package xapi) (modules certificate_check_main) (libraries certificate_check @@ -28,3 +26,8 @@ ) ) +(install + (files (certificate_check_main.exe as alert-certificate-check)) + (package xapi) + (section libexec_root) +) diff --git a/ocaml/cdrommon/dune b/ocaml/cdrommon/dune index bc57948a8d8..4d86c0ffafa 100644 --- a/ocaml/cdrommon/dune +++ b/ocaml/cdrommon/dune @@ -1,8 +1,6 @@ (executable (modes exe) (name cdrommon) - (public_name cdrommon) - (package xapi) (libraries cdrom threads @@ -11,3 +9,8 @@ ) ) +(install + (files (cdrommon.exe as cdrommon)) + (section libexec_root) + (package xapi) +) diff --git a/ocaml/database/dune b/ocaml/database/dune index 14ac44931bd..48fbd89936f 100644 --- a/ocaml/database/dune +++ b/ocaml/database/dune @@ -57,8 +57,6 @@ (executable (modes exe) (name block_device_io) - (public_name block_device_io) - (package xapi) (modules block_device_io) (libraries @@ -70,6 +68,12 @@ ) ) +(install + (package xapi) + (files (block_device_io.exe as block_device_io)) + (section libexec_root) +) + (executable (name database_server_main) (modes exe) diff --git a/ocaml/doc/dune b/ocaml/doc/dune index 7c3dbcf4f68..aa5077ef404 100644 --- a/ocaml/doc/dune +++ b/ocaml/doc/dune @@ -16,23 +16,47 @@ ) (rule - (alias jsapigen) + (aliases jsapigen xapi-doc) (deps (:x jsapi.exe) (source_tree templates) ) + (targets (dir api) branding.js) (package xapi-datamodel) (action (run %{x})) ) +(rule + (alias xapi-doc) + (package xapi) + (targets (dir jekyll)) + (action (run ../idl/json_backend/gen_json.exe -destdir jekyll)) +) + (rule (alias runtest) (deps (:x jsapi.exe) (source_tree templates) + (sandbox always) ) (package xapi-datamodel) (action (run %{x})) ) (data_only_dirs templates) + +(install + (package xapi) + (section share_root) + (dirs jekyll) + (files + (glob_files_rec (api/* with_prefix html/api)) + (glob_files (*.html with_prefix html)) + (glob_files (*.css with_prefix html)) + (glob_files (*.js with_prefix html)) + (glob_files ([!R]*.md with_prefix markdown)) + (glob_files *.dot) + doc-convert.sh + ) +) diff --git a/ocaml/events/dune b/ocaml/events/dune index bb2b0420399..a08f10c5615 100644 --- a/ocaml/events/dune +++ b/ocaml/events/dune @@ -2,7 +2,7 @@ (modes exe) (name event_listen) (public_name event_listen) - (package xapi) + (package xapi-debug) (libraries http_lib xapi-client diff --git a/ocaml/gencert/dune b/ocaml/gencert/dune index 66a78ca4a41..cbd5cd73ae2 100644 --- a/ocaml/gencert/dune +++ b/ocaml/gencert/dune @@ -28,8 +28,6 @@ (executable (modes exe) (name gencert) - (public_name gencert) - (package xapi) (modules gencert) (libraries astring @@ -41,6 +39,12 @@ ) ) +(install + (files (gencert.exe as gencert)) + (section libexec_root) + (package xapi) +) + (test (name test_lib) (package xapi) diff --git a/ocaml/idl/autogen/management-api.md b/ocaml/idl/autogen-static/management-api.md similarity index 100% rename from ocaml/idl/autogen/management-api.md rename to ocaml/idl/autogen-static/management-api.md diff --git a/ocaml/idl/autogen/dune b/ocaml/idl/autogen/dune deleted file mode 100644 index a423ff4a937..00000000000 --- a/ocaml/idl/autogen/dune +++ /dev/null @@ -1,6 +0,0 @@ -(alias - (name markdowngen) - (deps - (source_tree .) - ) -) diff --git a/ocaml/idl/dune b/ocaml/idl/dune index d971e6597df..84ad1c35a93 100644 --- a/ocaml/idl/dune +++ b/ocaml/idl/dune @@ -36,13 +36,29 @@ ) (rule - (alias markdowngen) + (aliases markdowngen xapi-doc) (deps (:x datamodel_main.exe) (source_tree templates) + (:md autogen-static/management-api.md) ) + (targets (dir autogen)) (package xapi-datamodel) - (action (run %{x} -closed -markdown)) + (action + (progn + (run mkdir -p autogen) + (run %{x} -closed -markdown) + (run cp %{md} autogen/management-api.md) + )) +) + +(install + (package xapi) + (section share_root) + (files + (glob_files (autogen/*.md with_prefix markdown)) + (glob_files (autogen/*.yml with_prefix markdown)) + ) ) (tests diff --git a/ocaml/license/dune b/ocaml/license/dune index e2ee71b2b3f..f37d0695981 100644 --- a/ocaml/license/dune +++ b/ocaml/license/dune @@ -14,8 +14,6 @@ (executable (modes exe) (name daily_license_check_main) - (public_name daily-license-check) - (package xapi) (modules daily_license_check_main) (libraries daily_license_check @@ -27,3 +25,8 @@ ) ) +(install + (files (daily_license_check_main.exe as daily-license-check)) + (package xapi) + (section libexec_root) +) diff --git a/ocaml/networkd/bin/dune b/ocaml/networkd/bin/dune index 2b50b1e4159..c6bfffbbf52 100644 --- a/ocaml/networkd/bin/dune +++ b/ocaml/networkd/bin/dune @@ -11,8 +11,6 @@ (executable (name networkd) - (public_name xapi-networkd) - (package xapi-networkd) (modes exe) (libraries astring @@ -45,3 +43,20 @@ (name man) (deps xcp-networkd.1) ) + +(install + (package xapi-networkd) + (section man) + (files xcp-networkd.1) +) + +(install + (package xapi-networkd) + (section sbin) + (files (networkd.exe as xcp-networkd)) +) + +(alias + (name xapi-doc) + (deps (alias man)) +) diff --git a/ocaml/perftest/dune b/ocaml/perftest/dune index eb5bb586d5c..38d7a0efd16 100644 --- a/ocaml/perftest/dune +++ b/ocaml/perftest/dune @@ -2,7 +2,7 @@ (modes exe) (name perftest) (public_name perftest) - (package xapi) + (package xapi-debug) (libraries http_lib diff --git a/ocaml/quicktest/dune b/ocaml/quicktest/dune index b061ff1176c..0ac6a171acd 100644 --- a/ocaml/quicktest/dune +++ b/ocaml/quicktest/dune @@ -2,7 +2,7 @@ (modes exe) (name quicktest) (public_name quicktestbin) - (package xapi) + (package xapi-debug) (libraries alcotest astring @@ -43,7 +43,6 @@ (preprocess (per_module ((pps ppx_deriving_rpc) Quicktest_vm_lifecycle))) ) - (rule (alias runtest) (package xapi) diff --git a/ocaml/rrd2csv/src/dune b/ocaml/rrd2csv/src/dune index ce263d70a01..28f26f831c2 100644 --- a/ocaml/rrd2csv/src/dune +++ b/ocaml/rrd2csv/src/dune @@ -2,7 +2,7 @@ (modes exe) (name rrd2csv) (public_name rrd2csv) - (package rrd2csv) + (package xapi) (libraries http_lib @@ -17,4 +17,3 @@ xmlm ) ) - diff --git a/ocaml/squeezed/src/dune b/ocaml/squeezed/src/dune index 4db102ad8a0..55dbbf92949 100644 --- a/ocaml/squeezed/src/dune +++ b/ocaml/squeezed/src/dune @@ -1,8 +1,6 @@ (executable (modes exe) (name squeezed) - (public_name squeezed) - (package xapi-squeezed) (flags (:standard -bin-annot)) (libraries xapi-stdext-threads @@ -30,3 +28,9 @@ re.str ) ) + +(install + (package xapi-squeezed) + (section sbin) + (files (squeezed.exe as squeezed)) +) diff --git a/ocaml/vhd-tool/cli/dune b/ocaml/vhd-tool/cli/dune index cb85ba1a1dc..99f73fa7615 100644 --- a/ocaml/vhd-tool/cli/dune +++ b/ocaml/vhd-tool/cli/dune @@ -1,8 +1,6 @@ (executables (modes exe) (names main sparse_dd get_vhd_vsize) - (package vhd-tool) - (public_names vhd-tool sparse_dd get_vhd_vsize) (libraries astring @@ -40,9 +38,33 @@ (action (with-stdout-to %{targets} (run %{x} --help))) ) +; specfile doesn't expect these +;(install +; (package vhd-tool) +; (section man) +; (files vhd-tool.1 sparse_dd.1)) + (install (package vhd-tool) - (section man) - (files vhd-tool.1 sparse_dd.1) + (section bin) + (files (main.exe as vhd-tool)) ) +(install + (package xapi) + (section libexec_root) + (files + (../scripts/get_nbd_extents.py as get_nbd_extents.py) + (../scripts/python_nbd_client.py as python_nbd_client.py) + ) +) + +; xapi's libexec is in /opt/xensource/libexec +; but vhd-tool installs into /usr/libexec/xapi +; we should eventually fix these inconsistencies, +; for now be backwards compatible +(install + (package vhd-tool) + (section libexec_root) + (files (get_vhd_vsize.exe as xapi/get_vhd_vsize) (sparse_dd.exe as xapi/sparse_dd)) +) diff --git a/ocaml/vncproxy/dune b/ocaml/vncproxy/dune index 5e6e1d768d8..97b89628334 100644 --- a/ocaml/vncproxy/dune +++ b/ocaml/vncproxy/dune @@ -2,7 +2,7 @@ (modes exe) (name vncproxy) (public_name vncproxy) - (package xapi) + (package xapi-debug) (libraries http_lib diff --git a/ocaml/wsproxy/cli/dune b/ocaml/wsproxy/cli/dune index 93984851950..65797a35c69 100644 --- a/ocaml/wsproxy/cli/dune +++ b/ocaml/wsproxy/cli/dune @@ -1,3 +1,7 @@ +; we can't install to libexec_root, because the default for that is /lib, +; so a plain dune build @install would fail because now it can no longer use /lib/wsproxy +; so we install it and then move it in the Makefile + (executable (name wsproxy) (public_name wsproxy) diff --git a/ocaml/xapi/dune b/ocaml/xapi/dune index acf3cb5ae66..9f3e5f825fa 100644 --- a/ocaml/xapi/dune +++ b/ocaml/xapi/dune @@ -49,11 +49,12 @@ ) (install - (section share) + (package xapi-debug) + (section share_root) (files rbac_static.csv) - (package xapi) ) + (library (name xapi_internal_minimal) (modules context custom_actions xapi_globs server_helpers session_check rbac rbac_audit db_actions taskHelper eventgen locking_helpers exnHelper rbac_static xapi_role xapi_extensions db) diff --git a/ocaml/xcp-rrdd/bin/read-blktap-stats/dune b/ocaml/xcp-rrdd/bin/read-blktap-stats/dune index 72861b33506..e7793085904 100644 --- a/ocaml/xcp-rrdd/bin/read-blktap-stats/dune +++ b/ocaml/xcp-rrdd/bin/read-blktap-stats/dune @@ -1,8 +1,9 @@ (executable (modes exe) (name read_blktap_stats) - (package rrdd-plugins) - (public_name xcp-rrdd-read-blktap-stats) +; not expected by the specfile +; (package rrdd-plugins) +; (public_name xcp-rrdd-read-blktap-stats) (libraries cstruct rrdd_plugins_libs diff --git a/ocaml/xcp-rrdd/bin/rrdd/dune b/ocaml/xcp-rrdd/bin/rrdd/dune index 9b0dbbbab29..9a0905bb27e 100644 --- a/ocaml/xcp-rrdd/bin/rrdd/dune +++ b/ocaml/xcp-rrdd/bin/rrdd/dune @@ -38,8 +38,6 @@ (executable (modes exe) (name xcp_rrdd) - (public_name xcp-rrdd) - (package xapi-rrdd) (modules xcp_rrdd) (libraries astring @@ -75,3 +73,8 @@ ) ) +(install + (package xapi-rrdd) + (files (xcp_rrdd.exe as xcp-rrdd)) + (section sbin) +) diff --git a/ocaml/xcp-rrdd/bin/rrdp-dcmi/dune b/ocaml/xcp-rrdd/bin/rrdp-dcmi/dune index a6e092c3843..5dd75984e1a 100644 --- a/ocaml/xcp-rrdd/bin/rrdp-dcmi/dune +++ b/ocaml/xcp-rrdd/bin/rrdp-dcmi/dune @@ -1,8 +1,6 @@ (executable (modes exe) (name rrdp_dcmi) - (package rrdd-plugins) - (public_name xcp-rrdd-dcmi) (libraries rrdd-plugin @@ -14,3 +12,8 @@ ) ) +(install + (package rrdd-plugins) + (files (rrdp_dcmi.exe as xcp-rrdd-plugins/xcp-rrdd-dcmi)) + (section libexec_root) +) diff --git a/ocaml/xcp-rrdd/bin/rrdp-iostat/dune b/ocaml/xcp-rrdd/bin/rrdp-iostat/dune index 1bf3c8ed4f0..cb8afcedf7f 100644 --- a/ocaml/xcp-rrdd/bin/rrdp-iostat/dune +++ b/ocaml/xcp-rrdd/bin/rrdp-iostat/dune @@ -1,8 +1,6 @@ (executable (modes exe) (name rrdp_iostat) - (package rrdd-plugins) - (public_name xcp-rrdd-iostat) (libraries astring cstruct @@ -31,3 +29,8 @@ ) ) +(install + (package rrdd-plugins) + (files (rrdp_iostat.exe as xcp-rrdd-plugins/xcp-rrdd-iostat)) + (section libexec_root) +) diff --git a/ocaml/xcp-rrdd/bin/rrdp-squeezed/dune b/ocaml/xcp-rrdd/bin/rrdp-squeezed/dune index acad6c3dfe9..97000c2ebed 100644 --- a/ocaml/xcp-rrdd/bin/rrdp-squeezed/dune +++ b/ocaml/xcp-rrdd/bin/rrdp-squeezed/dune @@ -1,8 +1,6 @@ (executable (modes exe) (name rrdp_squeezed) - (package rrdd-plugins) - (public_name xcp-rrdd-squeezed) (libraries rrdd-plugin @@ -20,3 +18,8 @@ ) ) +(install + (package rrdd-plugins) + (files (rrdp_squeezed.exe as xcp-rrdd-plugins/xcp-rrdd-squeezed)) + (section libexec_root) +) diff --git a/ocaml/xcp-rrdd/bin/rrdp-xenpm/dune b/ocaml/xcp-rrdd/bin/rrdp-xenpm/dune index 86340e6796e..2545d45d9f1 100644 --- a/ocaml/xcp-rrdd/bin/rrdp-xenpm/dune +++ b/ocaml/xcp-rrdd/bin/rrdp-xenpm/dune @@ -1,8 +1,6 @@ (executable (modes exe) (name rrdp_xenpm) - (package rrdd-plugins) - (public_name xcp-rrdd-xenpm) (libraries rrdd-plugin @@ -15,3 +13,8 @@ ) ) +(install + (package rrdd-plugins) + (files (rrdp_xenpm.exe as xcp-rrdd-plugins/xcp-rrdd-xenpm)) + (section libexec_root) +) diff --git a/ocaml/xe-cli/dune b/ocaml/xe-cli/dune index 5362781b31a..9141c1fab07 100644 --- a/ocaml/xe-cli/dune +++ b/ocaml/xe-cli/dune @@ -20,4 +20,3 @@ xapi-stdext-unix ) ) - diff --git a/ocaml/xenopsd/cli/dune b/ocaml/xenopsd/cli/dune index f9cfc7d353a..87dcdf98c8a 100644 --- a/ocaml/xenopsd/cli/dune +++ b/ocaml/xenopsd/cli/dune @@ -3,8 +3,6 @@ (executable (name main) - (public_name xenops-cli) - (package xapi-xenopsd-cli) (libraries astring cmdliner @@ -28,6 +26,12 @@ (preprocess (per_module ((pps ppx_deriving_rpc) Common Xn_cfg_types))) ) +(install + (files (main.exe as xenops-cli)) + (section sbin) + (package xapi-xenopsd-cli) +) + (rule (with-stdout-to xenops-cli.1 diff --git a/ocaml/xenopsd/dbgring/dune b/ocaml/xenopsd/dbgring/dune index c3d29f9e5be..7e50d7f83f6 100644 --- a/ocaml/xenopsd/dbgring/dune +++ b/ocaml/xenopsd/dbgring/dune @@ -1,7 +1,7 @@ (executable (name dbgring) - (public_name dbgring) - (package xapi-xenopsd-xc) +; (public_name dbgring) +; (package xapi-xenopsd-xc) (libraries xapi_xenopsd diff --git a/ocaml/xenopsd/dune b/ocaml/xenopsd/dune deleted file mode 100644 index 389b982cc01..00000000000 --- a/ocaml/xenopsd/dune +++ /dev/null @@ -1 +0,0 @@ -(data_only_dirs scripts) diff --git a/ocaml/xenopsd/pvs/dune b/ocaml/xenopsd/pvs/dune index d8b113392c9..facd232e0f2 100644 --- a/ocaml/xenopsd/pvs/dune +++ b/ocaml/xenopsd/pvs/dune @@ -1,7 +1,13 @@ (executable (name pvs_proxy_setup) - (public_name pvs-proxy-ovs-setup) - (package xapi-xenopsd-xc) (libraries ezxenstore.core bos xapi-consts.xapi_version xapi-idl cmdliner log rresult) ) +(install + (section libexec_root) + (package xapi-xenopsd-xc) + (files + (pvs_proxy_setup.exe as pvs-proxy-ovs-setup) + ) +) + diff --git a/ocaml/xenopsd/scripts/dune b/ocaml/xenopsd/scripts/dune new file mode 100644 index 00000000000..036965c492e --- /dev/null +++ b/ocaml/xenopsd/scripts/dune @@ -0,0 +1,13 @@ +(install + (section libexec_root) + (package xapi-xenopsd-xc) + (files + (vif as vif) + (vif-real as vif-real) + (block as block) + (tap as tap) + (setup-vif-rules as setup-vif-rules) + (common.py as common.py) + (igmp_query_injector.py as igmp_query_injector.py) + ) +) diff --git a/ocaml/xenopsd/simulator/dune b/ocaml/xenopsd/simulator/dune index 9274834e964..295e1b43ab4 100644 --- a/ocaml/xenopsd/simulator/dune +++ b/ocaml/xenopsd/simulator/dune @@ -1,7 +1,5 @@ (executable (name xenops_simulator_main) - (public_name xenopsd-simulator) - (package xapi-xenopsd-simulator) (libraries xapi-idl.xen.interface @@ -9,6 +7,12 @@ ) ) +(install + (files (xenops_simulator_main.exe as xenopsd-simulator)) + (section sbin) + (package xapi-xenopsd-simulator) +) + (rule (with-stdout-to xenopsd-simulator.1 diff --git a/ocaml/xenopsd/suspend_image_viewer/dune b/ocaml/xenopsd/suspend_image_viewer/dune index 47b8ced2a92..706b58bf3f3 100644 --- a/ocaml/xenopsd/suspend_image_viewer/dune +++ b/ocaml/xenopsd/suspend_image_viewer/dune @@ -1,7 +1,7 @@ (executable (public_name suspend-image-viewer) (name suspend_image_viewer) - (package xapi-xenopsd-xc) + (package xapi-debug) (libraries cmdliner forkexec diff --git a/ocaml/xenopsd/tools/dune b/ocaml/xenopsd/tools/dune index fa6d4519b50..4736daa0972 100644 --- a/ocaml/xenopsd/tools/dune +++ b/ocaml/xenopsd/tools/dune @@ -1,6 +1,10 @@ (executable (name set_domain_uuid) - (public_name set-domain-uuid) - (package xapi-xenopsd-xc) (libraries xenctrl uuid cmdliner) ) + +(install + (files (set_domain_uuid.exe as set-domain-uuid)) + (section libexec_root) + (package xapi-xenopsd-xc) +) diff --git a/ocaml/xenopsd/xc/dune b/ocaml/xenopsd/xc/dune index 06ba1a676e5..5ad84eb8097 100644 --- a/ocaml/xenopsd/xc/dune +++ b/ocaml/xenopsd/xc/dune @@ -69,8 +69,6 @@ (executable (name xenops_xc_main) (modes exe) - (public_name xenopsd-xc) - (package xapi-xenopsd-xc) (modules xenops_xc_main) (libraries @@ -107,6 +105,12 @@ ) ) +(install + (files (xenops_xc_main.exe as xenopsd-xc)) + (section sbin) + (package xapi-xenopsd-xc) +) + (executable (name memory_summary) (modes exe) diff --git a/ocaml/xenopsd/xc/fence/dune b/ocaml/xenopsd/xc/fence/dune index 4127982b138..48d0a6a1d0a 100644 --- a/ocaml/xenopsd/xc/fence/dune +++ b/ocaml/xenopsd/xc/fence/dune @@ -1,6 +1,10 @@ (executable (name fence) - (public_name fence.bin) - (package xapi-xenopsd-xc) (libraries xenctrl) ) + +(install + (package xapi) + (section libexec_root) + (files (fence.exe as fence.bin)) +) diff --git a/ocaml/xs-trace/dune b/ocaml/xs-trace/dune index 0be1866b2d0..4e2213ce287 100644 --- a/ocaml/xs-trace/dune +++ b/ocaml/xs-trace/dune @@ -2,7 +2,7 @@ (modes exe) (name xs_trace) (public_name xs-trace) - (package xapi) + (package xapi-xenopsd-xc) (libraries uri tracing @@ -19,8 +19,9 @@ (action (with-stdout-to %{targets} (run %{exe} --help=groff))) ) -(install - (section man) - (package xapi) - (files (xs-trace.1 as man1/xs-trace.1)) -) +; not expected by the specfile +;(install +; (section man) +; (package xapi) +; (files (xs-trace.1 as man1/xs-trace.1)) +;) diff --git a/rrd2csv.opam b/rrd2csv.opam deleted file mode 100644 index 4d71ee4468b..00000000000 --- a/rrd2csv.opam +++ /dev/null @@ -1,29 +0,0 @@ -# This file is generated by dune, edit dune-project instead - -opam-version: "2.0" -name: "rrd2csv" -maintainer: "opam-devel@lists.ocaml.org" -authors: [ "Guillem Rieu" ] -license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" -homepage: "https://github.com/xapi-project/xen-api" -bug-reports: "https://github.com/xapi-project/xen-api/issues" -dev-repo: "git+https://github.com/xapi-project/xen-api.git" -build: [ - ["dune" "build" "-p" name "-j" jobs ] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] -depends: [ - "ocaml" - "dune" {>= "3.15"} - "http-lib" - "xapi-client" - "xapi-idl" - "xapi-rrd" - "xapi-stdext-std" - "xapi-stdext-threads" - "xmlm" -] -synopsis: "Convert XenServer RRD data into CSV format" -url { - src: "https://github.com/xapi-project/xen-api/archive/master.tar.gz" -} diff --git a/rrd2csv.opam.template b/rrd2csv.opam.template deleted file mode 100644 index e86d004589e..00000000000 --- a/rrd2csv.opam.template +++ /dev/null @@ -1,27 +0,0 @@ -opam-version: "2.0" -name: "rrd2csv" -maintainer: "opam-devel@lists.ocaml.org" -authors: [ "Guillem Rieu" ] -license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" -homepage: "https://github.com/xapi-project/xen-api" -bug-reports: "https://github.com/xapi-project/xen-api/issues" -dev-repo: "git+https://github.com/xapi-project/xen-api.git" -build: [ - ["dune" "build" "-p" name "-j" jobs ] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] -depends: [ - "ocaml" - "dune" {>= "3.15"} - "http-lib" - "xapi-client" - "xapi-idl" - "xapi-rrd" - "xapi-stdext-std" - "xapi-stdext-threads" - "xmlm" -] -synopsis: "Convert XenServer RRD data into CSV format" -url { - src: "https://github.com/xapi-project/xen-api/archive/master.tar.gz" -} diff --git a/xapi-debug.opam b/xapi-debug.opam new file mode 100644 index 00000000000..5073a267be2 --- /dev/null +++ b/xapi-debug.opam @@ -0,0 +1,76 @@ +# This file is generated by dune, edit dune-project instead +opam-version: "2.0" +synopsis: "Debugging tools for XAPI" +description: + "Tools installed into the non-standard /opt/xensource/debug location" +maintainer: ["Xapi project maintainers"] +authors: ["xen-api@lists.xen.org"] +license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" +homepage: "https://xapi-project.github.io/" +bug-reports: "https://github.com/xapi-project/xen-api/issues" +depends: [ + "dune" {>= "3.15"} + "alcotest" + "angstrom" + "astring" + "base64" + "cmdliner" + "cohttp" + "cstruct" + "ctypes" + "domain-name" + "fd-send-recv" + "fmt" + "hex" + "integers" + "ipaddr" + "logs" + "magic-mime" + "mirage-crypto" + "mirage-crypto-pk" + "mirage-crypto-rng" + "mtime" + "pci" + "polly" + "ppx_deriving" + "ppx_deriving_rpc" + "ppx_sexp_conv" + "psq" + "ptime" + "qcheck-alcotest" + "qcheck-core" + "re" + "result" + "rpclib" + "rresult" + "sexplib" + "sexplib0" + "sha" + "tar" + "tar-unix" + "uri" + "uuidm" + "uutf" + "x509" + "xapi-backtrace" + "xenctrl" + "xenstore_transport" + "xmlm" + "yojson" + "odoc" {with-doc} +] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] +] +dev-repo: "git+https://github.com/xapi-project/xen-api.git" diff --git a/xapi-squeezed.opam b/xapi-squeezed.opam index 7b2de24dd18..7c4995d7e4f 100644 --- a/xapi-squeezed.opam +++ b/xapi-squeezed.opam @@ -26,7 +26,7 @@ depends: [ "xapi-stdext-threads" "xapi-stdext-unix" "xapi-types" - "xenctrl" {>= "0.9.20"} + "xenctrl" {>= "0.9.20" & with-test} "xenstore" "xenstore_transport" ] diff --git a/xapi-squeezed.opam.template b/xapi-squeezed.opam.template index 9641c69858a..aa928933c0d 100644 --- a/xapi-squeezed.opam.template +++ b/xapi-squeezed.opam.template @@ -23,7 +23,7 @@ depends: [ "xapi-stdext-threads" "xapi-stdext-unix" "xapi-types" - "xenctrl" {>= "0.9.20"} + "xenctrl" {>= "0.9.20" & with-test} "xenstore" "xenstore_transport" ] diff --git a/xapi-xenopsd-xc.opam b/xapi-xenopsd-xc.opam index 1ebd0e0073c..9b2f6771bc4 100644 --- a/xapi-xenopsd-xc.opam +++ b/xapi-xenopsd-xc.opam @@ -26,17 +26,17 @@ depends: [ "conf-xen" "ezxenstore" "fd-send-recv" - "fmt" + "fmt" {with-test} "forkexec" "inotify" "mtime" "polly" - "ppx_deriving_rpc" + "ppx_deriving_rpc" {with-test} "ppx_sexp_conv" "qmp" "re" - "result" - "rpclib" + "result" {with-test} + "rpclib" {with-test} "rresult" "sexplib" "sexplib0" @@ -55,7 +55,7 @@ depends: [ "xapi-test-utils" {with-test} "xenctrl" "xenstore" - "xenstore_transport" + "xenstore_transport" {with-test} "xenmmap" "xmlm" ] diff --git a/xapi-xenopsd-xc.opam.template b/xapi-xenopsd-xc.opam.template index e0dd497cde1..92b68a4f1a7 100644 --- a/xapi-xenopsd-xc.opam.template +++ b/xapi-xenopsd-xc.opam.template @@ -24,17 +24,17 @@ depends: [ "conf-xen" "ezxenstore" "fd-send-recv" - "fmt" + "fmt" {with-test} "forkexec" "inotify" "mtime" "polly" - "ppx_deriving_rpc" + "ppx_deriving_rpc" {with-test} "ppx_sexp_conv" "qmp" "re" - "result" - "rpclib" + "result" {with-test} + "rpclib" {with-test} "rresult" "sexplib" "sexplib0" @@ -53,7 +53,7 @@ depends: [ "xapi-test-utils" {with-test} "xenctrl" "xenstore" - "xenstore_transport" + "xenstore_transport" {with-test} "xenmmap" "xmlm" ] diff --git a/xapi.opam b/xapi.opam index e533b5127eb..3a850a4e359 100644 --- a/xapi.opam +++ b/xapi.opam @@ -10,7 +10,7 @@ homepage: "https://xapi-project.github.io/" bug-reports: "https://github.com/xapi-project/xen-api/issues" depends: [ "dune" {>= "3.15"} - "alcotest" + "alcotest" {with-test} "angstrom" "astring" "base-threads" From d35d9a635975691ed9eaeecd903486b93ebab2c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Fri, 13 Sep 2024 15:14:14 +0100 Subject: [PATCH 12/19] CP-51479: [maintenance]: merge dune rules and use -j consistently MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit compare with: ``` rm /tmp/inst/2 -rf; make build install DESTDIR=/tmp/inst/2 && (cd /tmp/inst/2 && find ! -type d -printf '%p %M %8s\n' ) >|this && sort -u ref >|refs && sort -u this >|thiss && diff -wu refs thiss && echo OK ``` Signed-off-by: Edwin Török --- Makefile | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 64397752bdf..086cc8ade72 100644 --- a/Makefile +++ b/Makefile @@ -15,8 +15,7 @@ build: # if available use external file, otherwise use built-in, this allows building XAPI without being root ! test -f $(SHAREDIR)/sm/XE_SR_ERRORCODES.xml || cp $(SHAREDIR)/sm/XE_SR_ERRORCODES.xml ocaml/sdk-gen/csharp/XE_SR_ERRORCODES.xml dune build @ocaml/idl/update-dm-lifecycle -j $(JOBS) --profile=$(PROFILE) --auto-promote || dune build @ocaml/idl/update-dm-lifecycle -j $(JOBS) --profile=$(PROFILE) --auto-promote - dune build @install -j $(JOBS) --profile=$(PROFILE) - dune build @ocaml/xapi-storage/python/xapi/storage/api/v5/python --profile=$(PROFILE) + dune build -j $(JOBS) --profile=$(PROFILE) @install @ocaml/xapi-storage/python/xapi/storage/api/v5/python @ocaml/xapi-doc @ocaml/sdk-gen/sdkgen # Quickly verify that the code compiles, without actually building it check: @@ -69,8 +68,7 @@ test: PSTREE_SLEEP_PID=$$!; \ trap "kill $${PSTREE_SLEEP_PID}" INT TERM EXIT; \ timeout --foreground $(TEST_TIMEOUT2) \ - dune runtest --profile=$(PROFILE) --error-reporting=twice -j $(JOBS) - dune build @runtest-python --profile=$(PROFILE) + dune build --profile=$(PROFILE) --error-reporting=twice -j $(JOBS) @runtest @runtest-python stresstest: dune build @stresstest --profile=$(PROFILE) --no-buffer -j $(JOBS) @@ -107,7 +105,7 @@ format: quality-gate: ./quality-gate.sh -install: build doc sdk doc-json +install: build doc doc-json mkdir -p $(DESTDIR)$(OPTDIR)/bin mkdir -p $(DESTDIR)$(OPTMANDIR) mkdir -p $(DESTDIR)$(LIBEXECDIR) @@ -140,29 +138,26 @@ install: build doc sdk doc-json install -D ./ocaml/xenopsd/scripts/pygrub-wrapper $(DESTDIR)/$(QEMU_WRAPPER_DIR)/pygrub-wrapper DESTDIR=$(DESTDIR) SBINDIR=$(SBINDIR) QEMU_WRAPPER_DIR=$(QEMU_WRAPPER_DIR) XENOPSD_LIBEXECDIR=$(XENOPSD_LIBEXECDIR) ETCDIR=$(ETCDIR) ./ocaml/xenopsd/scripts/make-custom-xenopsd.conf # dune can install libraries and several other files into the right locations - dune install --destdir=$(DESTDIR) --prefix=$(PREFIX) --libdir=$(LIBDIR) --mandir=$(MANDIR) \ - --libexecdir=$(XENOPSD_LIBEXECDIR) \ + dune install -j $(JOBS) --destdir=$(DESTDIR) --prefix=$(PREFIX) --libdir=$(LIBDIR) --mandir=$(MANDIR) \ + --libexecdir=$(XENOPSD_LIBEXECDIR) --datadir=$(SDKDIR) \ xapi-client xapi-schema xapi-consts xapi-cli-protocol xapi-datamodel xapi-types \ xen-api-client xen-api-client-lwt xen-api-client-async rrdd-plugin rrd-transport \ gzip http-lib pciutil sexpr stunnel uuid xml-light2 zstd xapi-compression safe-resources \ message-switch message-switch-async message-switch-cli message-switch-core message-switch-lwt \ message-switch-unix xapi-idl forkexec xapi-forkexecd xapi-storage xapi-storage-script xapi-storage-cli \ xapi-nbd varstored-guard xapi-log xapi-open-uri xapi-tracing xapi-tracing-export xapi-expiry-alerts cohttp-posix \ - xapi-rrd xapi-inventory clock xapi-rrdd rrddump xapi-rrd-transport-utils wsproxy xapi-networkd xapi-squeezed xapi-xenopsd-simulator xapi-xenopsd-cli xapi-xenopsd-xc\ + xapi-rrd xapi-inventory clock xapi-rrdd rrddump xapi-rrd-transport-utils wsproxy xapi-networkd xapi-squeezed xapi-xenopsd-simulator xapi-xenopsd-cli xapi-xenopsd-xc xapi-sdk\ xapi-stdext-date xapi-stdext-encodings xapi-stdext-pervasives xapi-stdext-std xapi-stdext-threads xapi-stdext-unix xapi-stdext-zerocheck - dune install --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(OPTDIR)/libexec --datadir=$(DOCDIR) xapi xe rrdd-plugins - dune install --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(OPTDIR)/libexec --bindir=$(OPTDIR)/debug --datadir=$(OPTDIR)/debug xapi-debug - dune install --destdir=$(DESTDIR) --prefix=$(PREFIX) --libdir=$(LIBDIR) --libexecdir=/usr/libexec --mandir=$(MANDIR) vhd-tool - + dune install -j $(JOBS) --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(OPTDIR)/libexec --datadir=$(DOCDIR) xapi xe rrdd-plugins + dune install -j $(JOBS) --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(OPTDIR)/libexec --bindir=$(OPTDIR)/debug --datadir=$(OPTDIR)/debug xapi-debug + dune install -j $(JOBS) --destdir=$(DESTDIR) --prefix=$(PREFIX) --libdir=$(LIBDIR) --libexecdir=/usr/libexec --mandir=$(MANDIR) vhd-tool # wsproxy mv $(DESTDIR)/usr/bin/wsproxy $(DESTDIR)$(LIBEXECDIR)/wsproxy (cd $(DESTDIR)/$(XENOPSD_LIBEXECDIR) && ln -sf pvs-proxy-ovs-setup setup-pvs-proxy-rules) -# sdk - dune install --destdir=$(DESTDIR) --datadir=$(SDKDIR) xapi-sdk chmod +x $(DESTDIR)$(DOCDIR)/doc-convert.sh # backward compat with existing specfile, to be removed after it is updated find $(DESTDIR) -name '*.cmxs' -delete - for pkg in rrdd-plugins xapi-debug xapi xe xapi-networkd xapi-xenopsd-cli xapi-xenopsd-simulator xapi-xenopsd-xc xapi-squeezed xapi-rrdd xapi-rrd-transport-utils rrddump wsproxy vhd-tool; do for f in CHANGELOG LICENSE README.markdown; do rm $(DESTDIR)$(OPTDIR)/doc/$$pkg/$$f $(DESTDIR)$(PREFIX)/doc/$$pkg/$$f -f; done; for f in META dune-package opam; do rm $(DESTDIR)$(LIBDIR)/$$pkg/$$f; done; done; + for pkg in rrdd-plugins xapi-debug xapi xe xapi-networkd xapi-xenopsd-cli xapi-xenopsd-simulator xapi-xenopsd-xc xapi-squeezed xapi-rrdd xapi-rrd-transport-utils rrddump wsproxy xapi-sdk vhd-tool; do for f in CHANGELOG LICENSE README.markdown; do rm $(DESTDIR)$(OPTDIR)/doc/$$pkg/$$f $(DESTDIR)$(PREFIX)/doc/$$pkg/$$f -f; done; for f in META dune-package opam; do rm $(DESTDIR)$(LIBDIR)/$$pkg/$$f -f; done; done; uninstall: # only removes what was installed with `dune install` From 44d7afa360e5c0cb57c9a7ce9286b42a414e971f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Sat, 14 Sep 2024 11:29:14 +0100 Subject: [PATCH 13/19] CP-51479: [maintenance]: parallelize install rule MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The dune build runs can't be parallelized, but the python and install.sh invocations and the `dune install` invocations can. Also remove the dependency between 'build' and 'install', if desired during development one can run `make build install`, however for the .spec build it is better to have a strict separation between build and install phases (this ensures that the install phase doesn't rebuild things by accident). Signed-off-by: Edwin Török --- Makefile | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 086cc8ade72..453f1064764 100644 --- a/Makefile +++ b/Makefile @@ -105,7 +105,17 @@ format: quality-gate: ./quality-gate.sh -install: build doc doc-json +.PHONY: install-scripts install-python3 install-dune1 install-dune2 install-dune3 install-dune4 install-extra + +install-scripts: + $(MAKE) -C scripts install + +install-python3: + $(MAKE) -C python3 install + +install-parallel: install-dune1 install-dune2 install-dune3 install-dune4 install-scripts install-python3 install-extra + +install-extra: mkdir -p $(DESTDIR)$(OPTDIR)/bin mkdir -p $(DESTDIR)$(OPTMANDIR) mkdir -p $(DESTDIR)$(LIBEXECDIR) @@ -116,8 +126,6 @@ install: build doc doc-json mkdir -p $(DESTDIR)/etc mkdir -p $(DESTDIR)/etc/bash_completion.d # ocaml/xapi - $(MAKE) -C scripts install - $(MAKE) -C python3 install scripts/install.sh 755 ocaml/quicktest/quicktest $(DESTDIR)$(OPTDIR)/debug # ocaml/xe-cli ln -sf $(OPTDIR)/bin/xe $(DESTDIR)/usr/bin/xe @@ -137,6 +145,8 @@ install: build doc doc-json install -D ./ocaml/xenopsd/scripts/swtpm-wrapper $(DESTDIR)/$(QEMU_WRAPPER_DIR)/swtpm-wrapper install -D ./ocaml/xenopsd/scripts/pygrub-wrapper $(DESTDIR)/$(QEMU_WRAPPER_DIR)/pygrub-wrapper DESTDIR=$(DESTDIR) SBINDIR=$(SBINDIR) QEMU_WRAPPER_DIR=$(QEMU_WRAPPER_DIR) XENOPSD_LIBEXECDIR=$(XENOPSD_LIBEXECDIR) ETCDIR=$(ETCDIR) ./ocaml/xenopsd/scripts/make-custom-xenopsd.conf + +install-dune1: # dune can install libraries and several other files into the right locations dune install -j $(JOBS) --destdir=$(DESTDIR) --prefix=$(PREFIX) --libdir=$(LIBDIR) --mandir=$(MANDIR) \ --libexecdir=$(XENOPSD_LIBEXECDIR) --datadir=$(SDKDIR) \ @@ -148,9 +158,18 @@ install: build doc doc-json xapi-nbd varstored-guard xapi-log xapi-open-uri xapi-tracing xapi-tracing-export xapi-expiry-alerts cohttp-posix \ xapi-rrd xapi-inventory clock xapi-rrdd rrddump xapi-rrd-transport-utils wsproxy xapi-networkd xapi-squeezed xapi-xenopsd-simulator xapi-xenopsd-cli xapi-xenopsd-xc xapi-sdk\ xapi-stdext-date xapi-stdext-encodings xapi-stdext-pervasives xapi-stdext-std xapi-stdext-threads xapi-stdext-unix xapi-stdext-zerocheck + +install-dune2: dune install -j $(JOBS) --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(OPTDIR)/libexec --datadir=$(DOCDIR) xapi xe rrdd-plugins + +install-dune3: dune install -j $(JOBS) --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(OPTDIR)/libexec --bindir=$(OPTDIR)/debug --datadir=$(OPTDIR)/debug xapi-debug + +install-dune4: dune install -j $(JOBS) --destdir=$(DESTDIR) --prefix=$(PREFIX) --libdir=$(LIBDIR) --libexecdir=/usr/libexec --mandir=$(MANDIR) vhd-tool + +install: + $(MAKE) -j $(JOBS) install-parallel # wsproxy mv $(DESTDIR)/usr/bin/wsproxy $(DESTDIR)$(LIBEXECDIR)/wsproxy (cd $(DESTDIR)/$(XENOPSD_LIBEXECDIR) && ln -sf pvs-proxy-ovs-setup setup-pvs-proxy-rules) @@ -159,6 +178,7 @@ install: build doc doc-json find $(DESTDIR) -name '*.cmxs' -delete for pkg in rrdd-plugins xapi-debug xapi xe xapi-networkd xapi-xenopsd-cli xapi-xenopsd-simulator xapi-xenopsd-xc xapi-squeezed xapi-rrdd xapi-rrd-transport-utils rrddump wsproxy xapi-sdk vhd-tool; do for f in CHANGELOG LICENSE README.markdown; do rm $(DESTDIR)$(OPTDIR)/doc/$$pkg/$$f $(DESTDIR)$(PREFIX)/doc/$$pkg/$$f -f; done; for f in META dune-package opam; do rm $(DESTDIR)$(LIBDIR)/$$pkg/$$f -f; done; done; + uninstall: # only removes what was installed with `dune install` dune uninstall --destdir=$(DESTDIR) --prefix=$(PREFIX) --libdir=$(LIBDIR) --mandir=$(MANDIR) \ From 371207df51b89c1c763a5baa13d1c910d2a689bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Sun, 15 Sep 2024 11:06:47 +0100 Subject: [PATCH 14/19] CP-51479: [maintenance]: merge rrdd-plugins with xapi, and remove xapi-rrdd-plugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They use the same install destination. xapi-rrdd-plugin was never installed, so remove the public-name and opam package (but keep the sources, they might be useful as an example). TODO: opam dune lint Signed-off-by: Edwin Török --- Makefile | 6 ++-- dune-project | 8 ----- ocaml/xcp-rrdd/bin/read-blktap-stats/dune | 2 +- ocaml/xcp-rrdd/bin/rrdp-dcmi/dune | 2 +- ocaml/xcp-rrdd/bin/rrdp-dummy/dune | 3 +- ocaml/xcp-rrdd/bin/rrdp-iostat/dune | 2 +- ocaml/xcp-rrdd/bin/rrdp-squeezed/dune | 2 +- ocaml/xcp-rrdd/bin/rrdp-xenpm/dune | 2 +- rrdd-plugins.opam | 36 ----------------------- rrdd-plugins.opam.template | 34 --------------------- xapi-rrdd-plugin.opam | 31 ------------------- xapi-rrdd-plugin.opam.template | 15 ---------- 12 files changed, 9 insertions(+), 134 deletions(-) delete mode 100644 rrdd-plugins.opam delete mode 100644 rrdd-plugins.opam.template delete mode 100644 xapi-rrdd-plugin.opam delete mode 100644 xapi-rrdd-plugin.opam.template diff --git a/Makefile b/Makefile index 453f1064764..647427b8677 100644 --- a/Makefile +++ b/Makefile @@ -160,7 +160,7 @@ install-dune1: xapi-stdext-date xapi-stdext-encodings xapi-stdext-pervasives xapi-stdext-std xapi-stdext-threads xapi-stdext-unix xapi-stdext-zerocheck install-dune2: - dune install -j $(JOBS) --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(OPTDIR)/libexec --datadir=$(DOCDIR) xapi xe rrdd-plugins + dune install -j $(JOBS) --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(OPTDIR)/libexec --datadir=$(DOCDIR) xapi xe install-dune3: dune install -j $(JOBS) --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(OPTDIR)/libexec --bindir=$(OPTDIR)/debug --datadir=$(OPTDIR)/debug xapi-debug @@ -176,7 +176,7 @@ install: chmod +x $(DESTDIR)$(DOCDIR)/doc-convert.sh # backward compat with existing specfile, to be removed after it is updated find $(DESTDIR) -name '*.cmxs' -delete - for pkg in rrdd-plugins xapi-debug xapi xe xapi-networkd xapi-xenopsd-cli xapi-xenopsd-simulator xapi-xenopsd-xc xapi-squeezed xapi-rrdd xapi-rrd-transport-utils rrddump wsproxy xapi-sdk vhd-tool; do for f in CHANGELOG LICENSE README.markdown; do rm $(DESTDIR)$(OPTDIR)/doc/$$pkg/$$f $(DESTDIR)$(PREFIX)/doc/$$pkg/$$f -f; done; for f in META dune-package opam; do rm $(DESTDIR)$(LIBDIR)/$$pkg/$$f -f; done; done; + for pkg in xapi-debug xapi xe xapi-networkd xapi-xenopsd-cli xapi-xenopsd-simulator xapi-xenopsd-xc xapi-squeezed xapi-rrdd xapi-rrd-transport-utils rrddump wsproxy xapi-sdk vhd-tool; do for f in CHANGELOG LICENSE README.markdown; do rm $(DESTDIR)$(OPTDIR)/doc/$$pkg/$$f $(DESTDIR)$(PREFIX)/doc/$$pkg/$$f -f; done; for f in META dune-package opam; do rm $(DESTDIR)$(LIBDIR)/$$pkg/$$f -f; done; done; uninstall: @@ -190,7 +190,7 @@ uninstall: xapi-open-uri xapi-tracing xapi-tracing-export xapi-expiry-alerts cohttp-posix \ xapi-rrd xapi-inventory clock xapi-rrdd rrddump xapi-rrd-transport-utils wsproxy xapi-networkd xapi-squeezed xapi-xenopsd-simulator xapi-xenopsd-cli\ xapi-stdext-date xapi-stdext-encodings xapi-stdext-pervasives xapi-stdext-std xapi-stdext-threads xapi-stdext-unix xapi-stdext-zerocheck - dune uninstall --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) xapi xe rrdd-plugins + dune uninstall --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) xapi xe dune uninstall --destdir=$(DESTDIR) --prefix=$(PREFIX) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(XENOPSD_LIBEXECDIR) xapi-xenopsd-xc dune uninstall --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(OPTDIR)/libexec --bindir=$(OPTDIR)/debug --datadir=$(OPTDIR)/debug xapi-debug diff --git a/dune-project b/dune-project index 8aca9cfd45b..4dab0145859 100644 --- a/dune-project +++ b/dune-project @@ -37,10 +37,6 @@ ) ) -(package - (name xapi-rrdd-plugin) -) - (package (name xml-light2) ) @@ -581,10 +577,6 @@ This package provides an Lwt compatible interface to the library.") (name rrddump) ) -(package - (name rrdd-plugins) -) - (package (name rrd-transport) (synopsis "Shared-memory protocols for exposing system metrics") diff --git a/ocaml/xcp-rrdd/bin/read-blktap-stats/dune b/ocaml/xcp-rrdd/bin/read-blktap-stats/dune index e7793085904..71d116d12d6 100644 --- a/ocaml/xcp-rrdd/bin/read-blktap-stats/dune +++ b/ocaml/xcp-rrdd/bin/read-blktap-stats/dune @@ -2,7 +2,7 @@ (modes exe) (name read_blktap_stats) ; not expected by the specfile -; (package rrdd-plugins) +; (package xapi) ; (public_name xcp-rrdd-read-blktap-stats) (libraries cstruct diff --git a/ocaml/xcp-rrdd/bin/rrdp-dcmi/dune b/ocaml/xcp-rrdd/bin/rrdp-dcmi/dune index 5dd75984e1a..971c2b3426b 100644 --- a/ocaml/xcp-rrdd/bin/rrdp-dcmi/dune +++ b/ocaml/xcp-rrdd/bin/rrdp-dcmi/dune @@ -13,7 +13,7 @@ ) (install - (package rrdd-plugins) + (package xapi) (files (rrdp_dcmi.exe as xcp-rrdd-plugins/xcp-rrdd-dcmi)) (section libexec_root) ) diff --git a/ocaml/xcp-rrdd/bin/rrdp-dummy/dune b/ocaml/xcp-rrdd/bin/rrdp-dummy/dune index c3ff89a1c35..758f76805da 100644 --- a/ocaml/xcp-rrdd/bin/rrdp-dummy/dune +++ b/ocaml/xcp-rrdd/bin/rrdp-dummy/dune @@ -1,7 +1,6 @@ (executable + (name rrdp_dummy) (modes exe) - (public_name rrdp_dummy) - (package xapi-rrdd-plugin) (libraries rrdd-plugin diff --git a/ocaml/xcp-rrdd/bin/rrdp-iostat/dune b/ocaml/xcp-rrdd/bin/rrdp-iostat/dune index cb8afcedf7f..4721f71aed1 100644 --- a/ocaml/xcp-rrdd/bin/rrdp-iostat/dune +++ b/ocaml/xcp-rrdd/bin/rrdp-iostat/dune @@ -30,7 +30,7 @@ ) (install - (package rrdd-plugins) + (package xapi) (files (rrdp_iostat.exe as xcp-rrdd-plugins/xcp-rrdd-iostat)) (section libexec_root) ) diff --git a/ocaml/xcp-rrdd/bin/rrdp-squeezed/dune b/ocaml/xcp-rrdd/bin/rrdp-squeezed/dune index 97000c2ebed..d45dd928de1 100644 --- a/ocaml/xcp-rrdd/bin/rrdp-squeezed/dune +++ b/ocaml/xcp-rrdd/bin/rrdp-squeezed/dune @@ -19,7 +19,7 @@ ) (install - (package rrdd-plugins) + (package xapi) (files (rrdp_squeezed.exe as xcp-rrdd-plugins/xcp-rrdd-squeezed)) (section libexec_root) ) diff --git a/ocaml/xcp-rrdd/bin/rrdp-xenpm/dune b/ocaml/xcp-rrdd/bin/rrdp-xenpm/dune index 2545d45d9f1..8eb5191fbd6 100644 --- a/ocaml/xcp-rrdd/bin/rrdp-xenpm/dune +++ b/ocaml/xcp-rrdd/bin/rrdp-xenpm/dune @@ -14,7 +14,7 @@ ) (install - (package rrdd-plugins) + (package xapi) (files (rrdp_xenpm.exe as xcp-rrdd-plugins/xcp-rrdd-xenpm)) (section libexec_root) ) diff --git a/rrdd-plugins.opam b/rrdd-plugins.opam deleted file mode 100644 index 4ca427e4561..00000000000 --- a/rrdd-plugins.opam +++ /dev/null @@ -1,36 +0,0 @@ -# This file is generated by dune, edit dune-project instead - -opam-version: "2.0" -name: "rrdd-plugins" -maintainer: "xs-devel@lists.xenserver.org" -authors: [ "xs-devel@lists.xenserver.org" ] -license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" -homepage: "https://github.com/xapi-project/xen-api" -bug-reports: "https://github.com/xapi-project/xen-api/issues" -dev-repo: "git+https://github.com/xapi-project/xen-api.git" -build: [[ "dune" "build" "-p" name "-j" jobs ]] -synopsis: "Plugins registering to the RRD daemon and exposing various metrics" -depends: [ - "ocaml" - "dune" {>= "3.15"} - "astring" - "base-threads" - "base-unix" - "cstruct" - "cstruct-unix" - "ezxenstore" - "inotify" - "ppx_cstruct" - "rrdd-plugin" - "stringext" - "uuid" - "xapi-stdext-std" - "xapi-stdext-unix" - "xenctrl" - "xenstore" - "xenstore_transport" - "mtime" -] -url { - src: "https://github.com/xapi-project/xen-api/archive/master.tar.gz" -} diff --git a/rrdd-plugins.opam.template b/rrdd-plugins.opam.template deleted file mode 100644 index 218b5f3c7bc..00000000000 --- a/rrdd-plugins.opam.template +++ /dev/null @@ -1,34 +0,0 @@ -opam-version: "2.0" -name: "rrdd-plugins" -maintainer: "xs-devel@lists.xenserver.org" -authors: [ "xs-devel@lists.xenserver.org" ] -license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" -homepage: "https://github.com/xapi-project/xen-api" -bug-reports: "https://github.com/xapi-project/xen-api/issues" -dev-repo: "git+https://github.com/xapi-project/xen-api.git" -build: [[ "dune" "build" "-p" name "-j" jobs ]] -synopsis: "Plugins registering to the RRD daemon and exposing various metrics" -depends: [ - "ocaml" - "dune" {>= "3.15"} - "astring" - "base-threads" - "base-unix" - "cstruct" - "cstruct-unix" - "ezxenstore" - "inotify" - "ppx_cstruct" - "rrdd-plugin" - "stringext" - "uuid" - "xapi-stdext-std" - "xapi-stdext-unix" - "xenctrl" - "xenstore" - "xenstore_transport" - "mtime" -] -url { - src: "https://github.com/xapi-project/xen-api/archive/master.tar.gz" -} diff --git a/xapi-rrdd-plugin.opam b/xapi-rrdd-plugin.opam deleted file mode 100644 index e102355bf9c..00000000000 --- a/xapi-rrdd-plugin.opam +++ /dev/null @@ -1,31 +0,0 @@ -# This file is generated by dune, edit dune-project instead -license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" -build: [ - ["dune" "subst"] {dev} - [ - "dune" - "build" - "-p" - name - "-j" - jobs - "@install" - "@runtest" {with-test} - "@doc" {with-doc} - ] -] -opam-version: "2.0" -maintainer: "xen-api@lists.xen.org" -authors: "xen-api@lists.xen.org" -homepage: "https://xapi-project.github.io/" -bug-reports: "https://github.com/xapi-project/xen-api/issues" -dev-repo: "git+https://github.com/xapi-project/xen-api.git" -depends: ["ocaml" "rrdd-plugin" "xenstore" "xenstore_transport" "dune" {>= "3.15"}] -synopsis: "A plugin library for the xapi performance monitoring daemon" -description: """ -This library allows one to expose a datasource which can then be -sampled by the performance monitoring daemon.""" -url { - src: - "https://github.com/xapi-project/xen-api/archive/master.tar.gz" -} diff --git a/xapi-rrdd-plugin.opam.template b/xapi-rrdd-plugin.opam.template deleted file mode 100644 index 0eaa9df6f8f..00000000000 --- a/xapi-rrdd-plugin.opam.template +++ /dev/null @@ -1,15 +0,0 @@ -opam-version: "2.0" -maintainer: "xen-api@lists.xen.org" -authors: "xen-api@lists.xen.org" -homepage: "https://xapi-project.github.io/" -bug-reports: "https://github.com/xapi-project/xen-api/issues" -dev-repo: "git+https://github.com/xapi-project/xen-api.git" -depends: ["ocaml" "rrdd-plugin" "xenstore" "xenstore_transport" "dune" {>= "3.15"}] -synopsis: "A plugin library for the xapi performance monitoring daemon" -description: """ -This library allows one to expose a datasource which can then be -sampled by the performance monitoring daemon.""" -url { - src: - "https://github.com/xapi-project/xen-api/archive/master.tar.gz" -} From 2f4d066c900bc4c487629220638d8f2fef371940 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Sun, 15 Sep 2024 11:11:35 +0100 Subject: [PATCH 15/19] CP-51479: [maintenance]: join CLI/daemon packages into xapi-tools MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These weren't being installed previously during a spec build, and had to be 'rm'-ed in the Makefile. Join them into a single package instead to reduce the number of opam files. Signed-off-by: Edwin Török --- Makefile | 12 +-- dune-project | 148 ++++++-------------------- ocaml/networkd/bin/dune | 4 +- ocaml/networkd/bin_db/dune | 2 +- ocaml/networkd/test/dune | 2 +- ocaml/squeezed/src/dune | 2 +- ocaml/squeezed/test/dune | 2 +- ocaml/tests/dune | 4 +- ocaml/wsproxy/cli/dune | 2 +- ocaml/wsproxy/test/dune | 2 +- ocaml/xapi-idl/rrd/dune | 4 +- ocaml/xcp-rrdd/bin/rrdd/dune | 2 +- ocaml/xcp-rrdd/bin/rrddump/dune | 2 +- ocaml/xcp-rrdd/bin/transport-rw/dune | 2 +- ocaml/xcp-rrdd/test/rrdd/dune | 2 +- ocaml/xenopsd/cli/dune | 4 +- ocaml/xenopsd/dbgring/dune | 2 +- ocaml/xenopsd/list_domains/dune | 2 +- ocaml/xenopsd/pvs/dune | 2 +- ocaml/xenopsd/scripts/dune | 2 +- ocaml/xenopsd/simulator/dune | 4 +- ocaml/xenopsd/test/dune | 4 +- ocaml/xenopsd/tools/dune | 2 +- ocaml/xenopsd/xc/dune | 4 +- ocaml/xs-trace/dune | 2 +- rrddump.opam | 16 --- rrddump.opam.template | 14 --- wsproxy.opam | 35 ------ xapi-rrd-transport-utils.opam | 34 ------ xapi-rrdd.opam | 57 ---------- xapi-squeezed.opam | 40 ------- xapi-squeezed.opam.template | 37 ------- xapi-networkd.opam => xapi-tools.opam | 34 +++--- xapi-xenopsd-cli.opam | 36 ------- xapi-xenopsd-cli.opam.template | 34 ------ xapi-xenopsd-simulator.opam | 40 ------- xapi-xenopsd-simulator.opam.template | 38 ------- xapi-xenopsd-xc.opam | 67 ------------ xapi-xenopsd-xc.opam.template | 65 ----------- 39 files changed, 85 insertions(+), 682 deletions(-) delete mode 100644 rrddump.opam delete mode 100644 rrddump.opam.template delete mode 100644 wsproxy.opam delete mode 100644 xapi-rrd-transport-utils.opam delete mode 100644 xapi-rrdd.opam delete mode 100644 xapi-squeezed.opam delete mode 100644 xapi-squeezed.opam.template rename xapi-networkd.opam => xapi-tools.opam (63%) delete mode 100644 xapi-xenopsd-cli.opam delete mode 100644 xapi-xenopsd-cli.opam.template delete mode 100644 xapi-xenopsd-simulator.opam delete mode 100644 xapi-xenopsd-simulator.opam.template delete mode 100644 xapi-xenopsd-xc.opam delete mode 100644 xapi-xenopsd-xc.opam.template diff --git a/Makefile b/Makefile index 647427b8677..29395da6340 100644 --- a/Makefile +++ b/Makefile @@ -156,8 +156,8 @@ install-dune1: message-switch message-switch-async message-switch-cli message-switch-core message-switch-lwt \ message-switch-unix xapi-idl forkexec xapi-forkexecd xapi-storage xapi-storage-script xapi-storage-cli \ xapi-nbd varstored-guard xapi-log xapi-open-uri xapi-tracing xapi-tracing-export xapi-expiry-alerts cohttp-posix \ - xapi-rrd xapi-inventory clock xapi-rrdd rrddump xapi-rrd-transport-utils wsproxy xapi-networkd xapi-squeezed xapi-xenopsd-simulator xapi-xenopsd-cli xapi-xenopsd-xc xapi-sdk\ - xapi-stdext-date xapi-stdext-encodings xapi-stdext-pervasives xapi-stdext-std xapi-stdext-threads xapi-stdext-unix xapi-stdext-zerocheck + xapi-rrd xapi-inventory clock xapi-sdk\ + xapi-stdext-date xapi-stdext-encodings xapi-stdext-pervasives xapi-stdext-std xapi-stdext-threads xapi-stdext-unix xapi-stdext-zerocheck xapi-tools install-dune2: dune install -j $(JOBS) --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(OPTDIR)/libexec --datadir=$(DOCDIR) xapi xe @@ -176,7 +176,7 @@ install: chmod +x $(DESTDIR)$(DOCDIR)/doc-convert.sh # backward compat with existing specfile, to be removed after it is updated find $(DESTDIR) -name '*.cmxs' -delete - for pkg in xapi-debug xapi xe xapi-networkd xapi-xenopsd-cli xapi-xenopsd-simulator xapi-xenopsd-xc xapi-squeezed xapi-rrdd xapi-rrd-transport-utils rrddump wsproxy xapi-sdk vhd-tool; do for f in CHANGELOG LICENSE README.markdown; do rm $(DESTDIR)$(OPTDIR)/doc/$$pkg/$$f $(DESTDIR)$(PREFIX)/doc/$$pkg/$$f -f; done; for f in META dune-package opam; do rm $(DESTDIR)$(LIBDIR)/$$pkg/$$f -f; done; done; + for pkg in xapi-debug xapi xe xapi-tools xapi-sdk vhd-tool; do for f in CHANGELOG LICENSE README.markdown; do rm $(DESTDIR)$(OPTDIR)/doc/$$pkg/$$f $(DESTDIR)$(PREFIX)/doc/$$pkg/$$f -f; done; for f in META dune-package opam; do rm $(DESTDIR)$(LIBDIR)/$$pkg/$$f -f; done; done; uninstall: @@ -188,10 +188,10 @@ uninstall: message-switch message-switch-async message-switch-cli message-switch-core message-switch-lwt \ message-switch-unix xapi-idl forkexec xapi-forkexecd xapi-storage xapi-storage-script xapi-log \ xapi-open-uri xapi-tracing xapi-tracing-export xapi-expiry-alerts cohttp-posix \ - xapi-rrd xapi-inventory clock xapi-rrdd rrddump xapi-rrd-transport-utils wsproxy xapi-networkd xapi-squeezed xapi-xenopsd-simulator xapi-xenopsd-cli\ - xapi-stdext-date xapi-stdext-encodings xapi-stdext-pervasives xapi-stdext-std xapi-stdext-threads xapi-stdext-unix xapi-stdext-zerocheck + xapi-rrd xapi-inventory clock xapi-sdk\ + xapi-stdext-date xapi-stdext-encodings xapi-stdext-pervasives xapi-stdext-std xapi-stdext-threads xapi-stdext-unix xapi-stdext-zerocheck xapi-tools dune uninstall --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) xapi xe - dune uninstall --destdir=$(DESTDIR) --prefix=$(PREFIX) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(XENOPSD_LIBEXECDIR) xapi-xenopsd-xc + dune uninstall --destdir=$(DESTDIR) --prefix=$(PREFIX) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(XENOPSD_LIBEXECDIR) xapi-tools dune uninstall --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(OPTDIR)/libexec --bindir=$(OPTDIR)/debug --datadir=$(OPTDIR)/debug xapi-debug compile_flags.txt: Makefile diff --git a/dune-project b/dune-project index 4dab0145859..09d6dc29894 100644 --- a/dune-project +++ b/dune-project @@ -89,18 +89,6 @@ (name xe) ) -(package - (name xapi-xenopsd-xc) -) - -(package - (name xapi-xenopsd-simulator) -) - -(package - (name xapi-xenopsd-cli) -) - (package (name xapi-types) ) @@ -158,10 +146,6 @@ (name xapi-storage) ) -(package - (name xapi-squeezed) -) - (package (name xapi-schema) ) @@ -186,90 +170,10 @@ ) ) -(package - (name xapi-rrdd) - (synopsis "Performance monitoring daemon for xapi") - (description "This daemon monitors 'datasources' i.e. time-varying values such as performance counters and records the samples in RRD archives. These archives can be used to examine historical performance trends.") - (depends - (ocaml (>= "4.02.0")) - (alcotest :with-test) - astring - cmdliner - (fmt :with-test) - (gzip (= :version)) - (http-lib (= :version)) - inotify - io-page - ipaddr - mtime - polly - ppx_deriving_rpc - rpclib - uri - (ezxenstore (= :version)) - (uuid (= :version)) - xapi-backtrace - (xapi-idl (= :version)) - (xapi-rrd (= :version)) - (xapi-stdext-threads (= :version)) - (xapi-stdext-unix (= :version)) - xapi-tracing - xenctrl - xenstore - xenstore_transport - xmlm - yojson - ) -) - -(package - (name xapi-rrd-transport-utils) - (synopsis "Shared-memory protocols for exposing performance counters") - (description "VMs running on a Xen host can use this library to expose performance counters which can be sampled by the xapi performance monitoring daemon.") - (authors "John Else") - (depends - ocaml - cmdliner - (rrd-transport (= :version)) - (xapi-idl (= :version)) - (xapi-rrd (= :version)) - ) -) - (package (name xapi-open-uri) ) -(package - (name xapi-networkd) - (authors "Jon Ludlam") - (synopsis "The XCP networking daemon") - (depends - (alcotest :with-test) - astring - base-threads - (forkexec (= :version)) - (http-lib (= :version)) - integers - mtime - netlink - re - result - rresult - rpclib - uri - (xapi-idl (= :version)) - xapi-inventory - (xapi-stdext-pervasives (= :version)) - (xapi-stdext-std (= :version)) - (xapi-stdext-threads (= :version)) - (xapi-stdext-unix (= :version)) - xapi-test-utils - (xen-api-client (= :version)) - yojson - ) -) - (package (name xapi-nbd) ) @@ -373,6 +277,37 @@ ) ) +(package + (name xapi-tools) + (synopsis "Various daemons and CLI applications required by XAPI") + (description "Includes message-switch, xenopsd, forkexecd, ...") + (depends + astring + base64 + cmdliner + cstruct-unix + fmt + logs + lwt + mtime + netlink + qmp + re + result + rpclib + rresult + uri + xenctrl + xmlm + yojson + (alcotest :with-test) + (ppx_deriving_rpc :with-test) + (qcheck-core :with-test) + (xapi-test-utils :with-test) + (xenstore_transport :with-test) + ) +) + (package (name xapi) (synopsis "The toolstack daemon which implements the XenAPI") @@ -462,23 +397,6 @@ ) ) -(package - (name wsproxy) - (synopsis "Websockets proxy for VNC traffic") - (authors "Jon Ludlam" "Marcello Seri") - (license "LGPL-2.0-only WITH OCaml-LGPL-linking-exception") - (depends - (alcotest :with-test) - (base64 (>= "3.1.0")) - fmt - logs - (lwt (>= "3.0.0")) - re - uuid - (qcheck-core :with-test) - ) -) - (package (name vhd-tool) (synopsis "Manipulate .vhd files") @@ -573,10 +491,6 @@ This package provides an Lwt compatible interface to the library.") (name safe-resources) ) -(package - (name rrddump) -) - (package (name rrd-transport) (synopsis "Shared-memory protocols for exposing system metrics") diff --git a/ocaml/networkd/bin/dune b/ocaml/networkd/bin/dune index c6bfffbbf52..9d755a10e37 100644 --- a/ocaml/networkd/bin/dune +++ b/ocaml/networkd/bin/dune @@ -45,13 +45,13 @@ ) (install - (package xapi-networkd) + (package xapi-tools) (section man) (files xcp-networkd.1) ) (install - (package xapi-networkd) + (package xapi-tools) (section sbin) (files (networkd.exe as xcp-networkd)) ) diff --git a/ocaml/networkd/bin_db/dune b/ocaml/networkd/bin_db/dune index b105b554b53..6997bd74d00 100644 --- a/ocaml/networkd/bin_db/dune +++ b/ocaml/networkd/bin_db/dune @@ -1,7 +1,7 @@ (executable (name networkd_db) (public_name networkd_db) - (package xapi-networkd) + (package xapi-tools) (modes exe) (libraries diff --git a/ocaml/networkd/test/dune b/ocaml/networkd/test/dune index 9d7ac2c9248..b3519ce2ec5 100644 --- a/ocaml/networkd/test/dune +++ b/ocaml/networkd/test/dune @@ -15,7 +15,7 @@ (rule (alias runtest) - (package xapi-networkd) + (package xapi-tools) (deps (:x network_test.exe) (source_tree jsonrpc_files) diff --git a/ocaml/squeezed/src/dune b/ocaml/squeezed/src/dune index 55dbbf92949..bb73a91f39d 100644 --- a/ocaml/squeezed/src/dune +++ b/ocaml/squeezed/src/dune @@ -30,7 +30,7 @@ ) (install - (package xapi-squeezed) + (package xapi-tools) (section sbin) (files (squeezed.exe as squeezed)) ) diff --git a/ocaml/squeezed/test/dune b/ocaml/squeezed/test/dune index a7bfdecca92..4d505fc5433 100644 --- a/ocaml/squeezed/test/dune +++ b/ocaml/squeezed/test/dune @@ -1,6 +1,6 @@ (test (name squeeze_test_main) - (package xapi-squeezed) + (package xapi-tools) (flags (:standard -bin-annot)) (libraries alcotest diff --git a/ocaml/tests/dune b/ocaml/tests/dune index 818d9288e70..b51bbca8b80 100644 --- a/ocaml/tests/dune +++ b/ocaml/tests/dune @@ -186,7 +186,7 @@ (rule (deps ../xenopsd/xc/xenops_xc_main.exe) (target xenops_xc_main.disasm) - (package xapi-xenopsd-xc) + (package xapi-tools) (action (with-stdout-to %{target} (run objdump %{deps} --wide -d --no-show-raw-insn) @@ -202,7 +202,7 @@ ) (rule (alias runtest) - (package xapi-xenopsd-xc) + (package xapi-tools) (deps (:script ./unix_select.gawk) (:disasm xenops_xc_main.disasm)) (action (run gawk -f ./%{script} %{disasm})) ) diff --git a/ocaml/wsproxy/cli/dune b/ocaml/wsproxy/cli/dune index 65797a35c69..4d6e72bfe7d 100644 --- a/ocaml/wsproxy/cli/dune +++ b/ocaml/wsproxy/cli/dune @@ -5,7 +5,7 @@ (executable (name wsproxy) (public_name wsproxy) - (package wsproxy) + (package xapi-tools) (libraries fmt logs diff --git a/ocaml/wsproxy/test/dune b/ocaml/wsproxy/test/dune index fafcac25646..0def0c88ccb 100644 --- a/ocaml/wsproxy/test/dune +++ b/ocaml/wsproxy/test/dune @@ -1,6 +1,6 @@ (test (name wsproxy_tests) (modes exe) - (package wsproxy) + (package xapi-tools) (libraries alcotest qcheck-core wslib) ) diff --git a/ocaml/xapi-idl/rrd/dune b/ocaml/xapi-idl/rrd/dune index 8a427a965e3..f7b2a8e7b70 100644 --- a/ocaml/xapi-idl/rrd/dune +++ b/ocaml/xapi-idl/rrd/dune @@ -44,7 +44,7 @@ (executable (name rrd_cli) (public_name rrd-cli) - (package xapi-rrdd) + (package xapi-tools) (modules rrd_cli) (modes exe) (libraries @@ -60,6 +60,6 @@ (rule (alias runtest) (deps (:x rrd_cli.exe)) - (package xapi-rrdd) + (package xapi-tools) (action (run %{x} --help=plain))) diff --git a/ocaml/xcp-rrdd/bin/rrdd/dune b/ocaml/xcp-rrdd/bin/rrdd/dune index 9a0905bb27e..c31182e4142 100644 --- a/ocaml/xcp-rrdd/bin/rrdd/dune +++ b/ocaml/xcp-rrdd/bin/rrdd/dune @@ -74,7 +74,7 @@ ) (install - (package xapi-rrdd) + (package xapi-tools) (files (xcp_rrdd.exe as xcp-rrdd)) (section sbin) ) diff --git a/ocaml/xcp-rrdd/bin/rrddump/dune b/ocaml/xcp-rrdd/bin/rrddump/dune index 0e79375137d..71c62c06db3 100644 --- a/ocaml/xcp-rrdd/bin/rrddump/dune +++ b/ocaml/xcp-rrdd/bin/rrddump/dune @@ -9,6 +9,6 @@ xapi-rrd.unix xmlm ) - (package rrddump) + (package xapi-tools) ) diff --git a/ocaml/xcp-rrdd/bin/transport-rw/dune b/ocaml/xcp-rrdd/bin/transport-rw/dune index 1b933823051..b080d67bd84 100644 --- a/ocaml/xcp-rrdd/bin/transport-rw/dune +++ b/ocaml/xcp-rrdd/bin/transport-rw/dune @@ -2,7 +2,7 @@ (modes exe) (names reader writer) (public_names rrdreader rrdwriter) - (package xapi-rrd-transport-utils) + (package xapi-tools) (libraries cmdliner diff --git a/ocaml/xcp-rrdd/test/rrdd/dune b/ocaml/xcp-rrdd/test/rrdd/dune index bf654c0e66f..77fc26aea49 100644 --- a/ocaml/xcp-rrdd/test/rrdd/dune +++ b/ocaml/xcp-rrdd/test/rrdd/dune @@ -1,7 +1,7 @@ (test (name test_rrdd_monitor) (modes exe) - (package xapi-rrdd) + (package xapi-tools) (libraries alcotest diff --git a/ocaml/xenopsd/cli/dune b/ocaml/xenopsd/cli/dune index 87dcdf98c8a..9b4b9baa7d6 100644 --- a/ocaml/xenopsd/cli/dune +++ b/ocaml/xenopsd/cli/dune @@ -29,7 +29,7 @@ (install (files (main.exe as xenops-cli)) (section sbin) - (package xapi-xenopsd-cli) + (package xapi-tools) ) (rule @@ -49,5 +49,5 @@ (install (section man) (files xenops-cli.1.gz) - (package xapi-xenopsd-cli) + (package xapi-tools) ) diff --git a/ocaml/xenopsd/dbgring/dune b/ocaml/xenopsd/dbgring/dune index 7e50d7f83f6..b9d4773b34e 100644 --- a/ocaml/xenopsd/dbgring/dune +++ b/ocaml/xenopsd/dbgring/dune @@ -1,7 +1,7 @@ (executable (name dbgring) ; (public_name dbgring) -; (package xapi-xenopsd-xc) +; (package xapi-tools) (libraries xapi_xenopsd diff --git a/ocaml/xenopsd/list_domains/dune b/ocaml/xenopsd/list_domains/dune index be8407cb32d..4cf065125c9 100644 --- a/ocaml/xenopsd/list_domains/dune +++ b/ocaml/xenopsd/list_domains/dune @@ -1,6 +1,6 @@ (executable (name list_domains) (public_name list_domains) - (package xapi-xenopsd-xc) + (package xapi-tools) (libraries xenctrl xapi-idl.memory ezxenstore.watch uuid) ) diff --git a/ocaml/xenopsd/pvs/dune b/ocaml/xenopsd/pvs/dune index facd232e0f2..bbd88cbb772 100644 --- a/ocaml/xenopsd/pvs/dune +++ b/ocaml/xenopsd/pvs/dune @@ -5,7 +5,7 @@ (install (section libexec_root) - (package xapi-xenopsd-xc) + (package xapi-tools) (files (pvs_proxy_setup.exe as pvs-proxy-ovs-setup) ) diff --git a/ocaml/xenopsd/scripts/dune b/ocaml/xenopsd/scripts/dune index 036965c492e..b58989d5a4d 100644 --- a/ocaml/xenopsd/scripts/dune +++ b/ocaml/xenopsd/scripts/dune @@ -1,6 +1,6 @@ (install (section libexec_root) - (package xapi-xenopsd-xc) + (package xapi-tools) (files (vif as vif) (vif-real as vif-real) diff --git a/ocaml/xenopsd/simulator/dune b/ocaml/xenopsd/simulator/dune index 295e1b43ab4..3d6248ff6b5 100644 --- a/ocaml/xenopsd/simulator/dune +++ b/ocaml/xenopsd/simulator/dune @@ -10,7 +10,7 @@ (install (files (xenops_simulator_main.exe as xenopsd-simulator)) (section sbin) - (package xapi-xenopsd-simulator) + (package xapi-tools) ) (rule @@ -30,5 +30,5 @@ (install (section man) (files xenopsd-simulator.1.gz) - (package xapi-xenopsd-simulator) + (package xapi-tools) ) diff --git a/ocaml/xenopsd/test/dune b/ocaml/xenopsd/test/dune index 2d3d34cc709..eb68e8ed393 100644 --- a/ocaml/xenopsd/test/dune +++ b/ocaml/xenopsd/test/dune @@ -1,7 +1,7 @@ (test (name test) (modes exe) - (package xapi-xenopsd-xc) + (package xapi-tools) (libraries alcotest cpuid @@ -26,7 +26,7 @@ (rule (alias runtest) - (package xapi-xenopsd-simulator) + (package xapi-tools) (deps (:x ../simulator/xenops_simulator_main.exe) ) diff --git a/ocaml/xenopsd/tools/dune b/ocaml/xenopsd/tools/dune index 4736daa0972..cdd062604df 100644 --- a/ocaml/xenopsd/tools/dune +++ b/ocaml/xenopsd/tools/dune @@ -6,5 +6,5 @@ (install (files (set_domain_uuid.exe as set-domain-uuid)) (section libexec_root) - (package xapi-xenopsd-xc) + (package xapi-tools) ) diff --git a/ocaml/xenopsd/xc/dune b/ocaml/xenopsd/xc/dune index 5ad84eb8097..1ee8a87e6e5 100644 --- a/ocaml/xenopsd/xc/dune +++ b/ocaml/xenopsd/xc/dune @@ -108,7 +108,7 @@ (install (files (xenops_xc_main.exe as xenopsd-xc)) (section sbin) - (package xapi-xenopsd-xc) + (package xapi-tools) ) (executable @@ -169,5 +169,5 @@ (install (section man) (files xenopsd-xc.1.gz) - (package xapi-xenopsd-xc) + (package xapi-tools) ) diff --git a/ocaml/xs-trace/dune b/ocaml/xs-trace/dune index 4e2213ce287..e34fc7e5575 100644 --- a/ocaml/xs-trace/dune +++ b/ocaml/xs-trace/dune @@ -2,7 +2,7 @@ (modes exe) (name xs_trace) (public_name xs-trace) - (package xapi-xenopsd-xc) + (package xapi-tools) (libraries uri tracing diff --git a/rrddump.opam b/rrddump.opam deleted file mode 100644 index 84464b418d3..00000000000 --- a/rrddump.opam +++ /dev/null @@ -1,16 +0,0 @@ -# This file is generated by dune, edit dune-project instead -license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" -opam-version: "2.0" -synopsis: "Tool to dump RRD contents to XML format" -description: "Tool to dump RRD contents to XML format" -maintainer: "xen-api@lists.xen.org" -authors: "John Else" -tags: "org:xapi-project" -homepage: "https://github.com/xapi-project/xen-api" -bug-reports: "https://github.com/xapi-project/xen-api/issues" -depends: ["rrd-transport" "xapi-rrd" "xmlm" "dune" {>= "3.15"}] -build: ["dune" "build" "-p" name "-j" jobs] -dev-repo: "git+https://github.com/xapi-project/xen-api.git" -url { - src: "https://github.com/xapi-project/xen-api/archive/master.tar.gz" -} diff --git a/rrddump.opam.template b/rrddump.opam.template deleted file mode 100644 index 1237bb624d5..00000000000 --- a/rrddump.opam.template +++ /dev/null @@ -1,14 +0,0 @@ -opam-version: "2.0" -synopsis: "Tool to dump RRD contents to XML format" -description: "Tool to dump RRD contents to XML format" -maintainer: "xen-api@lists.xen.org" -authors: "John Else" -tags: "org:xapi-project" -homepage: "https://github.com/xapi-project/xen-api" -bug-reports: "https://github.com/xapi-project/xen-api/issues" -depends: ["rrd-transport" "xapi-rrd" "xmlm" "dune" {>= "3.15"}] -build: ["dune" "build" "-p" name "-j" jobs] -dev-repo: "git+https://github.com/xapi-project/xen-api.git" -url { - src: "https://github.com/xapi-project/xen-api/archive/master.tar.gz" -} diff --git a/wsproxy.opam b/wsproxy.opam deleted file mode 100644 index 0d9e79c096c..00000000000 --- a/wsproxy.opam +++ /dev/null @@ -1,35 +0,0 @@ -# This file is generated by dune, edit dune-project instead -opam-version: "2.0" -synopsis: "Websockets proxy for VNC traffic" -maintainer: ["Xapi project maintainers"] -authors: ["Jon Ludlam" "Marcello Seri"] -license: "LGPL-2.0-only WITH OCaml-LGPL-linking-exception" -homepage: "https://xapi-project.github.io/" -bug-reports: "https://github.com/xapi-project/xen-api/issues" -depends: [ - "dune" {>= "3.15"} - "alcotest" {with-test} - "base64" {>= "3.1.0"} - "fmt" - "logs" - "lwt" {>= "3.0.0"} - "re" - "uuid" - "qcheck-core" {with-test} - "odoc" {with-doc} -] -build: [ - ["dune" "subst"] {dev} - [ - "dune" - "build" - "-p" - name - "-j" - jobs - "@install" - "@runtest" {with-test} - "@doc" {with-doc} - ] -] -dev-repo: "git+https://github.com/xapi-project/xen-api.git" diff --git a/xapi-rrd-transport-utils.opam b/xapi-rrd-transport-utils.opam deleted file mode 100644 index 754b956f157..00000000000 --- a/xapi-rrd-transport-utils.opam +++ /dev/null @@ -1,34 +0,0 @@ -# This file is generated by dune, edit dune-project instead -opam-version: "2.0" -synopsis: "Shared-memory protocols for exposing performance counters" -description: - "VMs running on a Xen host can use this library to expose performance counters which can be sampled by the xapi performance monitoring daemon." -maintainer: ["Xapi project maintainers"] -authors: ["John Else"] -license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" -homepage: "https://xapi-project.github.io/" -bug-reports: "https://github.com/xapi-project/xen-api/issues" -depends: [ - "dune" {>= "3.15"} - "ocaml" - "cmdliner" - "rrd-transport" {= version} - "xapi-idl" {= version} - "xapi-rrd" {= version} - "odoc" {with-doc} -] -build: [ - ["dune" "subst"] {dev} - [ - "dune" - "build" - "-p" - name - "-j" - jobs - "@install" - "@runtest" {with-test} - "@doc" {with-doc} - ] -] -dev-repo: "git+https://github.com/xapi-project/xen-api.git" diff --git a/xapi-rrdd.opam b/xapi-rrdd.opam deleted file mode 100644 index 62d448f2869..00000000000 --- a/xapi-rrdd.opam +++ /dev/null @@ -1,57 +0,0 @@ -# This file is generated by dune, edit dune-project instead -opam-version: "2.0" -synopsis: "Performance monitoring daemon for xapi" -description: - "This daemon monitors 'datasources' i.e. time-varying values such as performance counters and records the samples in RRD archives. These archives can be used to examine historical performance trends." -maintainer: ["Xapi project maintainers"] -authors: ["xen-api@lists.xen.org"] -license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" -homepage: "https://xapi-project.github.io/" -bug-reports: "https://github.com/xapi-project/xen-api/issues" -depends: [ - "dune" {>= "3.15"} - "ocaml" {>= "4.02.0"} - "alcotest" {with-test} - "astring" - "cmdliner" - "fmt" {with-test} - "gzip" {= version} - "http-lib" {= version} - "inotify" - "io-page" - "ipaddr" - "mtime" - "polly" - "ppx_deriving_rpc" - "rpclib" - "uri" - "ezxenstore" {= version} - "uuid" {= version} - "xapi-backtrace" - "xapi-idl" {= version} - "xapi-rrd" {= version} - "xapi-stdext-threads" {= version} - "xapi-stdext-unix" {= version} - "xapi-tracing" - "xenctrl" - "xenstore" - "xenstore_transport" - "xmlm" - "yojson" - "odoc" {with-doc} -] -build: [ - ["dune" "subst"] {dev} - [ - "dune" - "build" - "-p" - name - "-j" - jobs - "@install" - "@runtest" {with-test} - "@doc" {with-doc} - ] -] -dev-repo: "git+https://github.com/xapi-project/xen-api.git" diff --git a/xapi-squeezed.opam b/xapi-squeezed.opam deleted file mode 100644 index 7c4995d7e4f..00000000000 --- a/xapi-squeezed.opam +++ /dev/null @@ -1,40 +0,0 @@ -# This file is generated by dune, edit dune-project instead -authors: ["xen-api@lists.xen.org"] -license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" -opam-version: "2.0" -maintainer: "xen-api@lists.xen.org" -homepage: "https://github.com/xapi-project/xen-api" -bug-reports: "https://github.com/xapi-project/xen-api/issues" -dev-repo: "git+https://github.com/xapi-project/xen-api.git" -build: [ - ["dune" "build" "-p" name "-j" jobs] - ["dune" "build" "-p" name "-j" jobs "@runtest"] {with-test} -] -depends: [ - "ocaml" - "alcotest" {with-test} - "astring" - "cohttp" {>= "0.11.0"} - "dune" {>= "3.15"} - "re" - "rpclib" - "uri" - "uuid" - "xapi-idl" - "xapi-log" - "xapi-stdext-pervasives" - "xapi-stdext-threads" - "xapi-stdext-unix" - "xapi-types" - "xenctrl" {>= "0.9.20" & with-test} - "xenstore" - "xenstore_transport" -] -synopsis: "A memory ballooning daemon for the Xen hypervisor" -description: """ -The squeezed daemon shares host memory among running VMs using the -balloon drivers to move memory.""" -url { - src: - "https://github.com/xapi-project/xen-api/archive/master.tar.gz" -} diff --git a/xapi-squeezed.opam.template b/xapi-squeezed.opam.template deleted file mode 100644 index aa928933c0d..00000000000 --- a/xapi-squeezed.opam.template +++ /dev/null @@ -1,37 +0,0 @@ -opam-version: "2.0" -maintainer: "xen-api@lists.xen.org" -homepage: "https://github.com/xapi-project/xen-api" -bug-reports: "https://github.com/xapi-project/xen-api/issues" -dev-repo: "git+https://github.com/xapi-project/xen-api.git" -build: [ - ["dune" "build" "-p" name "-j" jobs] - ["dune" "build" "-p" name "-j" jobs "@runtest"] {with-test} -] -depends: [ - "ocaml" - "alcotest" {with-test} - "astring" - "cohttp" {>= "0.11.0"} - "dune" {>= "3.15"} - "re" - "rpclib" - "uri" - "uuid" - "xapi-idl" - "xapi-log" - "xapi-stdext-pervasives" - "xapi-stdext-threads" - "xapi-stdext-unix" - "xapi-types" - "xenctrl" {>= "0.9.20" & with-test} - "xenstore" - "xenstore_transport" -] -synopsis: "A memory ballooning daemon for the Xen hypervisor" -description: """ -The squeezed daemon shares host memory among running VMs using the -balloon drivers to move memory.""" -url { - src: - "https://github.com/xapi-project/xen-api/archive/master.tar.gz" -} diff --git a/xapi-networkd.opam b/xapi-tools.opam similarity index 63% rename from xapi-networkd.opam rename to xapi-tools.opam index a7df883bc7d..62a7bba7c8c 100644 --- a/xapi-networkd.opam +++ b/xapi-tools.opam @@ -1,35 +1,37 @@ # This file is generated by dune, edit dune-project instead opam-version: "2.0" -synopsis: "The XCP networking daemon" +synopsis: "Various daemons and CLI applications required by XAPI" +description: "Includes message-switch, xenopsd, forkexecd, ..." maintainer: ["Xapi project maintainers"] -authors: ["Jon Ludlam"] +authors: ["xen-api@lists.xen.org"] license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" homepage: "https://xapi-project.github.io/" bug-reports: "https://github.com/xapi-project/xen-api/issues" depends: [ "dune" {>= "3.15"} - "alcotest" {with-test} "astring" - "base-threads" - "forkexec" {= version} - "http-lib" {= version} - "integers" + "base64" + "cmdliner" + "cstruct-unix" + "fmt" + "logs" + "lwt" "mtime" "netlink" + "qmp" "re" "result" - "rresult" "rpclib" + "rresult" "uri" - "xapi-idl" {= version} - "xapi-inventory" - "xapi-stdext-pervasives" {= version} - "xapi-stdext-std" {= version} - "xapi-stdext-threads" {= version} - "xapi-stdext-unix" {= version} - "xapi-test-utils" - "xen-api-client" {= version} + "xenctrl" + "xmlm" "yojson" + "alcotest" {with-test} + "ppx_deriving_rpc" {with-test} + "qcheck-core" {with-test} + "xapi-test-utils" {with-test} + "xenstore_transport" {with-test} "odoc" {with-doc} ] build: [ diff --git a/xapi-xenopsd-cli.opam b/xapi-xenopsd-cli.opam deleted file mode 100644 index dfd3eab41f8..00000000000 --- a/xapi-xenopsd-cli.opam +++ /dev/null @@ -1,36 +0,0 @@ -# This file is generated by dune, edit dune-project instead -license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" -opam-version: "2.0" -maintainer: "xen-api@lists.xen.org" -authors: [ "xen-api@lists.xen.org" ] -homepage: "https://github.com/xapi-project/xen-api" -bug-reports: "https://github.com/xapi-project/xen-api/issues" -dev-repo: "git+https://github.com/xapi-project/xen-api.git" -build: [ - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] -depends: [ - "ocaml" - "dune" {>= "3.15"} - "astring" - "base-threads" - "cmdliner" - "ppx_deriving_rpc" - "re" - "result" - "rpclib" - "rresult" - "uuid" - "uuidm" - "xapi-idl" - "xenstore_transport" {with-test} - "yojson" -] -synopsis: "A simple command-line tool for interacting with xenopsd" -description: """ -A simple command-line tool for interacting with xenopsd -""" -url { - src: "https://github.com/xapi-project/xen-api/archive/master.tar.gz" -} diff --git a/xapi-xenopsd-cli.opam.template b/xapi-xenopsd-cli.opam.template deleted file mode 100644 index da363888e1b..00000000000 --- a/xapi-xenopsd-cli.opam.template +++ /dev/null @@ -1,34 +0,0 @@ -opam-version: "2.0" -maintainer: "xen-api@lists.xen.org" -authors: [ "xen-api@lists.xen.org" ] -homepage: "https://github.com/xapi-project/xen-api" -bug-reports: "https://github.com/xapi-project/xen-api/issues" -dev-repo: "git+https://github.com/xapi-project/xen-api.git" -build: [ - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] -depends: [ - "ocaml" - "dune" {>= "3.15"} - "astring" - "base-threads" - "cmdliner" - "ppx_deriving_rpc" - "re" - "result" - "rpclib" - "rresult" - "uuid" - "uuidm" - "xapi-idl" - "xenstore_transport" {with-test} - "yojson" -] -synopsis: "A simple command-line tool for interacting with xenopsd" -description: """ -A simple command-line tool for interacting with xenopsd -""" -url { - src: "https://github.com/xapi-project/xen-api/archive/master.tar.gz" -} diff --git a/xapi-xenopsd-simulator.opam b/xapi-xenopsd-simulator.opam deleted file mode 100644 index 16017fb218a..00000000000 --- a/xapi-xenopsd-simulator.opam +++ /dev/null @@ -1,40 +0,0 @@ -# This file is generated by dune, edit dune-project instead -license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" -opam-version: "2.0" -name: "xapi-xenopsd-simulator" -maintainer: "xen-api@lists.xen.org" -authors: "xen-api@lists.xen.org" -homepage: "https://github.com/xapi-project/xen-api" -dev-repo: "git+https://github.com/xapi-project/xen-api.git" -bug-reports: "https://github.com/xapi-project/xen-api/issues" -build: [ - ["./configure"] - [ "dune" "build" "-p" name "-j" jobs ] -] -depends: [ - "ocaml" - "dune" {>= "3.15"} - "base-unix" - "astring" - "cohttp" - "fd-send-recv" - "fmt" - "ppx_deriving_rpc" - "ppx_sexp_conv" - "re" - "result" - "rpclib" - "rresult" - "sexplib" - "sexplib0" - "uri" - "uuidm" - "uutf" - "xapi-backtrace" - "xmlm" -] -synopsis: - "Simulation backend allowing testing of the higher-level xenops logic" -url { - src: "https://github.com/xapi-project/xen-api/archive/master.tar.gz" -} diff --git a/xapi-xenopsd-simulator.opam.template b/xapi-xenopsd-simulator.opam.template deleted file mode 100644 index a11d9c74c19..00000000000 --- a/xapi-xenopsd-simulator.opam.template +++ /dev/null @@ -1,38 +0,0 @@ -opam-version: "2.0" -name: "xapi-xenopsd-simulator" -maintainer: "xen-api@lists.xen.org" -authors: "xen-api@lists.xen.org" -homepage: "https://github.com/xapi-project/xen-api" -dev-repo: "git+https://github.com/xapi-project/xen-api.git" -bug-reports: "https://github.com/xapi-project/xen-api/issues" -build: [ - ["./configure"] - [ "dune" "build" "-p" name "-j" jobs ] -] -depends: [ - "ocaml" - "dune" {>= "3.15"} - "base-unix" - "astring" - "cohttp" - "fd-send-recv" - "fmt" - "ppx_deriving_rpc" - "ppx_sexp_conv" - "re" - "result" - "rpclib" - "rresult" - "sexplib" - "sexplib0" - "uri" - "uuidm" - "uutf" - "xapi-backtrace" - "xmlm" -] -synopsis: - "Simulation backend allowing testing of the higher-level xenops logic" -url { - src: "https://github.com/xapi-project/xen-api/archive/master.tar.gz" -} diff --git a/xapi-xenopsd-xc.opam b/xapi-xenopsd-xc.opam deleted file mode 100644 index 9b2f6771bc4..00000000000 --- a/xapi-xenopsd-xc.opam +++ /dev/null @@ -1,67 +0,0 @@ -# This file is generated by dune, edit dune-project instead -license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" -opam-version: "2.0" -name: "xapi-xenopsd-xc" -maintainer: "xen-api@lists.xen.org" -authors: "xen-api@lists.xen.org" -homepage: "https://github.com/xapi-project/xen-api" -dev-repo: "git+https://github.com/xapi-project/xen-api.git" -bug-reports: "https://github.com/xapi-project/xen-api/issues" -build: [ - ["./configure"] - [ "dune" "build" "-p" name "-j" jobs ] - [ "dune" "runtest" "-p" name "-j" jobs] {with-test} -] -depends: [ - "ocaml" - "dune" {>= "3.15"} - "alcotest" {with-test} - "astring" - "base-threads" - "base-unix" - "base64" - "bos" - "cmdliner" - "cohttp" - "conf-xen" - "ezxenstore" - "fd-send-recv" - "fmt" {with-test} - "forkexec" - "inotify" - "mtime" - "polly" - "ppx_deriving_rpc" {with-test} - "ppx_sexp_conv" - "qmp" - "re" - "result" {with-test} - "rpclib" {with-test} - "rresult" - "sexplib" - "sexplib0" - "uri" - "uuid" - "uuidm" - "uutf" - "xapi-backtrace" - "xapi-idl" - "xapi-rrd" - "xapi-stdext-date" - "xapi-stdext-pervasives" - "xapi-stdext-std" - "xapi-stdext-threads" - "xapi-stdext-unix" - "xapi-test-utils" {with-test} - "xenctrl" - "xenstore" - "xenstore_transport" {with-test} - "xenmmap" - "xmlm" -] -synopsis: - "A xenops plugin which knows how to use xenstore, xenctrl and xenguest to manage" -description: "VMs on a xen host." -url { - src: "https://github.com/xapi-project/xen-api/archive/master.tar.gz" -} diff --git a/xapi-xenopsd-xc.opam.template b/xapi-xenopsd-xc.opam.template deleted file mode 100644 index 92b68a4f1a7..00000000000 --- a/xapi-xenopsd-xc.opam.template +++ /dev/null @@ -1,65 +0,0 @@ -opam-version: "2.0" -name: "xapi-xenopsd-xc" -maintainer: "xen-api@lists.xen.org" -authors: "xen-api@lists.xen.org" -homepage: "https://github.com/xapi-project/xen-api" -dev-repo: "git+https://github.com/xapi-project/xen-api.git" -bug-reports: "https://github.com/xapi-project/xen-api/issues" -build: [ - ["./configure"] - [ "dune" "build" "-p" name "-j" jobs ] - [ "dune" "runtest" "-p" name "-j" jobs] {with-test} -] -depends: [ - "ocaml" - "dune" {>= "3.15"} - "alcotest" {with-test} - "astring" - "base-threads" - "base-unix" - "base64" - "bos" - "cmdliner" - "cohttp" - "conf-xen" - "ezxenstore" - "fd-send-recv" - "fmt" {with-test} - "forkexec" - "inotify" - "mtime" - "polly" - "ppx_deriving_rpc" {with-test} - "ppx_sexp_conv" - "qmp" - "re" - "result" {with-test} - "rpclib" {with-test} - "rresult" - "sexplib" - "sexplib0" - "uri" - "uuid" - "uuidm" - "uutf" - "xapi-backtrace" - "xapi-idl" - "xapi-rrd" - "xapi-stdext-date" - "xapi-stdext-pervasives" - "xapi-stdext-std" - "xapi-stdext-threads" - "xapi-stdext-unix" - "xapi-test-utils" {with-test} - "xenctrl" - "xenstore" - "xenstore_transport" {with-test} - "xenmmap" - "xmlm" -] -synopsis: - "A xenops plugin which knows how to use xenstore, xenctrl and xenguest to manage" -description: "VMs on a xen host." -url { - src: "https://github.com/xapi-project/xen-api/archive/master.tar.gz" -} From 89563777283d41a73780ddd60bfebef4dd5cd2a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Mon, 16 Sep 2024 16:24:19 +0100 Subject: [PATCH 16/19] CP-51479: [maintenance]: use common dune install and uninstall variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Edwin Török --- Makefile | 52 +++++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index 29395da6340..3717f485b04 100644 --- a/Makefile +++ b/Makefile @@ -146,27 +146,37 @@ install-extra: install -D ./ocaml/xenopsd/scripts/pygrub-wrapper $(DESTDIR)/$(QEMU_WRAPPER_DIR)/pygrub-wrapper DESTDIR=$(DESTDIR) SBINDIR=$(SBINDIR) QEMU_WRAPPER_DIR=$(QEMU_WRAPPER_DIR) XENOPSD_LIBEXECDIR=$(XENOPSD_LIBEXECDIR) ETCDIR=$(ETCDIR) ./ocaml/xenopsd/scripts/make-custom-xenopsd.conf +# common flags and packages for 'dune install' and 'dune uninstall' +DUNE_IU_PACKAGES1=-j $(JOBS) --destdir=$(DESTDIR) --prefix=$(PREFIX) --libdir=$(LIBDIR) --mandir=$(MANDIR) +DUNE_IU_PACKAGES1+=--libexecdir=$(XENOPSD_LIBEXECDIR) --datadir=$(SDKDIR) +DUNE_IU_PACKAGES1+=xapi-client xapi-schema xapi-consts xapi-cli-protocol xapi-datamodel xapi-types +DUNE_IU_PACKAGES1+=xen-api-client xen-api-client-lwt xen-api-client-async rrdd-plugin rrd-transport +DUNE_IU_PACKAGES1+=gzip http-lib pciutil sexpr stunnel uuid xml-light2 zstd xapi-compression safe-resources +DUNE_IU_PACKAGES1+=message-switch message-switch-async message-switch-cli message-switch-core message-switch-lwt +DUNE_IU_PACKAGES1+=message-switch-unix xapi-idl forkexec xapi-forkexecd xapi-storage xapi-storage-script xapi-storage-cli +DUNE_IU_PACKAGES1+=xapi-nbd varstored-guard xapi-log xapi-open-uri xapi-tracing xapi-tracing-export xapi-expiry-alerts cohttp-posix +DUNE_IU_PACKAGES1+=xapi-rrd xapi-inventory clock xapi-sdk +DUNE_IU_PACKAGES1+=xapi-stdext-date xapi-stdext-encodings xapi-stdext-pervasives xapi-stdext-std xapi-stdext-threads xapi-stdext-unix xapi-stdext-zerocheck xapi-tools + + install-dune1: # dune can install libraries and several other files into the right locations - dune install -j $(JOBS) --destdir=$(DESTDIR) --prefix=$(PREFIX) --libdir=$(LIBDIR) --mandir=$(MANDIR) \ - --libexecdir=$(XENOPSD_LIBEXECDIR) --datadir=$(SDKDIR) \ - xapi-client xapi-schema xapi-consts xapi-cli-protocol xapi-datamodel xapi-types \ - xen-api-client xen-api-client-lwt xen-api-client-async rrdd-plugin rrd-transport \ - gzip http-lib pciutil sexpr stunnel uuid xml-light2 zstd xapi-compression safe-resources \ - message-switch message-switch-async message-switch-cli message-switch-core message-switch-lwt \ - message-switch-unix xapi-idl forkexec xapi-forkexecd xapi-storage xapi-storage-script xapi-storage-cli \ - xapi-nbd varstored-guard xapi-log xapi-open-uri xapi-tracing xapi-tracing-export xapi-expiry-alerts cohttp-posix \ - xapi-rrd xapi-inventory clock xapi-sdk\ - xapi-stdext-date xapi-stdext-encodings xapi-stdext-pervasives xapi-stdext-std xapi-stdext-threads xapi-stdext-unix xapi-stdext-zerocheck xapi-tools + dune install $(DUNE_IU_PACKAGES1) +DUNE_IU_PACKAGES2=-j $(JOBS) --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(OPTDIR)/libexec --datadir=$(DOCDIR) xapi xe + install-dune2: - dune install -j $(JOBS) --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(OPTDIR)/libexec --datadir=$(DOCDIR) xapi xe + dune install $(DUNE_IU_PACKAGES2) + +DUNE_IU_PACKAGES3=-j $(JOBS) --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(OPTDIR)/libexec --bindir=$(OPTDIR)/debug --datadir=$(OPTDIR)/debug xapi-debug install-dune3: - dune install -j $(JOBS) --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(OPTDIR)/libexec --bindir=$(OPTDIR)/debug --datadir=$(OPTDIR)/debug xapi-debug + dune install $(DUNE_IU_PACKAGES3) + +DUNE_IU_PACKAGES4=-j $(JOBS) --destdir=$(DESTDIR) --prefix=$(PREFIX) --libdir=$(LIBDIR) --libexecdir=/usr/libexec --mandir=$(MANDIR) vhd-tool install-dune4: - dune install -j $(JOBS) --destdir=$(DESTDIR) --prefix=$(PREFIX) --libdir=$(LIBDIR) --libexecdir=/usr/libexec --mandir=$(MANDIR) vhd-tool + dune install $(DUNE_IU_PACKAGES4) install: $(MAKE) -j $(JOBS) install-parallel @@ -181,18 +191,10 @@ install: uninstall: # only removes what was installed with `dune install` - dune uninstall --destdir=$(DESTDIR) --prefix=$(PREFIX) --libdir=$(LIBDIR) --mandir=$(MANDIR) \ - xapi-client xapi-schema xapi-consts xapi-cli-protocol xapi-datamodel xapi-types \ - xen-api-client xen-api-client-lwt xen-api-client-async rrdd-plugin rrd-transport \ - gzip http-lib pciutil sexpr stunnel uuid xml-light2 zstd xapi-compression safe-resources \ - message-switch message-switch-async message-switch-cli message-switch-core message-switch-lwt \ - message-switch-unix xapi-idl forkexec xapi-forkexecd xapi-storage xapi-storage-script xapi-log \ - xapi-open-uri xapi-tracing xapi-tracing-export xapi-expiry-alerts cohttp-posix \ - xapi-rrd xapi-inventory clock xapi-sdk\ - xapi-stdext-date xapi-stdext-encodings xapi-stdext-pervasives xapi-stdext-std xapi-stdext-threads xapi-stdext-unix xapi-stdext-zerocheck xapi-tools - dune uninstall --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) xapi xe - dune uninstall --destdir=$(DESTDIR) --prefix=$(PREFIX) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(XENOPSD_LIBEXECDIR) xapi-tools - dune uninstall --destdir=$(DESTDIR) --prefix=$(OPTDIR) --libdir=$(LIBDIR) --mandir=$(MANDIR) --libexecdir=$(OPTDIR)/libexec --bindir=$(OPTDIR)/debug --datadir=$(OPTDIR)/debug xapi-debug + dune uninstall $(DUNE_IU_PACKAGES1) + dune uninstall $(DUNE_IU_PACKAGES2) + dune uninstall $(DUNE_IU_PACKAGES3) + dune uninstall $(DUNE_IU_PACKAGES4) compile_flags.txt: Makefile (ocamlc -config-var ocamlc_cflags;\ From 4ce9906d9a3dfc745959fc8960998bcb6c1868b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Wed, 18 Sep 2024 09:51:28 +0100 Subject: [PATCH 17/19] CP-51479: [maintenance]: use 'if' instead of boolean logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Improves: 1bb454377364 ("CP-51479: [maintenance]: install SDK files using dune rules") Signed-off-by: Edwin Török --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3717f485b04..186b6c3e92f 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ OPTMANDIR ?= $(OPTDIR)/man/man1/ build: [ -z "${XAPI_VERSION}" ] || (sed -i '/(version.*)/d' dune-project && echo "(version ${XAPI_VERSION})" >> dune-project) # if available use external file, otherwise use built-in, this allows building XAPI without being root - ! test -f $(SHAREDIR)/sm/XE_SR_ERRORCODES.xml || cp $(SHAREDIR)/sm/XE_SR_ERRORCODES.xml ocaml/sdk-gen/csharp/XE_SR_ERRORCODES.xml + if test -f $(SHAREDIR)/sm/XE_SR_ERRORCODES.xml; then cp $(SHAREDIR)/sm/XE_SR_ERRORCODES.xml ocaml/sdk-gen/csharp/XE_SR_ERRORCODES.xml; fi dune build @ocaml/idl/update-dm-lifecycle -j $(JOBS) --profile=$(PROFILE) --auto-promote || dune build @ocaml/idl/update-dm-lifecycle -j $(JOBS) --profile=$(PROFILE) --auto-promote dune build -j $(JOBS) --profile=$(PROFILE) @install @ocaml/xapi-storage/python/xapi/storage/api/v5/python @ocaml/xapi-doc @ocaml/sdk-gen/sdkgen From 0a8fc6e64b0c59a8cb2d5ddf6d9fba68e9d0e7b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Thu, 19 Sep 2024 18:38:56 +0100 Subject: [PATCH 18/19] CP-51479: [maintenance]: fix opam dependencies after epoll merge MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit xs-opam build was failing due to missing dep between ezxenstore and xapi-stext-unix. opam-dune-lint didn't spot this one. Signed-off-by: Edwin Török --- xapi-datamodel.opam | 1 + xapi-datamodel.opam.template | 1 + 2 files changed, 2 insertions(+) diff --git a/xapi-datamodel.opam b/xapi-datamodel.opam index 4bc3b8ab90f..5925986447d 100644 --- a/xapi-datamodel.opam +++ b/xapi-datamodel.opam @@ -13,6 +13,7 @@ build: [ depends: [ "ocaml" "dune" {>= "3.15"} + "astring" {with-test} "mustache" "ppx_deriving_rpc" "rpclib" diff --git a/xapi-datamodel.opam.template b/xapi-datamodel.opam.template index aa34087cffc..22c306da48c 100644 --- a/xapi-datamodel.opam.template +++ b/xapi-datamodel.opam.template @@ -11,6 +11,7 @@ build: [ depends: [ "ocaml" "dune" {>= "3.15"} + "astring" {with-test} "mustache" "ppx_deriving_rpc" "rpclib" From 48f12a7edf7e76fc98120fb84b1490b8ba2cbfeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Fri, 20 Sep 2024 09:13:48 +0100 Subject: [PATCH 19/19] CP-51479: [maintenance]: fix opam dependency on rrd-transport MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This doesn't appear to be epoll related but causes an xs-opam failure. Signed-off-by: Edwin Török --- dune-project | 4 ++++ xapi-tools.opam | 1 + 2 files changed, 5 insertions(+) diff --git a/dune-project b/dune-project index 09d6dc29894..fc74adc8a6e 100644 --- a/dune-project +++ b/dune-project @@ -300,6 +300,10 @@ xenctrl xmlm yojson + ; can't use '= version' here yet, + ; 'xapi-tools' will have version ~dev, not 'master' like all the others + ; because it is not in xs-opam yet + rrd-transport (alcotest :with-test) (ppx_deriving_rpc :with-test) (qcheck-core :with-test) diff --git a/xapi-tools.opam b/xapi-tools.opam index 62a7bba7c8c..ba0f73b479f 100644 --- a/xapi-tools.opam +++ b/xapi-tools.opam @@ -27,6 +27,7 @@ depends: [ "xenctrl" "xmlm" "yojson" + "rrd-transport" "alcotest" {with-test} "ppx_deriving_rpc" {with-test} "qcheck-core" {with-test}