(for PR #23330)

2024-04-17 19:21.23: New job: build zarith.1.12-1, using opam dev
                              from https://github.com/ocaml/opam-repository.git#refs/pull/23330/head (e065de656cee71750ee448a95ca37886f41c1cd4)
                              on debian-12-ocaml-4.11/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/23330/head" && git reset --hard e065de65
git fetch origin master
git merge --no-edit f089d8564db935c703bea70a4b3d8335ffa1bef3
cat > ../Dockerfile <<'END-OF-DOCKERFILE'
FROM ocaml/opam:debian-12-ocaml-4.11@sha256:bc81fe455121d3704fde0904c935b8418597ca6860c926c1e6bfc71ceb98cdf4
USER 1000:1000
WORKDIR /home/opam
RUN sudo ln -f /usr/bin/opam-dev /usr/bin/opam
RUN opam init --reinit -ni
RUN uname -rs && opam exec -- ocaml -version && opam --version
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 zarith.1.12-1 1.12-1
RUN opam reinstall zarith.1.12-1; \
    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 "\"debian-12\""; then \
    echo "A package failed and has been disabled for CI using the 'x-ci-accept-failures' field."; \
    fi; \
    test "$pkg" != 'zarith.1.12-1' && 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-04-17 19:21.23: Using cache hint "ocaml/opam:debian-12-ocaml-4.11@sha256:bc81fe455121d3704fde0904c935b8418597ca6860c926c1e6bfc71ceb98cdf4-zarith.1.12-1-e065de656cee71750ee448a95ca37886f41c1cd4"
2024-04-17 19:21.23: Using OBuilder spec:
((from ocaml/opam:debian-12-ocaml-4.11@sha256:bc81fe455121d3704fde0904c935b8418597ca6860c926c1e6bfc71ceb98cdf4)
 (user (uid 1000) (gid 1000))
 (workdir /home/opam)
 (run (shell "sudo ln -f /usr/bin/opam-dev /usr/bin/opam"))
 (run (network host)
      (shell "opam init --reinit --config .opamrc-sandbox -ni"))
 (run (shell "uname -rs && opam exec -- ocaml -version && opam --version"))
 (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 zarith.1.12-1 1.12-1"))
 (run (cache (opam-archives (target /home/opam/.opam/download-cache)))
      (network host)
      (shell  "opam reinstall zarith.1.12-1;\
             \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 \"\\\"debian-12\\\"\"; then\
             \n            echo \"A package failed and has been disabled for CI using the 'x-ci-accept-failures' field.\";\
             \n          fi;\
             \n          test \"$pkg\" != 'zarith.1.12-1' && partial_fails=\"$partial_fails $pkg\";\
             \n        done;\
             \n        test \"${partial_fails}\" != \"\" && echo \"opam-repo-ci detected dependencies failing: ${partial_fails}\";\
             \n        exit 1"))
)

2024-04-17 19:21.23: Waiting for resource in pool OCluster
2024-04-17 19:40.14: Waiting for worker…
2024-04-17 19:41.54: Got resource from pool OCluster
Building on x86-bm-c17.sw.ocaml.org
All commits already cached
Updating files:  89% (29940/33527)
Updating files:  90% (30175/33527)
Updating files:  91% (30510/33527)
Updating files:  92% (30845/33527)
Updating files:  93% (31181/33527)
Updating files:  94% (31516/33527)
Updating files:  95% (31851/33527)
Updating files:  96% (32186/33527)
Updating files:  97% (32522/33527)
Updating files:  98% (32857/33527)
Updating files:  99% (33192/33527)
Updating files: 100% (33527/33527)
Updating files: 100% (33527/33527), done.
HEAD is now at f089d8564d Merge pull request #25672 from gborough/opam-publish-fred.0.1.0
Merge made by the 'ort' strategy.
 .../conf-gmp-powm-sec.4/files/test.c               | 26 ++++++++++++
 .../conf-gmp-powm-sec/conf-gmp-powm-sec.4/opam     | 17 ++++++++
 packages/conf-gmp/conf-gmp.5/files/test.c          | 10 +++++
 packages/conf-gmp/conf-gmp.5/opam                  | 32 +++++++++++++++
 packages/zarith/zarith.1.12-1/opam                 | 47 ++++++++++++++++++++++
 5 files changed, 132 insertions(+)
 create mode 100644 packages/conf-gmp-powm-sec/conf-gmp-powm-sec.4/files/test.c
 create mode 100644 packages/conf-gmp-powm-sec/conf-gmp-powm-sec.4/opam
 create mode 100644 packages/conf-gmp/conf-gmp.5/files/test.c
 create mode 100644 packages/conf-gmp/conf-gmp.5/opam
 create mode 100644 packages/zarith/zarith.1.12-1/opam

(from ocaml/opam:debian-12-ocaml-4.11@sha256:bc81fe455121d3704fde0904c935b8418597ca6860c926c1e6bfc71ceb98cdf4)
2024-04-17 19:42.05 ---> using "7ed5c1f19c5ca0526a28c77f75bb6acabc1dcee08131bb17edacbdd86820cda1" from cache

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

/: (workdir /home/opam)

/home/opam: (run (shell "sudo ln -f /usr/bin/opam-dev /usr/bin/opam"))
2024-04-17 19:42.05 ---> using "5d305313503fe69a463d5e3cb9be2f999a45aa3367c364e191581f099a6f82cb" from cache

/home/opam: (run (network host)
                 (shell "opam init --reinit --config .opamrc-sandbox -ni"))
Configuring from /home/opam/.opamrc-sandbox, then /home/opam/.opamrc, and finally from 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 /home/opam/.opam from version 2.0 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] synchronised from file:///home/opam/opam-repository
2024-04-17 19:42.05 ---> using "6050a16f1ad88e1bb65eff3797eb4799dc31d109d98ed30bfd6ebe85250b871e" from cache

/home/opam: (run (shell "uname -rs && opam exec -- ocaml -version && opam --version"))
Linux 5.15.0-101-generic
The OCaml toplevel, version 4.11.2
2.2.0~beta2~dev
2024-04-17 19:42.05 ---> using "78603ae49257acfd3aac54e341726224bcaa4cb22b55a4a88923326fbc142f65" from cache

/home/opam: (env OPAMDOWNLOADJOBS 1)

/home/opam: (env OPAMERRLOGLEN 0)

/home/opam: (env OPAMSOLVERTIMEOUT 500)

/home/opam: (env OPAMPRECISETRACKING 1)

/home/opam: (env CI true)

/home/opam: (env OPAM_REPO_CI true)

/home/opam: (run (shell "rm -rf opam-repository/"))
2024-04-17 19:42.05 ---> using "625698649f7ea37f9ce5f7b051524d91ed6c5a98414ad1ba3cac1b2a0c19c3ff" from cache

/home/opam: (copy (src .) (dst opam-repository/))
2024-04-17 19:42.19 ---> saved as "8a4f38027dd530d783c33833b0ae6d95253b16ca95e373c353b5f118aa77ec7e"

/home/opam: (run (shell "opam repository set-url --strict default opam-repository/"))
[default] Initialised
2024-04-17 19:43.17 ---> saved as "dccd6f73a7878224cce9652b8270bb3153a44afa62480b149f39edeee6f47f6b"

/home/opam: (run (network host)
                 (shell "opam update --depexts || true"))
+ /usr/bin/sudo "apt-get" "update"
- Hit:1 http://deb.debian.org/debian bookworm InRelease
- Get:2 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
- Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
- Get:4 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [154 kB]
- Fetched 257 kB in 0s (955 kB/s)
- Reading package lists...
2024-04-17 19:43.18 ---> saved as "eed518c6051ce3386d2bd28a893f2932a4edec5cf0fc7576b2ff92ed50d556ea"

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

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

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

/home/opam: (run (shell "opam pin add -k version -yn zarith.1.12-1 1.12-1"))
zarith is now pinned to version 1.12-1
2024-04-17 19:43.19 ---> saved as "7da89ac6b44012b5caf2b7236e6f2ef00d75eea5dea7c82601cde406a67f35be"

/home/opam: (run (cache (opam-archives (target /home/opam/.opam/download-cache)))
                 (network host)
                 (shell  "opam reinstall zarith.1.12-1;\
                        \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 \"\\\"debian-12\\\"\"; then\
                        \n            echo \"A package failed and has been disabled for CI using the 'x-ci-accept-failures' field.\";\
                        \n          fi;\
                        \n          test \"$pkg\" != 'zarith.1.12-1' && partial_fails=\"$partial_fails $pkg\";\
                        \n        done;\
                        \n        test \"${partial_fails}\" != \"\" && echo \"opam-repo-ci detected dependencies failing: ${partial_fails}\";\
                        \n        exit 1"))
zarith.1.12-1 is not installed. Install it? [y/n] y
The following actions will be performed:
=== install 4 packages
  - install conf-gmp        5               [required by zarith]
  - install conf-pkg-config 3               [required by conf-gmp]
  - install ocamlfind       1.9.6           [required by zarith]
  - install zarith          1.12-1 (pinned)

The following system packages will first need to be installed:
    libgmp-dev pkg-config

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

opam believes some required external dependencies are missing. opam can:
> 1. Run apt-get to install them (may need root/sudo access)
  2. Display the recommended apt-get 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/bin/sudo "apt-get" "install" "-qq" "-yy" "libgmp-dev" "pkg-config"
- debconf: delaying package configuration, since apt-utils is not installed
- Selecting previously unselected package libgmpxx4ldbl:amd64.
- (Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 18743 files and directories currently installed.)
- Preparing to unpack .../0-libgmpxx4ldbl_2%3a6.2.1+dfsg1-1.1_amd64.deb ...
- Unpacking libgmpxx4ldbl:amd64 (2:6.2.1+dfsg1-1.1) ...
- Selecting previously unselected package libgmp-dev:amd64.
- Preparing to unpack .../1-libgmp-dev_2%3a6.2.1+dfsg1-1.1_amd64.deb ...
- Unpacking libgmp-dev:amd64 (2:6.2.1+dfsg1-1.1) ...
- Selecting previously unselected package libpkgconf3:amd64.
- Preparing to unpack .../2-libpkgconf3_1.8.1-1_amd64.deb ...
- Unpacking libpkgconf3:amd64 (1.8.1-1) ...
- Selecting previously unselected package pkgconf-bin.
- Preparing to unpack .../3-pkgconf-bin_1.8.1-1_amd64.deb ...
- Unpacking pkgconf-bin (1.8.1-1) ...
- Selecting previously unselected package pkgconf:amd64.
- Preparing to unpack .../4-pkgconf_1.8.1-1_amd64.deb ...
- Unpacking pkgconf:amd64 (1.8.1-1) ...
- Selecting previously unselected package pkg-config:amd64.
- Preparing to unpack .../5-pkg-config_1.8.1-1_amd64.deb ...
- Unpacking pkg-config:amd64 (1.8.1-1) ...
- Setting up libpkgconf3:amd64 (1.8.1-1) ...
- Setting up libgmpxx4ldbl:amd64 (2:6.2.1+dfsg1-1.1) ...
- Setting up pkgconf-bin (1.8.1-1) ...
- Setting up libgmp-dev:amd64 (2:6.2.1+dfsg1-1.1) ...
- Setting up pkgconf:amd64 (1.8.1-1) ...
- Setting up pkg-config:amd64 (1.8.1-1) ...
- Processing triggers for libc-bin (2.36-9+deb12u4) ...

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> retrieved ocamlfind.1.9.6  (cached)
-> installed conf-pkg-config.3
-> retrieved zarith.1.12-1  (cached)
-> installed conf-gmp.5
-> installed ocamlfind.1.9.6
-> installed zarith.1.12-1
Done.
# Run eval $(opam env) to update the current shell environment
2024-04-17 19:43.43 ---> saved as "b67dde63e307d61ef7d12e51b16eb6efbfd6261d42ae5c8237c87af36739b360"
Job succeeded
2024-04-17 19:43.57: Job succeeded