Your message dated Tue, 18 Aug 2026 14:23:14 +0000
with message-id <[email protected]>
and subject line Bug#1128058: fixed in auto-apt-proxy 18
has caused the Debian Bug report #1128058,
regarding auto-apt-proxy: SRV lookup of illegal service name
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1128058: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1128058
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: auto-apt-proxy
Severity: normal
X-Debbugs-Cc: [email protected]

I reported this originally in bug #1051481
"apt-cacher-ng: Illegal SRV name (underscore not valid except first character 
of label)"
in September 2023 and it was fixed in f9330e88 2024-07-17.

At that time it seems I forgot to also report it for auto-apt-proxy!

Got bitten by it again now whilst writing an extension that uses
systemd-resolved/resolvectl instead of avahi-browse to do the lookup.

Specifically, systemd-resolved correctly refuses to advertise the
illegal SRV name so look-ups were failing 'mysteriously'.

systemd-resolved[1424470]: /etc/systemd/dnssd/squid-deb-proxy.dnssd:3: Service 
type is invalid. Ignoring.

$ cat /etc/systemd/dnssd/squid-deb-proxy.dnssd
[Service]
Name=Squid deb proxy on %H systemd
Type=_apt_proxy._tcp
Port=8000

The definition is in RFC6335 section 5.1 "Service Name Syntax":

Valid service names are hereby normatively defined as follows:

   o  MUST be at least 1 character and no more than 15 characters long

   o  MUST contain only US-ASCII [ANSI.X3.4-1986] letters 'A' - 'Z' and
      'a' - 'z', digits '0' - '9', and hyphens ('-', ASCII 0x2D or
      decimal 45)

   o  MUST contain at least one letter ('A' - 'Z' or 'a' - 'z')

   o  MUST NOT begin or end with a hyphen

   o  hyphens MUST NOT be adjacent to other hyphens
>From b821f0c4a33e2272558d49f90a2eb1a4e92a7fa9 Mon Sep 17 00:00:00 2001
From: Tj <[email protected]>
Date: Sun, 15 Feb 2026 12:46:21 +0000
Subject: [PATCH] use legal SRV name

RFC6335 section 5.1 Service Name Syntax does not allow underscores in
the SRV name itself; only as the leading character in each part.

-_apt_proxy._tcp
+_apt-proxy._tcp

apt-cacher-ng originally advertised only the illegal form but since
commit f9330e88 configures avahi to advertise both.

systemd-resolved refuses to asvertise the illegal form.

Signed-off-by: Tj <[email protected]>
Signed-off-by: Tj <[email protected]>
---
 auto-apt-proxy | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/auto-apt-proxy b/auto-apt-proxy
index 1063074..e49f834 100755
--- a/auto-apt-proxy
+++ b/auto-apt-proxy
@@ -43,6 +43,10 @@ log_debug_if_present() {
   log_debug "${msg}"
 }
 
+SERVICE_NAME="${SERVICE_NAME:-_apt-proxy._tcp}"
+# illegal format; RFC6335 section 5.1
+service_name_legacy="_apt_proxy._tcp"
+
 uid=$(id -u)
 cache_dir=${TMPDIR:-/tmp}/.auto-apt-proxy-${uid}
 if [ -d "${cache_dir}" ]; then
@@ -208,10 +212,12 @@ detect_DNS_SRV_record() {
   local domain
   domain="$(hostname --domain 2>/dev/null)"
   search_domains=$(get_search_domains)
+  local service
+  service="${1:-${SERVICE_NAME}}"
   for d in $domain $search_domains; do
-    log_debug "Looking up SRV entry for _apt_proxy._tcp.${d}"
+    log_debug "Looking up SRV entry for ${service}.${d}"
     result=$(
-      /usr/lib/apt/apt-helper srv-lookup _apt_proxy._tcp."${d}" 2>/dev/null |
+      /usr/lib/apt/apt-helper srv-lookup "${service}.${d}" 2>/dev/null |
       shuf |
       awk '/^[^#]/{print "http://"; $1 ":" $4;found=1;exit}END{exit !found}'
     )
@@ -230,9 +236,11 @@ detect_avahi_local() {
     return 1
   fi
 
-  log_debug "Looking up _apt_proxy._tcp on mDNS (avahi)"
+  local service
+  service="${1:-${SERVICE_NAME}}"
+  log_debug "Looking up ${service} on mDNS (avahi)"
 
-  data=$(avahi-browse --terminate --no-db-lookup --resolve --parsable 
_apt_proxy._tcp | awk -F ';' '/^=;/ { print($7, $8, $9); exit}')
+  data=$(avahi-browse --terminate --no-db-lookup --resolve --parsable 
"${service}" | awk -F ';' '/^=;/ { print($7, $8, $9); exit}')
   if [ -z "${data}" ]; then
     return 1
   fi
@@ -375,7 +383,11 @@ __detect__() {
   # Check for explicitly configured proxies
   detect_from v4_explicit_proxy_etc_hosts v6_explicit_proxy_etc_hosts && 
return 0
   detect_DNS_SRV_record && return 0
+  # fallback to lookup the legacy 'illegal' name
+  detect_DNS_SRV_record "${service_name_legacy}" && return 0
   detect_avahi_local && return 0
+  # fallback to lookup the legacy 'illegal' name
+  detect_avahi_local "${service_name_legacy}" && return 0
 
   # Check special hosts on the network
   detect_from v4_gateway v6_gateway && return 0
-- 
2.39.5


--- End Message ---
--- Begin Message ---
Source: auto-apt-proxy
Source-Version: 18
Done: Antonio Terceiro <[email protected]>

We believe that the bug you reported is fixed in the latest version of
auto-apt-proxy, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Antonio Terceiro <[email protected]> (supplier of updated auto-apt-proxy 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 18 Aug 2026 11:05:20 -0300
Source: auto-apt-proxy
Architecture: source
Version: 18
Distribution: unstable
Urgency: medium
Maintainer: Antonio Terceiro <[email protected]>
Changed-By: Antonio Terceiro <[email protected]>
Closes: 1120071 1124369 1128058 1142542
Changes:
 auto-apt-proxy (18) unstable; urgency=medium
 .
   [ Paride Legovini ]
   * Revert "autopkgtest: drop test for squid-deb-proxy"
 .
   [ Antonio Terceiro ]
   * Log a message when default gateway can't be looked up
   * hit(): prevent apt-helper call from recursing into auto-apt-proxy
     (Closes: #1142542)
   * detect_squid_deb_proxy: fix log message
   * Give higher precedence to squid-deb-proxy
   * auto-apt-proxy.conf: drop unused auto-apt-proxy::Debug "setting"
   * wait for network to be online
   * Add ability to lookup default gateway with networkctl
   * Use a unique output directory per run
   * avahi: iterate over all address broadcast as potential proxies
   * avahi: handle unrouteable addresss (Closes: #1124369)
 .
   [ Tj ]
   * use legal SRV name (Closes: #1128058)
   * Rename AUTO_APT_PROXY_AVAHI_NAME to AUTO_APT_PROXY_MDNS_NAME
   * Add systemd-resolved mDNS support
 .
   [ Kirt Runolfson ]
   * Restore DNS hostname resolution for apt-proxy (Closes: #1120071)
Checksums-Sha1:
 d3ab241f9cf08257bf07bbe35959d703a2294e59 1843 auto-apt-proxy_18.dsc
 cb9f8feb0c3e963b6507be1fe0977b363938dc55 23628 auto-apt-proxy_18.tar.xz
 e2bafcea92ab83445f052c39aaf85f9fb805bf95 6553 
auto-apt-proxy_18_source.buildinfo
Checksums-Sha256:
 4fe629bf4e3c65fb2df756355a6952958a5e9a5a2f063415268e169658a93ddc 1843 
auto-apt-proxy_18.dsc
 1507d3b22c5f12d610fa92158538f4351b5a983410913894e053450e21b3be59 23628 
auto-apt-proxy_18.tar.xz
 78fab503fd96aadc774603b2e448096c1762f3d8fe96141cc9a8eae6052f5808 6553 
auto-apt-proxy_18_source.buildinfo
Files:
 af04d510b8eea0b939ea90a80073058e 1843 net optional auto-apt-proxy_18.dsc
 738b4cb180fe1edbcddc2aec2ddc1cf6 23628 net optional auto-apt-proxy_18.tar.xz
 a26e952e63d7ff03c3e23971b94df9b7 6553 net optional 
auto-apt-proxy_18_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEst7mYDbECCn80PEM/A2xu81GC94FAmqEaXcACgkQ/A2xu81G
C96oyA//Swc1t9ABvI4giLpm0aLs5u/e4unT9KzdgQDMSm3BtupRiXQF+3af55Jb
Phn/X4p+WGXxFzlzlmmaTrRu+saI76g8p7qWWso2Al5VSYetDUEWpJ+Qt2Oe5Q8a
WT6L3MYavWqsevYcqrAcFDtnhAfV1UM10Pz5dtt6v4ej7jevz/+f5RhgIzZ80KnT
a1Pa5vxM7AcfhsDcbIfSMhjZUDJlFtKXxNlWhz0w5lJ7j12SOs6qvOYSzB/DoBGk
P9OUAfcwYkDwAL3aDNY9QBBuxRxp3cnA3UNdXZerTTAzNADVhZkGM4NcWcWI4acr
HI/ClTDuZKC7uV8drk73LLo/qrPBiDM4AOYvBnMTrQxsINzK9bAlP/oSXz4afxVh
HFXC9s34FIE2MaoTJZDXrZSSX6mCHFBIuBbZsEde8CqgLhAlJtY3YJAGSpq6wQJ9
0Jowl2SU4CTNrgEp+qb/kSTzSk+GoF2wdQy8xMQ6MGjJoSdw00oLuXxyGL80pCLT
KWjXPqVJUAJ2j6dTIyfciSaSoWOCRPCLjE66KxPFL24WKoRtdIbDe1kktXX9jpz6
tnp8dv9+ViqcbhSTeST7ilb21miyakaed8c1hX8tJiBwU5xt8xpvsIeqTGq2Swgk
+O2YSz1NnF5Iil7AQalrMys5/AzjFB+T6sMYZED3UgN9ACQTSFU=
=ew+U
-----END PGP SIGNATURE-----

Attachment: pgpSkOMtvraaU.pgp
Description: PGP signature


--- End Message ---

Reply via email to