(for PR #27360)

2025-02-12 09:42.44: New job: build ocaml-rocksdb.0.02, using opam dev
                              from https://github.com/ocaml/opam-repository.git#refs/pull/27360/head (879cce6341a5b8d26f5989e5001751782571cb8b)
                              on debian-12-ocaml-4.07/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/27360/head" && git reset --hard 879cce63
git fetch origin master
git merge --no-edit 48bb43844bc785e46443ebf25e3c37b4d7bc64dc
cat > ../Dockerfile <<'END-OF-DOCKERFILE'
FROM ocaml/opam:debian-12-ocaml-4.07@sha256:d58591e4e3cc3b9683bdc63fa5d4939e3711596bdf367294ade9c2e24ef61df7
USER 1000:1000
WORKDIR /home/opam
RUN sudo ln -f /usr/bin/opam-dev /usr/bin/opam
RUN opam init --reinit -ni
RUN opam option solver=builtin-0install && opam config report
ENV OPAMDOWNLOADJOBS="1"
ENV OPAMERRLOGLEN="0"
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
RUN opam pin add -k version -yn ocaml-rocksdb.0.02 0.02
RUN opam reinstall ocaml-rocksdb.0.02; \
    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" != 'ocaml-rocksdb.0.02' && 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 .

2025-02-12 09:42.44: Using cache hint "ocaml/opam:debian-12-ocaml-4.07@sha256:d58591e4e3cc3b9683bdc63fa5d4939e3711596bdf367294ade9c2e24ef61df7-ocaml-rocksdb.0.02-879cce6341a5b8d26f5989e5001751782571cb8b"
2025-02-12 09:42.44: Using OBuilder spec:
((from ocaml/opam:debian-12-ocaml-4.07@sha256:d58591e4e3cc3b9683bdc63fa5d4939e3711596bdf367294ade9c2e24ef61df7)
 (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 "opam option solver=builtin-0install && opam config report"))
 (env OPAMDOWNLOADJOBS 1)
 (env OPAMERRLOGLEN 0)
 (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"))
 (run (shell "opam pin add -k version -yn ocaml-rocksdb.0.02 0.02"))
 (run (cache (opam-archives (target /home/opam/.opam/download-cache)))
      (network host)
      (shell  "opam reinstall ocaml-rocksdb.0.02;\
             \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\" != 'ocaml-rocksdb.0.02' && partial_fails=\"$partial_fails $pkg\";\
             \n        done;\
             \n        test \"${partial_fails}\" != \"\" && echo \"opam-repo-ci detected dependencies failing: ${partial_fails}\";\
             \n        exit 1"))
)

2025-02-12 09:42.44: Waiting for resource in pool OCluster
2025-02-12 09:42.45: Waiting for worker…
2025-02-12 09:42.45: Got resource from pool OCluster
Building on x86-bm-c3.sw.ocaml.org
All commits already cached
Updating files:  84% (19700/23317)
Updating files:  85% (19820/23317)
Updating files:  86% (20053/23317)
Updating files:  87% (20286/23317)
Updating files:  88% (20519/23317)
Updating files:  89% (20753/23317)
Updating files:  90% (20986/23317)
Updating files:  91% (21219/23317)
Updating files:  92% (21452/23317)
Updating files:  93% (21685/23317)
Updating files:  94% (21918/23317)
Updating files:  95% (22152/23317)
Updating files:  96% (22385/23317)
Updating files:  97% (22618/23317)
Updating files:  98% (22851/23317)
Updating files:  99% (23084/23317)
Updating files: 100% (23317/23317)
Updating files: 100% (23317/23317), done.
HEAD is now at 48bb43844b Merge pull request #27403 from hhugo/prepare-jsoo-6
Updating 48bb43844b..879cce6341
Fast-forward
 .../conf-rocksdb-ge-5-17-2.5.17.2/opam             | 37 ++++++++++++++
 packages/ocaml-rocksdb/ocaml-rocksdb.0.02/opam     | 59 ++++++++++++++++++++++
 2 files changed, 96 insertions(+)
 create mode 100644 packages/conf-rocksdb-ge-5-17-2/conf-rocksdb-ge-5-17-2.5.17.2/opam
 create mode 100644 packages/ocaml-rocksdb/ocaml-rocksdb.0.02/opam

(from ocaml/opam:debian-12-ocaml-4.07@sha256:d58591e4e3cc3b9683bdc63fa5d4939e3711596bdf367294ade9c2e24ef61df7)
2025-02-12 09:43.50 ---> saved as "21fd29644d73c1a22b55ce69680641113cd4129a0792b89e7587b6b0eef2bb88"

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

/: (workdir /home/opam)

/home/opam: (run (shell "sudo ln -f /usr/bin/opam-dev /usr/bin/opam"))
2025-02-12 09:43.50 ---> saved as "0f85b7d7e76874b07f9524dac1c635cc281711234592bb48756c2b45c7c51bdf"

/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, which can't be reverted.
You may want to back it up before going further.

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

<><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><>
[opam-repository-archive] no changes from git+https://github.com/ocaml/opam-repository-archive
[default] synchronised from file:///home/opam/opam-repository
2025-02-12 09:44.54 ---> saved as "266db456a9568e1395a238c0d545c524d430d5bb122018986b5cc7038c96db00"

/home/opam: (run (shell "opam option solver=builtin-0install && opam config report"))
Set to 'builtin-0install' the field solver in global configuration
# opam config report
# opam-version         2.4.0~alpha1~dev (747e73667ad9d054b0f736be205c0013e1bec087)
# self-upgrade         no
# system               arch=x86_64 os=linux os-distribution=debian os-version=12
# solver               builtin-0install
# install-criteria     -changed,-count[avoid-version,solution]
# upgrade-criteria     -count[avoid-version,solution]
# jobs                 39
# repositories         1 (local), 1 (version-controlled)
# pinned               1 (version)
# current-switch       4.07
# invariant            ["ocaml-base-compiler" {= "4.07.1"}]
# compiler-packages    ocaml-base-compiler.4.07.1
# ocaml:native         true
# ocaml:native-tools   true
# ocaml:native-dynlink true
# ocaml:stubsdir       /home/opam/.opam/4.07/lib/ocaml/stublibs:/home/opam/.opam/4.07/lib/ocaml
# ocaml:preinstalled   false
# ocaml:compiler       4.07.1
2025-02-12 09:44.55 ---> saved as "50300419c72a9cf786bb2839d6a0363a1b38d9ffab07fe727bf40166f9485870"

/home/opam: (env OPAMDOWNLOADJOBS 1)

/home/opam: (env OPAMERRLOGLEN 0)

/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/"))
2025-02-12 09:45.03 ---> saved as "a27049d8ed22546186db9302323ad3ed57884a76aaee2bab5a8ec025c6e42aed"

/home/opam: (copy (src .) (dst opam-repository/))
2025-02-12 09:45.12 ---> saved as "16257448c8fb2703057225a5c6fe6dbb90772cddda5e54b3ad27f02eb2645157"

/home/opam: (run (shell "opam repository set-url --strict default opam-repository/"))
[default] Initialised
2025-02-12 09:45.56 ---> saved as "62045f30a9f42cd30675d3a890a7a8d12b76735025f0f49cfaf532a397695c38"

/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 [245 kB]
- Fetched 348 kB in 0s (1271 kB/s)
- Reading package lists...
2025-02-12 09:45.57 ---> saved as "63099a2f44826b3bce769e441e509b805843d44dd32096b971259ae0ca30d266"

/home/opam: (run (shell "opam pin add -k version -yn ocaml-rocksdb.0.02 0.02"))
ocaml-rocksdb is now pinned to version 0.02
2025-02-12 09:45.58 ---> saved as "4b64c7865fbcaf2578d0d1454c09ba57bca8ead30de02050c08ffd777ed66cfe"

/home/opam: (run (cache (opam-archives (target /home/opam/.opam/download-cache)))
                 (network host)
                 (shell  "opam reinstall ocaml-rocksdb.0.02;\
                        \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\" != 'ocaml-rocksdb.0.02' && partial_fails=\"$partial_fails $pkg\";\
                        \n        done;\
                        \n        test \"${partial_fails}\" != \"\" && echo \"opam-repo-ci detected dependencies failing: ${partial_fails}\";\
                        \n        exit 1"))
ocaml-rocksdb.0.02 is not installed. Install it? [Y/n] y
  * No agreement on the version of ocaml:
    - (invariant) -> ocaml-base-compiler = 4.07.1 -> ocaml = 4.07.1
    - ocaml-rocksdb -> ocaml >= 4.10.0
    You can temporarily relax the switch invariant with `--update-invariant'
  * Incompatible packages:
    - (invariant) -> ocaml-base-compiler = 4.07.1
    - ocaml-rocksdb -> ocaml >= 4.10.0 -> ocaml-variants >= 5.1.1~
  * Missing dependency:
    - ocaml-rocksdb -> ocaml >= 4.10.0 -> ocaml-variants >= 5.1.1~ -> system-msvc
    unmet availability conditions: 'os = "win32"'

No solution found, exiting
"/usr/bin/env" "bash" "-c" "opam reinstall ocaml-rocksdb.0.02;
        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" != 'ocaml-rocksdb.0.02' && partial_fails="$partial_fails $pkg";
        done;
        test "${partial_fails}" != "" && echo "opam-repo-ci detected dependencies failing: ${partial_fails}";
        exit 1" failed with exit status 20
2025-02-12 09:46.18: Job failed: Failed: Build failed
2025-02-12 09:46.18: Log analysis:
2025-02-12 09:46.18: >>> 
No solution found, exiting
 (score = 100)
2025-02-12 09:46.18: [SKIP] Package not available