The networkmanager ebuild installs the main D-Bus policy file into /etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf, while all other similar files such as interface description and the polkit rules go into /usr/share. /etc is an unexpected location for such a file, and indeed this causes the issue that Dracut cannot find the file (it only looks in the system location, /usr/share/dbus-1/system.d) and thus network does not come up in the initrd due to the missing policy. I will file a related bug for Dracut to be more robust here, but I still think the install location should be fixed. Reproducible: Always Steps to Reproduce: 1. Emerge networkmanager 2. Check install location for the default D-Bus policy file, org.freedesktop.NetworkManager.conf Actual Results: File is installed in /etc/dbus-1/system.d. Expected Results: File should be installed in /usr/share/dbus-1/system.d
Bug tracking the Dracut robustness measure: https://bugs.gentoo.org/show_bug.cgi?id=796470 I'm not sure where the fixes should go, but IMHO NetworkManager should install into /usr/share even if Dracut becomes more robust and starts to check /etc.
I tried to track down when/why we added --with-dbus-sys-dir=/etc/dbus-1/system.d to the ebuild. It seems to have been there since the beginning. Some key commits: https://gitweb.gentoo.org/repo/gentoo/historical.git/commit/?id=5a90d844a5134ec3eab294660ef8148278352394 https://gitweb.gentoo.org/repo/gentoo/historical.git/commit/?id=d17b9009bf0a8aab6ced43411c7c637a63e1aceb Anyway, I believe dbus has supported the /usr/share/dbus-1/system.d location for quite a while, so it should be safe to drop this.
Looks like this changed recently in NetworkManager upstream. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/831
dracut always prints this error: dracut-install: ERROR: installing '/usr/share/dbus-1/system.d/org.freedesktop.NetworkManager.conf' dracut: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.ndjma0/initramfs /usr/share/dbus-1/system.d/org.freedesktop.NetworkManager.conf also checked ubuntu, they install to /usr/share https://packages.ubuntu.com/focal/all/network-manager/filelist so yeah looks like etc location should not be used.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c70e9b2513b1c3fd530350ad0b91fc9421b21de commit 5c70e9b2513b1c3fd530350ad0b91fc9421b21de Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2021-08-22 05:35:28 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2021-08-22 19:22:33 +0000 net-misc/networkmanager: Version bump to 1.32.10 * switch to Meson * Add IUSE="conncheck debug psl lto syslog tools" * Remove IUSE="ncurses" (replaced by USE="tools"), bug #798483 Closes: https://bugs.gentoo.org/784494 Closes: https://bugs.gentoo.org/796467 Closes: https://bugs.gentoo.org/798483 Signed-off-by: Matt Turner <mattst88@gentoo.org> net-misc/networkmanager/Manifest | 1 + net-misc/networkmanager/metadata.xml | 8 + .../networkmanager/networkmanager-1.32.10.ebuild | 382 +++++++++++++++++++++ 3 files changed, 391 insertions(+)