(for PR #27798)

2025-04-19 22:51.44: New job: build conf-magick-core6.1, using opam 2.0
                              from https://github.com/ocaml/opam-repository.git#refs/pull/27798/head (7ffd814792efba70850b6829a4897bc274b099a1)
                              on debian-12-ocaml-5.3/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/27798/head" && git reset --hard 7ffd8147
git fetch origin master
git merge --no-edit 999bff3ed88d26f76ff7eaddbfa7af49ed4737dc
cat > ../Dockerfile <<'END-OF-DOCKERFILE'
FROM ocaml/opam:debian-12-ocaml-5.3@sha256:cda55e84863b5c1f4e5bd28bdeb54129bfbff2dd578bbcc8ffdb236107584a66
USER 1000:1000
WORKDIR /home/opam
RUN sudo ln -f /usr/bin/opam-2.0 /usr/bin/opam
RUN opam init --reinit -ni
RUN 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 depext -u || true
RUN opam pin add -k version -yn conf-magick-core6.1 1
RUN opam depext conf-magick-core6.1 && opam reinstall conf-magick-core6.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" != 'conf-magick-core6.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 .

2025-04-19 22:51.44: Using cache hint "ocaml/opam:debian-12-ocaml-5.3@sha256:cda55e84863b5c1f4e5bd28bdeb54129bfbff2dd578bbcc8ffdb236107584a66-conf-magick-core6.1-7ffd814792efba70850b6829a4897bc274b099a1"
2025-04-19 22:51.44: Using OBuilder spec:
((from ocaml/opam:debian-12-ocaml-5.3@sha256:cda55e84863b5c1f4e5bd28bdeb54129bfbff2dd578bbcc8ffdb236107584a66)
 (user (uid 1000) (gid 1000))
 (workdir /home/opam)
 (run (shell "sudo ln -f /usr/bin/opam-2.0 /usr/bin/opam"))
 (run (network host)
      (shell "opam init --reinit --config .opamrc-sandbox -ni"))
 (run (shell "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 depext -u || true"))
 (run (shell "opam pin add -k version -yn conf-magick-core6.1 1"))
 (run (cache (opam-archives (target /home/opam/.opam/download-cache)))
      (network host)
      (shell  "opam depext conf-magick-core6.1 && opam reinstall conf-magick-core6.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\" != 'conf-magick-core6.1' && partial_fails=\"$partial_fails $pkg\";\
             \n        done;\
             \n        test \"${partial_fails}\" != \"\" && echo \"opam-repo-ci detected dependencies failing: ${partial_fails}\";\
             \n        exit 1"))
)

2025-04-19 22:51.44: Waiting for resource in pool OCluster
2025-04-19 22:51.45: Waiting for worker…
2025-04-19 22:52.40: Got resource from pool OCluster
Building on x86-bm-c5.sw.ocaml.org
All commits already cached
Updating files:  91% (21087/22931)
Updating files:  92% (21097/22931)
Updating files:  93% (21326/22931)
Updating files:  94% (21556/22931)
Updating files:  95% (21785/22931)
Updating files:  96% (22014/22931)
Updating files:  97% (22244/22931)
Updating files:  98% (22473/22931)
Updating files:  99% (22702/22931)
Updating files: 100% (22931/22931)
Updating files: 100% (22931/22931), done.
HEAD is now at 999bff3ed8 Merge pull request #27746 from hirrolot/opam-publish-checked_oint.0.6.0
Updating 999bff3ed8..7ffd814792
Fast-forward
 packages/conf-magick-core6/conf-magick-core6.1/opam | 20 ++++++++++++++++++++
 packages/conf-magick-core7/conf-magick-core7.1/opam | 20 ++++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 packages/conf-magick-core6/conf-magick-core6.1/opam
 create mode 100644 packages/conf-magick-core7/conf-magick-core7.1/opam

(from ocaml/opam:debian-12-ocaml-5.3@sha256:cda55e84863b5c1f4e5bd28bdeb54129bfbff2dd578bbcc8ffdb236107584a66)
2025-04-19 22:53.23 ---> using "19877b52b990c5a970510eb0ace473d379b5f4771b9feb9f573b1d3119b07d2c" from cache

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

/: (workdir /home/opam)

/home/opam: (run (shell "sudo ln -f /usr/bin/opam-2.0 /usr/bin/opam"))
2025-04-19 22:53.23 ---> saved as "05321615b12bcc2da5488a358ba1a19dfcafdeda0102a1ccdd5663a393b2f621"

/home/opam: (run (network host)
                 (shell "opam init --reinit --config .opamrc-sandbox -ni"))
[NOTE] Will configure 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.

[WARNING] Recommended dependencies -- most packages rely on these:
  - m4

<><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><>
[default] Initialised
default (at git+file:///home/opam/opam-repository): 
    [INFO] opam 2.1 and 2.2 include many performance and security improvements over 2.0; please consider upgrading (https://opam.ocaml.org/doc/Install.html)

2025-04-19 22:54.24 ---> saved as "28ea40579bc318dea8adaf0e86574aea19ff5b235a39e53801ee6ffd66fceccf"

/home/opam: (run (shell "opam config report"))
# opam config report
# opam-version      2.0.10 (adc1e1829a2bef5b240746df80341b508290fe3b) 
# self-upgrade      no
# system            arch=x86_64 os=linux os-distribution=debian os-version=12
# solver            builtin-mccs+glpk
# install-criteria  -removed,-count[version-lag,request],-count[version-lag,changed],-changed
# upgrade-criteria  -removed,-count[version-lag,solution],-new
# jobs              39
# repositories      1 (version-controlled)
# pinned            1 (version)
# current-switch    5.3
2025-04-19 22:54.24 ---> saved as "932b3a1c5b24aa2f5cf0bf05fcf7fc50f84a7e99ddd71fcee9aff44155c03998"

/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-04-19 22:54.33 ---> saved as "7cb96ff63026816f2ed0f5b7361e95ddfb0b6bfd917afec5638c7aa1fcdd9103"

/home/opam: (copy (src .) (dst opam-repository/))
2025-04-19 22:54.41 ---> saved as "e3d32ff62807032ff8f3e4b2c0a76ffa68a173d1f385e530184efadbce4f2425"

/home/opam: (run (shell "opam repository set-url --strict default opam-repository/"))
[default] Initialised
default (at file:///home/opam/opam-repository): 
    [INFO] opam 2.1 and 2.2 include many performance and security improvements over 2.0; please consider upgrading (https://opam.ocaml.org/doc/Install.html)

2025-04-19 22:54.56 ---> saved as "24ffd181f02ad9f5c7740ec709c087e321732eacb01751d908c7b0a14665a0ee"

/home/opam: (run (network host)
                 (shell "opam depext -u || true"))
# Detecting depexts using vars: arch=x86_64, os=linux, os-distribution=debian, os-family=debian
# No extra OS packages requirements found.
# All required OS packages found.
The following command needs to be run through "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 [255 kB]
Fetched 359 kB in 0s (1420 kB/s)
Reading package lists...
# OS package update successful
2025-04-19 22:54.58 ---> saved as "9c19f2e5f05e7b83f832d13f1cd2e92bed66db83db423f32a155e2a8b31d599b"

/home/opam: (run (shell "opam pin add -k version -yn conf-magick-core6.1 1"))
conf-magick-core6 is now pinned to version 1
2025-04-19 22:54.59 ---> saved as "386c1ffb1a8ad880d366928e3aac535756d67ab27bfc06e48b06e72c76927a2b"

/home/opam: (run (cache (opam-archives (target /home/opam/.opam/download-cache)))
                 (network host)
                 (shell  "opam depext conf-magick-core6.1 && opam reinstall conf-magick-core6.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\" != 'conf-magick-core6.1' && partial_fails=\"$partial_fails $pkg\";\
                        \n        done;\
                        \n        test \"${partial_fails}\" != \"\" && echo \"opam-repo-ci detected dependencies failing: ${partial_fails}\";\
                        \n        exit 1"))
# Detecting depexts using vars: arch=x86_64, os=linux, os-distribution=debian, os-family=debian
# The following system packages are needed:
pkg-config
The following command needs to be run through "sudo":
    apt-get install -qq -yy pkg-config
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libpkgconf3: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 ... 18778 files and directories currently installed.)
Preparing to unpack .../libpkgconf3_1.8.1-1_amd64.deb ...
Unpacking libpkgconf3:amd64 (1.8.1-1) ...
Selecting previously unselected package pkgconf-bin.
Preparing to unpack .../pkgconf-bin_1.8.1-1_amd64.deb ...
Unpacking pkgconf-bin (1.8.1-1) ...
Selecting previously unselected package pkgconf:amd64.
Preparing to unpack .../pkgconf_1.8.1-1_amd64.deb ...
Unpacking pkgconf:amd64 (1.8.1-1) ...
Selecting previously unselected package pkg-config:amd64.
Preparing to unpack .../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 pkgconf-bin (1.8.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+deb12u10) ...
# OS packages installation successful
conf-magick-core6.1 is not installed. Install it? [Y/n] y
The following actions will be performed:
  - install conf-pkg-config   4  [required by conf-magick-core6]
  - install conf-magick-core6 1*
===== 2 to install =====

<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed conf-pkg-config.4
[ERROR] The compilation of conf-magick-core6 failed at "/home/opam/.opam/opam-init/hooks/sandbox.sh build sh -c pkg-config --exists MagickCore && pkg-config --modversion MagickCore | awk -F. '{ if ($1 == 6) exit 0; else exit 1; }'".

#=== ERROR while compiling conf-magick-core6.1 ================================#
# context              2.0.10 | linux/x86_64 | ocaml-base-compiler.5.3.0 | pinned
# path                 ~/.opam/5.3/.opam-switch/build/conf-magick-core6.1
# command              ~/.opam/opam-init/hooks/sandbox.sh build sh -c pkg-config --exists MagickCore && pkg-config --modversion MagickCore | awk -F. '{ if ($1 == 6) exit 0; else exit 1; }'
# exit-code            1
# env-file             ~/.opam/log/conf-magick-core6-114-7afd23.env
# output-file          ~/.opam/log/conf-magick-core6-114-7afd23.out



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+- The following actions failed
| - build conf-magick-core6 1
+- 
+- The following changes have been performed
| - install conf-pkg-config 4
+- 
# Run eval $(opam env) to update the current shell environment

The former state can be restored with:
    opam switch import "/home/opam/.opam/5.3/.opam-switch/backup/state-20250419225506.export"
"/usr/bin/env" "bash" "-c" "opam depext conf-magick-core6.1 && opam reinstall conf-magick-core6.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" != 'conf-magick-core6.1' && partial_fails="$partial_fails $pkg";
        done;
        test "${partial_fails}" != "" && echo "opam-repo-ci detected dependencies failing: ${partial_fails}";
        exit 1" failed with exit status 1
2025-04-19 22:55.18: Job failed: Failed: Build failed
2025-04-19 22:55.18: Log analysis:
2025-04-19 22:55.18: >>> 
[ERROR] The compilation of conf-magick-core6 failed at "/home/opam/.opam/opam-init/hooks/sandbox.sh build sh -c pkg-config --exists MagickCore && pkg-config --modversion MagickCore | awk -F. '{ if ($1 == 6) exit 0; else exit 1; }'".
 (score = 20)
2025-04-19 22:55.18: The compilation of conf-magick-core6 failed at "/home/opam/.opam/opam-init/hooks/sandbox.sh build sh -c pkg-config --exists MagickCore && pkg-config --modversion MagickCore | awk -F. '{ if ($1 == 6) exit 0; else exit 1; }'".