diff --git a/.gitignore b/.gitignore index 82cc2ac7..53be9c42 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,5 @@ *.swp _build/ -*.docdir -*.native -*.byte *~ #* *# diff --git a/.travis.yml b/.travis.yml index 1b04e8cc..cb076f73 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ env: global: - PACKAGE="xenstore" matrix: - - DISTRO=alpine OCAML_VERSION=4.04.0 - - DISTRO=alpine OCAML_VERSION=4.05.0 - - DISTRO=alpine OCAML_VERSION=4.06.0 + - DISTRO=alpine OCAML_VERSION=4.04 + - DISTRO=alpine OCAML_VERSION=4.05 + - DISTRO=alpine OCAML_VERSION=4.06 + - DISTRO=alpine OCAML_VERSION=4.07 diff --git a/CHANGES.md b/CHANGES.md index 243c47ef..beaf4594 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,10 @@ +## 2.1.0 (2019-02-03) + +* Upgrade opam metadata to 2.0 format (@avsm) +* Port build from jbuilder to Dune (@avsm) +* Test on OCaml 4.07 (@avsm) +* Remove topkg metadata in favour of dune-release (@avsm) + ## 2.0.1 (2018-08-01) * Improved efficiency of unmarshalling code diff --git a/README b/README deleted file mode 100644 index 741dc2cd..00000000 --- a/README +++ /dev/null @@ -1,7 +0,0 @@ -This repo contains: - 1. a xenstore client library, a merge of the Mirage and XCP ones - 2. a xenstore server library - 3. a xenstore server instance which runs under Unix with libxc - 4. a xenstore server instance which runs on mirage. - -The client and the server libraries have sets of unit-tests. diff --git a/README.md b/README.md new file mode 100644 index 00000000..b6b35836 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# xenstore - implementation of the XenStore protocol in OCaml + +This repo contains: +1. a xenstore client library, a merge of the Mirage and XCP ones +2. a xenstore server library +3. a xenstore server instance which runs under Unix with libxc +4. a xenstore server instance which runs on mirage. + +The client and the server libraries have sets of unit-tests. diff --git a/client_lwt/dune b/client_lwt/dune new file mode 100644 index 00000000..c0c78711 --- /dev/null +++ b/client_lwt/dune @@ -0,0 +1,6 @@ +(library + (name xenstore_client) + (public_name xenstore.client) + (wrapped false) + (libraries lwt xenstore) + (flags :standard -safe-string)) diff --git a/client_lwt/jbuild b/client_lwt/jbuild deleted file mode 100644 index 7ec2cf14..00000000 --- a/client_lwt/jbuild +++ /dev/null @@ -1,7 +0,0 @@ -(library - ((name xenstore_client) - (public_name xenstore.client) - (wrapped false) - (libraries (lwt xenstore)) - (flags (:standard -safe-string)) -)) diff --git a/client_unix/dune b/client_unix/dune new file mode 100644 index 00000000..fa414d60 --- /dev/null +++ b/client_unix/dune @@ -0,0 +1,6 @@ +(library + (name xenstore_unix) + (public_name xenstore.unix) + (wrapped false) + (libraries unix threads xenstore) + (flags :standard -safe-string)) diff --git a/client_unix/jbuild b/client_unix/jbuild deleted file mode 100644 index 6f20f68a..00000000 --- a/client_unix/jbuild +++ /dev/null @@ -1,7 +0,0 @@ -(library - ((name xenstore_unix) - (public_name xenstore.unix) - (wrapped false) - (libraries (unix threads xenstore)) - (flags (:standard -safe-string)) -)) diff --git a/core/dune b/core/dune new file mode 100644 index 00000000..1f5bf5a4 --- /dev/null +++ b/core/dune @@ -0,0 +1,8 @@ +(library + (name xenstore) + (public_name xenstore) + (wrapped false) + (libraries cstruct) + (preprocess + (pps ppx_cstruct)) + (flags :standard -safe-string)) diff --git a/core/jbuild b/core/jbuild deleted file mode 100644 index 368bec33..00000000 --- a/core/jbuild +++ /dev/null @@ -1,9 +0,0 @@ -(library - ((name xenstore) - (public_name xenstore) - (wrapped false) - (libraries (cstruct)) - (preprocess (pps (ppx_cstruct))) - (flags (:standard -safe-string)) -)) - diff --git a/core_test/dune b/core_test/dune new file mode 100644 index 00000000..5ad5e2a4 --- /dev/null +++ b/core_test/dune @@ -0,0 +1,11 @@ +(executables + (names xs_test) + (libraries lwt lwt.unix xenstore oUnit) + (flags :standard -safe-string)) + +(alias + (name runtest) + (deps + (:< xs_test.exe)) + (action + (run %{<}))) diff --git a/core_test/jbuild b/core_test/jbuild deleted file mode 100644 index 8e2a12e6..00000000 --- a/core_test/jbuild +++ /dev/null @@ -1,9 +0,0 @@ -(executables - ((names (xs_test)) - (libraries (lwt lwt.unix xenstore oUnit)) - (flags (:standard -safe-string)) -)) -(alias - ((name runtest) - (deps (xs_test.exe)) - (action (run ${<} )))) diff --git a/doc/api.odocl b/doc/api.odocl deleted file mode 100644 index f0bc8158..00000000 --- a/doc/api.odocl +++ /dev/null @@ -1,7 +0,0 @@ -# OASIS_START -# DO NOT EDIT (digest: 5e15a0d4a681cc1730dc53ed60a82391) -Xs_protocol -Xs_handle -Xs_client_lwt -Xs_client_unix -# OASIS_STOP diff --git a/dune-project b/dune-project new file mode 100644 index 00000000..e93babd2 --- /dev/null +++ b/dune-project @@ -0,0 +1,2 @@ +(lang dune 1.0) +(name xenstore) diff --git a/pkg/pkg.ml b/pkg/pkg.ml deleted file mode 100644 index 4d126672..00000000 --- a/pkg/pkg.ml +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ocaml -#use "topfind" -#require "topkg-jbuilder.auto" diff --git a/server/dune b/server/dune new file mode 100644 index 00000000..9f99573b --- /dev/null +++ b/server/dune @@ -0,0 +1,5 @@ +(library + (name xenstore_server) + (public_name xenstore.server) + (libraries lwt xenstore) + (flags :standard -safe-string)) diff --git a/server/jbuild b/server/jbuild deleted file mode 100644 index d0d24088..00000000 --- a/server/jbuild +++ /dev/null @@ -1,6 +0,0 @@ -(library - ((name xenstore_server) - (public_name xenstore.server) - (libraries (lwt xenstore)) - (flags (:standard -safe-string)) -)) diff --git a/server/store.mli b/server/store.mli index 8ee5678b..e033f23e 100644 --- a/server/store.mli +++ b/server/store.mli @@ -32,7 +32,7 @@ module Name : sig type t (** The name of an entity which may be watched. Note that not all these - entities are stored in the xenstore tree (e.g. @introduceDomain) *) + entities are stored in the xenstore tree (e.g. [@introduceDomain]) *) val introduceDomain: t (** The special watch when a domain is created *) diff --git a/server_test/dune b/server_test/dune new file mode 100644 index 00000000..a281f541 --- /dev/null +++ b/server_test/dune @@ -0,0 +1,11 @@ +(executables + (names server_test) + (libraries lwt lwt.unix xenstore xenstore.server oUnit) + (flags :standard -safe-string)) + +(alias + (name runtest) + (deps + (:< server_test.exe)) + (action + (run %{<}))) diff --git a/server_test/jbuild b/server_test/jbuild deleted file mode 100644 index 9aa868b5..00000000 --- a/server_test/jbuild +++ /dev/null @@ -1,9 +0,0 @@ -(executables - ((names (server_test)) - (libraries (lwt lwt.unix xenstore xenstore.server oUnit)) - (flags (:standard -safe-string)) -)) -(alias - ((name runtest) - (deps (server_test.exe)) - (action (run ${<} )))) diff --git a/xenstore.opam b/xenstore.opam index 75875efc..7d06e907 100644 --- a/xenstore.opam +++ b/xenstore.opam @@ -1,30 +1,36 @@ -opam-version: "1.2" -maintainer: "dave@recoil.org" -authors: [ +opam-version: "2.0" +maintainer: "dave@recoil.org" +authors: [ "Vincent Hanquez" "Thomas Gazagnaire" "Dave Scott" "Anil Madhavapeddy" "Vincent Bernardoff" ] -homepage: "https://github.com/mirage/ocaml-xenstore" -bug-reports: "https://github.com/mirage/ocaml-xenstore/issues" -dev-repo: "https://github.com/mirage/ocaml-xenstore.git" -doc: "https://mirage.github.io/ocaml-xenstore" - -build: [ - ["jbuilder" "subst" "-p" name "--name" name] {pinned} - ["jbuilder" "build" "-p" name "-j" jobs] -] - -build-test: ["jbuilder" "runtest" "-p" name] - +homepage: "https://github.com/mirage/ocaml-xenstore" +doc: "https://mirage.github.io/ocaml-xenstore/" +bug-reports: "https://github.com/mirage/ocaml-xenstore/issues" depends: [ - "jbuilder" {build & >="1.0+beta9"} + "ocaml" {>= "4.04.0"} + "dune" {build & >= "1.0"} "cstruct" {>= "3.2.0"} "ppx_cstruct" {>= "3.2.0"} - "ppx_tools" {build} "lwt" - "ounit" {test} + "ounit" {with-test} +] +build: [ + ["dune" "subst"] {pinned} + ["dune" "build" "-p" name "-j" jobs] + ["dune" "runtest" "-p" name "-j" jobs] {with-test} ] -available: [ ocaml-version >= "4.04.0" ] +dev-repo: "git+https://github.com/mirage/ocaml-xenstore.git" +synopsis: "Xenstore protocol in pure OCaml" +description: """ +This repo contains: +1. a xenstore client library, a merge of the Mirage and XCP ones +2. a xenstore server library +3. a xenstore server instance which runs under Unix with libxc +4. a xenstore server instance which runs on mirage. + +The client and the server libraries have sets of unit-tests. +"""