From 6e09fc568df9a0816dfa6a396960d907dd0b41e0 Mon Sep 17 00:00:00 2001 From: Pau Ruiz Safont Date: Fri, 5 Jul 2024 10:20:21 +0100 Subject: [PATCH 1/3] opam: generate xapi-forkexecd with dune Signed-off-by: Pau Ruiz Safont --- dune-project | 21 +++++++++++++++ forkexec.opam | 52 ++++++++++++++++++++---------------- forkexec.opam.template | 29 -------------------- xapi-forkexecd.opam | 51 ++++++++++++++++++----------------- xapi-forkexecd.opam.template | 30 --------------------- 5 files changed, 76 insertions(+), 107 deletions(-) delete mode 100644 forkexec.opam.template delete mode 100644 xapi-forkexecd.opam.template diff --git a/dune-project b/dune-project index 3240d722d69..ba66a2c0096 100644 --- a/dune-project +++ b/dune-project @@ -241,6 +241,14 @@ (package (name xapi-forkexecd) + (synopsis "Sub-process control service for xapi") + (description "This daemon creates and manages sub-processes on behalf of xapi.") + (depends + astring + (forkexec (= :version)) + (uuid (= :version)) + (xapi-stdext-unix (= :version)) + ) ) (package @@ -444,6 +452,19 @@ This package provides an Lwt compatible interface to the library.") (package (name forkexec) + (synopsis "Process-spawning library") + (description "Client and server library to spawn processes.") + (depends + base-threads + (fd-send-recv (>= "2.0.0")) + ppx_deriving_rpc + rpclib + (uuid (= :version)) + (xapi-log (= :version)) + (xapi-stdext-pervasives (= :version)) + (xapi-stdext-unix (= :version)) + (xapi-tracing (= :version)) + ) ) (package diff --git a/forkexec.opam b/forkexec.opam index a3296ea9771..3aea97441c2 100644 --- a/forkexec.opam +++ b/forkexec.opam @@ -1,31 +1,37 @@ # 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/" +synopsis: "Process-spawning library" +description: "Client and server library to spawn processes." +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" -dev-repo: "git+https://github.com/xapi-project/xen-api.git" -tags: [ "org:xapi-project" ] - -build: [[ "dune" "build" "-p" name "-j" jobs ]] - depends: [ - "ocaml" - "dune" + "dune" {>= "3.0"} "base-threads" - "fd-send-recv" + "fd-send-recv" {>= "2.0.0"} "ppx_deriving_rpc" "rpclib" - "uuid" - "xapi-log" - "xapi-stdext-pervasives" - "xapi-stdext-unix" - "xapi-tracing" + "uuid" {= version} + "xapi-log" {= version} + "xapi-stdext-pervasives" {= version} + "xapi-stdext-unix" {= version} + "xapi-tracing" {= version} + "odoc" {with-doc} ] -synopsis: "Sub-process control service for xapi" -description: - "This daemon creates and manages sub-processes on behalf of xapi." -url { - src: "https://github.com/xapi-project/xen-api/archive/master.tar.gz" -} +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/forkexec.opam.template b/forkexec.opam.template deleted file mode 100644 index cf537533421..00000000000 --- a/forkexec.opam.template +++ /dev/null @@ -1,29 +0,0 @@ -opam-version: "2.0" -maintainer: "xen-api@lists.xen.org" -authors: "xen-api@lists.xen.org" -homepage: "https://github.com/xapi-project/" -bug-reports: "https://github.com/xapi-project/xen-api/issues" -dev-repo: "git+https://github.com/xapi-project/xen-api.git" -tags: [ "org:xapi-project" ] - -build: [[ "dune" "build" "-p" name "-j" jobs ]] - -depends: [ - "ocaml" - "dune" - "base-threads" - "fd-send-recv" - "ppx_deriving_rpc" - "rpclib" - "uuid" - "xapi-log" - "xapi-stdext-pervasives" - "xapi-stdext-unix" - "xapi-tracing" -] -synopsis: "Sub-process control service for xapi" -description: - "This daemon creates and manages sub-processes on behalf of xapi." -url { - src: "https://github.com/xapi-project/xen-api/archive/master.tar.gz" -} diff --git a/xapi-forkexecd.opam b/xapi-forkexecd.opam index 51ce3a48d0a..900419be134 100644 --- a/xapi-forkexecd.opam +++ b/xapi-forkexecd.opam @@ -1,32 +1,33 @@ # 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/" +synopsis: "Sub-process control service for xapi" +description: + "This daemon creates and manages sub-processes on behalf of xapi." +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" -dev-repo: "git+https://github.com/xapi-project/xen-api.git" -tags: [ "org:xapi-project" ] - -build: [ - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] depends: [ - "ocaml" - "dune" + "dune" {>= "3.0"} "astring" - "forkexec" - "systemd" {>= "1.2"} - "uuid" - "xapi-stdext-unix" + "forkexec" {= version} + "uuid" {= version} + "xapi-stdext-unix" {= version} + "odoc" {with-doc} ] -conflicts: [ - "fd-send-recv" {< "2.0.0"} +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] ] -synopsis: "Sub-process control service for xapi" -description: - "This daemon creates and manages sub-processes on behalf of xapi." -url { - src: "https://github.com/xapi-project/xen-api/archive/master.tar.gz" -} +dev-repo: "git+https://github.com/xapi-project/xen-api.git" diff --git a/xapi-forkexecd.opam.template b/xapi-forkexecd.opam.template deleted file mode 100644 index 1c81daf10be..00000000000 --- a/xapi-forkexecd.opam.template +++ /dev/null @@ -1,30 +0,0 @@ -opam-version: "2.0" -maintainer: "xen-api@lists.xen.org" -authors: "xen-api@lists.xen.org" -homepage: "https://github.com/xapi-project/" -bug-reports: "https://github.com/xapi-project/xen-api/issues" -dev-repo: "git+https://github.com/xapi-project/xen-api.git" -tags: [ "org:xapi-project" ] - -build: [ - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] -depends: [ - "ocaml" - "dune" - "astring" - "forkexec" - "systemd" {>= "1.2"} - "uuid" - "xapi-stdext-unix" -] -conflicts: [ - "fd-send-recv" {< "2.0.0"} -] -synopsis: "Sub-process control service for xapi" -description: - "This daemon creates and manages sub-processes on behalf of xapi." -url { - src: "https://github.com/xapi-project/xen-api/archive/master.tar.gz" -} From 3f5e62d89a613f0da9f7fc6de5125ba20a364649 Mon Sep 17 00:00:00 2001 From: Pau Ruiz Safont Date: Fri, 5 Jul 2024 10:21:14 +0100 Subject: [PATCH 2/3] opam: remove unversioned opam dependencies Signed-off-by: Pau Ruiz Safont --- dune-project | 2 -- xapi-stdext-threads.opam | 1 - xapi-stdext-zerocheck.opam | 1 - 3 files changed, 4 deletions(-) diff --git a/dune-project b/dune-project index ba66a2c0096..20044d49199 100644 --- a/dune-project +++ b/dune-project @@ -534,7 +534,6 @@ This package provides an Lwt compatible interface to the library.") (synopsis "Xapi's standard library extension, Threads") (authors "Jonathan Ludlam") (depends - ocaml base-threads base-unix (odoc :with-doc) @@ -562,7 +561,6 @@ This package provides an Lwt compatible interface to the library.") (synopsis "Xapi's standard library extension, Zerocheck") (authors "Jonathan Ludlam") (depends - ocaml (odoc :with-doc) ) ) diff --git a/xapi-stdext-threads.opam b/xapi-stdext-threads.opam index de9699fe2e3..58e6fd0509e 100644 --- a/xapi-stdext-threads.opam +++ b/xapi-stdext-threads.opam @@ -8,7 +8,6 @@ homepage: "https://xapi-project.github.io/" bug-reports: "https://github.com/xapi-project/xen-api/issues" depends: [ "dune" {>= "3.0"} - "ocaml" "base-threads" "base-unix" "odoc" {with-doc} diff --git a/xapi-stdext-zerocheck.opam b/xapi-stdext-zerocheck.opam index fce24fb209d..6b6dfc62f9b 100644 --- a/xapi-stdext-zerocheck.opam +++ b/xapi-stdext-zerocheck.opam @@ -8,7 +8,6 @@ homepage: "https://xapi-project.github.io/" bug-reports: "https://github.com/xapi-project/xen-api/issues" depends: [ "dune" {>= "3.0"} - "ocaml" "odoc" {with-doc} ] build: [ From 832fd361acd9859a6bf26e6b7a20a19ae31bdee1 Mon Sep 17 00:00:00 2001 From: Pau Ruiz Safont Date: Fri, 5 Jul 2024 10:42:18 +0100 Subject: [PATCH 3/3] opam: generate xapi-networkd using dune Signed-off-by: Pau Ruiz Safont --- dune-project | 21 ++++++++++++++ xapi-networkd.opam | 55 +++++++++++++++++++++---------------- xapi-networkd.opam.template | 35 ----------------------- 3 files changed, 52 insertions(+), 59 deletions(-) delete mode 100644 xapi-networkd.opam.template diff --git a/dune-project b/dune-project index 20044d49199..cd4d286416c 100644 --- a/dune-project +++ b/dune-project @@ -225,6 +225,27 @@ (package (name xapi-networkd) + (authors "Jon Ludlam") + (synopsis "The XCP networking daemon") + (depends + (alcotest :with-test) + astring + base-threads + (forkexec (= :version)) + (http-lib (= :version)) + mtime + netlink + re + rpclib + (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)) + ) ) (package diff --git a/xapi-networkd.opam b/xapi-networkd.opam index 6a3f122d14f..595478821f2 100644 --- a/xapi-networkd.opam +++ b/xapi-networkd.opam @@ -1,37 +1,44 @@ # 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: "jonathan.ludlam@eu.citrix.com" -homepage: "https://github.com/xapi-project/xen-api" -dev-repo: "git+https://github.com/xapi-project/xen-api.git" +synopsis: "The XCP networking daemon" +maintainer: ["Xapi project maintainers"] +authors: ["Jon Ludlam"] +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" -build: [ - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] depends: [ - "astring" + "dune" {>= "3.0"} "alcotest" {with-test} + "astring" "base-threads" - "forkexec" - "http-lib" + "forkexec" {= version} + "http-lib" {= version} "mtime" "netlink" "re" "rpclib" - "systemd" - "xapi-idl" + "xapi-idl" {= version} "xapi-inventory" - "xapi-stdext-pervasives" - "xapi-stdext-std" - "xapi-stdext-threads" - "xapi-stdext-unix" + "xapi-stdext-pervasives" {= version} + "xapi-stdext-std" {= version} + "xapi-stdext-threads" {= version} + "xapi-stdext-unix" {= version} "xapi-test-utils" - "xen-api-client" + "xen-api-client" {= version} + "odoc" {with-doc} ] -synopsis: "The XCP networking daemon" -url { - src: - "https://github.com/xapi-project/xen-api/archive/master.tar.gz" -} +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-networkd.opam.template b/xapi-networkd.opam.template deleted file mode 100644 index b661773e09e..00000000000 --- a/xapi-networkd.opam.template +++ /dev/null @@ -1,35 +0,0 @@ -opam-version: "2.0" -maintainer: "xen-api@lists.xen.org" -authors: "jonathan.ludlam@eu.citrix.com" -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: [ - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] -depends: [ - "astring" - "alcotest" {with-test} - "base-threads" - "forkexec" - "http-lib" - "mtime" - "netlink" - "re" - "rpclib" - "systemd" - "xapi-idl" - "xapi-inventory" - "xapi-stdext-pervasives" - "xapi-stdext-std" - "xapi-stdext-threads" - "xapi-stdext-unix" - "xapi-test-utils" - "xen-api-client" -] -synopsis: "The XCP networking daemon" -url { - src: - "https://github.com/xapi-project/xen-api/archive/master.tar.gz" -}