summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild-arm64.sh13
-rwxr-xr-xbuild-helpers.sh33
-rwxr-xr-xbuild.sh2
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}"
diff --git a/build.sh b/build.sh
index cb95243..8bbf712 100755
--- a/build.sh
+++ b/build.sh
@@ -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"