Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/networkmanager/
Date: Sat, 27 May 2017 21:57:52
Message-Id: 1495922266.2920085828f93d046712c30e9f8a2c8807b1d292.floppym@gentoo
1 commit: 2920085828f93d046712c30e9f8a2c8807b1d292
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 27 21:56:48 2017 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Sat May 27 21:57:46 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29200858
7
8 net-misc/networkmanager: make polkit optional
9
10 Bug: https://bugs.gentoo.org/498388
11 Package-Manager: Portage-2.3.6_p1, Repoman-2.3.2_p69
12
13 .../networkmanager/networkmanager-1.8.0.ebuild | 29 ++++++----------------
14 1 file changed, 8 insertions(+), 21 deletions(-)
15
16 diff --git a/net-misc/networkmanager/networkmanager-1.8.0.ebuild b/net-misc/networkmanager/networkmanager-1.8.0.ebuild
17 index 1ce1cc72ebb..3a9b9dc5ad7 100644
18 --- a/net-misc/networkmanager/networkmanager-1.8.0.ebuild
19 +++ b/net-misc/networkmanager/networkmanager-1.8.0.ebuild
20 @@ -16,7 +16,7 @@ HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
21 LICENSE="GPL-2+"
22 SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
23
24 -IUSE="audit bluetooth connection-sharing consolekit +dhclient elogind gnutls +introspection json kernel_linux +nss +modemmanager ncurses ofono +ppp resolvconf selinux systemd teamd test vala +wext +wifi"
25 +IUSE="audit bluetooth connection-sharing consolekit +dhclient elogind gnutls +introspection json kernel_linux +nss +modemmanager ncurses ofono policykit +ppp resolvconf selinux systemd teamd test vala +wext +wifi"
26
27 REQUIRED_USE="
28 modemmanager? ( ppp )
29 @@ -36,7 +36,7 @@ COMMON_DEPEND="
30 >=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}]
31 >=dev-libs/glib-2.37.6:2[${MULTILIB_USEDEP}]
32 >=dev-libs/libnl-3.2.8:3=[${MULTILIB_USEDEP}]
33 - >=sys-auth/polkit-0.106
34 + policykit? ( >=sys-auth/polkit-0.106 )
35 net-libs/libndp
36 net-misc/curl
37 net-misc/iputils
38 @@ -195,6 +195,12 @@ multilib_src_configure() {
39 $(multilib_native_use_enable wifi)
40 )
41
42 + if multilib_is_native_abi && use policykit; then
43 + myconf+=( --enable-polkit=yes )
44 + else
45 + myconf+=( --enable-polkit=disabled )
46 + fi
47 +
48 # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
49 if use ppp; then
50 local PPPD_VER=`best_version net-dialup/ppp`
51 @@ -294,25 +300,6 @@ pkg_postinst() {
52 ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
53 fi
54
55 - # The polkit rules file moved to /usr/share
56 - old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
57 - if [[ -f "${old_rules}" ]]; then
58 - case "$(md5sum ${old_rules})" in
59 - 574d0cfa7e911b1f7792077003060240* )
60 - # Automatically delete the old rules.d file if the user did not change it
61 - elog
62 - elog "Removing old ${old_rules} ..."
63 - rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
64 - ;;
65 - * )
66 - elog "The ${old_rules}"
67 - elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
68 - elog "If you edited ${old_rules}"
69 - elog "without changing its behavior, you may want to remove it."
70 - ;;
71 - esac
72 - fi
73 -
74 # NM fallbacks to plugin specified at compile time (upstream bug #738611)
75 # but still show a warning to remember people to have cleaner config file
76 if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then