Skip to content

Commit c669c87

Browse files
committed
rootfs: strip mmdebstrap's apt proxy so it doesn't ship in the image
When a CI runner sets APT_PROXY_ADDR (from the runner map, or derived from an ambient http_proxy), rootfs-create routes mmdebstrap's bootstrap through it via --aptopt. mmdebstrap persists that aptopt as /etc/apt/apt.conf.d/99mmdebstrap inside the target rootfs — and nothing removed it, so the build-host proxy (e.g. http://10.0.40.2:3142) shipped in the final image. On the user's machine that proxy is meaningless/unreachable, so their apt update hangs or fails. Confirmed in a published rootfs artifact: 99mmdebstrap contained `Acquire::http::Proxy "http://10.0.40.2:3142";`. Remove it in the existing post-mmdebstrap cleanup, next to the 99-armbian-sandbox removal (also build-time only). Signed-off-by: Igor Pecovnik <igor@armbian.com>
1 parent 666402b commit c669c87

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/functions/rootfs/rootfs-create.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,10 @@ function create_new_rootfs_cache_via_debootstrap() {
158158
display_alert "Cleaning up after mmdebstrap" "mmdebstrap cleanup" "info"
159159
run_host_command_logged rm -rf "${SDCARD}/var/cache/apt" "${SDCARD}/var/lib/apt/lists"
160160
rm -f "${SDCARD}/etc/apt/apt.conf.d/99-armbian-sandbox" # build-time only; don't ship in the image
161+
# mmdebstrap persists the bootstrap --aptopt (our APT_PROXY_ADDR proxy) as
162+
# 99mmdebstrap inside the rootfs. That build-host proxy is meaningless — and
163+
# usually unreachable — on the user's machine, breaking their apt. Strip it.
164+
rm -f "${SDCARD}/etc/apt/apt.conf.d/99mmdebstrap"
161165

162166
local_apt_deb_cache_prepare "after mmdebstrap cleanup" # just for size reference in logs
163167

0 commit comments

Comments
 (0)