diff options
| author | Dave Hibberd <hibby@debian.org> | 2026-12-01 00:34:16 +0000 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2026-12-01 00:34:16 +0000 |
| commit | e71f435cc6a4b2c8ab4fda8f52d3d42e96ddee14 (patch) | |
| tree | ae7d0b7026ecb44eee85ac9b132c8583aa11ac76 | |
| parent | 733ad130eec9ed0e5ca26e6be307d59e1a04754d (diff) | |
| -rwxr-xr-x | build-arm64.sh | 13 | ||||
| -rwxr-xr-x | build-helpers.sh | 33 | ||||
| -rwxr-xr-x | build.sh | 2 |
3 files changed, 12 insertions, 36 deletions
diff --git a/build-arm64.sh b/build-arm64.sh index 0a47a20..5bceccb 100755 --- a/build-arm64.sh +++ b/build-arm64.sh @@ -46,8 +46,17 @@ else log_step "arm64: no local image; preparing pi-gen" ensure_pi_gen >> "$LOGFILE" 2>&1 - # ---- RUN YOUR PI-GEN BUILD HERE ---- - # Adjust this to your actual invocation + # Discover the local APT proxy unless explicitly supplied. + if [ -z "${APT_PROXY+x}" ]; then + APT_PROXY="" + if command -v auto-apt-proxy >/dev/null 2>&1; then + APT_PROXY="$(auto-apt-proxy)" || APT_PROXY="" + fi + fi + + [ "$APT_PROXY" != "DIRECT" ] || APT_PROXY="" + + log_step "arm64: apt proxy: ${APT_PROXY:-Direct connection}" log_step "arm64: running pi-gen build" pushd "$PI_GEN_DIR" >/dev/null diff --git a/build-helpers.sh b/build-helpers.sh index 1a55a84..0e52735 100755 --- a/build-helpers.sh +++ b/build-helpers.sh @@ -790,36 +790,3 @@ extract_date() { return 0 } -# Discover a local APT caching proxy using Zeroconf. -# Resolve to IPv4 on the host to avoid mDNS dependencies in chroots. -# Honour an explicitly supplied APT_PROXY, including an empty value. - -if [ -z "${APT_PROXY+x}" ]; then - APT_PROXY="" - - if command -v avahi-browse >/dev/null 2>&1 && - command -v curl >/dev/null 2>&1; then - - APT_PROXY="$(avahi-browse -prt _apt_proxy._tcp 2>/dev/null | - awk -F';' '$1 == "=" && $3 == "IPv4" && !found { - print "http://" $8 ":" $9 - found=1 - }')" || APT_PROXY="" - - # Verify the discovered cache is reachable. - if [ -n "$APT_PROXY" ]; then - if ! curl -fsS --connect-timeout 2 --max-time 5 \ - "$APT_PROXY/acng-report.html" >/dev/null 2>&1; then - APT_PROXY="" - fi - fi - fi -fi - -if [ "$APT_PROXY" = "DIRECT" ]; then - APT_PROXY="" -fi - -export APT_PROXY - -echo "APT proxy: ${APT_PROXY:-Direct connection}" @@ -40,7 +40,7 @@ run_build() { cd "$WORKDIR/config" echo "Cleaning previous live-build state..." >> "$LOGFILE" - sudo lb clean >> "$LOGFILE" 2>&1 + sudo lb clean --purge >> "$LOGFILE" 2>&1 # Run live-build config echo "Running lb config..." >> "$LOGFILE" |
