Package: auto-apt-proxy
Version: 18.1
Severity: wishlist
Tags: patch
X-Debbugs-Cc: [email protected]
Dear Maintainer,
apt-cacher-ultra (ACU) is a new replacement for apt-cacher-ng (ACNG), et al. It
has seen some discussion on the debian-user list, and a few people are
experimenting with it.
I use auto-apt-proxy (AAP) to detect my local apt cache, via the host name
apt-proxy.
```
root@testing:~# host apt-proxy
apt-proxy.localdomain is an alias for issola.localdomain.
issola.localdomain has address 192.168.100.12
root@testing:~# auto-apt-proxy
http://192.168.100.12:3142
root@testing:~#
```
AAP has worked quite well with ACNG; thank you. However, when I shifted to ACU,
AAP failed to detect it. The attached patch works in my environment. I have not
tested it with other ways of detecting an apt cache.
-- System Information:
Debian Release: forky/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 7.2.8+deb14-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages auto-apt-proxy depends on:
ii apt 3.3.3
Versions of packages auto-apt-proxy recommends:
ii busybox 1:1.38.0-3+b1
ii iproute2 7.2.0-1
Versions of packages auto-apt-proxy suggests:
pn avahi-utils <none>
-- no debconf information
-- debsums errors found:
debsums: changed file /usr/bin/auto-apt-proxy (from auto-apt-proxy package)
176a177,187
> detect_apt_cacher_ultra() {
> local ip="$1"
> local proxy="$(proxy_url "$ip" 3142)"
> log_debug "looking for apt-cacher-ultra at ${proxy}"
> if hit -o "Acquire::http::Proxy::${ip}=DIRECT" "$proxy" | grep -q -i
> 'HTTP.*400'; then
> set_proxy "$proxy"
> return 0
> fi
> return 1
> }
>
344c355
< for test in detect_apt_cacher detect_apt_cacher_ng detect_approx
detect_squid_deb_proxy; do
---
> for test in detect_apt_cacher detect_apt_cacher_ultra
> detect_apt_cacher_ng detect_approx detect_squid_deb_proxy; do
458,461c469,473
< detect_squid_deb_proxy "$ip" && return 0
< detect_apt_cacher_ng "$ip" && return 0
< detect_approx "$ip" && return 0
< detect_apt_cacher "$ip" && return 0
---
> detect_squid_deb_proxy "$ip" && return 0
> detect_apt_cacher_ultra "$ip" && return 0
> detect_apt_cacher_ng "$ip" && return 0
> detect_approx "$ip" && return 0
> detect_apt_cacher "$ip" && return 0