Files
computer-playbook/scripts/install
kevinveenbirkenbachandClaude Opus 5 d0b0b464e7 fix(images): make a dnf retry fetch again instead of replaying its cache
Both image-build jobs of run 37494541850 failed, and only centos broke; arch,
debian, ubuntu and fedora built. The headline reads like an outage:

    Error: Failed to download metadata for repo 'baseos':
      Cannot download repomd.xml ... All mirrors were tried

The line above it says otherwise:

    Errors during downloading metadata for repository 'baseos':
      - Downloading successful, but checksum doesn't match.
        Calculated: 76995e25878232aba76bc22834280007be1baf40...

The download succeeds; the repomd.xml served does not match the checksum the
metalink advertises. The decisive detail is that this digest is byte-identical
on attempts 1, 2 and 3. A real re-fetch reaches a different mirror and yields a
different digest, so attempts 2 and 3 fetched nothing: dnf had written the bad
metadata to /var/cache/dnf and retry only slept and re-invoked the same command
against the same file. Three attempts, one download, and the same for all seven
build attempts.

retry_dnf is retry plus a metadata clean before each re-run, so the next
attempt is a fetch and can land on a mirror that is not mid-sync. All ten dnf
call sites use it, not just the one that failed: the zfs builddep and install
paths carry the identical weakness. apt and pacman keep retry, having no
equivalent cache trap.

The success path is unchanged, so the common case behaves identically. On the
failure path the script runs under set -e, which aborts if the clean itself
returns non-zero: measured, and it fails closed and loud rather than continuing
against a stale cache.

This fixes the retry, not the mirror. If the EL mirrors served stale metadata
for the whole window, three real fetches still fail.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-06 19:15:52 +02:00
..
…
…
…

Install Scripts

This directory contains scripts that install and bootstrap host-side tooling used by the project.

  • 📦 Install Python, Ansible, and lint dependencies for supported environments
  • 🐧 Install ad-hoc APT packages for CI and workflow jobs via apt.sh
  • 📦 Build and install distro package metadata via package.sh (Arch/Debian/Ubuntu/Fedora)
  • 🪞 Point an Ubuntu image's apt sources at INFINITO_APT_UBUNTU_MIRRORS via apt-mirrors.sh, run first in the image build: apt tries the mirrors in list order and moves on when one fails or stays silent for 10 s; images of other distros are left untouched
  • 🏖️ Install OS-level Claude Code sandbox dependencies (bubblewrap, socat) via sandbox.sh, covering Debian, Ubuntu, Fedora, CentOS/RHEL/Rocky/Alma, and Arch; also exposed as make install-agent
  • 🧊 Install the ext4, btrfs and zfs userlands via filesystem.sh (distro packages, EPEL for btrfs on CentOS, the AUR PKGBUILD for zfs on Arch, the zfsonlinux repository on Fedora/CentOS); the kernel side comes from the host
  • 🐍 Bootstrap virtual environments and editable project dependencies
  • 🛠️ Keep host preparation separate from lint, build, and test execution

The scope of this folder is installation and bootstrap. Lint execution, build workflows, and test orchestration should stay in their dedicated script directories.