From 0d73b2a96a844988ad272cc7baea42c190a6e370 Mon Sep 17 00:00:00 2001 From: Calascibetta Romain Date: Fri, 17 Feb 2023 10:48:23 +0100 Subject: [PATCH 1/3] Separate binaries provided by dkim into a new package --- bin/dune | 4 ++-- dkim-bin.opam | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 dkim-bin.opam diff --git a/bin/dune b/bin/dune index d1b74c1..6c5e4fa 100644 --- a/bin/dune +++ b/bin/dune @@ -1,7 +1,7 @@ (executable (name verify) (public_name dkim.verify) - (package dkim) + (package dkim-bin) (modules verify) (libraries logs.cli fmt.cli logs.fmt fmt.tty dns-client.unix cmdliner fpath digestif.c ipaddr.unix dkim)) @@ -9,7 +9,7 @@ (executable (name sign) (public_name dkim.sign) - (package dkim) + (package dkim-bin) (modules sign) (libraries logs.cli fmt.cli logs.fmt fmt.tty dns-client.unix cmdliner fpath digestif.c dkim)) diff --git a/dkim-bin.opam b/dkim-bin.opam new file mode 100644 index 0000000..dba1f82 --- /dev/null +++ b/dkim-bin.opam @@ -0,0 +1,30 @@ +opam-version: "2.0" +name: "dkim-bin" +maintainer: "Romain Calascibetta " +authors: "Romain Calascibetta " +homepage: "https://github.com/mirage/ocaml-dkim" +bug-reports: "https://github.com/mirage/ocaml-dkim/issues" +dev-repo: "git+https://github.com/mirage/ocaml-dkim.git" +doc: "https://mirage.github.io/ocaml-dkim/" +license: "MIT" +synopsis: "Implementation of DKIM in OCaml" +description: """A library and a binary to verify and sign an email +with the DKIM mechanism described by the RFC 6376""" + +build: [ + [ "dune" "subst" ] {dev} + [ "dune" "build" "-p" name "-j" jobs ] + [ "dune" "runtest" "-p" name "-j" jobs ] {with-test} +] + +depends: [ + "ocaml" {>= "4.08.0"} + "dune" {>= "2.0.0"} + "dkim" {= version} + "base-unix" + "cmdliner" {>= "1.1.0"} + "logs" + "fmt" {>= "0.8.7"} + "fpath" + "dns-client" +] From 9aa2579948adaef61ac0a1f56a7c1ad8fe30c6d9 Mon Sep 17 00:00:00 2001 From: Calascibetta Romain Date: Fri, 17 Feb 2023 10:48:44 +0100 Subject: [PATCH 2/3] Upgrade tests with mirage-crypto-rng.0.11.0 --- dkim-mirage.opam | 2 +- dkim.opam | 2 +- test/test.ml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dkim-mirage.opam b/dkim-mirage.opam index f0110b5..b86cda4 100644 --- a/dkim-mirage.opam +++ b/dkim-mirage.opam @@ -30,5 +30,5 @@ depends: [ "digestif" {with-test} "fmt" {with-test} "logs" {with-test} - "mirage-crypto-rng" {with-test} + "mirage-crypto-rng" {with-test & >= "0.11.0"} ] diff --git a/dkim.opam b/dkim.opam index ca55019..682593f 100644 --- a/dkim.opam +++ b/dkim.opam @@ -36,6 +36,6 @@ depends: [ "mirage-crypto" {>= "0.9.2"} "mirage-crypto-pk" {>= "0.9.2"} "x509" {>= "0.6.3"} - "mirage-crypto-rng" {with-test} + "mirage-crypto-rng" {with-test & >= "0.11.0"} "alcotest" {with-test} ] diff --git a/test/test.ml b/test/test.ml index 2b9c110..cf6405b 100644 --- a/test/test.ml +++ b/test/test.ml @@ -1,4 +1,4 @@ -let () = Mirage_crypto_rng_unix.initialize () +let () = Mirage_crypto_rng_unix.initialize (module Mirage_crypto_rng.Fortuna) let ( <.> ) f g x = f (g x) let reporter ppf = From 73f57e375d908ccd2fb9f93aadee90830434303c Mon Sep 17 00:00:00 2001 From: Hannes Mehnert Date: Fri, 17 Feb 2023 12:31:14 +0100 Subject: [PATCH 3/3] adapt to dns-client 7.0.0 repackaging --- dkim-mirage.opam | 2 +- mirage/dune | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dkim-mirage.opam b/dkim-mirage.opam index b86cda4..0c769e2 100644 --- a/dkim-mirage.opam +++ b/dkim-mirage.opam @@ -20,7 +20,7 @@ depends: [ "ocaml" {>= "4.08.0"} "dune" {>= "2.0.0"} "dkim" {= version} - "dns-client" {>= "6.0.0"} + "dns-client-mirage" {>= "7.0.0"} "mirage-time" "mirage-random" "mirage-clock" diff --git a/mirage/dune b/mirage/dune index 5e67a02..03703ff 100644 --- a/mirage/dune +++ b/mirage/dune @@ -2,4 +2,4 @@ (name dkim_mirage) (public_name dkim-mirage) (libraries dkim mirage-random mirage-time mirage-clock tcpip - dns-client.mirage lwt)) + dns-client-mirage lwt))