Version in base suite: 16.8+deb13u1 Base version: auto-apt-proxy_16.8+deb13u1 Target version: auto-apt-proxy_16.8+deb13u2 Base file: /srv/ftp-master.debian.org/ftp/pool/main/a/auto-apt-proxy/auto-apt-proxy_16.8+deb13u1.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/a/auto-apt-proxy/auto-apt-proxy_16.8+deb13u2.dsc README.md | 15 +++++++++++++++ auto-apt-proxy | 15 +++++++++++++++ debian/changelog | 9 +++++++++ debian/tests/noproxy | 1 + debian/tests/timeout | 6 +++--- 5 files changed, 43 insertions(+), 3 deletions(-) dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmp5l6awjec/auto-apt-proxy_16.8+deb13u1.dsc: no acceptable signature found dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmp5l6awjec/auto-apt-proxy_16.8+deb13u2.dsc: no acceptable signature found diff -Nru auto-apt-proxy-16.8+deb13u1/README.md auto-apt-proxy-16.8+deb13u2/README.md --- auto-apt-proxy-16.8+deb13u1/README.md 2025-08-10 17:16:53.000000000 +0000 +++ auto-apt-proxy-16.8+deb13u2/README.md 2026-08-18 15:13:08.000000000 +0000 @@ -86,6 +86,21 @@ `AUTO_APT_PROXY_DEBUG` environment variable to a non-empty string and **auto-apt-proxy** will log debugging messages to `stderr`. +# WAITING TO BE ONLINE + +Starting with version 18, auto-apt-proxy will wait for the network to be +online before attempting to detect any proxies. This is done by calling +`/usr/lib/apt/apt-helper wait-online`, and is intended to help with cases +where: + +1. the network takes some time to start; +1. apt is used right away after booting, even before the network is fully up; +1. the first `auto-apt-proxy` call fails to find a proxy, and that gets + cached. + +To disable this behaviour, you can set the `AUTO_APT_PROXY_NO_WAIT_ONLINE` +environment variable to any non-empty value. + # EXAMPLES $ **auto-apt-proxy** diff -Nru auto-apt-proxy-16.8+deb13u1/auto-apt-proxy auto-apt-proxy-16.8+deb13u2/auto-apt-proxy --- auto-apt-proxy-16.8+deb13u1/auto-apt-proxy 2025-08-10 17:16:53.000000000 +0000 +++ auto-apt-proxy-16.8+deb13u2/auto-apt-proxy 2026-08-18 15:13:08.000000000 +0000 @@ -74,9 +74,22 @@ esac } +wait_online() { + if [ -n "${AUTO_APT_PROXY_NO_WAIT_ONLINE:-}" ]; then + return + fi + # apt-helper wait-online already has a timeout of its own, of 30s. That + # should to be enough for most systems to come online. + log_debug "Waiting for network to be online" + if ! /usr/lib/apt/apt-helper wait-online; then + exit + fi +} + hit() { timeout 5 /usr/lib/apt/apt-helper \ -o Acquire::http::Proxy=DIRECT -o Acquire::Retries=0 \ + -o Acquire::http::Proxy-Auto-Detect= \ download-file "$@" "$output" 2>&1 } @@ -321,6 +334,8 @@ } __detect__() { + wait_online + sources=" v4_localhost v4_addresses diff -Nru auto-apt-proxy-16.8+deb13u1/debian/changelog auto-apt-proxy-16.8+deb13u2/debian/changelog --- auto-apt-proxy-16.8+deb13u1/debian/changelog 2025-08-10 17:16:53.000000000 +0000 +++ auto-apt-proxy-16.8+deb13u2/debian/changelog 2026-08-18 15:13:08.000000000 +0000 @@ -1,3 +1,12 @@ +auto-apt-proxy (16.8+deb13u2) trixie; urgency=medium + + * hit(): prevent apt-helper call from recursing into auto-apt-proxy + (Closes: #1142542) + * wait for network to be online + * debian/tests/timeout: fix tests to be more reliable + + -- Antonio Terceiro Tue, 18 Aug 2026 12:13:08 -0300 + auto-apt-proxy (16.8+deb13u1) trixie; urgency=medium * Check explicitly configured proxies before network gateway diff -Nru auto-apt-proxy-16.8+deb13u1/debian/tests/noproxy auto-apt-proxy-16.8+deb13u2/debian/tests/noproxy --- auto-apt-proxy-16.8+deb13u1/debian/tests/noproxy 2025-08-10 17:16:53.000000000 +0000 +++ auto-apt-proxy-16.8+deb13u2/debian/tests/noproxy 2026-08-18 15:13:08.000000000 +0000 @@ -3,6 +3,7 @@ set -eu export AUTO_APT_PROXY_NO_CACHE=1 +export AUTO_APT_PROXY_NO_WAIT_ONLINE=1 if ! newnet true; then echo "I: cannot use user namespaces" diff -Nru auto-apt-proxy-16.8+deb13u1/debian/tests/timeout auto-apt-proxy-16.8+deb13u2/debian/tests/timeout --- auto-apt-proxy-16.8+deb13u1/debian/tests/timeout 2025-08-10 17:16:53.000000000 +0000 +++ auto-apt-proxy-16.8+deb13u2/debian/tests/timeout 2026-08-18 15:13:08.000000000 +0000 @@ -14,10 +14,10 @@ end run TimeoutProxy.new PROXY -rackup --daemonize --pid proxy.pid --port 9999 +rackup --daemonize --pid proxy.pid --host 127.0.0.1 --port 9999 trap 'kill -9 $(cat proxy.pid)' INT TERM EXIT set -x -# auto-apt-proxy should timeout and exit 0 in less than 15 seconds -timeout --signal=KILL 15 auto-apt-proxy +# auto-apt-proxy should timeout and exit 0 in less than 60 seconds +timeout --signal=KILL 60 auto-apt-proxy