revert(iso): remove apt-cacher-ng support, use lb package cache instead

apt-cacher-ng requires a separate container; lb's own package cache
persisted in --cache-dir is simpler and sufficient.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-28 10:02:34 +03:00
parent 23ad7ff534
commit c70ae274fa
2 changed files with 4 additions and 19 deletions

View File

@@ -16,14 +16,6 @@ else
LB_LINUX_PACKAGES="linux-image"
fi
# Route apt through proxy if BEE_APT_PROXY is set (e.g. apt-cacher-ng).
# Usage: APT_PROXY=http://host:3142 ./build-in-container.sh
if [ -n "${BEE_APT_PROXY:-}" ]; then
_MIRROR="${BEE_APT_PROXY%/}/debian"
else
_MIRROR="https://deb.debian.org/debian"
fi
lb config noauto \
--distribution bookworm \
--architectures amd64 \
@@ -31,9 +23,9 @@ lb config noauto \
--bootloaders "grub-efi,syslinux" \
--debian-installer none \
--archive-areas "main contrib non-free non-free-firmware" \
--mirror-bootstrap "${_MIRROR}" \
--mirror-chroot "${_MIRROR}" \
--mirror-binary "${_MIRROR}" \
--mirror-bootstrap "https://deb.debian.org/debian" \
--mirror-chroot "https://deb.debian.org/debian" \
--mirror-binary "https://deb.debian.org/debian" \
--security true \
--linux-flavours "amd64" \
--linux-packages "${LB_LINUX_PACKAGES}" \

View File

@@ -9,7 +9,6 @@ CONTAINER_TOOL="${CONTAINER_TOOL:-docker}"
IMAGE_TAG="${BEE_BUILDER_IMAGE:-bee-iso-builder}"
BUILDER_PLATFORM="${BEE_BUILDER_PLATFORM:-linux/amd64}"
CACHE_DIR="${BEE_BUILDER_CACHE_DIR:-${REPO_ROOT}/dist/container-cache}"
APT_PROXY="${APT_PROXY:-}"
AUTH_KEYS=""
REBUILD_IMAGE=0
@@ -29,13 +28,9 @@ while [ $# -gt 0 ]; do
AUTH_KEYS="$2"
shift 2
;;
--apt-proxy)
APT_PROXY="$2"
shift 2
;;
*)
echo "unknown arg: $1" >&2
echo "usage: $0 [--cache-dir /path] [--rebuild-image] [--authorized-keys /path/to/authorized_keys] [--apt-proxy http://host:3142]" >&2
echo "usage: $0 [--cache-dir /path] [--rebuild-image] [--authorized-keys /path/to/authorized_keys]" >&2
exit 1
;;
esac
@@ -105,7 +100,6 @@ set -- \
-e GOMODCACHE=/cache/go-mod \
-e TMPDIR=/cache/tmp \
-e BEE_CACHE_DIR=/cache/bee \
${APT_PROXY:+-e BEE_APT_PROXY="${APT_PROXY}"} \
-w /work \
"${IMAGE_REF}" \
sh /work/iso/builder/build.sh
@@ -121,7 +115,6 @@ if [ -n "$AUTH_KEYS" ]; then
-e GOMODCACHE=/cache/go-mod \
-e TMPDIR=/cache/tmp \
-e BEE_CACHE_DIR=/cache/bee \
${APT_PROXY:+-e BEE_APT_PROXY="${APT_PROXY}"} \
-w /work \
"${IMAGE_REF}" \
sh /work/iso/builder/build.sh --authorized-keys "/tmp/bee-authkeys/${AUTH_KEYS_BASE}"