I tried to merge systemd with enabled usrmerge flag. It fails with: rm: cannot remove '/var/tmp/portage/sys-apps/systemd-236/image/lib/udev/hwdb.d': No such file or directory The build contains this lines: === rm -r "${ED%/}"/lib/udev/hwdb.d || die if ! use usrmerge; then # Avoid breaking boot/reboot dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown fi === If usrmerge is set, the path of hwdb.d should be changed from "${ED%/}"/lib/udev/hwdb.d to "${ED%/}"/usr/lib/udev/hwdb.d Here the output of the lookup for that file name: # find /var/tmp/portage/sys-apps/systemd-236/ -name "hwdb.d" /var/tmp/portage/sys-apps/systemd-236/image/usr/lib/udev/hwdb.d /var/tmp/portage/sys-apps/systemd-236/image/etc/udev/hwdb.d
It is not really part of this issue but as a side note (as it is realted to usrmerge USE flag): This version of systemd introduced a static resolv.conf file for systemd-resolved and all the documentation states that the path of the file is /usr/lib/systemd/resolv.conf. So, if usrmerge is not enabled, shouldn't we also add a symlink for that file? e.g. dosym ../../../lib/systemd/resolv.conf /usr/lib/systemd/resolv.conf
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33ae78e82b42d4b6d9c203d88e8be8c4aaa68e72 commit 33ae78e82b42d4b6d9c203d88e8be8c4aaa68e72 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2017-12-16 19:46:10 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2017-12-16 19:46:53 +0000 sys-apps/systemd: fix usrmerge install Closes: https://bugs.gentoo.org/641396 Package-Manager: Portage-2.3.19_p1, Repoman-2.3.6_p35 sys-apps/systemd/metadata.xml | 2 +- sys-apps/systemd/systemd-236.ebuild | 5 ++++- sys-apps/systemd/systemd-9999.ebuild | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-)
Thanks for testing. I added a note that this USE flag is experimental. You should only enable it if you have already taken steps to merge /bin, /sbin, and /lib into /usr/bin, /usr/sbin, and /usr/lib.
Thanks for fixing. Is there any semi-official documentation how the merge should be done the "right" way?
What about "reverse usrmerge", that is: /usr -> . ... so everything from /usr ends up in / itself (shorter path)? Should that work? (I've not tried 236 yet to see if it does.) Duncan
(In reply to Duncan from comment #5) > What about "reverse usrmerge", that is: > > /usr -> . FWIW after merge with USE=usrmerge now... It seems to "just work". Thanks. A bit simpler now. =:^) Duncan
What about the ones that do not use usrmerge and wants to use the symbolic link to /usr/lib/systemd/resolv.conf as stated in the official documentation? Shouldn't there a line similar to dosym ../../../lib/systemd/resolv.conf /usr/lib/systemd/resolv.conf in the ebuild (if ! use usrmerge, similar to "avoid breaking boot/reboot)? See also Comment 1
https://github.com/gentoo/gentoo/pull/6579