Skip to content

Commit

Permalink
Feature/maintenance 202410 (#19)
Browse files Browse the repository at this point in the history
* update environment

* update deprecation warnings

* update lock file
  • Loading branch information
mabiede authored Oct 17, 2024
1 parent 287bab9 commit bde0041
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 57 deletions.
16 changes: 10 additions & 6 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
FROM node:16 AS node
FROM node:lts AS node
FROM hadolint/hadolint:latest-alpine AS hadolint
FROM ocaml/opam:debian-10-ocaml-4.14
FROM ocaml/opam:debian-12-ocaml-4.14

# copy node from node container and link commands
USER root

# copy node from node container and link commands
COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules
COPY --from=node /usr/local/bin/node /usr/local/bin/node
COPY --from=node /opt /opt
RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \
&& ln -s /usr/local/lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \
&& ln -s /opt/yarn-v*/bin/yarn /usr/local/bin/yarn \
&& ln -s /opt/yarn-v*/bin/yarnpkg /usr/local/bin/yarnpkg
Expand All @@ -34,9 +36,10 @@ RUN apt-get update --allow-releaseinfo-change -q \
# cleanup installations
&& apt-get autoremove -y \
&& apt-get clean all \
#
# add timezone
&& ln -fs /usr/share/zoneinfo/Europe/Zurich /etc/localtime
&& rm -rf /var/lib/apt/lists/*

# add timezone
RUN ln -fs /usr/share/zoneinfo/Europe/Zurich /etc/localtime

# WTF: https://github.com/mirage/ocaml-cohttp/issues/675
RUN bash -c 'echo "http 80/tcp www # WorldWideWeb HTTP" >> /etc/services' \
Expand All @@ -45,6 +48,7 @@ RUN bash -c 'echo "http 80/tcp www # WorldWideWeb HTTP" >> /etc/services' \
USER opam

# install oh-my-zsh
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -q -O - | zsh \
&& cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc \
&& sed -i "/^plugins=/c\plugins=(git dotenv)" ~/.zshrc
Expand Down
10 changes: 5 additions & 5 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ services:
- ${HOME}${USERPROFILE:-}/.ssh:/home/opam/.ssh
- ${HOME}${USERPROFILE:-}/.gitconfig:/home/opam/.gitconfig
- ${HOME}${USERPROFILE:-}/.gitignore_global:/home/opam/.gitignore_global
depends_on: [database]
ports: [3020:3000]
depends_on: [ database ]
ports: [ 3020:3000 ]
command: /workspace/.devcontainer/wait-for-database.sh test sleep infinity

database:
container_name: guardian_database
image: mariadb:10.6.3
command: --max_allowed_packet=629145600
ports: [3320:3306]
ports: [ 3320:3306 ]
environment:
- TZ=Europe/Zurich
- MYSQL_ALLOW_EMPTY_PASSWORD='yes'
Expand All @@ -36,8 +36,8 @@ services:
adminer:
image: adminer:standalone
restart: always
ports: [8080:8080]
depends_on: [database]
ports: [ 8080:8080 ]
depends_on: [ database ]

volumes:
opam:
Expand Down
83 changes: 45 additions & 38 deletions guardian.opam.locked
Original file line number Diff line number Diff line change
Expand Up @@ -12,93 +12,96 @@ homepage: "https://github.com/uzh/guardian"
doc: "https://uzh.github.io/guardian"
bug-reports: "https://github.com/uzh/guardian/issues"
depends: [
"angstrom" {= "0.16.0"}
"asn1-combinators" {= "0.2.6"}
"angstrom" {= "0.16.1"}
"asn1-combinators" {= "0.3.2"}
"base" {= "v0.16.3"}
"base-bigarray" {= "base"}
"base-bytes" {= "base"}
"base-threads" {= "base"}
"base-unix" {= "base"}
"base64" {= "3.5.1"}
"bigarray-compat" {= "1.1.0"}
"bigstringaf" {= "0.9.1"}
"caqti" {= "2.1.1"}
"bigstringaf" {= "0.10.0"}
"caqti" {= "2.1.2"}
"caqti-driver-mariadb" {= "2.1.1"}
"caqti-lwt" {= "2.1.1"}
"cmdliner" {= "1.2.0"}
"cmdliner" {= "1.3.0"}
"conf-bash" {= "1"}
"conf-gcc" {= "1.0"}
"conf-gmp" {= "4"}
"conf-gmp-powm-sec" {= "3"}
"conf-mariadb" {= "2"}
"conf-pkg-config" {= "3"}
"containers" {= "3.13.1"}
"containers-data" {= "3.13.1"}
"cppo" {= "1.6.9"}
"containers" {= "3.14"}
"containers-data" {= "3.14"}
"cppo" {= "1.7.0"}
"csexp" {= "1.5.2"}
"cstruct" {= "6.2.0"}
"ctypes" {= "0.20.2"}
"digestif" {= "1.2.0"}
"domain-name" {= "0.4.0"}
"dune" {= "3.15.2"}
"dune-configurator" {= "3.15.2"}
"dune-private-libs" {= "3.15.2"}
"dune-site" {= "3.15.2"}
"dune" {= "3.16.0"}
"dune-configurator" {= "3.16.0"}
"dune-private-libs" {= "3.16.0"}
"dune-site" {= "3.16.0"}
"duration" {= "0.2.1"}
"dyn" {= "3.15.2"}
"dyn" {= "3.16.0"}
"either" {= "1.0.0"}
"eqaf" {= "0.9"}
"eqaf" {= "0.10"}
"fieldslib" {= "v0.16.0"}
"fmt" {= "0.9.0"}
"gmap" {= "0.3.0"}
"hkdf" {= "1.0.4"}
"host-arch-arm64" {= "1"}
"host-system-other" {= "1"}
"integers" {= "0.7.0"}
"ipaddr" {= "5.5.0"}
"ipaddr" {= "5.6.0"}
"kdf" {= "1.0.0"}
"logs" {= "0.7.0"}
"lwt" {= "5.7.0"}
"lwt-dllist" {= "1.0.1"}
"lwt_ppx" {= "2.1.0"}
"macaddr" {= "5.5.0"}
"macaddr" {= "5.6.0"}
"mariadb" {= "1.1.6"}
"mirage-crypto" {= "0.11.3"}
"mirage-crypto-ec" {= "0.11.3"}
"mirage-crypto-pk" {= "0.11.3"}
"mirage-crypto-rng" {= "0.11.3"}
"mtime" {= "2.0.0"}
"ocaml" {= "4.14.1"}
"mirage-crypto" {= "1.1.0"}
"mirage-crypto-ec" {= "1.1.0"}
"mirage-crypto-pk" {= "1.1.0"}
"mirage-crypto-rng" {= "1.1.0"}
"mtime" {= "2.1.0"}
"ocaml" {= "4.14.2"}
"ocaml-base-compiler" {= "4.14.2"}
"ocaml-compiler-libs" {= "v0.12.4"}
"ocaml-syntax-shims" {= "1.0.0"}
"ocamlbuild" {= "0.14.3"}
"ocamlbuild" {= "0.15.0"}
"ocamlfind" {= "1.9.6"}
"ocplib-endian" {= "1.2"}
"ordering" {= "3.15.2"}
"pbkdf" {= "1.2.0"}
"ohex" {= "0.2.0"}
"ordering" {= "3.16.0"}
"pp" {= "1.2.0"}
"ppx_base" {= "v0.16.0"}
"ppx_cold" {= "v0.16.0"}
"ppx_compare" {= "v0.16.0"}
"ppx_derivers" {= "1.2.1"}
"ppx_deriving" {= "5.2.1"}
"ppx_deriving_yojson" {= "3.7.0"}
"ppx_deriving" {= "6.0.3"}
"ppx_deriving_yojson" {= "3.9.0"}
"ppx_enumerate" {= "v0.16.0"}
"ppx_fields_conv" {= "v0.16.0"}
"ppx_globalize" {= "v0.16.0"}
"ppx_hash" {= "v0.16.0"}
"ppx_sexp_conv" {= "v0.16.0"}
"ppx_string" {= "v0.16.0"}
"ppxlib" {= "0.32.1"}
"ptime" {= "1.1.0"}
"result" {= "1.5"}
"ppxlib" {= "0.33.0"}
"ptime" {= "1.2.0"}
"seq" {= "base"}
"sexplib0" {= "v0.16.0"}
"stdlib-shims" {= "0.3.0"}
"stdune" {= "3.15.2"}
"stdune" {= "3.16.0"}
"stringext" {= "1.6.0"}
"tls" {= "0.17.5"}
"tls" {= "1.0.2"}
"topkg" {= "1.0.7"}
"uri" {= "4.4.0"}
"uuidm" {= "0.9.8"}
"x509" {= "0.16.5"}
"yojson" {= "2.1.2"}
"zarith" {= "1.13"}
"uuidm" {= "0.9.9"}
"x509" {= "1.0.4"}
"yojson" {= "2.2.2"}
"zarith" {= "1.14"}
]
build: [
["dune" "subst"] {dev}
Expand All @@ -118,3 +121,7 @@ build: [
]
dev-repo: "git+https://github.com/uzh/guardian.git"
name: "guardian"
pin-depends: [
"ocaml-base-compiler.4.14.2"
"https://github.com/ocaml/ocaml/archive/4.14.2.tar.gz"
]
13 changes: 6 additions & 7 deletions lib/sig.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,21 @@ module type Uuid = sig
type t

val nil : t
val max : t
val ns_dns : t
val ns_url : t
val ns_oid : t
val ns_X500 : t
val equal : t -> t -> bool
val compare : t -> t -> int
val of_bytes : ?pos:int -> string -> t option
val to_bytes : t -> string
val of_mixed_endian_bytes : ?pos:int -> string -> t option
val to_mixed_endian_bytes : t -> string
val unsafe_of_bytes : string -> t
val unsafe_to_bytes : t -> string
val of_binary_string : ?pos:int -> string -> t option
val to_binary_string : t -> string
val unsafe_of_binary_string : string -> t
val unsafe_to_binary_string : t -> string
val of_string : ?pos:int -> string -> t option
val to_string : ?upper:bool -> t -> string
val pp : Format.formatter -> t -> unit
val pp_string : ?upper:bool -> Format.formatter -> t -> unit
val pp' : upper:bool -> Format.formatter -> t -> unit
val to_yojson : t -> [> `String of string ]
val of_yojson : [> `String of string ] -> (t, string) result
val of_string_exn : string -> t
Expand Down
2 changes: 1 addition & 1 deletion lib/uuid.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module UuidBase = struct
;;

let sexp_of_t uuid = Sexplib0.Sexp.Atom (to_string uuid)
let create () = v `V4
let create = v4_gen (Random.State.make_self_init ())
end

module Actor = struct
Expand Down

0 comments on commit bde0041

Please sign in to comment.