Package: release.debian.org
Severity: normal
Tags: trixie
X-Debbugs-Cc: [email protected]
Control: affects -1 + src:auto-apt-proxy
User: [email protected]
Usertags: pu

[ Reason ]
auto-apt-proxy is a helper tool for APT that automatically detects APT
proxies on the local network. In some networking configurations it might
enter an infinite loop. This bug is 

[ Impact ]
auto-apt-proxy might not only not detect a proxy, but will also go into
a infinite loop and prevent APT from working entirely.

[ Tests ]
All the autopkgtest pass with this change. The bug reporter also
confirmed that the change fixes things for them.

[ Risks ]
The change is trivial and risk is minimal, if not zero.

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable

[ Changes ]
The call to `apt-helper download-file` will now receive an extra option
telling it to not use an APT proxy autodetection command, which would
cause auto-apt-proxy to be called again.

There is also a change to one of the test cases that is currently
failing in trixie. That test case is not a problem for forky because
there the default timeout for network operations has been changed to 1s
instead of 5.

[ Other info ]
n/a
diff --git c/auto-apt-proxy w/auto-apt-proxy
index b730234..2b0903b 100755
--- c/auto-apt-proxy
+++ w/auto-apt-proxy
@@ -77,6 +77,7 @@ proxy_url() {
 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
 }
 
diff --git c/debian/changelog w/debian/changelog
index a8cccf7..ef2abb6 100644
--- c/debian/changelog
+++ w/debian/changelog
@@ -1,3 +1,11 @@
+auto-apt-proxy (16.8+deb13u2) trixie; urgency=medium
+
+  * hit(): prevent apt-helper call from recursing into auto-apt-proxy
+    (Closes: #1142542)
+  * debian/tests/timeout: fix tests to be more reliable
+
+ -- Antonio Terceiro <[email protected]>  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 --git c/debian/tests/timeout w/debian/tests/timeout
index 08a8c26..3d1e026 100755
--- c/debian/tests/timeout
+++ w/debian/tests/timeout
@@ -14,10 +14,10 @@ class TimeoutProxy
 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

Attachment: signature.asc
Description: PGP signature

Reply via email to