(for PR #23932)

2024-02-08 11:39.21: New job: build hpke.0.0.pre-alpha, using opam dev
                              from https://github.com/ocaml/opam-repository.git#refs/pull/23932/head (04858040f13a0b01bae25ee9bb5a66a8430570f1)
                              on freebsd-ocaml-4.14/amd64

To reproduce locally:

cd $(mktemp -d)
git clone --recursive "https://github.com/ocaml/opam-repository.git" && cd "opam-repository" && git fetch origin "refs/pull/23932/head" && git reset --hard 04858040
git fetch origin master
git merge --no-edit d87a1eb8c3d0e6228e3f957b25aa87f49e397d03
cat > ../Dockerfile <<'END-OF-DOCKERFILE'
FROM freebsd-ocaml-4.14
USER 1000:1000
WORKDIR /usr/home/opam
RUN sudo ln -f /usr/local/bin/opam-dev /usr/local/bin/opam
RUN opam init --reinit -ni
ENV OPAMDOWNLOADJOBS="1"
ENV OPAMERRLOGLEN="0"
ENV OPAMSOLVERTIMEOUT="500"
ENV OPAMPRECISETRACKING="1"
ENV CI="true"
ENV OPAM_REPO_CI="true"
RUN rm -rf opam-repository/
COPY --chown=1000:1000 . opam-repository/
RUN opam repository set-url --strict default opam-repository/
RUN opam update --depexts || true
ENV OPAMCRITERIA="-removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed"
ENV OPAMFIXUPCRITERIA="-removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed"
ENV OPAMUPGRADECRITERIA="-removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed"
RUN opam pin add -k version -yn hpke.0.0.pre-alpha 0.0.pre-alpha
RUN opam reinstall hpke.0.0.pre-alpha; \
    res=$?; \
    test "$res" != 31 && exit "$res"; \
    export OPAMCLI=2.0; \
    build_dir=$(opam var prefix)/.opam-switch/build; \
    failed=$(ls "$build_dir"); \
    partial_fails=""; \
    for pkg in $failed; do \
    if opam show -f x-ci-accept-failures: "$pkg" | grep -qF "\"freebsd\""; then \
    echo "A package failed and has been disabled for CI using the 'x-ci-accept-failures' field."; \
    fi; \
    test "$pkg" != 'hpke.0.0.pre-alpha' && partial_fails="$partial_fails $pkg"; \
    done; \
    test "${partial_fails}" != "" && echo "opam-repo-ci detected dependencies failing: ${partial_fails}"; \
    exit 1

END-OF-DOCKERFILE
docker build -f ../Dockerfile .

2024-02-08 11:39.21: Using cache hint "freebsd-ocaml-4.14-hpke.0.0.pre-alpha-04858040f13a0b01bae25ee9bb5a66a8430570f1"
2024-02-08 11:39.21: Using OBuilder spec:
((from freebsd-ocaml-4.14)
 (user (uid 1000) (gid 1000))
 (workdir /usr/home/opam)
 (run (shell "sudo ln -f /usr/local/bin/opam-dev /usr/local/bin/opam"))
 (run (network host)
      (shell "opam init --reinit -ni"))
 (env OPAMDOWNLOADJOBS 1)
 (env OPAMERRLOGLEN 0)
 (env OPAMSOLVERTIMEOUT 500)
 (env OPAMPRECISETRACKING 1)
 (env CI true)
 (env OPAM_REPO_CI true)
 (run (shell "rm -rf opam-repository/"))
 (copy (src .) (dst opam-repository/))
 (run (shell "opam repository set-url --strict default opam-repository/"))
 (run (network host)
      (shell "opam update --depexts || true"))
 (env OPAMCRITERIA -removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed)
 (env OPAMFIXUPCRITERIA -removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed)
 (env OPAMUPGRADECRITERIA -removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed)
 (run (shell "opam pin add -k version -yn hpke.0.0.pre-alpha 0.0.pre-alpha"))
 (run (cache (opam-archives (target /usr/home/opam/.opam/download-cache)))
      (network host)
      (shell  "opam reinstall hpke.0.0.pre-alpha;\
             \n        res=$?;\
             \n        test \"$res\" != 31 && exit \"$res\";\
             \n        export OPAMCLI=2.0;\
             \n        build_dir=$(opam var prefix)/.opam-switch/build;\
             \n        failed=$(ls \"$build_dir\");\
             \n        partial_fails=\"\";\
             \n        for pkg in $failed; do\
             \n          if opam show -f x-ci-accept-failures: \"$pkg\" | grep -qF \"\\\"freebsd\\\"\"; then\
             \n            echo \"A package failed and has been disabled for CI using the 'x-ci-accept-failures' field.\";\
             \n          fi;\
             \n          test \"$pkg\" != 'hpke.0.0.pre-alpha' && partial_fails=\"$partial_fails $pkg\";\
             \n        done;\
             \n        test \"${partial_fails}\" != \"\" && echo \"opam-repo-ci detected dependencies failing: ${partial_fails}\";\
             \n        exit 1"))
)

2024-02-08 11:39.21: Connecting to build cluster…
2024-02-08 11:39.21: Waiting for resource in pool OCluster
2024-02-08 11:39.29: Waiting for worker…
2024-02-08 11:40.37: Got resource from pool OCluster
Building on summer
All commits already cached
Updating files: 100% (32901/32901), done.
HEAD is now at d87a1eb8c3 Merge pull request #25204 from toots/opam-publish-tls-liquidsoap.1-prometheus-liquidsoap.2-liquidsoap.2.2.4-sdl-liquidsoap.3
Merge made by the 'ort' strategy.
 packages/hpke/hpke.0.0.pre-alpha/opam | 43 +++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 packages/hpke/hpke.0.0.pre-alpha/opam

(from freebsd-ocaml-4.14)
2024-02-08 11:38.20 ---> using "57eeeabfec88366322a66f228a693df277d348dc99f1cc2a63749102c5e1e405" from cache

/: (user (uid 1000) (gid 1000))

/: (workdir /usr/home/opam)

/usr/home/opam: (run (shell "sudo ln -f /usr/local/bin/opam-dev /usr/local/bin/opam"))
2024-02-08 11:38.21 ---> using "003589b375dac5ea4b6c2bd4633d351ea20deb749a1875f678c207760f012e52" from cache

/usr/home/opam: (run (network host)
                     (shell "opam init --reinit -ni"))
No configuration file found, using built-in defaults.
Checking for available remotes: rsync and local, git.
  - you won't be able to use mercurial repositories unless you install the hg command on your system.
  - you won't be able to use darcs repositories unless you install the darcs command on your system.

This development version of opam requires an update to the layout of /usr/home/opam/.opam from version 2.1 to version 2.2~alpha, which can't be reverted.
You may want to back it up before going further.

Continue? [y/n] y
Format upgrade done.

<><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><>
[default] no changes from git+file:///usr/home/opam/opam-repository
2024-02-08 11:38.21 ---> using "cf60be49f527d1931ca1f04663574b6b2b04f5a70937cb24a3a40782758cc209" from cache

/usr/home/opam: (env OPAMDOWNLOADJOBS 1)

/usr/home/opam: (env OPAMERRLOGLEN 0)

/usr/home/opam: (env OPAMSOLVERTIMEOUT 500)

/usr/home/opam: (env OPAMPRECISETRACKING 1)

/usr/home/opam: (env CI true)

/usr/home/opam: (env OPAM_REPO_CI true)

/usr/home/opam: (run (shell "rm -rf opam-repository/"))
2024-02-08 11:38.22 ---> using "e3c41ee419a858d045e5cf160fa6c52e46f7efd4dab949bc5498660fcb272636" from cache

/usr/home/opam: (copy (src .) (dst opam-repository/))
2024-02-08 11:40.27 ---> saved as "097366cd27812c52b940be0e48355c436d44bf5fffbef2f23bc54feb09a41b86"

/usr/home/opam: (run (shell "opam repository set-url --strict default opam-repository/"))
[default] Initialised
2024-02-08 11:41.41 ---> saved as "9d795d10b476acc1cccf61e9b22165650d703e5b3075be0e2a915225b4d75132"

/usr/home/opam: (run (network host)
                     (shell "opam update --depexts || true"))
[WARNING] Unknown update command for bsd, skipping system update
2024-02-08 11:41.43 ---> saved as "871ab06bde9e2a098c022f89f177fe80723ad2d45ff93a7dee5baf1578ae5a1a"

/usr/home/opam: (env OPAMCRITERIA -removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed)

/usr/home/opam: (env OPAMFIXUPCRITERIA -removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed)

/usr/home/opam: (env OPAMUPGRADECRITERIA -removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed)

/usr/home/opam: (run (shell "opam pin add -k version -yn hpke.0.0.pre-alpha 0.0.pre-alpha"))
hpke is now pinned to version 0.0.pre-alpha
2024-02-08 11:41.46 ---> saved as "16653f09a464e6bb953abf387a5b700995657d4aa6eec6bc0cec39e7a45f8138"

/usr/home/opam: (run (cache (opam-archives (target /usr/home/opam/.opam/download-cache)))
                     (network host)
                     (shell  "opam reinstall hpke.0.0.pre-alpha;\
                            \n        res=$?;\
                            \n        test \"$res\" != 31 && exit \"$res\";\
                            \n        export OPAMCLI=2.0;\
                            \n        build_dir=$(opam var prefix)/.opam-switch/build;\
                            \n        failed=$(ls \"$build_dir\");\
                            \n        partial_fails=\"\";\
                            \n        for pkg in $failed; do\
                            \n          if opam show -f x-ci-accept-failures: \"$pkg\" | grep -qF \"\\\"freebsd\\\"\"; then\
                            \n            echo \"A package failed and has been disabled for CI using the 'x-ci-accept-failures' field.\";\
                            \n          fi;\
                            \n          test \"$pkg\" != 'hpke.0.0.pre-alpha' && partial_fails=\"$partial_fails $pkg\";\
                            \n        done;\
                            \n        test \"${partial_fails}\" != \"\" && echo \"opam-repo-ci detected dependencies failing: ${partial_fails}\";\
                            \n        exit 1"))
hpke.0.0.pre-alpha is not installed. Install it? [y/n] y
Constructing initial basis...
Number of 0-1 knapsack inequalities = 2977
Constructing conflict graph...
Conflict graph has 685 + 242 = 927 vertices
The following actions will be performed:
=== install 20 packages
  ∗ conf-gmp          4                      [required by conf-gmp-powm-sec, zarith]
  ∗ conf-gmp-powm-sec 3                      [required by mirage-crypto-pk]
  ∗ csexp             1.5.2                  [required by dune-configurator]
  ∗ cstruct           6.2.0                  [required by hpke]
  ∗ dune              3.13.1                 [required by hpke]
  ∗ dune-configurator 3.13.1                 [required by mirage-crypto, mirage-crypto-rng]
  ∗ duration          0.2.1                  [required by mirage-crypto-rng]
  ∗ eqaf              0.9                    [required by mirage-crypto-pk]
  ∗ fmt               0.9.0                  [required by cstruct]
  ∗ hkdf              1.0.4                  [required by hpke]
  ∗ hpke              0.0.pre-alpha (pinned)
  ∗ logs              0.7.0                  [required by mirage-crypto-rng]
  ∗ mirage-crypto     0.11.2                 [required by hpke]
  ∗ mirage-crypto-pk  0.11.2                 [required by hpke]
  ∗ mirage-crypto-rng 0.11.2                 [required by mirage-crypto-pk]
  ∗ ocamlbuild        0.14.3                 [required by fmt]
  ∗ ocamlfind         1.9.6                  [required by fmt, zarith]
  ∗ sexplib0          v0.16.0                [required by mirage-crypto-pk]
  ∗ topkg             1.0.7                  [required by fmt]
  ∗ zarith            1.13                   [required by mirage-crypto-pk]

The following system packages will first need to be installed:
    gmp

<><> Handling external dependencies <><><><><><><><><><><><><><><><><><><><><><>

opam believes some required external dependencies are missing. opam can:
> 1. Run pkg to install them (may need root/sudo access)
  2. Display the recommended pkg command and wait while you run it manually (e.g. in another terminal)
  3. Continue anyway, and, upon success, permanently register that this external dependency is present, but not detectable
  4. Abort the installation

[1/2/3/4] 1

+ /usr/local/bin/sudo "pkg" "install" "-y" "gmp"
- Updating FreeBSD repository catalogue...
- [summer] Fetching packagesite.pkg: ..
- ........ done
- Processing entries: 
- .
- ..
- .
- ..
- .
- .
- .
- . done
- FreeBSD repository update completed. 33807 packages processed.
- All repositories are up to date.
- The following 1 package(s) will be affected (of 0 checked):
- 
- New packages to be INSTALLED:
- 	gmp: 6.3.0
- 
- Number of packages to be installed: 1
- 
- The process will require 3 MiB more space.
- 477 KiB to be downloaded.
- [summer] [1/1] Fetching gmp-6.3.0.pkg: .......... done
- Checking integrity... done (0 conflicting)
- [summer] [1/1] Installing gmp-6.3.0...
- [summer] [1/1] Extracting gmp-6.3.0: .......... done

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
⬇ retrieved csexp.1.5.2  (cached)
⬇ retrieved cstruct.6.2.0  (cached)
∗ installed conf-gmp.4
∗ installed conf-gmp-powm-sec.3
⬇ retrieved dune.3.13.1, dune-configurator.3.13.1  (cached)
⬇ retrieved duration.0.2.1  (cached)
⬇ retrieved eqaf.0.9  (cached)
⬇ retrieved fmt.0.9.0  (cached)
⬇ retrieved hkdf.1.0.4  (cached)
⬇ retrieved hpke.0.0.pre-alpha  (https://github.com/FantomeBeignet/ohpke/archive/refs/tags/0.0.pre-alpha.tar.gz)
⬇ retrieved logs.0.7.0  (cached)
⬇ retrieved mirage-crypto.0.11.2, mirage-crypto-pk.0.11.2, mirage-crypto-rng.0.11.2  (cached)
⬇ retrieved ocamlbuild.0.14.3  (cached)
⬇ retrieved ocamlfind.1.9.6  (cached)
⬇ retrieved sexplib0.v0.16.0  (cached)
⬇ retrieved topkg.1.0.7  (cached)
⬇ retrieved zarith.1.13  (cached)
∗ installed ocamlfind.1.9.6
∗ installed ocamlbuild.0.14.3
∗ installed zarith.1.13
∗ installed topkg.1.0.7
∗ installed fmt.0.9.0
∗ installed logs.0.7.0
∗ installed dune.3.13.1
∗ installed duration.0.2.1
∗ installed csexp.1.5.2
∗ installed sexplib0.v0.16.0
∗ installed cstruct.6.2.0
∗ installed eqaf.0.9
∗ installed dune-configurator.3.13.1
∗ installed mirage-crypto.0.11.2
∗ installed hkdf.1.0.4
∗ installed mirage-crypto-rng.0.11.2
∗ installed mirage-crypto-pk.0.11.2
∗ installed hpke.0.0.pre-alpha
Done.
2024-02-08 11:44.06 ---> saved as "a20699a490e020b51262972208927177d5669e008a68b3390858926627bab327"
Job succeeded
2024-02-08 11:48.38: Job succeeded