diff --git a/packages/upstream/cstruct-lwt.3.3.0/opam b/packages/upstream/cstruct-lwt.4.0.0/opam similarity index 86% rename from packages/upstream/cstruct-lwt.3.3.0/opam rename to packages/upstream/cstruct-lwt.4.0.0/opam index 962934865..ef988fca7 100644 --- a/packages/upstream/cstruct-lwt.3.3.0/opam +++ b/packages/upstream/cstruct-lwt.4.0.0/opam @@ -2,7 +2,7 @@ opam-version: "2.0" maintainer: "anil@recoil.org" authors: ["Anil Madhavapeddy" "Richard Mortier" "Thomas Gazagnaire" "Pierre Chambart" "David Kaloper" "Jeremy Yallop" "David Scott" - "Mindy Preston" "Thomas Leonard" ] + "Mindy Preston" "Thomas Leonard" "Etienne Millon" ] homepage: "https://github.com/mirage/ocaml-cstruct" license: "ISC" dev-repo: "git+https://github.com/mirage/ocaml-cstruct.git" @@ -17,7 +17,7 @@ depends: [ "ocaml" {>= "4.03.0"} "base-unix" "lwt" - "cstruct" {>="3.2.0"} + "cstruct" {=version} "dune" {build & >= "1.0"} ] synopsis: "Access C-like structures directly from OCaml" @@ -27,6 +27,6 @@ structures directly from OCaml. It supports both reading and writing to these structures, and they are accessed via the `Bigarray` module.""" url { src: - "https://github.com/mirage/ocaml-cstruct/releases/download/v3.3.0/cstruct-v3.3.0.tbz" - checksum: "md5=7451389f3941d938575f8887c55c5e6b" + "https://github.com/mirage/ocaml-cstruct/releases/download/v4.0.0/cstruct-v4.0.0.tbz" + checksum: "md5=e01a2036d1fb08d1d8e47d4f3e122bf0" } diff --git a/packages/upstream/cstruct-sexp.4.0.0/opam b/packages/upstream/cstruct-sexp.4.0.0/opam new file mode 100644 index 000000000..fdcaf4cfa --- /dev/null +++ b/packages/upstream/cstruct-sexp.4.0.0/opam @@ -0,0 +1,36 @@ +opam-version: "2.0" +maintainer: "anil@recoil.org" +authors: ["Anil Madhavapeddy" "Richard Mortier" "Thomas Gazagnaire" + "Pierre Chambart" "David Kaloper" "Jeremy Yallop" "David Scott" + "Mindy Preston" "Thomas Leonard" "Anton Kochkov" "Etienne Millon" ] +homepage: "https://github.com/mirage/ocaml-cstruct" +license: "ISC" +dev-repo: "git+https://github.com/mirage/ocaml-cstruct.git" +bug-reports: "https://github.com/mirage/ocaml-cstruct/issues" +doc: "https://mirage.github.io/ocaml-cstruct/" + +tags: [ "org:mirage" "org:ocamllabs" ] +build: [ + ["dune" "subst"] {pinned} + ["dune" "build" "-p" name "-j" jobs] + ["dune" "runtest" "-p" name "-j" jobs] {with-test} +] +depends: [ + "ocaml" {>= "4.03.0"} + "dune" {build & >= "1.0"} + "sexplib" {< "v0.13"} + "cstruct" {=version} + "alcotest" {with-test} +] +synopsis: "S-expression serialisers for C-like structures" +description: """ +Cstruct is a library and syntax extension to make it easier to access C-like +structures directly from OCaml. It supports both reading and writing to these +structures, and they are accessed via the `Bigarray` module. + +This library provides Sexplib serialisers for the Cstruct.t values.""" +url { + src: + "https://github.com/mirage/ocaml-cstruct/releases/download/v4.0.0/cstruct-v4.0.0.tbz" + checksum: "md5=e01a2036d1fb08d1d8e47d4f3e122bf0" +} diff --git a/packages/upstream/cstruct-unix.3.3.0/opam b/packages/upstream/cstruct-unix.4.0.0/opam similarity index 83% rename from packages/upstream/cstruct-unix.3.3.0/opam rename to packages/upstream/cstruct-unix.4.0.0/opam index 303aa59a8..c4478bb90 100644 --- a/packages/upstream/cstruct-unix.3.3.0/opam +++ b/packages/upstream/cstruct-unix.4.0.0/opam @@ -2,7 +2,7 @@ opam-version: "2.0" maintainer: "anil@recoil.org" authors: ["Anil Madhavapeddy" "Richard Mortier" "Thomas Gazagnaire" "Pierre Chambart" "David Kaloper" "Jeremy Yallop" "David Scott" - "Mindy Preston" "Thomas Leonard" ] + "Mindy Preston" "Thomas Leonard" "Etienne Millon" ] homepage: "https://github.com/mirage/ocaml-cstruct" license: "ISC" dev-repo: "git+https://github.com/mirage/ocaml-cstruct.git" @@ -15,10 +15,10 @@ build: [ ["dune" "build" "-p" name "-j" jobs] ] depends: [ - "ocaml" {>= "4.03.0"} + "ocaml" {>= "4.06.0"} "dune" {build & >= "1.0"} "base-unix" - "cstruct" {>="3.2.0"} + "cstruct" {=version} ] synopsis: "Access C-like structures directly from OCaml" @@ -29,6 +29,6 @@ structures, and they are accessed via the `Bigarray` module. """ url { src: - "https://github.com/mirage/ocaml-cstruct/releases/download/v3.3.0/cstruct-v3.3.0.tbz" - checksum: "md5=7451389f3941d938575f8887c55c5e6b" + "https://github.com/mirage/ocaml-cstruct/releases/download/v4.0.0/cstruct-v4.0.0.tbz" + checksum: "md5=e01a2036d1fb08d1d8e47d4f3e122bf0" } diff --git a/packages/upstream/cstruct.3.3.0/opam b/packages/upstream/cstruct.4.0.0/opam similarity index 87% rename from packages/upstream/cstruct.3.3.0/opam rename to packages/upstream/cstruct.4.0.0/opam index 038743d51..e3d03e5a6 100644 --- a/packages/upstream/cstruct.3.3.0/opam +++ b/packages/upstream/cstruct.4.0.0/opam @@ -2,7 +2,7 @@ opam-version: "2.0" maintainer: "anil@recoil.org" authors: ["Anil Madhavapeddy" "Richard Mortier" "Thomas Gazagnaire" "Pierre Chambart" "David Kaloper" "Jeremy Yallop" "David Scott" - "Mindy Preston" "Thomas Leonard" ] + "Mindy Preston" "Thomas Leonard" "Anton Kochkov" "Etienne Millon" ] homepage: "https://github.com/mirage/ocaml-cstruct" license: "ISC" dev-repo: "git+https://github.com/mirage/ocaml-cstruct.git" @@ -18,7 +18,6 @@ build: [ depends: [ "ocaml" {>= "4.03.0"} "dune" {build & >= "1.0"} - "sexplib" {< "v0.12"} "alcotest" {with-test} ] synopsis: "Access C-like structures directly from OCaml" @@ -28,6 +27,6 @@ structures directly from OCaml. It supports both reading and writing to these structures, and they are accessed via the `Bigarray` module.""" url { src: - "https://github.com/mirage/ocaml-cstruct/releases/download/v3.3.0/cstruct-v3.3.0.tbz" - checksum: "md5=7451389f3941d938575f8887c55c5e6b" + "https://github.com/mirage/ocaml-cstruct/releases/download/v4.0.0/cstruct-v4.0.0.tbz" + checksum: "md5=e01a2036d1fb08d1d8e47d4f3e122bf0" } diff --git a/packages/upstream/nocrypto.0.5.4+1/files/0001-Update-to-support-latest-cstruct-and-ppx_sexp_conv-a.patch b/packages/upstream/nocrypto.0.5.4+1/files/0001-Update-to-support-latest-cstruct-and-ppx_sexp_conv-a.patch deleted file mode 100644 index 3ed4818cb..000000000 --- a/packages/upstream/nocrypto.0.5.4+1/files/0001-Update-to-support-latest-cstruct-and-ppx_sexp_conv-a.patch +++ /dev/null @@ -1,151 +0,0 @@ -From cfab75e7e1c1806efba8da73e6823a9cc5b76601 Mon Sep 17 00:00:00 2001 -From: Docker CI -Date: Wed, 16 May 2018 10:35:39 +0000 -Subject: [PATCH] Update to support latest cstruct and ppx_sexp_conv, and added - missing ocplib-endian dependency - -Signed-off-by: Marcello Seri ---- - _tags | 2 +- - bench/runnable.ml | 2 +- - opam | 3 ++- - pkg/META | 2 +- - src/nocrypto.mli | 28 ++++++++++++++-------------- - tests/testlib.ml | 2 +- - 6 files changed, 20 insertions(+), 19 deletions(-) - -diff --git a/_tags b/_tags -index 6d4e7de..c291666 100644 ---- a/_tags -+++ b/_tags -@@ -1,7 +1,7 @@ - true: color(always) - true: bin_annot, safe_string - true: warn(A-4-29-33-40-41-42-43-34-44-48) --true: package(bytes), package(cstruct) -+true: package(bytes), package(cstruct), package(ocplib-endian), package(ppx_sexp_conv.runtime-lib) - - : include - : package(zarith), package(sexplib), package(ppx_sexp_conv) -diff --git a/bench/runnable.ml b/bench/runnable.ml -index 506a6be..7b02df0 100644 ---- a/bench/runnable.ml -+++ b/bench/runnable.ml -@@ -142,7 +142,7 @@ let rsa_feedback bits = - Printf.printf "+ generating...\n%!"; - generate ~e bits in - Printf.printf "%s\n%!" -- (Sexplib.Sexp.to_string_hum (sexp_of_priv key)); -+ (Ppx_sexp_conv_lib.Sexp.to_string_hum (sexp_of_priv key)); - - let c = - Printf.printf "+ encrypt...\n%!"; -diff --git a/opam b/opam -index ad1dbc7..3d52c72 100644 ---- a/opam -+++ b/opam -@@ -20,11 +20,12 @@ depends: [ - "topkg" {build} - "cpuid" {build} - "ocb-stubblr" {build} -- "ppx_sexp_conv" {build} -+ "ppx_sexp_conv" - "oUnit" {test} - "cstruct" - "zarith" - "sexplib" -+ "ocplib-endian" - ("mirage-no-xen" | ("mirage-xen" & "mirage-entropy" & "zarith-xen")) - ("mirage-no-solo5" | ("mirage-solo5" & "mirage-entropy" & "zarith-freestanding")) - ] -diff --git a/pkg/META b/pkg/META -index 242b2bb..258bfc4 100644 ---- a/pkg/META -+++ b/pkg/META -@@ -1,6 +1,6 @@ - version = "%%VERSION_NUM%%" - description = "Simple crypto for the modern age" --requires = "cstruct zarith sexplib" -+requires = "cstruct zarith sexplib ocplib-endian ppx_sexp_conv.runtime-lib" - archive(byte) = "nocrypto.cma" - archive(native) = "nocrypto.cmxa" - plugin(byte) = "nocrypto.cma" -diff --git a/src/nocrypto.mli b/src/nocrypto.mli -index 21fec3f..b7fae6e 100644 ---- a/src/nocrypto.mli -+++ b/src/nocrypto.mli -@@ -214,8 +214,8 @@ module Hash : sig - val module_of : [< hash ] -> (module S) - - (**/**) -- val hash_of_sexp : Sexplib.Sexp.t -> hash -- val sexp_of_hash : hash -> Sexplib.Sexp.t -+ val hash_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> hash -+ val sexp_of_hash : hash -> Ppx_sexp_conv_lib.Sexp.t - (**/**) - - end -@@ -780,11 +780,11 @@ module Rsa : sig - end - - (**/**) -- val pub_of_sexp : Sexplib.Sexp.t -> pub -- val sexp_of_pub : pub -> Sexplib.Sexp.t -+ val pub_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> pub -+ val sexp_of_pub : pub -> Ppx_sexp_conv_lib.Sexp.t - -- val priv_of_sexp : Sexplib.Sexp.t -> priv -- val sexp_of_priv : priv -> Sexplib.Sexp.t -+ val priv_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> priv -+ val sexp_of_priv : priv -> Ppx_sexp_conv_lib.Sexp.t - (**/**) - - end -@@ -867,11 +867,11 @@ module Dsa : sig - end - - (**/**) -- val pub_of_sexp : Sexplib.Sexp.t -> pub -- val sexp_of_pub : pub -> Sexplib.Sexp.t -+ val pub_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> pub -+ val sexp_of_pub : pub -> Ppx_sexp_conv_lib.Sexp.t - -- val priv_of_sexp : Sexplib.Sexp.t -> priv -- val sexp_of_priv : priv -> Sexplib.Sexp.t -+ val priv_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> priv -+ val sexp_of_priv : priv -> Ppx_sexp_conv_lib.Sexp.t - (**/**) - - end -@@ -960,11 +960,11 @@ module Dh : sig - end - - (**/**) -- val group_of_sexp : Sexplib.Sexp.t -> group -- val sexp_of_group : group -> Sexplib.Sexp.t -+ val group_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> group -+ val sexp_of_group : group -> Ppx_sexp_conv_lib.Sexp.t - -- val secret_of_sexp : Sexplib.Sexp.t -> secret -- val sexp_of_secret : secret -> Sexplib.Sexp.t -+ val secret_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> secret -+ val sexp_of_secret : secret -> Ppx_sexp_conv_lib.Sexp.t - (**/**) - - end -diff --git a/tests/testlib.ml b/tests/testlib.ml -index d4a8f08..d82365e 100644 ---- a/tests/testlib.ml -+++ b/tests/testlib.ml -@@ -156,7 +156,7 @@ let b64_selftest n = - let gen_rsa ~bits = - let e = Z.(if bits < 24 then ~$3 else ~$0x10001) in - let key = Rsa.(generate ~e bits) in -- let key_s = Sexplib.Sexp.to_string_hum Rsa.(sexp_of_priv key) in -+ let key_s = Ppx_sexp_conv_lib.Sexp.to_string_hum Rsa.(sexp_of_priv key) in - assert_equal - ~msg:Printf.(sprintf "key size not %d bits:\n%s" bits key_s) - bits Rsa.(priv_bits key); --- -1.8.3.1 - diff --git a/packages/upstream/nocrypto.0.5.4+2/files/0001-add-missing-runtime-dependencies-in-_tags.patch b/packages/upstream/nocrypto.0.5.4+2/files/0001-add-missing-runtime-dependencies-in-_tags.patch new file mode 100644 index 000000000..1b3b9720c --- /dev/null +++ b/packages/upstream/nocrypto.0.5.4+2/files/0001-add-missing-runtime-dependencies-in-_tags.patch @@ -0,0 +1,47 @@ +From 6f97531287a3e3ee749f2277248af28bdc85b8e4 Mon Sep 17 00:00:00 2001 +From: Gabriel Scherer +Date: Mon, 26 Mar 2018 16:09:16 +0200 +Subject: [PATCH 1/4] add missing runtime dependencies in _tags + +Binaries in , depend on ppx_sexp_conv's runtime +library within ppx_sexp_conv. + +The packed modules also depend on the package +ppx_sexp_conv: its presence at pack-creation time influences the +generated .cmi interface, see + + https://github.com/ocaml/opam-repository/pull/11628#issuecomment-375697444 + +Note: the package ppx_sexp_conv.runtime-lib would suffice, but it is +only available as such under recent ppx_sexp_conv versions, so its +explicit use would make the build description (needlessly) +incompatible with older ppx_sexp_conv versions. +--- + _tags | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/_tags b/_tags +index 6d4e7de..c2a6610 100644 +--- a/_tags ++++ b/_tags +@@ -7,6 +7,7 @@ true: package(bytes), package(cstruct) + : package(zarith), package(sexplib), package(ppx_sexp_conv) + and not : for-pack(Nocrypto) + : link_stubs(src/libnocrypto_stubs) ++: package(ppx_sexp_conv) + + : include + : package(unix), package(bytes) +@@ -19,7 +20,7 @@ true: package(bytes), package(cstruct) + + <**/*.c>: ccopt(--std=c99 -Wall -Wextra -O3) + +-: use_nocrypto, package(zarith), package(cstruct.unix) +-: use_nocrypto, package(zarith), package(oUnit) ++: use_nocrypto, package(zarith), package(ppx_sexp_conv) ++: use_nocrypto, package(zarith), package(ppx_sexp_conv), package(oUnit) + + : -traverse +-- +2.18.0 + diff --git a/packages/upstream/nocrypto.0.5.4+2/files/0002-add-ppx_sexp_conv-as-a-runtime-dependency-in-the-pac.patch b/packages/upstream/nocrypto.0.5.4+2/files/0002-add-ppx_sexp_conv-as-a-runtime-dependency-in-the-pac.patch new file mode 100644 index 000000000..e4d343951 --- /dev/null +++ b/packages/upstream/nocrypto.0.5.4+2/files/0002-add-ppx_sexp_conv-as-a-runtime-dependency-in-the-pac.patch @@ -0,0 +1,39 @@ +From dc799fd2a66c41ca7729201a5d038cd403ca1de6 Mon Sep 17 00:00:00 2001 +From: Gabriel Scherer +Date: Tue, 27 Mar 2018 12:00:23 +0200 +Subject: [PATCH 2/4] add ppx_sexp_conv as a runtime dependency in the + packaging metadata + +--- + opam | 2 +- + pkg/META | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/opam b/opam +index ad1dbc7..c35570b 100644 +--- a/opam ++++ b/opam +@@ -20,7 +20,7 @@ depends: [ + "topkg" {build} + "cpuid" {build} + "ocb-stubblr" {build} +- "ppx_sexp_conv" {build} ++ "ppx_sexp_conv" + "oUnit" {test} + "cstruct" + "zarith" +diff --git a/pkg/META b/pkg/META +index 242b2bb..a7929c7 100644 +--- a/pkg/META ++++ b/pkg/META +@@ -1,6 +1,6 @@ + version = "0.5.4" + description = "Simple crypto for the modern age" +-requires = "cstruct zarith sexplib" ++requires = "cstruct zarith sexplib ppx_sexp_conv" + archive(byte) = "nocrypto.cma" + archive(native) = "nocrypto.cmxa" + plugin(byte) = "nocrypto.cma" +-- +2.18.0 + diff --git a/packages/upstream/nocrypto.0.5.4+2/files/0003-Auto-detect-ppx_sexp_conv-runtime-library.patch b/packages/upstream/nocrypto.0.5.4+2/files/0003-Auto-detect-ppx_sexp_conv-runtime-library.patch new file mode 100644 index 000000000..e2f03a133 --- /dev/null +++ b/packages/upstream/nocrypto.0.5.4+2/files/0003-Auto-detect-ppx_sexp_conv-runtime-library.patch @@ -0,0 +1,146 @@ +From ad9278021a65d423e30765e58110848adda4b13e Mon Sep 17 00:00:00 2001 +From: Jeremie Dimino +Date: Fri, 11 May 2018 15:44:47 +0200 +Subject: [PATCH 3/4] Auto-detect ppx_sexp_conv runtime library + +--- + myocamlbuild.ml | 25 ++++++++++++++++++++++--- + pkg/META | 43 ------------------------------------------- + pkg/META.in | 43 +++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 65 insertions(+), 46 deletions(-) + delete mode 100644 pkg/META + create mode 100644 pkg/META.in + +diff --git a/myocamlbuild.ml b/myocamlbuild.ml +index 2752315..7b29635 100644 +--- a/myocamlbuild.ml ++++ b/myocamlbuild.ml +@@ -1,5 +1,24 @@ + open Ocamlbuild_plugin + +-let () = dispatch Ocb_stubblr.( +- init & ccopt ~tags:["accelerate"] "-DACCELERATE -msse2 -maes" +-) ++let runtime_deps_of_ppx ppx = ++ (Findlib.query "ppx_sexp_conv").dependencies ++ |> List.filter_opt (fun { Findlib.name; _ } -> ++ if name = ppx || name = "ppx_deriving" then ++ None ++ else ++ Some name) ++ ++let () = dispatch (fun hook -> ++ Ocb_stubblr.( ++ init & ccopt ~tags:["accelerate"] "-DACCELERATE -msse2 -maes" ++ ) hook; ++ match hook with ++ | After_rules -> ++ let meta = "pkg/META" in ++ let meta_in = meta ^ ".in" in ++ rule meta ~dep:meta_in ~prod:meta (fun _ _ -> ++ let deps = String.concat " " (runtime_deps_of_ppx "ppx_sexp_conv") in ++ Echo([String.subst "PPX_SEXP_CONV_RUNTIME" deps ++ (Pathname.read meta_in)], ++ meta)) ++ | _ -> ()) +diff --git a/pkg/META b/pkg/META +deleted file mode 100644 +index a7929c7..0000000 +--- a/pkg/META ++++ /dev/null +@@ -1,43 +0,0 @@ +-version = "0.5.4" +-description = "Simple crypto for the modern age" +-requires = "cstruct zarith sexplib ppx_sexp_conv" +-archive(byte) = "nocrypto.cma" +-archive(native) = "nocrypto.cmxa" +-plugin(byte) = "nocrypto.cma" +-plugin(native) = "nocrypto.cmxs" +-xen_linkopts = "-lnocrypto_stubs+mirage-xen" +-freestanding_linkopts = "-lnocrypto_stubs+mirage-freestanding" +-exists_if = "nocrypto.cma" +- +-package "unix" ( +- version = "0.5.4" +- description = "Simple crypto for the modern age" +- requires = "nocrypto unix bytes" +- archive(byte) = "nocrypto_unix.cma" +- archive(native) = "nocrypto_unix.cmxa" +- plugin(byte) = "nocrypto_unix.cma" +- plugin(native) = "nocrypto_unix.cmxs" +- exists_if = "nocrypto_unix.cma" +-) +- +-package "lwt" ( +- version = "0.5.4" +- description = "Simple crypto for the modern age" +- requires = "nocrypto nocrypto.unix lwt.unix cstruct.lwt" +- archive(byte) = "nocrypto_lwt.cma" +- archive(native) = "nocrypto_lwt.cmxa" +- plugin(byte) = "nocrypto_lwt.cma" +- plugin(native) = "nocrypto_lwt.cmxs" +- exists_if = "nocrypto_lwt.cma" +-) +- +-package "mirage" ( +- version = "0.5.4" +- description = "Simple crypto for the modern age" +- requires = "nocrypto lwt mirage-entropy" +- archive(byte) = "nocrypto_mirage.cma" +- archive(native) = "nocrypto_mirage.cmxa" +- plugin(byte) = "nocrypto_mirage.cma" +- plugin(native) = "nocrypto_mirage.cmxs" +- exists_if = "nocrypto_mirage.cma" +-) +diff --git a/pkg/META.in b/pkg/META.in +new file mode 100644 +index 0000000..0b263d7 +--- /dev/null ++++ b/pkg/META.in +@@ -0,0 +1,43 @@ ++version = "0.5.4" ++description = "Simple crypto for the modern age" ++requires = "cstruct zarith sexplib PPX_SEXP_CONV_RUNTIME" ++archive(byte) = "nocrypto.cma" ++archive(native) = "nocrypto.cmxa" ++plugin(byte) = "nocrypto.cma" ++plugin(native) = "nocrypto.cmxs" ++xen_linkopts = "-lnocrypto_stubs+mirage-xen" ++freestanding_linkopts = "-lnocrypto_stubs+mirage-freestanding" ++exists_if = "nocrypto.cma" ++ ++package "unix" ( ++ version = "0.5.4" ++ description = "Simple crypto for the modern age" ++ requires = "nocrypto unix bytes" ++ archive(byte) = "nocrypto_unix.cma" ++ archive(native) = "nocrypto_unix.cmxa" ++ plugin(byte) = "nocrypto_unix.cma" ++ plugin(native) = "nocrypto_unix.cmxs" ++ exists_if = "nocrypto_unix.cma" ++) ++ ++package "lwt" ( ++ version = "0.5.4" ++ description = "Simple crypto for the modern age" ++ requires = "nocrypto nocrypto.unix lwt.unix cstruct.lwt" ++ archive(byte) = "nocrypto_lwt.cma" ++ archive(native) = "nocrypto_lwt.cmxa" ++ plugin(byte) = "nocrypto_lwt.cma" ++ plugin(native) = "nocrypto_lwt.cmxs" ++ exists_if = "nocrypto_lwt.cma" ++) ++ ++package "mirage" ( ++ version = "0.5.4" ++ description = "Simple crypto for the modern age" ++ requires = "nocrypto lwt mirage-entropy" ++ archive(byte) = "nocrypto_mirage.cma" ++ archive(native) = "nocrypto_mirage.cmxa" ++ plugin(byte) = "nocrypto_mirage.cma" ++ plugin(native) = "nocrypto_mirage.cmxs" ++ exists_if = "nocrypto_mirage.cma" ++) +-- +2.18.0 + diff --git a/packages/upstream/nocrypto.0.5.4+2/files/0004-pack-package-workaround-ocamlbuild-272.patch b/packages/upstream/nocrypto.0.5.4+2/files/0004-pack-package-workaround-ocamlbuild-272.patch new file mode 100644 index 000000000..8bda0dbaf --- /dev/null +++ b/packages/upstream/nocrypto.0.5.4+2/files/0004-pack-package-workaround-ocamlbuild-272.patch @@ -0,0 +1,38 @@ +From 063b3496340fe4c3544b532ec0d27797b7917bb4 Mon Sep 17 00:00:00 2001 +From: Gabriel Scherer +Date: Mon, 26 Mar 2018 16:07:45 +0200 +Subject: [PATCH 4/4] pack+package: workaround ocamlbuild#272 + +ocamlbuild should pass -package(...) flags to ocamlfind when building +a -pack-ed file, see + + https://github.com/ocaml/opam-repository/pull/11628#issuecomment-375697444 +--- + myocamlbuild.ml | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/myocamlbuild.ml b/myocamlbuild.ml +index 7b29635..7a5cdb6 100644 +--- a/myocamlbuild.ml ++++ b/myocamlbuild.ml +@@ -8,9 +8,17 @@ let runtime_deps_of_ppx ppx = + else + Some name) + ++let ocamlfind_and_pack = function ++ | After_rules -> ++ if !Options.use_ocamlfind then ++ pflag ["ocaml"; "pack"] "package" ++ (fun pkg -> S [A "-package"; A pkg]); ++ | _ -> () ++ + let () = dispatch (fun hook -> + Ocb_stubblr.( + init & ccopt ~tags:["accelerate"] "-DACCELERATE -msse2 -maes" ++ & ocamlfind_and_pack + ) hook; + match hook with + | After_rules -> +-- +2.18.0 + diff --git a/packages/upstream/nocrypto.0.5.4+2/files/0005-use-modern-cstruct-findlib.patch b/packages/upstream/nocrypto.0.5.4+2/files/0005-use-modern-cstruct-findlib.patch new file mode 100644 index 000000000..406df1c70 --- /dev/null +++ b/packages/upstream/nocrypto.0.5.4+2/files/0005-use-modern-cstruct-findlib.patch @@ -0,0 +1,32 @@ +From 063b3496340fe4c3544b532ec0d27797b7917bb4 Mon Sep 17 00:00:00 2001 +From: Anil Madhavapeddy +Date: Tue, 12 Mar 2019 09:07:13 +0000 +Subject: [PATCH 5/5] use modern cstruct findlib + +see https://discuss.ocaml.org/t/psa-cstruct-3-4-0-removes-old-ocamlfind-subpackage-aliases/3275 + +--- a/_tags.orig 2019-03-12 09:03:58.000000000 +0000 ++++ b/_tags 2019-03-12 09:04:12.000000000 +0000 +@@ -13,7 +13,7 @@ + : package(unix), package(bytes) + + : include +-: package(lwt.unix), package(cstruct.lwt) ++: package(lwt.unix), package(cstruct-lwt) + + : include + : package(lwt), package(mirage-entropy) +--- a/pkg/META.in.orig 2019-03-12 09:03:19.000000000 +0000 ++++ b/pkg/META.in 2019-03-12 09:03:33.000000000 +0000 +@@ -23,7 +23,7 @@ + package "lwt" ( + version = "0.5.4" + description = "Simple crypto for the modern age" +- requires = "nocrypto nocrypto.unix lwt.unix cstruct.lwt" ++ requires = "nocrypto nocrypto.unix lwt.unix cstruct-lwt" + archive(byte) = "nocrypto_lwt.cma" + archive(native) = "nocrypto_lwt.cmxa" + plugin(byte) = "nocrypto_lwt.cma" +-- +2.18.0 + diff --git a/packages/upstream/nocrypto.0.5.4+2/files/0006-explicit-dependency-on-sexplib.patch b/packages/upstream/nocrypto.0.5.4+2/files/0006-explicit-dependency-on-sexplib.patch new file mode 100644 index 000000000..80c8075f5 --- /dev/null +++ b/packages/upstream/nocrypto.0.5.4+2/files/0006-explicit-dependency-on-sexplib.patch @@ -0,0 +1,24 @@ +From 063b3496340fe4c3544b532ec0d27797b7917bb4 Mon Sep 17 00:00:00 2001 +From: Anil Madhavapeddy +Date: Tue, 26 Mar 2019 20:07:13 +0000 +Subject: [PATCH 6/6] explicitly depend on sexplib + +Need to explicitly depend on sexplib rather than hope +it is a transitive dependency of cstruct. This lets +cstruct.4.0.0 work which makes sexplib optional. + +--- a/_tags.orig 2019-03-26 20:33:33.000000000 +0000 ++++ b/_tags 2019-03-26 20:33:42.000000000 +0000 +@@ -1,7 +1,7 @@ + true: color(always) + true: bin_annot, safe_string + true: warn(A-4-29-33-40-41-42-43-34-44-48) +-true: package(bytes), package(cstruct) ++true: package(bytes), package(sexplib), package(cstruct) + + : include + : package(zarith), package(sexplib), package(ppx_sexp_conv) + +-- +2.18.0 + diff --git a/packages/upstream/nocrypto.0.5.4+1/opam b/packages/upstream/nocrypto.0.5.4+2/opam similarity index 61% rename from packages/upstream/nocrypto.0.5.4+1/opam rename to packages/upstream/nocrypto.0.5.4+2/opam index a07028ffe..aaed92fa6 100644 --- a/packages/upstream/nocrypto.0.5.4+1/opam +++ b/packages/upstream/nocrypto.0.5.4+2/opam @@ -21,12 +21,11 @@ depends: [ "topkg" {build} "cpuid" {build} "ocb-stubblr" {build} - "ppx_deriving" {build} - "ppx_sexp_conv" {build} + "ppx_deriving" + "ppx_sexp_conv" {>= "113.33.01" & != "v0.11.0"} "ounit" {with-test} - "cstruct" {>= "2.4.0"} + "cstruct" {>= "3.0.0"} "cstruct-lwt" - "ocplib-endian" "zarith" "lwt" "sexplib" @@ -35,13 +34,19 @@ depends: [ ("mirage-solo5" & "mirage-entropy" & "zarith-freestanding") ] conflicts: [ - "topkg" {<"0.8.0"} + "topkg" {<"0.9.1"} "ocb-stubblr" {<"0.1.0"} "mirage-xen" {<"2.2.0"} "sexplib" {="v0.9.0"} ] + patches: [ - "0001-Update-to-support-latest-cstruct-and-ppx_sexp_conv-a.patch" + "0001-add-missing-runtime-dependencies-in-_tags.patch" + "0002-add-ppx_sexp_conv-as-a-runtime-dependency-in-the-pac.patch" + "0003-Auto-detect-ppx_sexp_conv-runtime-library.patch" + "0004-pack-package-workaround-ocamlbuild-272.patch" + "0005-use-modern-cstruct-findlib.patch" + "0006-explicit-dependency-on-sexplib.patch" ] synopsis: "Simpler crypto" description: """ @@ -52,8 +57,30 @@ SHA1, SHA2), public-key primitives (RSA, DSA, DH) and a strong RNG (Fortuna). RSA timing attacks are countered by blinding. AES timing attacks are avoided by delegating to AES-NI.""" extra-files: [ - "0001-Update-to-support-latest-cstruct-and-ppx_sexp_conv-a.patch" - "md5=01ace16f550833f967f955255b2b65b8" + [ + "0006-explicit-dependency-on-sexplib.patch" + "md5=7f552e18ba304eb4e1e19d66d19b7888" + ] + [ + "0005-use-modern-cstruct-findlib.patch" + "md5=4d4aab890f0ca9327d83548c32d64efc" + ] + [ + "0004-pack-package-workaround-ocamlbuild-272.patch" + "md5=94615e4a8d5976e9e75c3b031d3484f1" + ] + [ + "0003-Auto-detect-ppx_sexp_conv-runtime-library.patch" + "md5=871b3f904cf87527b7390993d5598884" + ] + [ + "0002-add-ppx_sexp_conv-as-a-runtime-dependency-in-the-pac.patch" + "md5=06962f4f2f5b4c3f1e39293b3d3528f2" + ] + [ + "0001-add-missing-runtime-dependencies-in-_tags.patch" + "md5=ae679a096e14c0a0ecb881bc7432cc2a" + ] ] url { src: diff --git a/packages/upstream/ppx_cstruct.3.3.0/opam b/packages/upstream/ppx_cstruct.4.0.0/opam similarity index 79% rename from packages/upstream/ppx_cstruct.3.3.0/opam rename to packages/upstream/ppx_cstruct.4.0.0/opam index 9f7cda832..1f7dcf2f4 100644 --- a/packages/upstream/ppx_cstruct.3.3.0/opam +++ b/packages/upstream/ppx_cstruct.4.0.0/opam @@ -2,7 +2,7 @@ opam-version: "2.0" maintainer: "anil@recoil.org" authors: ["Anil Madhavapeddy" "Richard Mortier" "Thomas Gazagnaire" "Pierre Chambart" "David Kaloper" "Jeremy Yallop" "David Scott" - "Mindy Preston" "Thomas Leonard" ] + "Mindy Preston" "Thomas Leonard" "Etienne Millon" ] homepage: "https://github.com/mirage/ocaml-cstruct" license: "ISC" dev-repo: "git+https://github.com/mirage/ocaml-cstruct.git" @@ -18,13 +18,14 @@ build: [ depends: [ "ocaml" {>= "4.03.0"} "dune" {build & >= "1.0"} - "cstruct" {>= "3.1.1"} + "cstruct" {=version} "ounit" {with-test} "ppx_tools_versioned" {>= "5.0.1"} "ocaml-migrate-parsetree" - "ppx_driver" {with-test & >= "v0.9.0"} - "ppx_sexp_conv" {with-test & < "v0.12"} - "cstruct-unix" {with-test} + "ppx_sexp_conv" {with-test & < "v0.13"} + "sexplib" {< "v0.13"} + "cstruct-sexp" {with-test} + "cstruct-unix" {with-test & =version} ] synopsis: "Access C-like structures directly from OCaml" description: """ @@ -33,6 +34,6 @@ structures directly from OCaml. It supports both reading and writing to these structures, and they are accessed via the `Bigarray` module.""" url { src: - "https://github.com/mirage/ocaml-cstruct/releases/download/v3.3.0/cstruct-v3.3.0.tbz" - checksum: "md5=7451389f3941d938575f8887c55c5e6b" + "https://github.com/mirage/ocaml-cstruct/releases/download/v4.0.0/cstruct-v4.0.0.tbz" + checksum: "md5=e01a2036d1fb08d1d8e47d4f3e122bf0" } diff --git a/packages/upstream/tar-unix.1.0.1/opam b/packages/upstream/tar-unix.1.1.0/opam similarity index 71% rename from packages/upstream/tar-unix.1.0.1/opam rename to packages/upstream/tar-unix.1.1.0/opam index a71731016..21ce34775 100644 --- a/packages/upstream/tar-unix.1.0.1/opam +++ b/packages/upstream/tar-unix.1.1.0/opam @@ -12,7 +12,6 @@ depends: [ "cstruct" {>= "1.9.0"} "cstruct-lwt" "re" - "result" "lwt" ] build: [ @@ -27,6 +26,9 @@ streaming. This library provides a Unix or Windows compatible interface. """ url { src: - "https://github.com/mirage/ocaml-tar/releases/download/v1.0.1/tar-v1.0.1.tbz" - checksum: "md5=0018b647a829299f0bf88a85c80b8a54" + "https://github.com/mirage/ocaml-tar/releases/download/v1.1.0/tar-v1.1.0.tbz" + checksum: [ + "sha256=c48e4ce128058fac4ae1a0f3d2d49f42d9a736a3bf166b59f086e6e6f926018d" + "sha512=ea273a8fefab42624c42da9d1a02557d1c51d4d8c0d032e8d8a17e0f6866c56b3ab0b32eacb8ad788bbf6983bff36ac072353af08a730b6b26f9c45d4d4f521a" + ] } diff --git a/packages/upstream/tar.1.0.1/opam b/packages/upstream/tar.1.1.0/opam similarity index 68% rename from packages/upstream/tar.1.0.1/opam rename to packages/upstream/tar.1.1.0/opam index e832a8a8c..eebe23096 100644 --- a/packages/upstream/tar.1.0.1/opam +++ b/packages/upstream/tar.1.1.0/opam @@ -9,10 +9,9 @@ depends: [ "ocaml" {>= "4.03.0"} "dune" {build & >= "1.0"} "ppx_tools" {build} - "ppx_cstruct" {>= "3.1.0"} + "ppx_cstruct" {>= "3.6.0"} "cstruct" {>= "1.9.0"} "re" - "result" ] build: [ ["dune" "subst"] {pinned} @@ -28,6 +27,9 @@ This is pure OCaml code, no C bindings. """ url { src: - "https://github.com/mirage/ocaml-tar/releases/download/v1.0.1/tar-v1.0.1.tbz" - checksum: "md5=0018b647a829299f0bf88a85c80b8a54" + "https://github.com/mirage/ocaml-tar/releases/download/v1.1.0/tar-v1.1.0.tbz" + checksum: [ + "sha256=c48e4ce128058fac4ae1a0f3d2d49f42d9a736a3bf166b59f086e6e6f926018d" + "sha512=ea273a8fefab42624c42da9d1a02557d1c51d4d8c0d032e8d8a17e0f6866c56b3ab0b32eacb8ad788bbf6983bff36ac072353af08a730b6b26f9c45d4d4f521a" + ] } diff --git a/packages/upstream/x509.0.6.2/opam b/packages/upstream/x509.0.6.2/opam deleted file mode 100644 index b086f3a65..000000000 --- a/packages/upstream/x509.0.6.2/opam +++ /dev/null @@ -1,54 +0,0 @@ -opam-version: "2.0" -name: "x509" -homepage: "https://github.com/mirleft/ocaml-x509" -dev-repo: "git+https://github.com/mirleft/ocaml-x509.git" -bug-reports: "https://github.com/mirleft/ocaml-x509/issues" -doc: "https://mirleft.github.io/ocaml-x509/doc" -maintainer: [ "Hannes Mehnert " "David Kaloper " ] -license: "BSD2" - -build: [ - ["ocaml" "pkg/pkg.ml" "build" "--pinned" "%{pinned}%"] - ["ocaml" "pkg/pkg.ml" "build" "--pinned" "%{pinned}%" "--tests" "true"] - {with-test} - ["ocaml" "pkg/pkg.ml" "test"] {with-test} -] -depends: [ - "ocaml" {>= "4.02.2"} - "ocamlfind" {build} - "ocamlbuild" {build} - "topkg" {build} - "ppx_sexp_conv" {< "v0.12"} - "result" - "cstruct" {>= "1.6.0"} - "sexplib" {< "v0.12"} - "asn1-combinators" {>= "0.2.0"} - "ptime" - "nocrypto" {>= "0.5.3"} - "astring" - "ounit" {with-test} - "cstruct-unix" {with-test & >= "3.0.0"} -] -conflicts: [ - "ppx_sexp_conv" {= "v0.11.0"} -] - -tags: [ "org:mirage" ] -synopsis: "Public Key Infrastructure purely in OCaml" -description: """ -X.509 is a public key infrastructure used mostly on the Internet. It consists -of certificates which include public keys and identifiers, signed by an -authority. Authorities must be exchanged over a second channel to establish the -trust relationship. This library implements most parts of -[RFC5280](https://tools.ietf.org/html/rfc5280) and -[RFC6125](https://tools.ietf.org/html/rfc6125). - -Read [further](https://nqsb.io) and our [Usenix Security 2015 paper](https://usenix15.nqsb.io).""" -authors: [ - "David Kaloper " "Hannes Mehnert " -] -url { - src: - "https://github.com/mirleft/ocaml-x509/releases/download/0.6.2/x509-0.6.2.tbz" - checksum: "md5=b39c0ceae9bd22436bf5849316a7e0ee" -} diff --git a/packages/upstream/x509.0.6.3/opam b/packages/upstream/x509.0.6.3/opam new file mode 100644 index 000000000..fc43f8a37 --- /dev/null +++ b/packages/upstream/x509.0.6.3/opam @@ -0,0 +1,51 @@ +opam-version: "2.0" +name: "x509" +maintainer: [ + "Hannes Mehnert " "David Kaloper " +] +authors: [ + "David Kaloper " "Hannes Mehnert " +] +license: "BSD2" +tags: "org:mirage" +homepage: "https://github.com/mirleft/ocaml-x509" +doc: "https://mirleft.github.io/ocaml-x509/doc" +bug-reports: "https://github.com/mirleft/ocaml-x509/issues" +depends: [ + "ocaml" {>= "4.04.2"} + "dune" {build & >= "1.2"} + "ppx_sexp_conv" {>="v0.11.0"} + "cstruct" {>= "4.0.0"} + "cstruct-sexp" + "sexplib" + "asn1-combinators" {>= "0.2.0"} + "ptime" + "nocrypto" {>= "0.5.3"} + "astring" + "ounit" {with-test} + "cstruct-unix" {with-test & >= "3.0.0"} +] +conflicts: [ + "ppx_sexp_conv" {= "v0.11.0"} +] +build: [ + ["dune" "subst"] {pinned} + ["dune" "build" "-p" name "-j" jobs] + ["dune" "runtest" "-p" name "-j" jobs] {with-test} +] +dev-repo: "git+https://github.com/mirleft/ocaml-x509.git" +synopsis: "Public Key Infrastructure (RFC 5280, PKCS) purely in OCaml" +description: """ +X.509 is a public key infrastructure used mostly on the Internet. It consists +of certificates which include public keys and identifiers, signed by an +authority. Authorities must be exchanged over a second channel to establish the +trust relationship. This library implements most parts of RFC5280 and RFC6125. +The Public Key Cryptography Standards (PKCS) defines encoding and decoding, +which is also partially implemented by this library - namely PKCS 1, PKCS 7, +PKCS 8, PKCS 9 and PKCS 10. +""" +url { + src: + "https://github.com/mirleft/ocaml-x509/releases/download/0.6.3/x509-0.6.3.tbz" + checksum: "md5=52fbcf55fd7fe775c0b33a81f04a92cf" +}