Package: systemd-resolved
Version: 252.5-2~bpo11+1
Followup-For: Bug #1032937

Ubuntu had this in their systemd.postinst since 5 years:
> ef4adf4 Dimitri John Ledkov   5 years ago  63│ # Use stub resolve.conf by 
> default on new installs
> 20bc8a3 Dimitri John Ledkov   5 years ago  64│ if [ -z "$2" ]; then
> 20bc8a3 Dimitri John Ledkov   5 years ago  65│     mkdir -p 
> /run/systemd/resolve
> 20bc8a3 Dimitri John Ledkov   5 years ago  66│     if [ -e /etc/resolv.conf 
> ]; then
> 20bc8a3 Dimitri John Ledkov   5 years ago  67│             cp 
> /etc/resolv.conf /run/systemd/resolve/stub-resolv.conf
> 20bc8a3 Dimitri John Ledkov   5 years ago  68│     fi
> b04f573 Dimitri John Ledkov   5 years ago  69│     # If /etc/resolv.conf is a 
> bind-mount, moving or replacing
> b04f573 Dimitri John Ledkov   5 years ago  70│     # /etc/resolv.conf may fail
> b04f573 Dimitri John Ledkov   5 years ago  71│     ln -snf 
> ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf || true
> ef4adf4 Dimitri John Ledkov   5 years ago  72│ fi

and moved the relevant copy operation into systemd-resolved.postinst in 
September.
Any reason not to apply the same, @Luca?

Workaround for live-build can be a 
/usr/share/live/build/hooks/normal/0001-systemd-resolved-unbreak.hook.chroot
> #!/bin/sh
> mkdir -p /run/systemd/resolve/
> cp -a /etc/.resolv.conf.systemd-resolved.bak 
> /run/systemd/resolve/stub-resolv.conf

-- System Information:
Debian Release: 12.0
  APT prefers unstable
  APT policy: (510, 'unstable'), (509, 'experimental'), (500, 
'stable-updates'), (500, 'stable-security'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.19.0-1-amd64 (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN, TAINT_FIRMWARE_WORKAROUND
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.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 systemd-resolved depends on:
ii  dbus [default-dbus-system-bus]  1.14.6-1
ii  libc6                           2.36-5
ii  libssl1.1                       1.1.1n-1
ii  libssl3                         3.0.8-1
ii  libsystemd-shared               252.6-1
ii  systemd                         252.6-1

Versions of packages systemd-resolved recommends:
ii  libnss-myhostname  252.6-1
pn  libnss-resolve     <none>

Versions of packages systemd-resolved suggests:
ii  policykit-1  122-3
ii  polkitd      122-3

Reply via email to