From 171748d9254c58af7d4b78f9563fd31c28fad712 Mon Sep 17 00:00:00 2001 From: sabine <6594573+sabine@users.noreply.github.com> Date: Mon, 26 May 2025 15:08:31 +0200 Subject: [PATCH] chore: advance opam pin to use newer dependencies --- .devcontainer/Dockerfile | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/debug-ci.yml | 2 +- .github/workflows/linkcheck.yml | 2 +- .github/workflows/scrape.yml | 2 +- Dockerfile | 2 +- Makefile | 2 +- dune-project | 3 +-- dune-workspace | 6 ++++++ ocamlorg.opam | 2 +- src/ocamlorg_web/lib/ocamlorg_web.ml | 2 +- 11 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 dune-workspace diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 8995edd338..5e753f958c 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,7 +1,7 @@ FROM ocaml/opam:debian-ocaml-5.2 # Branch freeze was opam-repo HEAD at the time of commit -RUN cd ~/opam-repository && git checkout -b freeze c45f5bab71d3589f41f9603daca5acad14df0ab0 && opam update +RUN cd ~/opam-repository && git checkout -b freeze 584630e7a7e27e3cf56158696a3fe94623a0cf4f && opam update # Dev tools RUN opam install -y dune-release merlin ocamlformat=0.26.2 utop ocaml-lsp-server diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d08ec0581..49b1ff16ff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: ocaml-compiler: ${{ matrix.ocaml-compiler }} dune-cache: ${{ matrix.os != 'macos-latest' }} opam-repositories: | - pin: git+https://github.com/ocaml/opam-repository#c45f5bab71d3589f41f9603daca5acad14df0ab0 + pin: git+https://github.com/ocaml/opam-repository#584630e7a7e27e3cf56158696a3fe94623a0cf4f opam-disable-sandboxing: true - name: Install system dependencies (Linux) diff --git a/.github/workflows/debug-ci.yml b/.github/workflows/debug-ci.yml index 0c10658e11..acfd13fc01 100644 --- a/.github/workflows/debug-ci.yml +++ b/.github/workflows/debug-ci.yml @@ -28,7 +28,7 @@ jobs: ocaml-compiler: ${{ matrix.ocaml-compiler }} dune-cache: ${{ matrix.os != 'macos-latest' }} opam-repositories: | - pin: git+https://github.com/ocaml/opam-repository#c45f5bab71d3589f41f9603daca5acad14df0ab0 + pin: git+https://github.com/ocaml/opam-repository#584630e7a7e27e3cf56158696a3fe94623a0cf4f opam-disable-sandboxing: true - name: Install system dependencies (Linux) diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index 54036ef6cd..ccb5dba373 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -33,7 +33,7 @@ jobs: ocaml-compiler: ${{ matrix.ocaml-compiler }} dune-cache: ${{ matrix.os != 'macos-latest' }} opam-repositories: | - pin: git+https://github.com/ocaml/opam-repository#c45f5bab71d3589f41f9603daca5acad14df0ab0 + pin: git+https://github.com/ocaml/opam-repository#584630e7a7e27e3cf56158696a3fe94623a0cf4f opam-disable-sandboxing: true - name: Install olinkcheck diff --git a/.github/workflows/scrape.yml b/.github/workflows/scrape.yml index 6818302e39..038f67ab5b 100644 --- a/.github/workflows/scrape.yml +++ b/.github/workflows/scrape.yml @@ -30,7 +30,7 @@ jobs: ocaml-compiler: ${{ matrix.ocaml-compiler }} dune-cache: ${{ matrix.os != 'macos-latest' }} opam-repositories: | - pin: git+https://github.com/ocaml/opam-repository#c45f5bab71d3589f41f9603daca5acad14df0ab0 + pin: git+https://github.com/ocaml/opam-repository#584630e7a7e27e3cf56158696a3fe94623a0cf4f opam-disable-sandboxing: true - name: Install system dependencies diff --git a/Dockerfile b/Dockerfile index 8698cc0c5e..b5af4ef6f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ RUN sudo apk -U upgrade --no-cache && sudo apk add --no-cache \ openssl-dev # Branch freeze was opam-repo HEAD at the time of commit -RUN cd ~/opam-repository && git reset --hard c45f5bab71d3589f41f9603daca5acad14df0ab0 && opam update +RUN cd ~/opam-repository && git reset --hard 584630e7a7e27e3cf56158696a3fe94623a0cf4f && opam update WORKDIR /home/opam diff --git a/Makefile b/Makefile index ecd1297296..a18c2e3f4a 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ deps: create_switch ## Install development dependencies .PHONY: create_switch create_switch: ## Create switch and pinned opam repo - opam switch create . 5.2.0 --no-install --repos pin=git+https://github.com/ocaml/opam-repository#c45f5bab71d3589f41f9603daca5acad14df0ab0 + opam switch create . 5.2.0 --no-install --repos pin=git+https://github.com/ocaml/opam-repository#584630e7a7e27e3cf56158696a3fe94623a0cf4f .PHONY: switch switch: deps ## Create an opam switch and install development dependencies diff --git a/dune-project b/dune-project index 15fb213ca5..0b79ac3649 100644 --- a/dune-project +++ b/dune-project @@ -34,8 +34,7 @@ "This repository contains the server that serves the official OCaml website at https://ocaml.org.") (depends (ocaml - (>= 4.14.0)) - dune + (>= 5.2.0)) ppx_deriving cohttp cohttp-lwt-unix diff --git a/dune-workspace b/dune-workspace new file mode 100644 index 0000000000..c338c1da4c --- /dev/null +++ b/dune-workspace @@ -0,0 +1,6 @@ +(lang dune 3.19) + +(repository (name pinned_opam_repository) (url git+https://github.com/ocaml/opam-repository#584630e7a7e27e3cf56158696a3fe94623a0cf4f)) + +(lock_dir + (repositories pinned_opam_repository)) diff --git a/ocamlorg.opam b/ocamlorg.opam index 837e74a55d..3a7248b1cf 100644 --- a/ocamlorg.opam +++ b/ocamlorg.opam @@ -18,8 +18,8 @@ homepage: "https://github.com/ocaml/ocaml.org" doc: "https://ocaml.github.io/ocaml.org/" bug-reports: "https://github.com/ocaml/ocaml.org/issues" depends: [ - "ocaml" {>= "4.14.0"} "dune" {>= "3.15"} + "ocaml" {>= "5.2.0"} "ppx_deriving" "cohttp" "cohttp-lwt-unix" diff --git a/src/ocamlorg_web/lib/ocamlorg_web.ml b/src/ocamlorg_web/lib/ocamlorg_web.ml index 8cc0b096da..ecda4963f2 100644 --- a/src/ocamlorg_web/lib/ocamlorg_web.ml +++ b/src/ocamlorg_web/lib/ocamlorg_web.ml @@ -9,7 +9,7 @@ let () = Logs.set_level (Some Info) let run () = - Mirage_crypto_rng_lwt.initialize (module Mirage_crypto_rng.Fortuna); + Mirage_crypto_rng_unix.use_default (); let state = Ocamlorg_package.init () in try Dream.run ~interface:"0.0.0.0" ~port:Config.http_port