NetworkManager has a --with-polkit configure flag which is currently not used by Gentoo. This works exactly as expected. While most desktop users need this, policykit may not be needed or wanted for smaller builds especially as it depends on a javascript engine (spidermonkey). Users who need policykit should already have this USE flag turned on for consolekit. This patch adds support for disabling policykit support in networkmanager-0.9.8.8.
Created attachment 368024 [details, diff] Patch to add policykit USE flag to net-misc/networkmanager-0.9.8.8
This doesn't seem to achieve the goal of not needing policykit since upower is pulled in regardless: The following USE changes are necessary to proceed: (see "package.use" in the portage(5) man page for more details) # required by sys-auth/polkit-0.112-r1[-systemd] # required by sys-power/upower-0.99.0-r1 # required by net-misc/networkmanager-0.9.8.8::local # required by =net-misc/networkmanager-0.9.8.8::local (argument) >=sys-auth/consolekit-0.4.6 policykit upower can be made optional, but suspend/resume functionality is lost. I am not sure to what extent removing this cripples networkmanager. Hopefully no more than failing to bring up the correct connection up after resume.
Created attachment 381448 [details, diff] Optional upower for 0.9.8.10 This patch builds ontop of the previous, but for 0.9.8.10
This is great, thank you! The ARM-based systems I'm working on do not need upower either.
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2920085828f93d046712c30e9f8a2c8807b1d292 commit 2920085828f93d046712c30e9f8a2c8807b1d292 Author: Mike Gilbert <floppym@gentoo.org> Date: Sat May 27 17:56:48 2017 -0400 net-misc/networkmanager: make polkit optional Bug: https://bugs.gentoo.org/498388 Package-Manager: Portage-2.3.6_p1, Repoman-2.3.2_p69 .../networkmanager/networkmanager-1.8.0.ebuild | 29 ++++++---------------- 1 file changed, 8 insertions(+), 21 deletions(-)