mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-28 22:06:31 +00:00
Both image jobs of run 37494541850 fail building the centos image:
Downloading successful, but checksum doesn't match.
Calculated: 76995e25878232ab... Expected: 0ebc31a075dcba98...
Error: Failed to download metadata for repo 'baseos':
Cannot download repomd.xml: All mirrors were tried
[filesystem] ERROR: 'dnf install -y epel-release' failed after 3 attempts
The retry added in d0b0b464e7 does not help and the log says why: the
Calculated digest is byte-identical on all three attempts, so dropping the dnf
metadata cache between them changes nothing. The stale bytes were never local.
Probing the sources directly settles where they come from. The metalink
advertises 0ebc31a075... for x86_64 BaseOS, matching the job's Expected value
hours later, while mirror.plusline.net and mirrors.xtom.de both serve a
repomd.xml hashing to 76995e25..., matching the job's Calculated value. The
mirrors agree with each other; the metalink is the outlier, and no retry can
reconcile a digest that no mirror serves.
The metalink exists to carry that digest alongside the mirror list, which
means the bytes and the hash for the same file arrive from two sources that
can drift apart. The mirrorlist offers the same mirrors without the second
source, so the failure class disappears rather than being retried. Mirror
redundancy is unchanged; no host is pinned.
Scoped to mirrors.centos.org. Fedora ships the same metalink shape, is not
affected by the desync, and keeps its repositories as upstream set them.
Distros without /etc/yum.repos.d exit before the rewrite.
Verified against the files the image actually ships, extracted from
centos-stream-repos-10.0-18.el10.noarch.rpm: all 23 metalink lines convert, 9
in centos.repo and 14 in centos-addons.repo. The three repositories that are
enabled there -- baseos, appstream and extras-sig-extras-common -- all resolve
through the mirrorlist endpoint.
This gives up the metalink's integrity check on repomd.xml itself. Packages
remain GPG-verified through gpgcheck.
No image has been built from this and no CI run has exercised it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
92 lines
3.7 KiB
Docker
92 lines
3.7 KiB
Docker
# Base image (pkgmgr) selector. SPOT lives in default.env's
|
|
# INFINITO_PARENT_IMAGE and is forwarded as a build arg by compose.yml /
|
|
# scripts/image/build.sh.
|
|
# Example values:
|
|
# INFINITO_PARENT_IMAGE=ghcr.io/kevinveenbirkenbach/pkgmgr-arch:stable
|
|
ARG INFINITO_PARENT_IMAGE
|
|
FROM ${INFINITO_PARENT_IMAGE} AS full
|
|
|
|
ARG NIX_CONFIG
|
|
|
|
ARG INFINITO_SRC_DIR
|
|
ENV INFINITO_SRC_DIR=${INFINITO_SRC_DIR}
|
|
ARG INFINITO_VENV_DIR
|
|
ENV INFINITO_VENV_DIR=${INFINITO_VENV_DIR}
|
|
ENV PYTHON="${INFINITO_VENV_DIR}/bin/python"
|
|
ENV PIP="${INFINITO_VENV_DIR}/bin/python -m pip"
|
|
ENV PATH="${INFINITO_VENV_DIR}/bin:${PATH}"
|
|
|
|
# hadolint DL4006: ensure pipefail is set for RUN instructions that use pipes
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-lc"]
|
|
|
|
RUN set -euo pipefail; \
|
|
cat /etc/os-release || true; \
|
|
if [ -f /etc/nix/nix.conf ]; then \
|
|
grep -q '^accept-flake-config *= *true' /etc/nix/nix.conf || \
|
|
echo 'accept-flake-config = true' >> /etc/nix/nix.conf; \
|
|
fi
|
|
|
|
COPY default.env ${INFINITO_SRC_DIR}/default.env
|
|
COPY scripts/install ${INFINITO_SRC_DIR}/scripts/install
|
|
|
|
# hadolint ignore=SC1090
|
|
RUN set -euo pipefail; \
|
|
source <(grep -hE '^INFINITO_(FILESYSTEM_INSTALL_SCRIPT|APT_UBUNTU_MIRRORS)=' "${INFINITO_SRC_DIR}/default.env"); \
|
|
INFINITO_APT_UBUNTU_MIRRORS="${INFINITO_APT_UBUNTU_MIRRORS:?}" /bin/bash "${INFINITO_SRC_DIR}/scripts/install/apt-mirrors.sh"; \
|
|
/bin/bash "${INFINITO_SRC_DIR}/scripts/install/dnf-mirrors.sh"; \
|
|
/bin/bash "${INFINITO_SRC_DIR}/${INFINITO_FILESYSTEM_INSTALL_SCRIPT:?}"
|
|
|
|
COPY roles/dev-python/files/shell ${INFINITO_SRC_DIR}/roles/dev-python/files/shell
|
|
COPY requirements ${INFINITO_SRC_DIR}/requirements
|
|
COPY utils/__init__.py ${INFINITO_SRC_DIR}/utils/__init__.py
|
|
COPY utils/install/__init__.py ${INFINITO_SRC_DIR}/utils/install/__init__.py
|
|
COPY utils/install/collections.py ${INFINITO_SRC_DIR}/utils/install/collections.py
|
|
|
|
# hadolint ignore=DL3008,DL3033,DL3041,SC1090,SC3040
|
|
RUN set -euo pipefail; \
|
|
source <(grep -hE '^INFINITO_PYTHON_INSTALL_SCRIPT=' "${INFINITO_SRC_DIR}/default.env"); \
|
|
/bin/bash "${INFINITO_SRC_DIR}/${INFINITO_PYTHON_INSTALL_SCRIPT:?}" ensure; \
|
|
VENV="${INFINITO_VENV_DIR}" bash "${INFINITO_SRC_DIR}/scripts/install/venv.sh"; \
|
|
${PIP} install --upgrade pip setuptools wheel; \
|
|
${PIP} install ansible PyYAML; \
|
|
ANSIBLE_COLLECTIONS_DIR="${HOME}/.ansible/collections" \
|
|
bash "${INFINITO_SRC_DIR}/scripts/install/ansible.sh"
|
|
|
|
COPY . ${INFINITO_SRC_DIR}
|
|
|
|
# hadolint ignore=DL3008,DL3033,DL3041,SC1090
|
|
RUN set -euo pipefail; \
|
|
source <(grep -hE '^INFINITO_(PYTHON|DOCKER_CLI|PACKAGE|INTERPRETERS)_INSTALL_SCRIPT=' "${INFINITO_SRC_DIR}/default.env"); \
|
|
/bin/bash "${INFINITO_SRC_DIR}/${INFINITO_PYTHON_INSTALL_SCRIPT:?}"; \
|
|
/bin/bash "${INFINITO_SRC_DIR}/${INFINITO_DOCKER_CLI_INSTALL_SCRIPT:?}"; \
|
|
/bin/bash "${INFINITO_SRC_DIR}/${INFINITO_PACKAGE_INSTALL_SCRIPT:?}"; \
|
|
/bin/bash "${INFINITO_SRC_DIR}/${INFINITO_INTERPRETERS_INSTALL_SCRIPT:?}"
|
|
|
|
RUN set -euo pipefail; \
|
|
systemctl mask systemd-firstboot.service first-boot-complete.target \
|
|
systemd-binfmt.service proc-sys-fs-binfmt_misc.automount \
|
|
proc-sys-fs-binfmt_misc.mount || true; \
|
|
systemd-machine-id-setup || true
|
|
|
|
RUN set -euo pipefail; \
|
|
systemctl mask getty.target console-getty.service getty-static.service getty@.service
|
|
|
|
ENV container=docker
|
|
STOPSIGNAL SIGRTMIN+3
|
|
|
|
# hadolint ignore=SC3040
|
|
RUN set -euo pipefail; \
|
|
export NIX_CONFIG="${NIX_CONFIG:-}"; \
|
|
"${INFINITO_SRC_DIR}/scripts/docker/entry.sh" --compile -- true
|
|
|
|
WORKDIR /
|
|
|
|
COPY scripts/docker/healthcheck.sh /usr/local/bin/healthcheck.sh
|
|
RUN chmod +x /usr/local/bin/healthcheck.sh
|
|
HEALTHCHECK --interval=5s --timeout=20s --start-period=30s --retries=20 \
|
|
CMD ["/usr/local/bin/healthcheck.sh"]
|
|
|
|
ENTRYPOINT ["/bin/bash", "-c", "exec \"${INFINITO_SRC_DIR}/scripts/docker/entry.sh\" \"$@\"", "--"]
|
|
|
|
CMD ["/sbin/init"]
|