From e887d1ed0f99fdace6f746699078f6188551ca68 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 13 Jul 2026 18:06:16 +0200 Subject: image-builder: feed full build from LAN NFS mirror over HTTP, fix GPG verify The full-image build pulled the entire Slackware tree from slackware.nl over WAN: slow (40+ min), flaky (truncated .asc downloads), and it wedged the legacy builder. The identical tree is on LAN NFS, so serve it to the build container instead. - config: add HTTP_MIRROR_HOST/PORT (docker0 bridge gateway + ephemeral port). - bootstrap.sh: bake the LAN HTTP mirror URL into the base image instead of slackware.nl, so the full build inherits it. - build-full-image.sh: start an ephemeral python3 http.server rooted at the variant NFS tree on the bridge for the build duration, killed via the EXIT trap; require_mount so an unmounted NAS fails loud; wait for the server before building. Also fix a silent-failure bug: without importing the Slackware GPG key against the mirror first, slackpkg cannot verify CHECKSUMS.md5 and installs almost nothing (94 packages instead of ~1788). Add "slackpkg update gpg" as the first Dockerfile step; verified the package count jumps 94 -> 1788 with it. Fetch is incremental (slackpkg downloads only installed packages), unlike the buildkit --build-context path which eagerly copies the whole multi-GB tree. Co-Authored-By: Claude Opus 4.8 --- .extras/image-builder/bootstrap.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to '.extras/image-builder/bootstrap.sh') diff --git a/.extras/image-builder/bootstrap.sh b/.extras/image-builder/bootstrap.sh index ff766d1..e9d9be5 100755 --- a/.extras/image-builder/bootstrap.sh +++ b/.extras/image-builder/bootstrap.sh @@ -268,7 +268,11 @@ build_variant() { local REPO_KEY="slackware64-${VERSION}" local PKG_PATH; PKG_PATH="$(mirror_path "${MIRROR}" "${REPO_KEY}")" local TAG="${REGISTRY_IMAGE}:${VERSION}" - local SLACKPKG_MIRROR="https://slackware.nl/slackware/slackware64-${VERSION}/" + # Bake the LAN HTTP mirror into the base image: the full-image build serves + # the NFS mirror over HTTP on the bridge (see build-full-image.sh), rooted + # at the variant's mirror tree, so slackpkg pulls from LAN not the internet. + # The URL is variant-agnostic (the server's --directory selects the tree). + local SLACKPKG_MIRROR="http://${HTTP_MIRROR_HOST}:${HTTP_MIRROR_PORT}/" _log "=== Building ${TAG} from ${PKG_PATH} ===" -- cgit v1.2.3