I have installed sys-apps/systemd-236 (same is true for 236-r1). The man page for systemd-resolved.service states: A static file /usr/lib/systemd/resolv.conf is provided ... Without using the experimental usrmerge flag, the file is installed in /lib not in /usr/lib So following the upstream documentation and using (regardless if absolute or relative symlink is used) ln -s /usr/lib/systemd/resolv.conf /etc/resolv.conf the symlink points to a non existing file and name resolution does not work. I already added some comments to another bug that has been created because of "usrmerge", but I see the point that a separate bug would be better. * https://bugs.gentoo.org/641396#c1 * https://bugs.gentoo.org/641396#c7 I tried to solve the problem by providing a /usr/lib/systemd/resolv.conf as a symbolic link that points to /lib/systemd/resolv.conf here: https://github.com/gentoo/gentoo/pull/6579 The PR has been closed by "The resolv.conf symlink is easily fixed after rebooting." I didn't get the point how the resolv.conf symlink should be fixed after rebooting. Also after a reboot the file still resides in /lib/systemd and not in /usr/lib/systemd. So, perhaps can give me the missing information what I am doing wrong. I don't think it make sense if the upstream project and the man page uses "/usr/lib/systemd/resolv.conf" but systemd on Gentoo is using "/lib/systemd/resolv.conf" -- at least does not add the symlink workaround. What I am missing here?
Sorry, I guess I was not clear when I closed the PR. The symlinks for systemd and systemd-shutdown are there to prevent fatal system errors when the user executes "systemctl daemon-reexec" or "systemctl reboot" after upgrading to >=sys-apps/systemd-234. The systemd symlink also prevents bootloader configs from breaking. The resolv.conf symlink is less critical -- it may be updated by the system administrator at any time since the system is still usable even without working DNS. I think there are a few things we could do to make this more visible: 1. Add a pkg_postinst check for a broken /etc/resolv.conf symlink, and advise the user to update it. 2. Maybe write a wiki page to summarize the various options for the resolv.conf symlink; we might include NetworkManager and other options. 3. Patch the manual pages to contain the correct path for files installed under rootprefix.
I agree, that the location of the static resolv.conf file (/lib vs. /usr/lib) is not critical. The location /etc/resolv.conf could be fixed easily. But isn't one good thing of systemd that you could setup your system regardless of the distribution the same way? The official man page states "/usr/lib/systemd/resolv.conf" but Gentoo uses "/lib/systemd/resolv.conf". Sure, if we patch the man page, our documentation fits to the locations, but is this a optimal solution? About your points: 1.: I don't know if we need to check for a broken symlink. If the link has been set by the admin, he should know what he do. 2.: Isn't that part of the systemd man page already. 3.: The man page should be fit to the locations of the package. My point has been only to follow the upstream path and not introducing another one. It is no problem for me to set the symlink to Gentoo's location of that file, but IMHO using the same as others would be better. No problem if you set this issue to WONTFIX. Perhaps I need to migrate to usrmerge some time to have a more "vanilla" systemd system. ;)
Wiki page: https://wiki.gentoo.org/wiki/Resolv.conf I think this will be helpful for people who need to chose where to point resolv.conf.
(In reply to Markus Rathgeb from comment #2) > My point has been only to follow the upstream path and not introducing > another one. It is no problem for me to set the symlink to Gentoo's location > of that file, but IMHO using the same as others would be better. /lib/systemd/resolv.conf is the "correct" upstream path when split-usr is true (and rootprefix=/). The systemd maintainers have basically refused any attempt to make the man pages match the installed files depending on the split-usr option. It seems like they are rather conflicted on how far they are willing to support split-usr. > Perhaps I need to migrate to usrmerge some time to have a more "vanilla" systemd system. Note that systemd upstream doesn't really support USE=usrmerge (split-usr=false) unless you symlinks set up to point /bin -> usr/bin, /sbin -> usr/sbin, and /lib -> usr/lib. You will probably run into some problems. The USE flag is there to allow people to experiment on a system that have the requisite symlinks. This use flag will likely be forced on/off via profile settings at some later date.
> /lib/systemd/resolv.conf is the "correct" upstream path when split-usr is > true (and rootprefix=/). > > The systemd maintainers have basically refused any attempt to make the man > pages match the installed files depending on the split-usr option. It seems > like they are rather conflicted on how far they are willing to support > split-usr. Many thanks for that information. So, if already upstream install location and man page does not fit all is for me (but not happy about that). Thank you for the wiki page, too. Should we close this using "WORKSFORME"? Feel free to choose the reason.