#1092164 apt: SRV query not performed without netbase installed

Package:
apt
Source:
apt
Description:
commandline package manager
Submitter:
Chris Hofstaedtler
Date:
2025-01-05 15:09:02 UTC
Severity:
normal
#1092164#5
Date:
2025-01-05 15:07:34 UTC
From:
To:
For a while I've been seeing odd behaviour where apt ignored the SRV
DNS records we inject to redirect deb.debian.org elsewhere (to a local
cache, so the entire network benefits without any local setup).

Debugging shows that only a single deb.debian.org A DNS query is
performed, and no SRV queries are performed. Googling this yielded
https://gist.github.com/tsangwpx/fd3c5c2b9aac53d9d0964cf3dc91b2ed .
Apparently this is known behaviour to some people on the internet,
but was news to me.

Here is a minimal reproducer:

  $ podman run -it --rm debian:bookworm-slim bash
  # apt update

This will use an A lookup, and thus ignore SRV.

This however works:

  $ podman run -it --rm debian:bookworm-slim bash
  # echo http 80/tcp > /etc/services
  # apt update

Could this please be made work by default in the common container
scenario? So probably without having netbase (provides
/etc/services) installed?

Thanks,
Chris