Bug#1007018: systemd: Creates broken symlink to stub-resolv.conf since v250

Michael Biebl biebl at debian.org
Fri Mar 11 09:36:20 GMT 2022


Am 10.03.22 um 16:11 schrieb Arnaud Rebillout:
> Package: systemd
> Version: 250.3-2
> Severity: normal
> User: devel at kali.org
> Usertags: origin-kali
> 
> Dear Maintainer,
> 
> Since v250, systemd moved the tmpfiles config for /etc/resolv.conf out
> of the file tmpfiles.d/etc.conf and inside a new file
> tmpfiles.d/systemd-resolve.conf. Cf:
> https://github.com/systemd/systemd/commit/b15f6eae
> 
> The Debian package does not install tmpfiles.d/etc.conf, however with
> this change it now installs the new file
> tmpfiles.d/systemd-resolve.conf. One way to see that:
> 
>    +--- (debian stable)
>    | # dpkg-query -W | grep '^systemd\s'
>    | systemd 247.3-6
>    | # grep -rn "resolv\.conf" /usr/lib/tmpfiles.d/
>    +---
> 
>    +--- (debian unstable)
>    | # dpkg-query -W | grep '^systemd\s'
>    | systemd 250.3-2
>    | # grep -rn "resolv\.conf" /usr/lib/tmpfiles.d/
>    | /usr/lib/tmpfiles.d/systemd-resolve.conf:10:L! /etc/resolv.conf - - - - ../run/systemd/resolve/stub-resolv.conf
>    +---
> 
> The consequence of this change is that, on boot, if there's no file
> /etc/resolv.conf, systemd creates a symlink /etc/resolv.conf ->
> ../run/systemd/resolve/stub-resolv.conf. However, since systemd-resolved
> is not enabled, it's a dead symlink, and DNS resolution is broken.
> 
> Of course, on most systems there's already a file /etc/resolv.conf, so
> an upgrade of the systemd package is unlikely to cause an issue. However
> the problem manifests itself when building new systems (eg. with debos),
> on first boot there is no file /etc/resolv.conf, and this dead symlink
> effectively breaks the network.
> 
>>From what I see, I have the impression that this new file
> tmpfiles.d/systemd-resolve.conf is shipped in the package by mistake,
> and should simply be removed from the package?

There is
https://github.com/systemd/systemd/pull/21317
and to some extent relevant as well
https://github.com/systemd/systemd/issues/21402

Might be, that the only clean solution (at least for Debian) is to split 
out systemd-resolved into its own subpackage (and move this tmpfile 
along with it).
This sub-package would then enable systemd-resolved by default upon 
installation.
Of course the upgrade path is a bit tricky, so I shyed away from doing this.

Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20220311/79e7cf1d/attachment.sig>


More information about the Pkg-systemd-maintainers mailing list