Skip to content

Commit

Permalink
[maintenance]: enable generate_opam_files in dune-project
Browse files Browse the repository at this point in the history
Use the simplest solution: copy *.opam to *.opam.template so that we get exactly the same opam files as before,
and only declare the names in dune-project.

This will allow us to merge subprojects that already use dune-project to generate opam files (such as xapi-stdext),
and we can gradually move opam files to be generated by dune.
However first we should drop the opam files that we do not need,
which will be partially done in xapi-project#4939

Signed-off-by: Edwin Török <edwin.torok@cloud.com>
  • Loading branch information
edwintorok committed Jan 22, 2024
1 parent da5059d commit 86fe3d1
Show file tree
Hide file tree
Showing 123 changed files with 2,254 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cohttp-posix.opam
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# 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"
Expand Down
22 changes: 22 additions & 0 deletions cohttp-posix.opam.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
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.git"
dev-repo: "git+https://github.com/xapi-project/xen-api.git"
build: [[ "dune" "build" "-p" name "-j" jobs ]]

available: [ os = "linux" ]
depends: [
"ocaml"
"dune"
"cohttp"
]
synopsis: "Library required by xapi"
description: """
These libraries are provided for backwards compatibility only.
No new code should use these libraries."""
url {
src:
"https://github.com/xapi-project/xen-api/archive/master.tar.gz"
}
254 changes: 253 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1,3 +1,255 @@
(lang dune 2.0)

(formatting (enabled_for ocaml))

(generate_opam_files true)

(source (github xapi-project/xen-api))
(license "LGPL-2.1-only WITH OCaml-LGPL-linking-exception")
(authors "xen-api@lists.xen.org")
(maintainers "Xapi project maintainers")
(homepage "https://xapi-project.github.io/")

(package
(name zstd)
)

(package
(name xapi-rrdd-plugin)
)

(package
(name xml-light2)
)

(package
(name xen-api-sdk)
)

(package
(name xen-api-client-lwt)
)


(package
(name xen-api-client-async)
)

(package
(name xen-api-client)
)

(package
(name xe)
)

(package
(name xapi-xenopsd-xc)
)

(package
(name xapi-xenopsd-simulator)
)

(package
(name xapi-xenopsd-cli)
)

(package
(name xapi-xenopsd)
)

(package
(name xapi-types)
)

(package
(name xapi-tracing)
)

(package
(name xapi-storage-script)
)

(package
(name xapi-storage-cli)
)

(package
(name xapi-storage)
)

(package
(name xapi-squeezed)
)

(package
(name xapi-schema)
)

(package
(name rrdd-plugin)
)

(package
(name xapi-rrdd)
)

(package
(name xapi-rrd-transport-utils)
)

(package
(name xapi-rrd-transport)
)

(package
(name xapi-open-uri)
)

(package
(name xapi-networkd)
)

(package
(name xapi-nbd)
)

(package
(name xapi-log)
)

(package
(name xapi-idl)
)

(package
(name xapi-forkexecd)
)

(package
(name xapi-expiry-alerts)
)

(package
(name xapi-datamodel)
)

(package
(name xapi-consts)
)

(package
(name xapi-compression)
)

(package
(name xapi-client)
)

(package
(name xapi-cli-protocol)
)

(package
(name xapi)
)

(package
(name wsproxy)
)

(package
(name vhd-tool)
)

(package
(name vhd-format)
)

(package
(name vhd-format-lwt)
)

(package
(name varstored-guard)
)

(package
(name uuid)
)

(package
(name stunnel)
)

(package
(name sexpr)
)

(package
(name safe-resources)
)

(package
(name rrddump)
)

(package
(name rrdd-plugins)
)

(package
(name rrd2csv)
)

(package
(name rrd-transport)
)

(package
(name pciutil)
)

(package
(name message-switch-async)
)

(package
(name message-switch-lwt)
)

(package
(name message-switch-core)
)

(package
(name message-switch-cli)
)

(package
(name message-switch-unix)
)

(package
(name message-switch)
)

(package
(name http-lib)
)

(package
(name gzip)
)

(package
(name forkexec)
)

(package
(name ezxenstore)
)

(package
(name cohttp-posix)
)
2 changes: 2 additions & 0 deletions ezxenstore.opam
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is generated by dune, edit dune-project instead

opam-version: "2.0"
maintainer: "xapi project maintainers"
authors: ["Jonathan Ludlam"]
Expand Down
27 changes: 27 additions & 0 deletions ezxenstore.opam.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
opam-version: "2.0"
maintainer: "xapi project maintainers"
authors: ["Jonathan Ludlam"]
license: "ISC"
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 ]]
depends: [
"ocaml"
"dune" {>= "1.4"}
"cmdliner" {with-test & >= "1.1.0"}
"logs"
"uuidm"
"xenctrl"
"xenstore"
"xenstore_transport"
]
synopsis:
"An easy-to-use interface to xenstore"
description: """
An easy-to-use xenstore library with a simplified interface geared
towards use within a daemon that maintains a single connection to
xenstored."""
url {
src: "https://github.com/xapi-project/xen-api/archive/master.tar.gz"
}
2 changes: 2 additions & 0 deletions forkexec.opam
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# 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"
Expand Down
28 changes: 28 additions & 0 deletions forkexec.opam.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
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"
]
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"
}
2 changes: 2 additions & 0 deletions gzip.opam
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# 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"
Expand Down
22 changes: 22 additions & 0 deletions gzip.opam.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
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.git"
dev-repo: "git+https://github.com/xapi-project/xen-api.git"
build: [[ "dune" "build" "-p" name "-j" jobs ]]

available: [ os = "linux" ]
depends: [
"ocaml"
"dune"
"xapi-compression"
]
synopsis: "Library required by xapi"
description: """
These libraries are provided for backwards compatibility only.
No new code should use these libraries."""
url {
src:
"https://github.com/xapi-project/xen-api/archive/master.tar.gz"
}
2 changes: 2 additions & 0 deletions http-lib.opam
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# 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"
Expand Down
Loading

0 comments on commit 86fe3d1

Please sign in to comment.