Skip to content

Commit

Permalink
Merge pull request #44 from mirage/upgrade
Browse files Browse the repository at this point in the history
Upgrade
  • Loading branch information
dinosaure authored Jan 24, 2024
2 parents 80411d4 + 60a5455 commit 2635c3f
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .ocamlformat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=0.24.1
version=0.26.1
module-item-spacing=compact
break-struct=natural
break-infix=fit-or-vertical
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.relay
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ocaml/opam:ubuntu-20.04-ocaml-4.14
RUN sudo ln -f /usr/bin/opam-2.1 /usr/bin/opam
RUN cd ~/opam-repository && git pull origin master && git reset --hard 789990a742984743e12a872912ab71b023b031e7 && opam update
RUN cd ~/opam-repository && git pull origin master && git reset --hard cd449b28e1149a5bafa7f1c6262879ce509b7eea && opam update
RUN opam depext -ui mirage
RUN mkdir -p /home/opam/src
WORKDIR /home/opam/src
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.signer
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ocaml/opam:ubuntu-20.04-ocaml-4.14
RUN sudo ln -f /usr/bin/opam-2.1 /usr/bin/opam
RUN cd ~/opam-repository && git pull origin master && git reset --hard 34576e67c88137d40ce6ff9e252d549e9e87205f && opam update
RUN cd ~/opam-repository && git pull origin master && git reset --hard cd449b28e1149a5bafa7f1c6262879ce509b7eea && opam update
RUN opam depext -ui mirage
RUN mkdir -p /home/opam/src
WORKDIR /home/opam/src
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.spamfilter
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ocaml/opam:ubuntu-20.04-ocaml-4.14
RUN sudo ln -f /usr/bin/opam-2.1 /usr/bin/opam
RUN cd ~/opam-repository && git pull origin master && git reset --hard 34576e67c88137d40ce6ff9e252d549e9e87205f && opam update
RUN cd ~/opam-repository && git pull origin master && git reset --hard cd449b28e1149a5bafa7f1c6262879ce509b7eea && opam update
RUN opam depext -ui mirage
RUN mkdir -p /home/opam/src
WORKDIR /home/opam/src
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.submission
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ocaml/opam:ubuntu-20.04-ocaml-4.14
RUN sudo ln -f /usr/bin/opam-2.1 /usr/bin/opam
RUN cd ~/opam-repository && git pull origin master && git reset --hard 789990a742984743e12a872912ab71b023b031e7 && opam update
RUN cd ~/opam-repository && git pull origin master && git reset --hard cd449b28e1149a5bafa7f1c6262879ce509b7eea && opam update
RUN opam depext -ui mirage
RUN mkdir -p /home/opam/src
WORKDIR /home/opam/src
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.verifier
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ocaml/opam:ubuntu-20.04-ocaml-4.14
RUN sudo ln -f /usr/bin/opam-2.1 /usr/bin/opam
RUN cd ~/opam-repository && git pull origin master && git reset --hard 34576e67c88137d40ce6ff9e252d549e9e87205f && opam update
RUN cd ~/opam-repository && git pull origin master && git reset --hard cd449b28e1149a5bafa7f1c6262879ce509b7eea && opam update
RUN opam depext -ui mirage
RUN mkdir -p /home/opam/src
WORKDIR /home/opam/src
Expand Down
8 changes: 4 additions & 4 deletions bin/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
(public_name ptt.mti_gf)
(package ptt-bin)
(modules mti_gf)
(libraries bos ca-certs mirage-time-unix mirage-clock-unix dns-client.lwt
(libraries bos ca-certs mirage-time-unix mirage-clock-unix dns-client-lwt
tcpip.stack-socket ptt.mti-gf logs.fmt mirage-crypto-rng))

(executable
Expand All @@ -12,7 +12,7 @@
(package ptt-bin)
(modules lipap)
(libraries digestif.c ca-certs mirage-time-unix bos mirage-clock-unix
dns-client.lwt tcpip.stack-socket ptt.lipap logs.fmt mirage-crypto-rng))
dns-client-lwt tcpip.stack-socket ptt.lipap logs.fmt mirage-crypto-rng))

(executable
(name adduser)
Expand All @@ -27,5 +27,5 @@
(public_name ptt.spf)
(package ptt-bin)
(modules spf)
(libraries cmdliner dns-tsig ptime.clock.os dns-client.lwt mirage-crypto-rng
tcpip.stack-socket uspf uspf.lwt dns-mirage))
(libraries cmdliner dns-tsig ptime.clock.os dns-client-lwt mirage-crypto-rng
tcpip.stack-socket uspf uspf-lwt dns-mirage))
2 changes: 1 addition & 1 deletion bin/lipap.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let () = Fmt.set_style_renderer Fmt.stdout `Ansi_tty
let () = Fmt.set_style_renderer Fmt.stderr `Ansi_tty
let () = Logs.set_level ~all:true (Some Logs.Debug)
let () = Logs.set_reporter reporter
let () = Mirage_crypto_rng_unix.initialize ()
let () = Mirage_crypto_rng_unix.initialize (module Mirage_crypto_rng.Fortuna)
let ( <.> ) f g x = f (g x)

module Random = struct
Expand Down
2 changes: 1 addition & 1 deletion bin/mti_gf.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let () = Fmt.set_style_renderer Fmt.stdout `Ansi_tty
let () = Fmt.set_style_renderer Fmt.stderr `Ansi_tty
let () = Logs.set_level ~all:true (Some Logs.Debug)
let () = Logs.set_reporter reporter
let () = Mirage_crypto_rng_unix.initialize ()
let () = Mirage_crypto_rng_unix.initialize (module Mirage_crypto_rng.Fortuna)
let ( <.> ) f g x = f (g x)

module Random = struct
Expand Down
2 changes: 1 addition & 1 deletion lib/dune
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
(name hm)
(public_name ptt.hm)
(modules hm)
(libraries dns-client.mirage uspf mirage-random ptt.transmit))
(libraries dns-client-mirage uspf mirage-random ptt.transmit))

(library
(name ptt_value)
Expand Down
1 change: 1 addition & 0 deletions ptt-bin.opam
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ depends: [
"cmdliner" {>= "1.1.0"}
"mirage-clock-unix" {>= "3.1.0"}
"mirage-crypto-rng"
"uspf-lwt"
"mirage-time-unix" {>= "2.0.0"}
"mimic" {>= "0.0.1"}
"alcotest-lwt" {with-test}
Expand Down
4 changes: 0 additions & 4 deletions ptt.opam
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,4 @@ pin-depends: [
[ "spamtacus-bayesian.dev" "git+https://github.com/mirage/spamtacus.git#25dbb19afc8344f6933652ab8f6c590d887583bc" ]
[ "spamtacus.dev" "git+https://github.com/mirage/spamtacus.git#25dbb19afc8344f6933652ab8f6c590d887583bc" ]
[ "spamtacus-mirage.dev" "git+https://github.com/mirage/spamtacus.git#25dbb19afc8344f6933652ab8f6c590d887583bc" ]
[ "colombe.dev" "git+https://github.com/mirage/colombe.git#96c2e9ba6cd04b87879e048110df2fa3f7f0644f" ]
[ "sendmail.dev" "git+https://github.com/mirage/colombe.git#96c2e9ba6cd04b87879e048110df2fa3f7f0644f" ]
[ "sendmail-lwt.dev" "git+https://github.com/mirage/colombe.git#96c2e9ba6cd04b87879e048110df2fa3f7f0644f" ]
[ "mrmime.dev" "git+https://github.com/mirage/mrmime.git#a9bbd8e3773e404c1b70687d566c4194af3f0529" ]
]
16 changes: 8 additions & 8 deletions test/test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let () = Fmt.set_style_renderer Fmt.stdout `Ansi_tty
let () = Fmt.set_style_renderer Fmt.stderr `Ansi_tty
let () = Logs.set_level ~all:true (Some Logs.Debug)
let () = Logs.set_reporter reporter
let () = Mirage_crypto_rng_unix.initialize ()
let () = Mirage_crypto_rng_unix.initialize (module Mirage_crypto_rng.Fortuna)
let () = Sys.set_signal Sys.sigpipe Sys.Signal_ignore

module Scheduler = Colombe.Sigs.Make (struct type +'a t = 'a Lwt.t end)
Expand Down Expand Up @@ -875,12 +875,12 @@ let full_test_0 =
let romain_calascibetta =
(Rresult.R.get_ok <.> Colombe_emile.to_forward_path)
(let open Mrmime.Mailbox in
Local.[w "romain"; w "calascibetta"]
@ Domain.(domain, [a "gmail"; a "com"])) in
Local.[w "romain"; w "calascibetta"]
@ Domain.(domain, [a "gmail"; a "com"])) in
let anil =
(Rresult.R.get_ok <.> Colombe_emile.to_reverse_path)
(let open Mrmime.Mailbox in
Local.[w "anil"] @ Domain.(domain, [a "recoil"; a "org"])) in
Local.[w "anil"] @ Domain.(domain, [a "recoil"; a "org"])) in
let recoil = (Colombe.Domain.of_string_exn <.> Domain_name.to_string) recoil in
let sendmail contents =
sendmail
Expand Down Expand Up @@ -923,16 +923,16 @@ let full_test_1 =
let romain_calascibetta =
(Rresult.R.get_ok <.> Colombe_emile.to_forward_path)
(let open Mrmime.Mailbox in
Local.[w "romain"; w "calascibetta"]
@ Domain.(domain, [a "gmail"; a "com"])) in
Local.[w "romain"; w "calascibetta"]
@ Domain.(domain, [a "gmail"; a "com"])) in
let anil =
(Rresult.R.get_ok <.> Colombe_emile.to_reverse_path)
(let open Mrmime.Mailbox in
Local.[w "anil"] @ Domain.(domain, [a "recoil"; a "org"])) in
Local.[w "anil"] @ Domain.(domain, [a "recoil"; a "org"])) in
let thomas =
(Rresult.R.get_ok <.> Colombe_emile.to_reverse_path)
(let open Mrmime.Mailbox in
Local.[w "thomas"] @ Domain.(domain, [a "gazagnaire"; a "org"])) in
Local.[w "thomas"] @ Domain.(domain, [a "gazagnaire"; a "org"])) in
let recoil = (Colombe.Domain.of_string_exn <.> Domain_name.to_string) recoil in
let gazagnaire =
(Colombe.Domain.of_string_exn <.> Domain_name.to_string) gazagnaire in
Expand Down
8 changes: 6 additions & 2 deletions unikernel/relay/config.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ let ssh_key =
let doc = Key.Arg.info ~doc:"The private SSH key." [ "ssh-key" ] in
Key.(create "ssh_key" Arg.(opt (some string) None doc))

let ssh_password =
let doc = Key.Arg.info ~doc:"The SSH password." [ "ssh-password" ] in
Key.(create "ssh_password" Arg.(opt (some string) None doc))

let ssh_authenticator =
let doc = Key.Arg.info ~doc:"SSH public key of the remote Git repository." [ "ssh-authenticator" ] in
Key.(create "ssh_authenticator" Arg.(opt (some string) None doc))
Expand Down Expand Up @@ -48,8 +52,8 @@ let stack = generic_stackv4v6 default_network
let dns = generic_dns_client ~nameservers stack
let tcp = tcpv4v6_of_stackv4v6 stack
let git_client =
let happy_eyeballs = git_happy_eyeballs stack dns (generic_happy_eyeballs stack dns) in
git_ssh ~key:ssh_key tcp happy_eyeballs
let happy_eyeballs = mimic_happy_eyeballs stack dns (generic_happy_eyeballs stack dns) in
git_ssh ~password:ssh_password ~key:ssh_key tcp happy_eyeballs

let () =
register "relay"
Expand Down
8 changes: 6 additions & 2 deletions unikernel/submission/config.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ let ssh_key =
let doc = Key.Arg.info ~doc:"The private SSH key." [ "ssh-key" ] in
Key.(create "ssh_key" Arg.(opt (some string) None doc))

let ssh_password =
let doc = Key.Arg.info ~doc:"The SSH password." [ "ssh-password" ] in
Key.(create "ssh_password" Arg.(opt (some string) None doc))

let ssh_authenticator =
let doc = Key.Arg.info ~doc:"SSH public key of the remote Git repository." [ "ssh-authenticator" ] in
Key.(create "ssh_authenticator" Arg.(opt (some string) None doc))
Expand Down Expand Up @@ -77,8 +81,8 @@ let stack = generic_stackv4v6 default_network
let dns = generic_dns_client stack
let tcp = tcpv4v6_of_stackv4v6 stack
let git_client =
let happy_eyeballs = git_happy_eyeballs stack dns (generic_happy_eyeballs stack dns) in
git_ssh ~key:ssh_key tcp happy_eyeballs
let happy_eyeballs = mimic_happy_eyeballs stack dns (generic_happy_eyeballs stack dns) in
git_ssh ~password:ssh_password ~key:ssh_key tcp happy_eyeballs

let () =
register "submission"
Expand Down

0 comments on commit 2635c3f

Please sign in to comment.