Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 796467 - net-misc/networkmanager-1.30.4: D-Bus policy file installed in /etc instead of /usr/share
Summary: net-misc/networkmanager-1.30.4: D-Bus policy file installed in /etc instead o...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 796470
  Show dependency tree
 
Reported: 2021-06-17 09:44 UTC by Manuel Nickschas
Modified: 2021-08-22 19:35 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Nickschas 2021-06-17 09:44:23 UTC
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
Comment 1 Manuel Nickschas 2021-06-17 10:01:10 UTC
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.
Comment 2 Mike Gilbert gentoo-dev 2021-06-17 15:29:26 UTC
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.
Comment 3 Mike Gilbert gentoo-dev 2021-06-17 15:51:47 UTC
Looks like this changed recently in NetworkManager upstream.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/831
Comment 4 Georgy Yakovlev archtester gentoo-dev 2021-08-09 14:19:51 UTC
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.
Comment 5 Larry the Git Cow gentoo-dev 2021-08-22 19:35:48 UTC
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(+)