The `virgin` stage installed the distribution build dependencies, and that layer now lives in its own repository: https://github.com/kevinveenbirkenbach/base-images. What remains here is one image per distribution that installs pkgmgr on top of it. `slim` goes with it: it was published for every distribution and pulled by nothing. scripts/build/base.sh stops pinning five upstream images and resolves ghcr.io/<owner>/base-<distro>:<tag> instead. Its env names follow the images repository rather than this one, so the code shows whose namespace that is. image.sh loses the --target axis, the -virgin/-slim tag suffixes with it, and passes --platform on push. Manjaro joins the set; os_resolver.sh already maps it onto arch, so it needs no dependency script of its own. The two virgin workflows pull the base image rather than building it. What they prove is unchanged: pkgmgr installs into an untouched container, as root and as an unprivileged user. test_distro_dependency_scripts_install_gpg_tools goes: it grepped the dependency scripts for gnupg, and those scripts are base-images' responsibility now, where the contract test runs `gpg --version` instead of reading a package list. Verified against locally built base images: the arch image builds FROM base-arch, and the full suite passes inside it - 405 unit, 90 integration and 49 e2e tests. Requires base-images to be published first; until then every build here fails at the pull. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
33 lines
1.1 KiB
Bash
Executable File
33 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# The distribution bases this repository builds on. They are published by
|
|
# https://github.com/kevinveenbirkenbach/base-images, one multi-platform image
|
|
# per distribution, and carry the build dependencies the package build needs.
|
|
#
|
|
# Env overrides exist for testing an unpublished base; the registry namespace
|
|
# follows the images repository, not this one.
|
|
|
|
: "${BASE_IMAGES_REGISTRY:=ghcr.io}"
|
|
: "${BASE_IMAGES_OWNER:=kevinveenbirkenbach}"
|
|
: "${BASE_IMAGES_TAG:=latest}"
|
|
|
|
resolve_base_image() {
|
|
local PKGMGR_DISTRO="$1"
|
|
case "$PKGMGR_DISTRO" in
|
|
arch|manjaro|debian|ubuntu|fedora|centos)
|
|
echo "${BASE_IMAGES_REGISTRY}/${BASE_IMAGES_OWNER}/base-${PKGMGR_DISTRO}:${BASE_IMAGES_TAG}"
|
|
;;
|
|
*) echo "ERROR: Unknown distro '$PKGMGR_DISTRO'" >&2; exit 1 ;;
|
|
esac
|
|
}
|
|
|
|
# Platforms each distribution's base offers; see base-images/scripts/build/distros.sh.
|
|
resolve_platforms() {
|
|
local PKGMGR_DISTRO="$1"
|
|
case "$PKGMGR_DISTRO" in
|
|
arch|manjaro|debian|ubuntu|fedora|centos) echo "linux/amd64,linux/arm64" ;;
|
|
*) echo "ERROR: Unknown distro '$PKGMGR_DISTRO'" >&2; exit 1 ;;
|
|
esac
|
|
}
|