public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/
@ 2015-09-05 10:33 Pacho Ramos
  0 siblings, 0 replies; 14+ messages in thread
From: Pacho Ramos @ 2015-09-05 10:33 UTC (permalink / raw
  To: gentoo-commits

commit:     7e9c8aeb134da151be0d6d09a846e20d8387518c
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sat Sep  5 10:33:04 2015 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sat Sep  5 10:33:04 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e9c8aeb

net-misc/networkmanager: Remove more obsolete files and old and vulnerable versions

Package-Manager: portage-2.2.20.1

 net-misc/networkmanager/Manifest                   |   1 -
 .../files/networkmanager-0.9.10.0-arpingpath.patch |  16 --
 .../files/networkmanager-0.9.8.4-pre-sleep.patch   | 131 ---------
 ...kmanager-0.9.8.9-fix-crash-on-wifi-rescan.patch |  47 ----
 .../files/networkmanager-1.0.0-find-helpers.patch  |  23 --
 .../files/networkmanager-1.0.0-lto-switch.patch    |  36 ---
 .../networkmanager-1.0.0-remove-bashisms.patch     |  44 ----
 .../files/nm-system-settings.conf-ifnet            |   6 -
 .../networkmanager-0.9.8.10-r1.ebuild              | 252 ------------------
 .../networkmanager/networkmanager-1.0.2.ebuild     | 292 ---------------------
 10 files changed, 848 deletions(-)

diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest
index 4b6cd8d..3d6b3b9 100644
--- a/net-misc/networkmanager/Manifest
+++ b/net-misc/networkmanager/Manifest
@@ -1,4 +1,3 @@
-DIST NetworkManager-0.9.8.10.tar.xz 2015492 SHA256 064d27223d3824859df12e1fb25b787fec1c68bbc864dc52a0289b9211c4c972 SHA512 8688b8dceadf87d26b76bdda76ecb0b383ecaa7991487e6f6ddc150cf311f2f0cb3487afd91f19ecde2925585e8d53c8761fd45743f25c488eff6a7811ca4200 WHIRLPOOL 29c4f2189eb812c23e8c1cfbce728c525282ad3f04d3c9c25b3a80a043c95f2a9419fa71ac6f8a59d7abde8a30275e68e3ef615b74f78c07846757d92f114e1c
 DIST NetworkManager-1.0.2.tar.xz 3210588 SHA256 359385707494bedbb48cfe0992ccfbcc4ac147dae1f7a47055c71e96439508ff SHA512 9c5884c75c2a2aae478d99bde4ecbb0dc4293b3f50dcf78a1579aa13e09ab95b01981a366f1dc58cd5d02fe77dc90fc0941f00142cd5ef1cea14c3b9d89f5c36 WHIRLPOOL 0a9f4bc6cc0f176bfc1c82294b45392c86b6d6a65cefe38fc80fce8f09584f275a23163d1909dfde9427405fe7b4086b8e2bc4995eded4cf441b8024fa00657d
 DIST NetworkManager-1.0.4.tar.xz 3364168 SHA256 e4099fa2f4f4b8d95d0ad9fdd03ec20960845085fa500bf79aecbf54cee018c9 SHA512 b07583ca654a95dc018a712626ba0065c2ff5d9904b326891be684b32526f360f287b46cbd11026277a385558c1b55e38a086ae2b0aab059b63a4f3e11566cb1 WHIRLPOOL d6a612a855e216b7b46c620a85ceb3b3893029cf83bb9699ed0ba1c2d349abdeb4ee8921155216fb8285ac369cea64704836984e86bbf3813d8287b4803fc49a
 DIST NetworkManager-1.0.6.tar.xz 3381092 SHA256 38ea002403e3b884ffa9aae25aea431d2a8420f81f4919761c83fb92648254bd SHA512 74e8f91bbd9a70f1764b06c729717e091d2be0a8e316fe1b6235e644b65f43add5214be7a1100fe9d30b1511f4a00b9892dce79bb8ba0f0b0d57089d2ba6ddbb WHIRLPOOL 5f1d8c905e4aaa78c742c16e773f8fdbcdb2771edf36565f6b419af457776084573aa43b384ba32885992e76b399d4f2fc7dc94ad4295ac28dcfa3d6b6994b97

diff --git a/net-misc/networkmanager/files/networkmanager-0.9.10.0-arpingpath.patch b/net-misc/networkmanager/files/networkmanager-0.9.10.0-arpingpath.patch
deleted file mode 100644
index f8e0d52..0000000
--- a/net-misc/networkmanager/files/networkmanager-0.9.10.0-arpingpath.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Source: Timo Gurr <tgurr@exherbo.org>
-Upstream: Reported, https://bugzilla.gnome.org/show_bug.cgi?id=734131
-Reason: fix hardcoded path to arping
-
-diff -Naur NetworkManager-0.9.10.0.old/src/devices/nm-device.c NetworkManager-0.9.10.0/src/devices/nm-device.c
---- NetworkManager-0.9.10.0.old/src/devices/nm-device.c	2014-07-04 02:44:19.000000000 +0200
-+++ NetworkManager-0.9.10.0/src/devices/nm-device.c	2014-09-01 17:35:29.656282068 +0200
-@@ -4429,7 +4429,7 @@
- static void
- send_arps (NMDevice *self, const char *mode_arg)
- {
--	const char *argv[] = { "/sbin/arping", mode_arg, "-q", "-I", nm_device_get_ip_iface (self), "-c", "1", NULL, NULL };
-+	const char *argv[] = { "/bin/arping", mode_arg, "-q", "-I", nm_device_get_ip_iface (self), "-c", "1", NULL, NULL };
- 	int ip_arg = G_N_ELEMENTS (argv) - 2;
- 	NMConnection *connection;
- 	NMSettingIP4Config *s_ip4;

diff --git a/net-misc/networkmanager/files/networkmanager-0.9.8.4-pre-sleep.patch b/net-misc/networkmanager/files/networkmanager-0.9.8.4-pre-sleep.patch
deleted file mode 100644
index 6e6dfbe..0000000
--- a/net-misc/networkmanager/files/networkmanager-0.9.8.4-pre-sleep.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From ffb08fa288cea4c9ac8f18fd83e063b2e86ac51b Mon Sep 17 00:00:00 2001
-From: Alexandre Rostovtsev <tetromino@gentoo.org>
-Date: Sun, 27 Jan 2013 23:39:56 -0500
-Subject: [PATCH] Implement "pre-sleep" action dispatch
-
-Based on work by Christian Becke <christianbecke@gmail.com> in
-https://bugzilla.gnome.org/show_bug.cgi?id=387832
----
- callouts/nm-dispatcher-utils.c |  3 ++-
- src/nm-dispatcher.c            |  8 ++++++--
- src/nm-dispatcher.h            |  3 ++-
- src/nm-manager.c               | 28 +++++++++++++++++++++-------
- 4 files changed, 31 insertions(+), 11 deletions(-)
-
-diff --git a/callouts/nm-dispatcher-utils.c b/callouts/nm-dispatcher-utils.c
-index 8824295..66cbc4b 100644
---- a/callouts/nm-dispatcher-utils.c
-+++ b/callouts/nm-dispatcher-utils.c
-@@ -409,7 +409,8 @@ nm_dispatcher_utils_construct_envp (const char *action,
- 	g_return_val_if_fail (*out_iface == NULL, NULL);
- 
- 	/* Hostname changes don't require a device nor contain a connection */
--	if (!strcmp (action, "hostname"))
-+	if (!strcmp (action, "hostname") ||
-+	    !strcmp (action, "pre-sleep"))
- 		return g_new0 (char *, 1);
- 
- 	/* Canonicalize the VPN interface name; "" is used when passing it through
-diff --git a/src/nm-dispatcher.c b/src/nm-dispatcher.c
-index 12cd0f0..42d7e12 100644
---- a/src/nm-dispatcher.c
-+++ b/src/nm-dispatcher.c
-@@ -237,6 +237,8 @@ action_to_string (DispatcherAction action)
- 		return "dhcp4-change";
- 	case DISPATCHER_ACTION_DHCP6_CHANGE:
- 		return "dhcp6-change";
-+	case DISPATCHER_ACTION_PRE_SLEEP:
-+		return "pre-sleep";
- 	default:
- 		break;
- 	}
-@@ -269,7 +271,8 @@ _dispatcher_call (DispatcherAction action,
- 	DispatchInfo *info;
- 
- 	/* All actions except 'hostname' require a device */
--	if (action != DISPATCHER_ACTION_HOSTNAME)
-+	if (action != DISPATCHER_ACTION_HOSTNAME &&
-+	    action != DISPATCHER_ACTION_PRE_SLEEP)
- 		g_return_val_if_fail (NM_IS_DEVICE (device), NULL);
- 	/* VPN actions require at least an IPv4 config (for now) */
- 	if (action == DISPATCHER_ACTION_VPN_UP)
-@@ -308,7 +311,8 @@ _dispatcher_call (DispatcherAction action,
- 	vpn_ip6_props = value_hash_create ();
- 
- 	/* hostname actions only send the hostname */
--	if (action != DISPATCHER_ACTION_HOSTNAME) {
-+	if (action != DISPATCHER_ACTION_HOSTNAME &&
-+	    action != DISPATCHER_ACTION_PRE_SLEEP) {
- 		fill_device_props (device,
- 		                   device_props,
- 		                   device_ip4_props,
-diff --git a/src/nm-dispatcher.h b/src/nm-dispatcher.h
-index 05a6c87..8e95834 100644
---- a/src/nm-dispatcher.h
-+++ b/src/nm-dispatcher.h
-@@ -39,7 +39,8 @@ typedef enum {
- 	DISPATCHER_ACTION_VPN_PRE_DOWN,
- 	DISPATCHER_ACTION_VPN_DOWN,
- 	DISPATCHER_ACTION_DHCP4_CHANGE,
--	DISPATCHER_ACTION_DHCP6_CHANGE
-+	DISPATCHER_ACTION_DHCP6_CHANGE,
-+	DISPATCHER_ACTION_PRE_SLEEP = 999,
- } DispatcherAction;
- 
- typedef void (*DispatcherFunc) (gconstpointer call, gpointer user_data);
-diff --git a/src/nm-manager.c b/src/nm-manager.c
-index 811f49d..f52956d 100644
---- a/src/nm-manager.c
-+++ b/src/nm-manager.c
-@@ -73,6 +73,7 @@
- #include "nm-sleep-monitor.h"
- #include "nm-connectivity.h"
- #include "nm-policy.h"
-+#include "nm-dispatcher.h"
- 
- 
- #define NM_AUTOIP_DBUS_SERVICE "org.freedesktop.nm_avahi_autoipd"
-@@ -3350,6 +3351,23 @@ impl_manager_deactivate_connection (NMManager *self,
- }
- 
- static void
-+pre_sleep_dispatcher_done (gpointer call, gpointer user_data)
-+{
-+	NMManager *self = (NMManager *) user_data;
-+	NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
-+	GSList *iter;
-+
-+	/* Just deactivate and down all devices from the device list,
-+	 * to keep things fast the device list will get resynced when
-+	 * the manager wakes up.
-+	 */
-+	for (iter = priv->devices; iter; iter = iter->next)
-+		nm_device_set_managed (NM_DEVICE (iter->data), FALSE, NM_DEVICE_STATE_REASON_SLEEPING);
-+
-+	nm_manager_update_state (self);
-+}
-+
-+static void
- do_sleep_wake (NMManager *self)
- {
- 	NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
-@@ -3359,13 +3377,9 @@ do_sleep_wake (NMManager *self)
- 	if (manager_sleeping (self)) {
- 		nm_log_info (LOGD_SUSPEND, "sleeping or disabling...");
- 
--		/* Just deactivate and down all devices from the device list,
--		 * to keep things fast the device list will get resynced when
--		 * the manager wakes up.
--		 */
--		for (iter = priv->devices; iter; iter = iter->next)
--			nm_device_set_managed (NM_DEVICE (iter->data), FALSE, NM_DEVICE_STATE_REASON_SLEEPING);
--
-+		nm_dispatcher_call (DISPATCHER_ACTION_PRE_SLEEP, NULL, NULL,
-+		                    pre_sleep_dispatcher_done, self);
-+		return;
- 	} else {
- 		nm_log_info (LOGD_SUSPEND, "waking up and re-enabling...");
- 
--- 
-1.8.3.2
-

diff --git a/net-misc/networkmanager/files/networkmanager-0.9.8.9-fix-crash-on-wifi-rescan.patch b/net-misc/networkmanager/files/networkmanager-0.9.8.9-fix-crash-on-wifi-rescan.patch
deleted file mode 100644
index 35e9c04..0000000
--- a/net-misc/networkmanager/files/networkmanager-0.9.8.9-fix-crash-on-wifi-rescan.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 4099c9242b091604466dda081dc5f6909354258b Mon Sep 17 00:00:00 2001
-From: M. Vefa Bicakci <m.v.b@runbox.com>
-Date: Sat, 24 May 2014 23:37:00 +0000
-Subject: core: fix crash during Wi-Fi rescan by emitting NM_DEVICE_AUTH_REQUEST signal correctly
-
-Fixes regression introduced by commit da59b6d2229b85afbb9e14846931376340dc6030.
-
-https://mail.gnome.org/archives/networkmanager-list/2014-May/msg00038.html
-
-Backport-of: d9653484859c426f707b4759bc9882f7a57c1152
-[thaller@redhat.com: original patch modified in nm-device-wifi.c to pass no
-                     connection, as it is done on master]
-Signed-off-by: Thomas Haller <thaller@redhat.com>
----
-diff --git a/src/nm-device-wifi.c b/src/nm-device-wifi.c
-index 8ca5278..052d68f 100644
---- a/src/nm-device-wifi.c
-+++ b/src/nm-device-wifi.c
-@@ -1563,6 +1563,7 @@ impl_device_request_scan (NMDeviceWifi *self,
- 	g_signal_emit_by_name (device,
- 	                       NM_DEVICE_AUTH_REQUEST,
- 	                       context,
-+	                       NULL,
- 	                       NM_AUTH_PERMISSION_NETWORK_CONTROL,
- 	                       TRUE,
- 	                       request_scan_cb,
-diff --git a/src/nm-manager.c b/src/nm-manager.c
-index 9037e64..96bf3b4 100644
---- a/src/nm-manager.c
-+++ b/src/nm-manager.c
-@@ -1874,10 +1874,10 @@ device_auth_request_cb (NMDevice *device,
- 	}
- 
- 	/* Ensure the subject has permissions for this connection */
--	if (!nm_auth_uid_in_acl (connection,
--	                         priv->session_monitor,
--	                         sender_uid,
--	                         &error_desc)) {
-+	if (connection != NULL && !nm_auth_uid_in_acl (connection,
-+	                                               priv->session_monitor,
-+	                                               sender_uid,
-+	                                               &error_desc)) {
- 		error = g_error_new_literal (NM_MANAGER_ERROR,
- 		                             NM_MANAGER_ERROR_PERMISSION_DENIED,
- 		                             error_desc);
---
-cgit v0.9.0.2-2-gbebe

diff --git a/net-misc/networkmanager/files/networkmanager-1.0.0-find-helpers.patch b/net-misc/networkmanager/files/networkmanager-1.0.0-find-helpers.patch
deleted file mode 100644
index a84909c..0000000
--- a/net-misc/networkmanager/files/networkmanager-1.0.0-find-helpers.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 6f643d2761650e53fd3b647526110a8473138b5d Mon Sep 17 00:00:00 2001
-From: Thomas Haller <thaller@redhat.com>
-Date: Thu, 8 Jan 2015 11:55:50 +0100
-Subject: core: add /bin to the default search path
-
-https://bugzilla.gnome.org/show_bug.cgi?id=742576
-(cherry picked from commit abbca50ca9d552a28eca792f12ec618df6128fff)
-
-diff --git a/src/NetworkManagerUtils.c b/src/NetworkManagerUtils.c
-index 2c291cd..6747b65 100644
---- a/src/NetworkManagerUtils.c
-+++ b/src/NetworkManagerUtils.c
-@@ -814,6 +814,7 @@ const char *const NM_PATHS_DEFAULT[] = {
- 	"/sbin/",
- 	"/usr/sbin/",
- 	"/usr/local/sbin/",
-+	"/bin/",
- 	"/usr/bin/",
- 	"/usr/local/bin/",
- 	NULL,
--- 
-cgit v0.10.2
-

diff --git a/net-misc/networkmanager/files/networkmanager-1.0.0-lto-switch.patch b/net-misc/networkmanager/files/networkmanager-1.0.0-lto-switch.patch
deleted file mode 100644
index 5d66c33..0000000
--- a/net-misc/networkmanager/files/networkmanager-1.0.0-lto-switch.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From cda2802fe960737abb4623166ca4f75a63b5fe5a Mon Sep 17 00:00:00 2001
-From: Thomas Haller <thaller@redhat.com>
-Date: Thu, 8 Jan 2015 12:01:32 +0100
-Subject: build: fix --enable-lto configure option to allow disabling option
- explicitly
-
-When specifying '--enable-lto=anything' or '--disable-lto',
-the configure script would always set enable_lto=yes.
-
-The only way to disable lto, was *not* specifying the
-configure option.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=742575
-(cherry picked from commit 6eccfda0face594f86dea495d2ed2546b0d37e77)
-
-diff --git a/configure.ac b/configure.ac
-index b6bf38e..b407686 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -821,10 +821,11 @@ AM_CONDITIONAL(BUILD_NMTUI, test "$build_nmtui" = yes)
- 
- NM_COMPILER_WARNINGS
- 
--AC_ARG_ENABLE(lto, AS_HELP_STRING([--enable-lto], [Enable Link Time Optimization for smaller size (default: no)]),
--              [enable_lto=yes], [enable_lto=no])
-+AC_ARG_ENABLE(lto, AS_HELP_STRING([--enable-lto], [Enable Link Time Optimization for smaller size (default: no)]))
- if (test "${enable_lto}" = "yes"); then
-     CFLAGS="-flto $CFLAGS"
-+else
-+    enable_lto='no'
- fi
- 
- 
--- 
-cgit v0.10.2
-

diff --git a/net-misc/networkmanager/files/networkmanager-1.0.0-remove-bashisms.patch b/net-misc/networkmanager/files/networkmanager-1.0.0-remove-bashisms.patch
deleted file mode 100644
index 366627f..0000000
--- a/net-misc/networkmanager/files/networkmanager-1.0.0-remove-bashisms.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 4c3c9a38272112fe7a6a248ba521d55ac1b66892 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?R=C3=A9mi=20Cardona?= <remi@gentoo.org>
-Date: Sun, 25 Jan 2015 13:02:19 +0100
-Subject: [PATCH] build: use POSIX-compliant 'printf' instead of 'echo'
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Fixes the following error when running ./configure with dash:
-
-  checking for QT... yes
-  checking for moc-qt4... no
-  checking for moc... moc
-  configure: error: --with-udev-dir must be an absolute path or 'yes' or
-  'no'. Instead it is '/lib/udev'
-
-As per the Autoconf Manual's section on "Limitations of Shell Builtins":
-
-  The simple echo is probably the most surprising source of portability
-  troubles. It is not possible to use ‘echo’ portably unless both
-  options and escape sequences are omitted.
-
-https://www.gnu.org/software/automake/faq/autoconf.html#echo
-https://bugs.gentoo.org/536540
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index b407686..5c87c7e 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -302,7 +302,7 @@ AM_CONDITIONAL(WITH_QT, test "${enable_qt}" = "yes")
- 
- AC_ARG_WITH(udev-dir, AS_HELP_STRING([--with-udev-dir=DIR], [Absolute path of the udev base directory. Set to 'no' not to install the udev rules]), [], [with_udev_dir="yes"])
- if (test "$with_udev_dir" != 'no'); then
--	if (test "$with_udev_dir" != 'yes' && echo -n "$with_udev_dir" | grep -v -q '^/'); then
-+	if (test "$with_udev_dir" != 'yes' && printf '%s' "$with_udev_dir" | grep -v -q '^/'); then
- 		AC_MSG_ERROR([--with-udev-dir must be an absolute path or 'yes' or 'no'. Instead it is '$with_udev_dir'])
- 	fi
- 	if (test "$with_udev_dir" = 'yes'); then
--- 
-2.2.1
-

diff --git a/net-misc/networkmanager/files/nm-system-settings.conf-ifnet b/net-misc/networkmanager/files/nm-system-settings.conf-ifnet
deleted file mode 100644
index 4d14ee7..0000000
--- a/net-misc/networkmanager/files/nm-system-settings.conf-ifnet
+++ /dev/null
@@ -1,6 +0,0 @@
-[main]
-plugins=ifnet,keyfile
-
-[ifnet]
-managed=true
-auto_refresh=false

diff --git a/net-misc/networkmanager/networkmanager-0.9.8.10-r1.ebuild b/net-misc/networkmanager/networkmanager-0.9.8.10-r1.ebuild
deleted file mode 100644
index 7e5d00c..0000000
--- a/net-misc/networkmanager/networkmanager-0.9.8.10-r1.ebuild
+++ /dev/null
@@ -1,252 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-GNOME_ORG_MODULE="NetworkManager"
-VALA_MIN_API_VERSION="0.18"
-VALA_USE_DEPEND="vapigen"
-
-inherit bash-completion-r1 gnome.org linux-info systemd user readme.gentoo toolchain-funcs vala virtualx udev eutils
-
-DESCRIPTION="Universal network configuration daemon for laptops, desktops, servers and virtualization hosts"
-HOMEPAGE="https://projects.gnome.org/NetworkManager/"
-
-LICENSE="GPL-2+"
-SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
-IUSE="avahi bluetooth connection-sharing consolekit dhclient +dhcpcd gnutls +introspection kernel_linux +nss +modemmanager +ppp resolvconf systemd test vala +wext +wifi" # wimax
-
-KEYWORDS="~alpha amd64 arm ~ia64 ppc ppc64 ~sparc x86"
-
-REQUIRED_USE="
-	modemmanager? ( ppp )
-	^^ ( nss gnutls )
-	^^ ( dhclient dhcpcd )
-"
-
-# gobject-introspection-0.10.3 is needed due to gnome bug 642300
-# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
-# TODO: Qt support?
-COMMON_DEPEND="
-	>=sys-apps/dbus-1.2
-	>=dev-libs/dbus-glib-0.94
-	>=dev-libs/glib-2.30
-	>=dev-libs/libnl-3.2.7:3=
-	>=sys-auth/polkit-0.106
-	>=net-libs/libsoup-2.26:2.4=
-	virtual/libgudev:=
-	bluetooth? ( >=net-wireless/bluez-4.82 )
-	avahi? ( net-dns/avahi:=[autoipd] )
-	connection-sharing? (
-		net-dns/dnsmasq[dhcp]
-		net-firewall/iptables )
-	gnutls? (
-		dev-libs/libgcrypt:0=
-		net-libs/gnutls:= )
-	modemmanager? ( >=net-misc/modemmanager-0.7.991 )
-	nss? ( >=dev-libs/nss-3.11:= )
-	dhclient? ( =net-misc/dhcp-4*[client] )
-	dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 )
-	introspection? ( >=dev-libs/gobject-introspection-0.10.3 )
-	ppp? ( >=net-dialup/ppp-2.4.5[ipv6] )
-	resolvconf? ( net-dns/openresolv )
-	systemd? ( >=sys-apps/systemd-183:0= )
-	|| ( sys-power/upower sys-power/upower-pm-utils >=sys-apps/systemd-183 )
-"
-RDEPEND="${COMMON_DEPEND}
-	virtual/udev
-	consolekit? ( sys-auth/consolekit )
-	wifi? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
-"
-DEPEND="${COMMON_DEPEND}
-	dev-util/gtk-doc-am
-	>=dev-util/intltool-0.40
-	>=sys-devel/gettext-0.17
-	>=sys-kernel/linux-headers-2.6.29
-	virtual/pkgconfig
-	vala? ( $(vala_depend) )
-	test? (
-		dev-lang/python:2.7
-		dev-python/dbus-python[python_targets_python2_7]
-		dev-python/pygobject:2[python_targets_python2_7] )
-"
-
-sysfs_deprecated_check() {
-	ebegin "Checking for SYSFS_DEPRECATED support"
-
-	if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
-		eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
-		eerror "or NetworkManager will not work correctly."
-		eerror "See https://bugs.gentoo.org/333639 for more info."
-		die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
-	fi
-	eend $?
-}
-
-pkg_pretend() {
-	if use kernel_linux; then
-		get_version
-		if linux_config_exists; then
-			sysfs_deprecated_check
-		else
-			ewarn "Was unable to determine your kernel .config"
-			ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
-			ewarn "See https://bugs.gentoo.org/333639 for more info."
-		fi
-
-	fi
-}
-
-pkg_setup() {
-	enewgroup plugdev
-}
-
-src_prepare() {
-	DOC_CONTENTS="To modify system network connections without needing to enter the
-		root password, add your user account to the 'plugdev' group."
-
-	# Bug #402085, https://bugzilla.gnome.org/show_bug.cgi?id=387832
-	epatch "${FILESDIR}/${PN}-0.9.8.4-pre-sleep.patch"
-
-	# https://www.mail-archive.com/networkmanager-list@gnome.org/msg24038.html
-	epatch "${FILESDIR}/${PN}-0.9.8.9-fix-crash-on-wifi-rescan.patch"
-
-	# Use python2.7 shebangs for test scripts
-	sed -e 's@\(^#!.*python\)@\12.7@' \
-		-i */tests/*.py || die
-
-	# Fix completiondir, avoid eautoreconf, bug #465100
-	sed -i "s|^completiondir =.*|completiondir = $(get_bashcompdir)|" \
-		cli/completion/Makefile.in || die "sed completiondir failed"
-
-	## Force use of /run, avoid eautoreconf
-	sed -e 's:$localstatedir/run/:/run/:' -i configure || die
-
-	use vala && vala_src_prepare
-
-	epatch_user # don't remove, users often want custom patches for NM
-}
-
-src_configure() {
-	# TODO: enable wimax when we have a libnl:3 compatible revision of it
-	# We are not ready for bluez5 yet
-	econf \
-		--enable-bluez4 \
-		--disable-more-warnings \
-		--disable-static \
-		--localstatedir=/var \
-		$(usex systemd '--disable-ifnet' '--enable-ifnet') \
-		--without-netconfig \
-		--with-dbus-sys-dir=/etc/dbus-1/system.d \
-		--with-udev-dir="$(get_udevdir)" \
-		--with-iptables=/sbin/iptables \
-		--enable-concheck \
-		--with-crypto=$(usex nss nss gnutls) \
-		--with-session-tracking=$(usex systemd systemd $(usex consolekit consolekit no)) \
-		--with-suspend-resume=$(usex systemd systemd upower) \
-		$(use_enable introspection) \
-		$(use_enable ppp) \
-		--disable-wimax \
-		$(use_with dhclient) \
-		$(use_with dhcpcd) \
-		$(use_with modemmanager modem-manager-1) \
-		$(use_with resolvconf) \
-		$(use_enable test tests) \
-		$(use_enable vala) \
-		$(use_with wext) \
-		"$(systemd_with_unitdir)"
-}
-
-src_test() {
-	# bug #????
-	cp libnm-util/tests/certs/test_ca_cert.pem src/settings/plugins/ifnet/tests/ || die
-	Xemake check
-}
-
-src_install() {
-	default
-
-	readme.gentoo_create_doc
-
-	# Gentoo init script
-	newinitd "${FILESDIR}/init.d.NetworkManager" NetworkManager
-
-	# /var/run/NetworkManager is used by some distros, but not by Gentoo
-	rmdir -v "${ED}/var/run/NetworkManager" || die "rmdir failed"
-
-	# Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
-	keepdir /etc/NetworkManager/dispatcher.d
-
-	# Provide openrc net dependency only when nm is connected
-	exeinto /etc/NetworkManager/dispatcher.d
-	newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
-	sed -e "s:@EPREFIX@:${EPREFIX}:g" \
-		-i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
-
-	# Default conf.d file
-	newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
-
-	# Add keyfile plugin support
-	keepdir /etc/NetworkManager/system-connections
-	chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765
-
-	if ! use systemd; then
-		insinto /etc/NetworkManager
-		newins "${FILESDIR}/nm-system-settings.conf-ifnet" NetworkManager.conf
-	fi
-
-	# Allow users in plugdev group to modify system connections
-	insinto /usr/share/polkit-1/rules.d/
-	doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
-
-	prune_libtool_files --modules
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-
-	if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
-		ewarn "The ${PN} system configuration file has moved to a new location."
-		ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
-		ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
-		ewarn
-		ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
-	fi
-
-	# The polkit rules file moved to /usr/share
-	old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
-	if [[ -f "${old_rules}" ]]; then
-		case "$(md5sum ${old_rules})" in
-		  574d0cfa7e911b1f7792077003060240* )
-			# Automatically delete the old rules.d file if the user did not change it
-			elog
-			elog "Removing old ${old_rules} ..."
-			rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
-			;;
-		  * )
-			elog "The ${old_rules}"
-			elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
-			elog "If you edited ${old_rules}"
-			elog "without changing its behavior, you may want to remove it."
-			;;
-		esac
-	fi
-
-	if use systemd; then
-		if [[ ${REPLACING_VERSIONS} < 0.9.8.6 ]]; then
-			ewarn "Ifnet plugin won't be used with systemd support enabled"
-			ewarn "as it is meant to be used with openRC and can cause collisions"
-			ewarn "(like bug #485658)."
-			ewarn "Because of this, you will likely need to reconfigure some of"
-			ewarn "your networks."
-		fi
-
-		if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
-			if grep -q plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
-				ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
-				ewarn "Since it won't be used when running under Systemd, you will need to stop setting"
-				ewarn "ifnet plugin there to allow NetworkManager to work."
-			fi
-		fi
-	fi
-}

diff --git a/net-misc/networkmanager/networkmanager-1.0.2.ebuild b/net-misc/networkmanager/networkmanager-1.0.2.ebuild
deleted file mode 100644
index 0dd58e6..0000000
--- a/net-misc/networkmanager/networkmanager-1.0.2.ebuild
+++ /dev/null
@@ -1,292 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-GCONF_DEBUG="no"
-GNOME_ORG_MODULE="NetworkManager"
-GNOME2_LA_PUNT="yes"
-VALA_MIN_API_VERSION="0.18"
-VALA_USE_DEPEND="vapigen"
-PYTHON_COMPAT=( python{2_7,3_3,3_4} )
-
-inherit bash-completion-r1 eutils gnome2 linux-info multilib python-any-r1 systemd \
-	user readme.gentoo toolchain-funcs vala versionator virtualx udev
-
-DESCRIPTION="Universal network configuration daemon for laptops, desktops, servers and virtualization hosts"
-HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
-
-LICENSE="GPL-2+"
-SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
-
-IUSE="bluetooth connection-sharing consolekit +dhclient dhcpcd gnutls +introspection \
-kernel_linux +nss +modemmanager ncurses +ppp resolvconf selinux systemd teamd test \
-vala +wext +wifi zeroconf" # wimax
-
-KEYWORDS="~alpha amd64 arm ~arm64 ppc ppc64 ~sparc x86"
-
-REQUIRED_USE="
-	modemmanager? ( ppp )
-	^^ ( nss gnutls )
-	^^ ( dhclient dhcpcd )
-"
-
-# gobject-introspection-0.10.3 is needed due to gnome bug 642300
-# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
-# TODO: Qt support?
-COMMON_DEPEND="
-	>=sys-apps/dbus-1.2
-	>=dev-libs/dbus-glib-0.100
-	>=dev-libs/glib-2.32:2
-	>=dev-libs/libnl-3.2.8:3=
-	>=sys-auth/polkit-0.106
-	net-libs/libndp
-	>=net-libs/libsoup-2.26:2.4=
-	net-misc/iputils
-	sys-libs/readline:0
-	>=virtual/libgudev-165:=
-	bluetooth? ( >=net-wireless/bluez-5 )
-	connection-sharing? (
-		net-dns/dnsmasq[dhcp]
-		net-firewall/iptables )
-	gnutls? (
-		dev-libs/libgcrypt:0=
-		net-libs/gnutls:= )
-	modemmanager? ( >=net-misc/modemmanager-0.7.991 )
-	ncurses? ( >=dev-libs/newt-0.52.15 )
-	nss? ( >=dev-libs/nss-3.11:= )
-	dhclient? ( >=net-misc/dhcp-4[client] )
-	dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 )
-	introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
-	ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] net-dialup/rp-pppoe )
-	resolvconf? ( net-dns/openresolv )
-	systemd? ( >=sys-apps/systemd-209:0= )
-	!systemd? ( || ( sys-power/upower sys-power/upower-pm-utils ) )
-	teamd? ( >=net-misc/libteam-1.9 )
-	zeroconf? ( net-dns/avahi:=[autoipd] )
-"
-RDEPEND="${COMMON_DEPEND}
-	consolekit? ( sys-auth/consolekit )
-	wifi? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
-"
-DEPEND="${COMMON_DEPEND}
-	dev-util/gdbus-codegen
-	dev-util/gtk-doc-am
-	>=dev-util/intltool-0.40
-	>=sys-devel/gettext-0.17
-	>=sys-kernel/linux-headers-2.6.29
-	virtual/pkgconfig
-	vala? ( $(vala_depend) )
-	test? (
-		$(python_gen_any_dep '
-			dev-python/dbus-python[${PYTHON_USEDEP}]
-			dev-python/pygobject:2[${PYTHON_USEDEP}]')
-	)
-"
-
-sysfs_deprecated_check() {
-	ebegin "Checking for SYSFS_DEPRECATED support"
-
-	if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
-		eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
-		eerror "or NetworkManager will not work correctly."
-		eerror "See https://bugs.gentoo.org/333639 for more info."
-		die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
-	fi
-	eend $?
-}
-
-pkg_pretend() {
-	if use kernel_linux; then
-		get_version
-		if linux_config_exists; then
-			sysfs_deprecated_check
-		else
-			ewarn "Was unable to determine your kernel .config"
-			ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
-			ewarn "See https://bugs.gentoo.org/333639 for more info."
-		fi
-
-	fi
-}
-
-pkg_setup() {
-	enewgroup plugdev
-}
-
-src_prepare() {
-	DOC_CONTENTS="To modify system network connections without needing to enter the
-		root password, add your user account to the 'plugdev' group."
-
-	# Force use of /run, avoid eautoreconf, upstream bug #737139
-	sed -e 's:$localstatedir/run/:/run/:' -i configure || die
-
-	use vala && vala_src_prepare
-
-	epatch_user # don't remove, users often want custom patches for NM
-	gnome2_src_prepare
-}
-
-src_configure() {
-	local myconf
-
-	# Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
-	if use ppp; then
-		local PPPD_VER=`best_version net-dialup/ppp`
-		PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
-		PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
-		myconf="${myconf} --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER}"
-	fi
-
-	# unit files directory needs to be passed only when systemd is enabled,
-	# otherwise systemd support is not disabled completely, bug #524534
-	use systemd && myconf="${myconf} "$(systemd_with_unitdir)""
-
-	# TODO: enable wimax when we have a libnl:3 compatible revision of it
-	# wimax will be removed, bug #522822
-	# ifnet plugin always disabled until someone volunteers to actively
-	# maintain and fix it
-	gnome2_src_configure \
-		--disable-more-warnings \
-		--disable-static \
-		--localstatedir=/var \
-		--disable-lto \
-		--disable-config-plugin-ibft \
-		--disable-ifnet \
-		--without-netconfig \
-		--with-dbus-sys-dir=/etc/dbus-1/system.d \
-		--with-udev-dir="$(get_udevdir)" \
-		--with-config-plugins-default=keyfile \
-		--with-iptables=/sbin/iptables \
-		--with-libsoup=yes \
-		--enable-concheck \
-		--with-crypto=$(usex nss nss gnutls) \
-		--with-session-tracking=$(usex systemd systemd $(usex consolekit consolekit no)) \
-		--with-suspend-resume=$(usex systemd systemd upower) \
-		$(use_enable bluetooth bluez5-dun) \
-		$(use_enable introspection) \
-		$(use_enable ppp) \
-		--disable-wimax \
-		$(use_with dhclient) \
-		$(use_with dhcpcd) \
-		$(use_with modemmanager modem-manager-1) \
-		$(use_with ncurses nmtui) \
-		$(use_with resolvconf) \
-		$(use_with selinux) \
-		$(use_enable teamd teamdctl) \
-		$(use_enable test tests) \
-		$(use_enable vala) \
-		--without-valgrind \
-		$(use_with wext) \
-		${myconf}
-}
-
-src_test() {
-	python_setup
-	Xemake check
-}
-
-src_install() {
-	# Install completions at proper place, bug #465100
-	gnome2_src_install completiondir="$(get_bashcompdir)"
-
-	! use systemd && readme.gentoo_create_doc
-
-	newinitd "${FILESDIR}/init.d.NetworkManager" NetworkManager
-	newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
-
-	# /var/run/NetworkManager is used by some distros, but not by Gentoo
-	rmdir -v "${ED}/var/run/NetworkManager" || die "rmdir failed"
-	rmdir -v "${ED}/var/run" || die "rmdir failed"
-
-	# Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
-	keepdir /etc/NetworkManager/dispatcher.d
-
-	# Provide openrc net dependency only when nm is connected
-	exeinto /etc/NetworkManager/dispatcher.d
-	newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
-	sed -e "s:@EPREFIX@:${EPREFIX}:g" \
-		-i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
-
-	keepdir /etc/NetworkManager/system-connections
-	chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765
-
-	# Allow users in plugdev group to modify system connections
-	insinto /usr/share/polkit-1/rules.d/
-	doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
-}
-
-pkg_postinst() {
-	gnome2_pkg_postinst
-	! use systemd && readme.gentoo_print_elog
-
-	if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
-		ewarn "The ${PN} system configuration file has moved to a new location."
-		ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
-		ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
-		ewarn
-		ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
-	fi
-
-	# The polkit rules file moved to /usr/share
-	old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
-	if [[ -f "${old_rules}" ]]; then
-		case "$(md5sum ${old_rules})" in
-		  574d0cfa7e911b1f7792077003060240* )
-			# Automatically delete the old rules.d file if the user did not change it
-			elog
-			elog "Removing old ${old_rules} ..."
-			rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
-			;;
-		  * )
-			elog "The ${old_rules}"
-			elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
-			elog "If you edited ${old_rules}"
-			elog "without changing its behavior, you may want to remove it."
-			;;
-		esac
-	fi
-
-	# ifnet plugin was disabled for systemd users with 0.9.8.6 version
-	# and for all people with 0.9.10.0-r1 (see ChangeLog for full explanations)
-	if use systemd; then
-		if ! version_is_at_least 0.9.8.6 ${REPLACING_VERSIONS}; then
-			ewarn "Ifnet plugin won't be used with systemd support enabled"
-			ewarn "as it is meant to be used with openRC and can cause collisions"
-			ewarn "(like bug #485658)."
-			ewarn "Because of this, you will likely need to reconfigure some of"
-			ewarn "your networks. To do this you can rely on Gnome control center,"
-			ewarn "nm-connection-editor or nmtui tools for example once updated"
-			ewarn "NetworkManager version is installed."
-		fi
-	else
-		if ! version_is_at_least 0.9.10.0-r1 ${REPLACING_VERSIONS}; then
-			ewarn "Ifnet plugin is now disabled because of it being unattended"
-			ewarn "and unmaintained for a long time, leading to some unfixed bugs"
-			ewarn "and new problems appearing. We will now use upstream 'keyfile'"
-			ewarn "plugin."
-			ewarn "Because of this, you will likely need to reconfigure some of"
-			ewarn "your networks. To do this you can rely on Gnome control center,"
-			ewarn "nm-connection-editor or nmtui tools for example once updated"
-			ewarn "NetworkManager version is installed."
-		fi
-	fi
-
-	# NM fallbacks to plugin specified at compile time (upstream bug #738611)
-	# but still show a warning to remember people to have cleaner config file
-	if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
-		if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
-			ewarn
-			ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
-			ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
-			ewarn
-		fi
-	fi
-
-	# NM shows lots of errors making nmcli neither unusable, bug #528748 upstream bug #690457
-	if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
-		ewarn "You have psk-flags=1 setting in above files, you will need to"
-		ewarn "either reconfigure affected networks or, at least, set the flag"
-		ewarn "value to '0'."
-	fi
-}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/
@ 2015-10-03 11:53 Pacho Ramos
  0 siblings, 0 replies; 14+ messages in thread
From: Pacho Ramos @ 2015-10-03 11:53 UTC (permalink / raw
  To: gentoo-commits

commit:     32923fba19c5b92210481ed853cc0bdfb705c7a6
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sat Oct  3 11:51:54 2015 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sat Oct  3 11:52:56 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32923fba

net-misc/networkmanager: Fix VPN problems due to wrong MTU (#559908 by Markos Chandras and Lubomir Rintel).

Package-Manager: portage-2.2.22

 .../files/networkmanager-1.0.6-vpn-mtu.patch       |  53 ++++
 .../networkmanager/networkmanager-1.0.6-r1.ebuild  | 348 +++++++++++++++++++++
 2 files changed, 401 insertions(+)

diff --git a/net-misc/networkmanager/files/networkmanager-1.0.6-vpn-mtu.patch b/net-misc/networkmanager/files/networkmanager-1.0.6-vpn-mtu.patch
new file mode 100644
index 0000000..6159972
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-1.0.6-vpn-mtu.patch
@@ -0,0 +1,53 @@
+From 105e30efbaf422401902575749efdcd18706ace1 Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak@v3.sk>
+Date: Mon, 28 Sep 2015 20:57:09 +0200
+Subject: vpn-connection: set the MTU for the VPN IP interface
+
+The 9b79e6c73 commit moved setting of the MTU from IP4Config to NMDevice, but
+VPN connections don't have a NMDevice instance (yet). Set the MTU also from the
+VPN connection. Also, copying of the MTU to the IP4Config is no longer needed
+as the ip4_config_commit no longer sets the MTU.
+
+Fixes: 9b79e6c732ffb2fb105647c1465070d36a6cc180
+
+https://bugzilla.gnome.org/show_bug.cgi?id=754781
+(cherry picked from commit e0fa48f224abcb73a1a129f10050f7cd942ee629)
+
+diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c
+index f0e6149..e2d3103 100644
+--- a/src/vpn-manager/nm-vpn-connection.c
++++ b/src/vpn-manager/nm-vpn-connection.c
+@@ -980,6 +980,9 @@ nm_vpn_connection_apply_config (NMVpnConnection *connection)
+ 			                           TRUE))
+ 				return FALSE;
+ 		}
++
++		if (priv->mtu && priv->mtu != nm_platform_link_get_mtu (NM_PLATFORM_GET, priv->ip_ifindex))
++			nm_platform_link_set_mtu (NM_PLATFORM_GET, priv->ip_ifindex, priv->mtu);
+ 	}
+ 
+ 	apply_parent_device_config (connection);
+@@ -1149,10 +1152,6 @@ process_generic_config (NMVpnConnection *connection,
+ 		}
+ 	}
+ 
+-	/* MTU; this is a per-connection value, though NM's API treats it
+-	 * like it's IP4-specific. So we store it for now and retrieve it
+-	 * later in ip4_config_get.
+-	 */
+ 	priv->mtu = 0;
+ 	val = (GValue *) g_hash_table_lookup (config_hash, NM_VPN_PLUGIN_CONFIG_MTU);
+ 	if (val) {
+@@ -1328,9 +1327,6 @@ nm_vpn_connection_ip4_config_get (DBusGProxy *proxy,
+ 	if (val)
+ 		nm_ip4_config_set_mss (config, g_value_get_uint (val));
+ 
+-	if (priv->mtu)
+-		nm_ip4_config_set_mtu (config, priv->mtu, NM_IP_CONFIG_SOURCE_VPN);
+-
+ 	val = (GValue *) g_hash_table_lookup (config_hash, NM_VPN_PLUGIN_IP4_CONFIG_DOMAIN);
+ 	if (val)
+ 		nm_ip4_config_add_domain (config, g_value_get_string (val));
+-- 
+cgit v0.10.2
+

diff --git a/net-misc/networkmanager/networkmanager-1.0.6-r1.ebuild b/net-misc/networkmanager/networkmanager-1.0.6-r1.ebuild
new file mode 100644
index 0000000..89bc91b
--- /dev/null
+++ b/net-misc/networkmanager/networkmanager-1.0.6-r1.ebuild
@@ -0,0 +1,348 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME_ORG_MODULE="NetworkManager"
+GNOME2_LA_PUNT="yes"
+VALA_USE_DEPEND="vapigen"
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit autotools bash-completion-r1 eutils gnome2 linux-info multilib python-any-r1 systemd \
+	user readme.gentoo toolchain-funcs vala versionator virtualx udev multilib-minimal
+
+DESCRIPTION="Universal network configuration daemon for laptops, desktops, servers and virtualization hosts"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
+
+IUSE="bluetooth connection-sharing consolekit +dhclient dhcpcd gnutls +introspection \
+kernel_linux +nss +modemmanager ncurses +ppp resolvconf selinux systemd teamd test \
+vala +wext +wifi zeroconf" # wimax
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+
+REQUIRED_USE="
+	modemmanager? ( ppp )
+	wext? ( wifi )
+	^^ ( nss gnutls )
+	^^ ( dhclient dhcpcd )
+"
+
+# gobject-introspection-0.10.3 is needed due to gnome bug 642300
+# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
+# TODO: Qt support?
+COMMON_DEPEND="
+	>=sys-apps/dbus-1.2[${MULTILIB_USEDEP}]
+	>=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}]
+	>=dev-libs/glib-2.37.6:2[${MULTILIB_USEDEP}]
+	>=dev-libs/libnl-3.2.8:3=
+	>=sys-auth/polkit-0.106
+	net-libs/libndp
+	>=net-libs/libsoup-2.26:2.4=
+	net-misc/iputils
+	sys-libs/readline:0
+	>=virtual/libgudev-165:=[${MULTILIB_USEDEP}]
+	bluetooth? ( >=net-wireless/bluez-5 )
+	connection-sharing? (
+		net-dns/dnsmasq[dhcp]
+		net-firewall/iptables )
+	gnutls? (
+		dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
+		net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+	modemmanager? ( >=net-misc/modemmanager-0.7.991 )
+	ncurses? ( >=dev-libs/newt-0.52.15 )
+	nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
+	dhclient? ( >=net-misc/dhcp-4[client] )
+	dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 )
+	introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
+	ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] net-dialup/rp-pppoe )
+	resolvconf? ( net-dns/openresolv )
+	systemd? ( >=sys-apps/systemd-209:0= )
+	!systemd? ( || ( sys-power/upower sys-power/upower-pm-utils ) )
+	teamd? ( >=net-misc/libteam-1.9 )
+	zeroconf? ( net-dns/avahi:=[autoipd] )
+"
+RDEPEND="${COMMON_DEPEND}
+	consolekit? ( sys-auth/consolekit )
+	wifi? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
+"
+DEPEND="${COMMON_DEPEND}
+	dev-util/gdbus-codegen
+	dev-util/gtk-doc-am
+	>=dev-util/intltool-0.40
+	>=sys-devel/gettext-0.17
+	>=sys-kernel/linux-headers-2.6.29
+	virtual/pkgconfig
+	vala? ( $(vala_depend) )
+	test? (
+		$(python_gen_any_dep '
+			dev-python/dbus-python[${PYTHON_USEDEP}]
+			dev-python/pygobject:2[${PYTHON_USEDEP}]')
+	)
+"
+
+sysfs_deprecated_check() {
+	ebegin "Checking for SYSFS_DEPRECATED support"
+
+	if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
+		eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
+		eerror "or NetworkManager will not work correctly."
+		eerror "See https://bugs.gentoo.org/333639 for more info."
+		die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
+	fi
+	eend $?
+}
+
+pkg_pretend() {
+	if use kernel_linux; then
+		get_version
+		if linux_config_exists; then
+			sysfs_deprecated_check
+		else
+			ewarn "Was unable to determine your kernel .config"
+			ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
+			ewarn "See https://bugs.gentoo.org/333639 for more info."
+		fi
+
+	fi
+}
+
+pkg_setup() {
+	enewgroup plugdev
+}
+
+src_prepare() {
+	DOC_CONTENTS="To modify system network connections without needing to enter the
+		root password, add your user account to the 'plugdev' group."
+
+	# vpn-connection: set the MTU for the VPN IP interface (from nm-1.0 branch)
+	epatch "${FILESDIR}"/${P}-vpn-mtu.patch
+
+	# Force use of /run, avoid eautoreconf, upstream bug #737139, fixed in 'master'
+	sed -e 's:$localstatedir/run/:/run/:' -i configure || die
+
+	# Don't build examples, they are not needed and can cause build failure
+	sed -e '/^\s*examples\s*\\/d' -i Makefile.{am,in} || die
+
+	use vala && vala_src_prepare
+
+	epatch_user # don't remove, users often want custom patches for NM
+
+	eautoreconf
+
+	gnome2_src_prepare
+}
+
+multilib_src_configure() {
+	local myconf=()
+
+	# Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
+	if use ppp; then
+		local PPPD_VER=`best_version net-dialup/ppp`
+		PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
+		PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
+		myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
+	fi
+
+	# unit files directory needs to be passed only when systemd is enabled,
+	# otherwise systemd support is not disabled completely, bug #524534
+	use systemd && myconf+=( "$(systemd_with_unitdir)" )
+
+	if multilib_is_native_abi; then
+		# work-around man out-of-source brokenness, must be done before configure
+		mkdir man || die
+		find "${S}"/man -name '*.?' -exec ln -s {} man/ ';' || die
+	else
+		# libnl, libndp are only used for executables, not libraries
+		myconf+=( LIB{NL,NDP}_{CFLAGS,LIBS}=' ' )
+	fi
+
+	# TODO: enable wimax when we have a libnl:3 compatible revision of it
+	# wimax will be removed, bug #522822
+	# ifnet plugin always disabled until someone volunteers to actively
+	# maintain and fix it
+	ECONF_SOURCE=${S} \
+	gnome2_src_configure \
+		--disable-more-warnings \
+		--disable-static \
+		--localstatedir=/var \
+		--disable-lto \
+		--disable-config-plugin-ibft \
+		--disable-ifnet \
+		--without-netconfig \
+		--with-dbus-sys-dir=/etc/dbus-1/system.d \
+		--with-udev-dir="$(get_udevdir)" \
+		--with-config-plugins-default=keyfile \
+		--with-iptables=/sbin/iptables \
+		$(multilib_native_with libsoup) \
+		$(multilib_native_enable concheck) \
+		--with-crypto=$(usex nss nss gnutls) \
+		--with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex consolekit consolekit no)) \
+		--with-suspend-resume=$(multilib_native_usex systemd systemd upower) \
+		$(multilib_native_use_enable bluetooth bluez5-dun) \
+		$(multilib_native_use_enable introspection) \
+		$(multilib_native_use_enable ppp) \
+		--disable-wimax \
+		$(use_with dhclient) \
+		$(use_with dhcpcd) \
+		$(multilib_native_use_with modemmanager modem-manager-1) \
+		$(multilib_native_use_with ncurses nmtui) \
+		$(multilib_native_use_with resolvconf) \
+		$(multilib_native_use_with selinux) \
+		$(multilib_native_use_enable teamd teamdctl) \
+		$(multilib_native_use_enable test tests) \
+		$(multilib_native_use_enable vala) \
+		--without-valgrind \
+		$(multilib_native_use_with wext) \
+		$(multilib_native_use_enable wifi) \
+		"${myconf[@]}"
+
+	# work-around gtk-doc out-of-source brokedness
+	if multilib_is_native_abi; then
+		local d
+		for d in api libnm libnm-util libnm-glib; do
+			ln -s "${S}"/docs/${d}/html docs/${d}/html || die
+		done
+	fi
+}
+
+multilib_src_compile() {
+	if multilib_is_native_abi; then
+		emake
+	else
+		emake all-am
+		emake -C include
+		emake -C introspection # generated headers, needed for libnm
+		emake -C libnm-core
+		emake -C libnm
+		emake -C libnm-util
+		emake -C libnm-glib
+	fi
+}
+
+multilib_src_test() {
+	if multilib_is_native_abi; then
+		python_setup
+		Xemake check
+	fi
+}
+
+multilib_src_install() {
+	if multilib_is_native_abi; then
+		# Install completions at proper place, bug #465100
+		gnome2_src_install completiondir="$(get_bashcompdir)"
+	else
+		emake DESTDIR="${D}" install-am
+		emake DESTDIR="${D}" install -C include
+		emake DESTDIR="${D}" install -C introspection
+		emake DESTDIR="${D}" install -C libnm-core
+		emake DESTDIR="${D}" install -C libnm
+		emake DESTDIR="${D}" install -C libnm-util
+		emake DESTDIR="${D}" install -C libnm-glib
+	fi
+}
+
+multilib_src_install_all() {
+	! use systemd && readme.gentoo_create_doc
+
+	newinitd "${FILESDIR}/init.d.NetworkManager" NetworkManager
+	newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
+
+	# /var/run/NetworkManager is used by some distros, but not by Gentoo
+	rmdir -v "${ED}/var/run/NetworkManager" || die "rmdir failed"
+	rmdir -v "${ED}/var/run" || die "rmdir failed"
+
+	# Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
+	keepdir /etc/NetworkManager/dispatcher.d
+
+	# Provide openrc net dependency only when nm is connected
+	exeinto /etc/NetworkManager/dispatcher.d
+	newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
+	sed -e "s:@EPREFIX@:${EPREFIX}:g" \
+		-i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
+
+	keepdir /etc/NetworkManager/system-connections
+	chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
+
+	# Allow users in plugdev group to modify system connections
+	insinto /usr/share/polkit-1/rules.d/
+	doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
+}
+
+pkg_postinst() {
+	gnome2_pkg_postinst
+	! use systemd && readme.gentoo_print_elog
+
+	if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
+		ewarn "The ${PN} system configuration file has moved to a new location."
+		ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
+		ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
+		ewarn
+		ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
+	fi
+
+	# The polkit rules file moved to /usr/share
+	old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
+	if [[ -f "${old_rules}" ]]; then
+		case "$(md5sum ${old_rules})" in
+		  574d0cfa7e911b1f7792077003060240* )
+			# Automatically delete the old rules.d file if the user did not change it
+			elog
+			elog "Removing old ${old_rules} ..."
+			rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
+			;;
+		  * )
+			elog "The ${old_rules}"
+			elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
+			elog "If you edited ${old_rules}"
+			elog "without changing its behavior, you may want to remove it."
+			;;
+		esac
+	fi
+
+	# ifnet plugin was disabled for systemd users with 0.9.8.6 version
+	# and for all people with 0.9.10.0-r1 (see ChangeLog for full explanations)
+	if use systemd; then
+		if ! version_is_at_least 0.9.8.6 ${REPLACING_VERSIONS}; then
+			ewarn "Ifnet plugin won't be used with systemd support enabled"
+			ewarn "as it is meant to be used with openRC and can cause collisions"
+			ewarn "(like bug #485658)."
+			ewarn "Because of this, you will likely need to reconfigure some of"
+			ewarn "your networks. To do this you can rely on Gnome control center,"
+			ewarn "nm-connection-editor or nmtui tools for example once updated"
+			ewarn "NetworkManager version is installed."
+		fi
+	else
+		if ! version_is_at_least 0.9.10.0-r1 ${REPLACING_VERSIONS}; then
+			ewarn "Ifnet plugin is now disabled because of it being unattended"
+			ewarn "and unmaintained for a long time, leading to some unfixed bugs"
+			ewarn "and new problems appearing. We will now use upstream 'keyfile'"
+			ewarn "plugin."
+			ewarn "Because of this, you will likely need to reconfigure some of"
+			ewarn "your networks. To do this you can rely on Gnome control center,"
+			ewarn "nm-connection-editor or nmtui tools for example once updated"
+			ewarn "NetworkManager version is installed."
+		fi
+	fi
+
+	# NM fallbacks to plugin specified at compile time (upstream bug #738611)
+	# but still show a warning to remember people to have cleaner config file
+	if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
+		if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
+			ewarn
+			ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
+			ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
+			ewarn
+		fi
+	fi
+
+	# NM shows lots of errors making nmcli neither unusable, bug #528748 upstream bug #690457
+	if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
+		ewarn "You have psk-flags=1 setting in above files, you will need to"
+		ewarn "either reconfigure affected networks or, at least, set the flag"
+		ewarn "value to '0'."
+	fi
+}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/
@ 2016-04-16 11:13 Pacho Ramos
  0 siblings, 0 replies; 14+ messages in thread
From: Pacho Ramos @ 2016-04-16 11:13 UTC (permalink / raw
  To: gentoo-commits

commit:     2121c3a782bac69a7bd00efc6211e962883a607b
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 16 11:12:09 2016 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sat Apr 16 11:12:09 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2121c3a7

net-misc/networkmanager: Fix connection with some wifi devices (#579820 by Oleg)

Package-Manager: portage-2.2.28

 .../files/networkmanager-1.0.12-wifi-wext.patch    |  24 ++
 .../networkmanager/networkmanager-1.0.12-r1.ebuild | 346 +++++++++++++++++++++
 2 files changed, 370 insertions(+)

diff --git a/net-misc/networkmanager/files/networkmanager-1.0.12-wifi-wext.patch b/net-misc/networkmanager/files/networkmanager-1.0.12-wifi-wext.patch
new file mode 100644
index 0000000..124cafe
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-1.0.12-wifi-wext.patch
@@ -0,0 +1,24 @@
+From 70c0defe753bc98ac75725cc32a84b36f32258e4 Mon Sep 17 00:00:00 2001
+From: Francesco Giudici <fgiudici@redhat.com>
+Date: Fri, 11 Mar 2016 09:55:39 +0100
+Subject: wifi: hack for wext devices reporting IW_MODE_AUTO configuration
+ mode.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=763388
+(cherry picked from commit 0f6febc6fbeafde62e6e0a8c12f57204d94166fb)
+
+diff --git a/src/platform/wifi/wifi-utils-wext.c b/src/platform/wifi/wifi-utils-wext.c
+index 470b73d..14a16ec 100644
+--- a/src/platform/wifi/wifi-utils-wext.c
++++ b/src/platform/wifi/wifi-utils-wext.c
+@@ -122,6 +122,7 @@ wifi_wext_get_mode (WifiData *data)
+ 	case IW_MODE_MASTER:
+ 		return NM_802_11_MODE_AP;
+ 	case IW_MODE_INFRA:
++	case IW_MODE_AUTO: /* hack for WEXT devices reporting IW_MODE_AUTO */
+ 		return NM_802_11_MODE_INFRA;
+ 	default:
+ 		break;
+-- 
+cgit v0.10.2
+

diff --git a/net-misc/networkmanager/networkmanager-1.0.12-r1.ebuild b/net-misc/networkmanager/networkmanager-1.0.12-r1.ebuild
new file mode 100644
index 0000000..6689afa
--- /dev/null
+++ b/net-misc/networkmanager/networkmanager-1.0.12-r1.ebuild
@@ -0,0 +1,346 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME_ORG_MODULE="NetworkManager"
+GNOME2_LA_PUNT="yes"
+VALA_USE_DEPEND="vapigen"
+PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
+
+inherit autotools bash-completion-r1 eutils gnome2 linux-info multilib python-any-r1 systemd \
+	user readme.gentoo toolchain-funcs vala versionator virtualx udev multilib-minimal
+
+DESCRIPTION="A set of co-operative tools that make networking simple and straightforward"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
+
+IUSE="bluetooth connection-sharing consolekit +dhclient dhcpcd gnutls +introspection \
+kernel_linux +nss +modemmanager ncurses +ppp resolvconf selinux systemd teamd test \
+vala +wext +wifi zeroconf" # wimax
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+
+REQUIRED_USE="
+	modemmanager? ( ppp )
+	wext? ( wifi )
+	^^ ( nss gnutls )
+	^^ ( dhclient dhcpcd )
+"
+
+# gobject-introspection-0.10.3 is needed due to gnome bug 642300
+# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
+# TODO: Qt support?
+COMMON_DEPEND="
+	>=sys-apps/dbus-1.2[${MULTILIB_USEDEP}]
+	>=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}]
+	>=dev-libs/glib-2.37.6:2[${MULTILIB_USEDEP}]
+	>=dev-libs/libnl-3.2.8:3=
+	>=sys-auth/polkit-0.106
+	net-libs/libndp
+	>=net-libs/libsoup-2.40:2.4=
+	net-misc/iputils
+	sys-libs/readline:0
+	>=virtual/libgudev-165:=[${MULTILIB_USEDEP}]
+	bluetooth? ( >=net-wireless/bluez-5 )
+	connection-sharing? (
+		net-dns/dnsmasq[dhcp]
+		net-firewall/iptables )
+	gnutls? (
+		dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
+		net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+	modemmanager? ( >=net-misc/modemmanager-0.7.991 )
+	ncurses? ( >=dev-libs/newt-0.52.15 )
+	nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
+	dhclient? ( >=net-misc/dhcp-4[client] )
+	dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 )
+	introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
+	ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] net-dialup/rp-pppoe )
+	resolvconf? ( net-dns/openresolv )
+	systemd? ( >=sys-apps/systemd-209:0= )
+	!systemd? ( || ( sys-power/upower sys-power/upower-pm-utils ) )
+	teamd? ( >=net-misc/libteam-1.9 )
+	zeroconf? ( net-dns/avahi:=[autoipd] )
+"
+RDEPEND="${COMMON_DEPEND}
+	consolekit? ( sys-auth/consolekit )
+	wifi? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
+"
+DEPEND="${COMMON_DEPEND}
+	dev-util/gdbus-codegen
+	dev-util/gtk-doc-am
+	>=dev-util/intltool-0.40
+	>=sys-devel/gettext-0.17
+	>=sys-kernel/linux-headers-2.6.29
+	virtual/pkgconfig
+	vala? ( $(vala_depend) )
+	test? (
+		$(python_gen_any_dep '
+			dev-python/dbus-python[${PYTHON_USEDEP}]
+			dev-python/pygobject:2[${PYTHON_USEDEP}]')
+	)
+"
+
+sysfs_deprecated_check() {
+	ebegin "Checking for SYSFS_DEPRECATED support"
+
+	if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
+		eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
+		eerror "or NetworkManager will not work correctly."
+		eerror "See https://bugs.gentoo.org/333639 for more info."
+		die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
+	fi
+	eend $?
+}
+
+pkg_pretend() {
+	if use kernel_linux; then
+		get_version
+		if linux_config_exists; then
+			sysfs_deprecated_check
+		else
+			ewarn "Was unable to determine your kernel .config"
+			ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
+			ewarn "See https://bugs.gentoo.org/333639 for more info."
+		fi
+
+	fi
+}
+
+pkg_setup() {
+	enewgroup plugdev
+}
+
+src_prepare() {
+	DOC_CONTENTS="To modify system network connections without needing to enter the
+		root password, add your user account to the 'plugdev' group."
+
+	# wifi: hack for wext devices reporting IW_MODE_AUTO configuration mode.
+	# (from 1.0 branch)
+	epatch "${FILESDIR}"/${P}-wifi-wext.patch
+
+	# Force use of /run, avoid eautoreconf, upstream bug #737139, fixed in 'master'
+	sed -e 's:$localstatedir/run/:/run/:' -i configure || die
+
+	# Don't build examples, they are not needed and can cause build failure
+	sed -e '/^\s*examples\s*\\/d' -i Makefile.{am,in} || die
+
+	use vala && vala_src_prepare
+	epatch_user # don't remove, users often want custom patches for NM
+	eautoreconf
+	gnome2_src_prepare
+}
+
+multilib_src_configure() {
+	local myconf=()
+
+	# Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
+	if use ppp; then
+		local PPPD_VER=`best_version net-dialup/ppp`
+		PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
+		PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
+		myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
+	fi
+
+	# unit files directory needs to be passed only when systemd is enabled,
+	# otherwise systemd support is not disabled completely, bug #524534
+	use systemd && myconf+=( "$(systemd_with_unitdir)" )
+
+	if multilib_is_native_abi; then
+		# work-around man out-of-source brokenness, must be done before configure
+		mkdir man || die
+		find "${S}"/man -name '*.?' -exec ln -s {} man/ ';' || die
+	else
+		# libnl, libndp are only used for executables, not libraries
+		myconf+=( LIB{NL,NDP}_{CFLAGS,LIBS}=' ' )
+	fi
+
+	# TODO: enable wimax when we have a libnl:3 compatible revision of it
+	# wimax will be removed, bug #522822
+	# ifnet plugin always disabled until someone volunteers to actively
+	# maintain and fix it
+	ECONF_SOURCE=${S} \
+	gnome2_src_configure \
+		--disable-more-warnings \
+		--disable-static \
+		--localstatedir=/var \
+		--disable-lto \
+		--disable-config-plugin-ibft \
+		--disable-ifnet \
+		--without-netconfig \
+		--with-dbus-sys-dir=/etc/dbus-1/system.d \
+		--with-udev-dir="$(get_udevdir)" \
+		--with-config-plugins-default=keyfile \
+		--with-iptables=/sbin/iptables \
+		$(multilib_native_with libsoup) \
+		$(multilib_native_enable concheck) \
+		--with-crypto=$(usex nss nss gnutls) \
+		--with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex consolekit consolekit no)) \
+		--with-suspend-resume=$(multilib_native_usex systemd systemd upower) \
+		$(multilib_native_use_enable bluetooth bluez5-dun) \
+		$(multilib_native_use_enable introspection) \
+		$(multilib_native_use_enable ppp) \
+		--disable-wimax \
+		$(use_with dhclient) \
+		$(use_with dhcpcd) \
+		$(multilib_native_use_with modemmanager modem-manager-1) \
+		$(multilib_native_use_with ncurses nmtui) \
+		$(multilib_native_use_with resolvconf) \
+		$(multilib_native_use_with selinux) \
+		$(multilib_native_use_enable teamd teamdctl) \
+		$(multilib_native_use_enable test tests) \
+		$(multilib_native_use_enable vala) \
+		--without-valgrind \
+		$(multilib_native_use_with wext) \
+		$(multilib_native_use_enable wifi) \
+		"${myconf[@]}"
+
+	# work-around gtk-doc out-of-source brokedness
+	if multilib_is_native_abi; then
+		local d
+		for d in api libnm libnm-util libnm-glib; do
+			ln -s "${S}"/docs/${d}/html docs/${d}/html || die
+		done
+	fi
+}
+
+multilib_src_compile() {
+	if multilib_is_native_abi; then
+		emake
+	else
+		emake all-am
+		emake -C include
+		emake -C introspection # generated headers, needed for libnm
+		emake -C libnm-core
+		emake -C libnm
+		emake -C libnm-util
+		emake -C libnm-glib
+	fi
+}
+
+multilib_src_test() {
+	if multilib_is_native_abi; then
+		python_setup
+		Xemake check
+	fi
+}
+
+multilib_src_install() {
+	if multilib_is_native_abi; then
+		# Install completions at proper place, bug #465100
+		gnome2_src_install completiondir="$(get_bashcompdir)"
+	else
+		emake DESTDIR="${D}" install-am
+		emake DESTDIR="${D}" install -C include
+		emake DESTDIR="${D}" install -C introspection
+		emake DESTDIR="${D}" install -C libnm-core
+		emake DESTDIR="${D}" install -C libnm
+		emake DESTDIR="${D}" install -C libnm-util
+		emake DESTDIR="${D}" install -C libnm-glib
+	fi
+}
+
+multilib_src_install_all() {
+	! use systemd && readme.gentoo_create_doc
+
+	newinitd "${FILESDIR}/init.d.NetworkManager" NetworkManager
+	newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
+
+	# /var/run/NetworkManager is used by some distros, but not by Gentoo
+	rmdir -v "${ED}/var/run/NetworkManager" || die "rmdir failed"
+	rmdir -v "${ED}/var/run" || die "rmdir failed"
+
+	# Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
+	keepdir /etc/NetworkManager/dispatcher.d
+
+	# Provide openrc net dependency only when nm is connected
+	exeinto /etc/NetworkManager/dispatcher.d
+	newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
+	sed -e "s:@EPREFIX@:${EPREFIX}:g" \
+		-i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
+
+	keepdir /etc/NetworkManager/system-connections
+	chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
+
+	# Allow users in plugdev group to modify system connections
+	insinto /usr/share/polkit-1/rules.d/
+	doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
+}
+
+pkg_postinst() {
+	gnome2_pkg_postinst
+	! use systemd && readme.gentoo_print_elog
+
+	if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
+		ewarn "The ${PN} system configuration file has moved to a new location."
+		ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
+		ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
+		ewarn
+		ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
+	fi
+
+	# The polkit rules file moved to /usr/share
+	old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
+	if [[ -f "${old_rules}" ]]; then
+		case "$(md5sum ${old_rules})" in
+		  574d0cfa7e911b1f7792077003060240* )
+			# Automatically delete the old rules.d file if the user did not change it
+			elog
+			elog "Removing old ${old_rules} ..."
+			rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
+			;;
+		  * )
+			elog "The ${old_rules}"
+			elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
+			elog "If you edited ${old_rules}"
+			elog "without changing its behavior, you may want to remove it."
+			;;
+		esac
+	fi
+
+	# ifnet plugin was disabled for systemd users with 0.9.8.6 version
+	# and for all people with 0.9.10.0-r1 (see ChangeLog for full explanations)
+	if use systemd; then
+		if ! version_is_at_least 0.9.8.6 ${REPLACING_VERSIONS}; then
+			ewarn "Ifnet plugin won't be used with systemd support enabled"
+			ewarn "as it is meant to be used with openRC and can cause collisions"
+			ewarn "(like bug #485658)."
+			ewarn "Because of this, you will likely need to reconfigure some of"
+			ewarn "your networks. To do this you can rely on Gnome control center,"
+			ewarn "nm-connection-editor or nmtui tools for example once updated"
+			ewarn "NetworkManager version is installed."
+		fi
+	else
+		if ! version_is_at_least 0.9.10.0-r1 ${REPLACING_VERSIONS}; then
+			ewarn "Ifnet plugin is now disabled because of it being unattended"
+			ewarn "and unmaintained for a long time, leading to some unfixed bugs"
+			ewarn "and new problems appearing. We will now use upstream 'keyfile'"
+			ewarn "plugin."
+			ewarn "Because of this, you will likely need to reconfigure some of"
+			ewarn "your networks. To do this you can rely on Gnome control center,"
+			ewarn "nm-connection-editor or nmtui tools for example once updated"
+			ewarn "NetworkManager version is installed."
+		fi
+	fi
+
+	# NM fallbacks to plugin specified at compile time (upstream bug #738611)
+	# but still show a warning to remember people to have cleaner config file
+	if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
+		if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
+			ewarn
+			ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
+			ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
+			ewarn
+		fi
+	fi
+
+	# NM shows lots of errors making nmcli neither unusable, bug #528748 upstream bug #690457
+	if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
+		ewarn "You have psk-flags=1 setting in above files, you will need to"
+		ewarn "either reconfigure affected networks or, at least, set the flag"
+		ewarn "value to '0'."
+	fi
+}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/
@ 2016-07-08 20:44 Alexandre Rostovtsev
  0 siblings, 0 replies; 14+ messages in thread
From: Alexandre Rostovtsev @ 2016-07-08 20:44 UTC (permalink / raw
  To: gentoo-commits

commit:     2dc98b75db10d30cc56d89e9b4188cb68b71cd6c
Author:     Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
AuthorDate: Fri Jul  8 20:41:52 2016 +0000
Commit:     Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
CommitDate: Fri Jul  8 20:43:22 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2dc98b75

net-misc/networkmanager: fix build when USE="consolekit -systemd" (bug #588278)

Thanks to jorgicio for finding the patch.

Package-Manager: portage-2.3.0

 ...anager-1.2.2-sleep-monitor-upower-include.patch | 30 ++++++++++++++++++++++
 .../networkmanager/networkmanager-1.2.2.ebuild     |  3 +++
 2 files changed, 33 insertions(+)

diff --git a/net-misc/networkmanager/files/networkmanager-1.2.2-sleep-monitor-upower-include.patch b/net-misc/networkmanager/files/networkmanager-1.2.2-sleep-monitor-upower-include.patch
new file mode 100644
index 0000000..52a21c4
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-1.2.2-sleep-monitor-upower-include.patch
@@ -0,0 +1,30 @@
+From 10ba492047b1ad80adeeb878e7f155a13638da7f Mon Sep 17 00:00:00 2001
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Wed, 18 May 2016 10:43:51 +0200
+Subject: [PATCH] sleep-monitor-upower: add missing include
+
+Otherwise building fails with:
+
+  nm-sleep-monitor-upower.c:132:45: error: expected declaration specifiers or '...' before 'nm_sleep_monitor_get'
+  nm-sleep-monitor-upower.c:132:67: error: expected declaration specifiers or '...' before '(' token
+
+https://mail.gnome.org/archives/networkmanager-list/2016-May/msg00053.html
+---
+ src/nm-sleep-monitor-upower.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/nm-sleep-monitor-upower.c b/src/nm-sleep-monitor-upower.c
+index 5f0ff24..8d07190 100644
+--- a/src/nm-sleep-monitor-upower.c
++++ b/src/nm-sleep-monitor-upower.c
+@@ -24,6 +24,7 @@
+ #include <sys/stat.h>
+ 
+ #include "nm-core-internal.h"
++#include "NetworkManagerUtils.h"
+ 
+ #include "nm-sleep-monitor.h"
+ 
+-- 
+2.9.0
+

diff --git a/net-misc/networkmanager/networkmanager-1.2.2.ebuild b/net-misc/networkmanager/networkmanager-1.2.2.ebuild
index c366987..aec8280 100644
--- a/net-misc/networkmanager/networkmanager-1.2.2.ebuild
+++ b/net-misc/networkmanager/networkmanager-1.2.2.ebuild
@@ -117,6 +117,9 @@ src_prepare() {
 	# Don't build examples, they are not needed and can cause build failure
 	sed -e '/^\s*examples\s*\\/d' -i Makefile.{am,in} || die
 
+	# Upstream patches from 1.2 branch
+	eapply "${FILESDIR}/${P}-sleep-monitor-upower-include.patch" #588278
+
 	use vala && vala_src_prepare
 	gnome2_src_prepare
 }


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/
@ 2016-07-09 18:39 Pacho Ramos
  0 siblings, 0 replies; 14+ messages in thread
From: Pacho Ramos @ 2016-07-09 18:39 UTC (permalink / raw
  To: gentoo-commits

commit:     5f1ed4ef8ff99ac6d8814f38d4f817a9425fd776
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sat Jul  9 18:37:40 2016 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sat Jul  9 18:39:29 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f1ed4ef

net-misc/networkmanager: Drop old

Package-Manager: portage-2.3.0

 net-misc/networkmanager/Manifest                   |   2 -
 .../files/networkmanager-1.0.10-vpn-routes.patch   |  51 ---
 .../files/networkmanager-1.0.6-vpn-mtu.patch       |  53 ----
 .../networkmanager/networkmanager-1.0.10-r1.ebuild | 346 --------------------
 .../networkmanager/networkmanager-1.0.6-r1.ebuild  | 348 ---------------------
 5 files changed, 800 deletions(-)

diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest
index ddbbb88..bfa1133 100644
--- a/net-misc/networkmanager/Manifest
+++ b/net-misc/networkmanager/Manifest
@@ -1,4 +1,2 @@
-DIST NetworkManager-1.0.10.tar.xz 3488600 SHA256 1bcfce8441dfd9f432a100d06b54f3831a2275cccc3b74b1b4c09a011e179fbc SHA512 0c5df37565c1ec6fafe60fad0ede34d28e7d87200e338489f35eec18c3e88920f47d58eae5a8aba5caeddb26a6f7074e79e8f6a7d4f7584ce3cc9be0df99f1ef WHIRLPOOL e1a0158d69e444224c25a6287bbe4f3b89d623c85f39a59eb2aeffca83b38cd85ccf067af14e5ff79b23b4346f606e15e3d33b9d097c7ef8d50054fdc5056379
 DIST NetworkManager-1.0.12.tar.xz 3490836 SHA256 3a470f8c60109b1acb5784ddc2423501706b5fe34c793a6faee87e591eb04a9e SHA512 926c0139dc7ade7bbc512f0d2e386a42a278aceff68996bc3a18fb1940f5d516f0ff2768459d6f50fd5669d72c15202307396bb3cf8b67c3dbac19db484b971c WHIRLPOOL 6178af61fb30a7e8b72cc05296a014a5be5b10fed41cd5385f0bebae1fa22519c83cf8c359479372f063fc2b891715015454c53cd4f1f1516fc03bca76a552ac
-DIST NetworkManager-1.0.6.tar.xz 3381092 SHA256 38ea002403e3b884ffa9aae25aea431d2a8420f81f4919761c83fb92648254bd SHA512 74e8f91bbd9a70f1764b06c729717e091d2be0a8e316fe1b6235e644b65f43add5214be7a1100fe9d30b1511f4a00b9892dce79bb8ba0f0b0d57089d2ba6ddbb WHIRLPOOL 5f1d8c905e4aaa78c742c16e773f8fdbcdb2771edf36565f6b419af457776084573aa43b384ba32885992e76b399d4f2fc7dc94ad4295ac28dcfa3d6b6994b97
 DIST NetworkManager-1.2.2.tar.xz 3752592 SHA256 41d8082e027f58bb5fa4181f93742606ab99c659794a18e2823eff22df0eecd9 SHA512 5360f22073dc78d5ff440a3cae8126f263c8ba8230eb77ea2b421ff26e1615c0a44b00c21abddcd0b50a38634b1a44d15c24becb72c735b5abe3ee7bbc3211d5 WHIRLPOOL 9324725793090d551e48e158c46ca283e120d4ac210ad0f14a800442fa62db17c448629f51bb7e18d0b4c602bdf7ebbb8a65cd9e1ea82b6384e8019652403683

diff --git a/net-misc/networkmanager/files/networkmanager-1.0.10-vpn-routes.patch b/net-misc/networkmanager/files/networkmanager-1.0.10-vpn-routes.patch
deleted file mode 100644
index b7c2be6..0000000
--- a/net-misc/networkmanager/files/networkmanager-1.0.10-vpn-routes.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 11aa07ed939193e85516c287a57dee1837242972 Mon Sep 17 00:00:00 2001
-From: Thomas Haller <thaller@redhat.com>
-Date: Mon, 4 Jan 2016 18:54:26 +0100
-Subject: core: fix failure to configure routes due to wrong device-route for
- IPv4 peer-addresses
-
-As in the case of a OpenVPN connection, we might add an address like:
-  10.8.0.58/32 ptp 10.8.0.57
-
-In this case, kernel would automatically add a device-route like:
-  10.8.0.57/32 via 0.0.0.0 dev 32 metric 0 mss 0 src rtprot-kernel scope link pref-src 10.8.0.58
-
-nm_ip4_config_commit() checks all IP addresses to figure out
-the present device-routes. Then the routes are synced by NMRouteManager.
-Due to a bug, we would not consider the peer-address, but the local-address
-and configure a route 10.8.0.58/32, instead of 10.8.0.57/32.
-
-That stays mostly unnoticed, because usually the peer and the local-address are
-in the same subnet, so that there is no difference (/32 is an example of the
-peer-address being in a different subnet).
-
-It also seems that due to a bug fixed by df4e5357521 this issue didn't surface.
-Probably because we would not notice the 10.8.0.57/32 right away and thus
-nm_route_manager_ip4_route_sync() would not wrongly delete it.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=759892
-
-https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809195
-https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809494
-https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809526
-https://bugs.archlinux.org/task/47535
-https://bugzilla.redhat.com/show_bug.cgi?id=1294309
-https://mail.gnome.org/archives/networkmanager-list/2015-December/msg00059.html
-
-diff --git a/src/nm-ip4-config.c b/src/nm-ip4-config.c
-index f625d35..61e29af 100644
---- a/src/nm-ip4-config.c
-+++ b/src/nm-ip4-config.c
-@@ -298,7 +298,8 @@ nm_ip4_config_commit (const NMIP4Config *config, int ifindex, gboolean routes_fu
- 
- 				route.ifindex = ifindex;
- 				route.source = NM_IP_CONFIG_SOURCE_KERNEL;
--				route.network = nm_utils_ip4_address_clear_host_address (addr->address, addr->plen);
-+				route.network = nm_utils_ip4_address_clear_host_address (addr->peer_address ? : addr->address,
-+				                                                         addr->plen);
- 				route.plen = addr->plen;
- 				route.pref_src = addr->address;
- 				route.metric = default_route_metric;
--- 
-cgit v0.10.2
-

diff --git a/net-misc/networkmanager/files/networkmanager-1.0.6-vpn-mtu.patch b/net-misc/networkmanager/files/networkmanager-1.0.6-vpn-mtu.patch
deleted file mode 100644
index 6159972..0000000
--- a/net-misc/networkmanager/files/networkmanager-1.0.6-vpn-mtu.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 105e30efbaf422401902575749efdcd18706ace1 Mon Sep 17 00:00:00 2001
-From: Lubomir Rintel <lkundrak@v3.sk>
-Date: Mon, 28 Sep 2015 20:57:09 +0200
-Subject: vpn-connection: set the MTU for the VPN IP interface
-
-The 9b79e6c73 commit moved setting of the MTU from IP4Config to NMDevice, but
-VPN connections don't have a NMDevice instance (yet). Set the MTU also from the
-VPN connection. Also, copying of the MTU to the IP4Config is no longer needed
-as the ip4_config_commit no longer sets the MTU.
-
-Fixes: 9b79e6c732ffb2fb105647c1465070d36a6cc180
-
-https://bugzilla.gnome.org/show_bug.cgi?id=754781
-(cherry picked from commit e0fa48f224abcb73a1a129f10050f7cd942ee629)
-
-diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c
-index f0e6149..e2d3103 100644
---- a/src/vpn-manager/nm-vpn-connection.c
-+++ b/src/vpn-manager/nm-vpn-connection.c
-@@ -980,6 +980,9 @@ nm_vpn_connection_apply_config (NMVpnConnection *connection)
- 			                           TRUE))
- 				return FALSE;
- 		}
-+
-+		if (priv->mtu && priv->mtu != nm_platform_link_get_mtu (NM_PLATFORM_GET, priv->ip_ifindex))
-+			nm_platform_link_set_mtu (NM_PLATFORM_GET, priv->ip_ifindex, priv->mtu);
- 	}
- 
- 	apply_parent_device_config (connection);
-@@ -1149,10 +1152,6 @@ process_generic_config (NMVpnConnection *connection,
- 		}
- 	}
- 
--	/* MTU; this is a per-connection value, though NM's API treats it
--	 * like it's IP4-specific. So we store it for now and retrieve it
--	 * later in ip4_config_get.
--	 */
- 	priv->mtu = 0;
- 	val = (GValue *) g_hash_table_lookup (config_hash, NM_VPN_PLUGIN_CONFIG_MTU);
- 	if (val) {
-@@ -1328,9 +1327,6 @@ nm_vpn_connection_ip4_config_get (DBusGProxy *proxy,
- 	if (val)
- 		nm_ip4_config_set_mss (config, g_value_get_uint (val));
- 
--	if (priv->mtu)
--		nm_ip4_config_set_mtu (config, priv->mtu, NM_IP_CONFIG_SOURCE_VPN);
--
- 	val = (GValue *) g_hash_table_lookup (config_hash, NM_VPN_PLUGIN_IP4_CONFIG_DOMAIN);
- 	if (val)
- 		nm_ip4_config_add_domain (config, g_value_get_string (val));
--- 
-cgit v0.10.2
-

diff --git a/net-misc/networkmanager/networkmanager-1.0.10-r1.ebuild b/net-misc/networkmanager/networkmanager-1.0.10-r1.ebuild
deleted file mode 100644
index ac5e50a..0000000
--- a/net-misc/networkmanager/networkmanager-1.0.10-r1.ebuild
+++ /dev/null
@@ -1,346 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-GCONF_DEBUG="no"
-GNOME_ORG_MODULE="NetworkManager"
-GNOME2_LA_PUNT="yes"
-VALA_USE_DEPEND="vapigen"
-PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
-
-inherit autotools bash-completion-r1 eutils gnome2 linux-info multilib python-any-r1 systemd \
-	user readme.gentoo toolchain-funcs vala versionator virtualx udev multilib-minimal
-
-DESCRIPTION="A set of co-operative tools that make networking simple and straightforward"
-HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
-
-LICENSE="GPL-2+"
-SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
-
-IUSE="bluetooth connection-sharing consolekit +dhclient dhcpcd gnutls +introspection \
-kernel_linux +nss +modemmanager ncurses +ppp resolvconf selinux systemd teamd test \
-vala +wext +wifi zeroconf" # wimax
-
-KEYWORDS="~alpha amd64 arm ~arm64 ~ia64 ~ppc ppc64 ~sparc x86"
-
-REQUIRED_USE="
-	modemmanager? ( ppp )
-	wext? ( wifi )
-	^^ ( nss gnutls )
-	^^ ( dhclient dhcpcd )
-"
-
-# gobject-introspection-0.10.3 is needed due to gnome bug 642300
-# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
-# TODO: Qt support?
-COMMON_DEPEND="
-	>=sys-apps/dbus-1.2[${MULTILIB_USEDEP}]
-	>=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}]
-	>=dev-libs/glib-2.37.6:2[${MULTILIB_USEDEP}]
-	>=dev-libs/libnl-3.2.8:3=
-	>=sys-auth/polkit-0.106
-	net-libs/libndp
-	>=net-libs/libsoup-2.40:2.4=
-	net-misc/iputils
-	sys-libs/readline:0
-	>=virtual/libgudev-165:=[${MULTILIB_USEDEP}]
-	bluetooth? ( >=net-wireless/bluez-5 )
-	connection-sharing? (
-		net-dns/dnsmasq[dhcp]
-		net-firewall/iptables )
-	gnutls? (
-		dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
-		net-libs/gnutls:=[${MULTILIB_USEDEP}] )
-	modemmanager? ( >=net-misc/modemmanager-0.7.991 )
-	ncurses? ( >=dev-libs/newt-0.52.15 )
-	nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
-	dhclient? ( >=net-misc/dhcp-4[client] )
-	dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 )
-	introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
-	ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] net-dialup/rp-pppoe )
-	resolvconf? ( net-dns/openresolv )
-	systemd? ( >=sys-apps/systemd-209:0= )
-	!systemd? ( || ( sys-power/upower sys-power/upower-pm-utils ) )
-	teamd? ( >=net-misc/libteam-1.9 )
-	zeroconf? ( net-dns/avahi:=[autoipd] )
-"
-RDEPEND="${COMMON_DEPEND}
-	consolekit? ( sys-auth/consolekit )
-	wifi? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
-"
-DEPEND="${COMMON_DEPEND}
-	dev-util/gdbus-codegen
-	dev-util/gtk-doc-am
-	>=dev-util/intltool-0.40
-	>=sys-devel/gettext-0.17
-	>=sys-kernel/linux-headers-2.6.29
-	virtual/pkgconfig
-	vala? ( $(vala_depend) )
-	test? (
-		$(python_gen_any_dep '
-			dev-python/dbus-python[${PYTHON_USEDEP}]
-			dev-python/pygobject:2[${PYTHON_USEDEP}]')
-	)
-"
-
-sysfs_deprecated_check() {
-	ebegin "Checking for SYSFS_DEPRECATED support"
-
-	if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
-		eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
-		eerror "or NetworkManager will not work correctly."
-		eerror "See https://bugs.gentoo.org/333639 for more info."
-		die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
-	fi
-	eend $?
-}
-
-pkg_pretend() {
-	if use kernel_linux; then
-		get_version
-		if linux_config_exists; then
-			sysfs_deprecated_check
-		else
-			ewarn "Was unable to determine your kernel .config"
-			ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
-			ewarn "See https://bugs.gentoo.org/333639 for more info."
-		fi
-
-	fi
-}
-
-pkg_setup() {
-	enewgroup plugdev
-}
-
-src_prepare() {
-	DOC_CONTENTS="To modify system network connections without needing to enter the
-		root password, add your user account to the 'plugdev' group."
-
-	# Force use of /run, avoid eautoreconf, upstream bug #737139, fixed in 'master'
-	sed -e 's:$localstatedir/run/:/run/:' -i configure || die
-
-	# Don't build examples, they are not needed and can cause build failure
-	sed -e '/^\s*examples\s*\\/d' -i Makefile.{am,in} || die
-
-	# core: fix failure to configure routes due to wrong device-route for IPv4 peer-addresses
-	# (from 1.0 branch)
-	epatch "${FILESDIR}"/${P}-vpn-routes.patch
-
-	use vala && vala_src_prepare
-	epatch_user # don't remove, users often want custom patches for NM
-	eautoreconf
-	gnome2_src_prepare
-}
-
-multilib_src_configure() {
-	local myconf=()
-
-	# Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
-	if use ppp; then
-		local PPPD_VER=`best_version net-dialup/ppp`
-		PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
-		PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
-		myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
-	fi
-
-	# unit files directory needs to be passed only when systemd is enabled,
-	# otherwise systemd support is not disabled completely, bug #524534
-	use systemd && myconf+=( "$(systemd_with_unitdir)" )
-
-	if multilib_is_native_abi; then
-		# work-around man out-of-source brokenness, must be done before configure
-		mkdir man || die
-		find "${S}"/man -name '*.?' -exec ln -s {} man/ ';' || die
-	else
-		# libnl, libndp are only used for executables, not libraries
-		myconf+=( LIB{NL,NDP}_{CFLAGS,LIBS}=' ' )
-	fi
-
-	# TODO: enable wimax when we have a libnl:3 compatible revision of it
-	# wimax will be removed, bug #522822
-	# ifnet plugin always disabled until someone volunteers to actively
-	# maintain and fix it
-	ECONF_SOURCE=${S} \
-	gnome2_src_configure \
-		--disable-more-warnings \
-		--disable-static \
-		--localstatedir=/var \
-		--disable-lto \
-		--disable-config-plugin-ibft \
-		--disable-ifnet \
-		--without-netconfig \
-		--with-dbus-sys-dir=/etc/dbus-1/system.d \
-		--with-udev-dir="$(get_udevdir)" \
-		--with-config-plugins-default=keyfile \
-		--with-iptables=/sbin/iptables \
-		$(multilib_native_with libsoup) \
-		$(multilib_native_enable concheck) \
-		--with-crypto=$(usex nss nss gnutls) \
-		--with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex consolekit consolekit no)) \
-		--with-suspend-resume=$(multilib_native_usex systemd systemd upower) \
-		$(multilib_native_use_enable bluetooth bluez5-dun) \
-		$(multilib_native_use_enable introspection) \
-		$(multilib_native_use_enable ppp) \
-		--disable-wimax \
-		$(use_with dhclient) \
-		$(use_with dhcpcd) \
-		$(multilib_native_use_with modemmanager modem-manager-1) \
-		$(multilib_native_use_with ncurses nmtui) \
-		$(multilib_native_use_with resolvconf) \
-		$(multilib_native_use_with selinux) \
-		$(multilib_native_use_enable teamd teamdctl) \
-		$(multilib_native_use_enable test tests) \
-		$(multilib_native_use_enable vala) \
-		--without-valgrind \
-		$(multilib_native_use_with wext) \
-		$(multilib_native_use_enable wifi) \
-		"${myconf[@]}"
-
-	# work-around gtk-doc out-of-source brokedness
-	if multilib_is_native_abi; then
-		local d
-		for d in api libnm libnm-util libnm-glib; do
-			ln -s "${S}"/docs/${d}/html docs/${d}/html || die
-		done
-	fi
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi; then
-		emake
-	else
-		emake all-am
-		emake -C include
-		emake -C introspection # generated headers, needed for libnm
-		emake -C libnm-core
-		emake -C libnm
-		emake -C libnm-util
-		emake -C libnm-glib
-	fi
-}
-
-multilib_src_test() {
-	if multilib_is_native_abi; then
-		python_setup
-		Xemake check
-	fi
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi; then
-		# Install completions at proper place, bug #465100
-		gnome2_src_install completiondir="$(get_bashcompdir)"
-	else
-		emake DESTDIR="${D}" install-am
-		emake DESTDIR="${D}" install -C include
-		emake DESTDIR="${D}" install -C introspection
-		emake DESTDIR="${D}" install -C libnm-core
-		emake DESTDIR="${D}" install -C libnm
-		emake DESTDIR="${D}" install -C libnm-util
-		emake DESTDIR="${D}" install -C libnm-glib
-	fi
-}
-
-multilib_src_install_all() {
-	! use systemd && readme.gentoo_create_doc
-
-	newinitd "${FILESDIR}/init.d.NetworkManager" NetworkManager
-	newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
-
-	# /var/run/NetworkManager is used by some distros, but not by Gentoo
-	rmdir -v "${ED}/var/run/NetworkManager" || die "rmdir failed"
-	rmdir -v "${ED}/var/run" || die "rmdir failed"
-
-	# Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
-	keepdir /etc/NetworkManager/dispatcher.d
-
-	# Provide openrc net dependency only when nm is connected
-	exeinto /etc/NetworkManager/dispatcher.d
-	newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
-	sed -e "s:@EPREFIX@:${EPREFIX}:g" \
-		-i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
-
-	keepdir /etc/NetworkManager/system-connections
-	chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
-
-	# Allow users in plugdev group to modify system connections
-	insinto /usr/share/polkit-1/rules.d/
-	doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
-}
-
-pkg_postinst() {
-	gnome2_pkg_postinst
-	! use systemd && readme.gentoo_print_elog
-
-	if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
-		ewarn "The ${PN} system configuration file has moved to a new location."
-		ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
-		ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
-		ewarn
-		ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
-	fi
-
-	# The polkit rules file moved to /usr/share
-	old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
-	if [[ -f "${old_rules}" ]]; then
-		case "$(md5sum ${old_rules})" in
-		  574d0cfa7e911b1f7792077003060240* )
-			# Automatically delete the old rules.d file if the user did not change it
-			elog
-			elog "Removing old ${old_rules} ..."
-			rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
-			;;
-		  * )
-			elog "The ${old_rules}"
-			elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
-			elog "If you edited ${old_rules}"
-			elog "without changing its behavior, you may want to remove it."
-			;;
-		esac
-	fi
-
-	# ifnet plugin was disabled for systemd users with 0.9.8.6 version
-	# and for all people with 0.9.10.0-r1 (see ChangeLog for full explanations)
-	if use systemd; then
-		if ! version_is_at_least 0.9.8.6 ${REPLACING_VERSIONS}; then
-			ewarn "Ifnet plugin won't be used with systemd support enabled"
-			ewarn "as it is meant to be used with openRC and can cause collisions"
-			ewarn "(like bug #485658)."
-			ewarn "Because of this, you will likely need to reconfigure some of"
-			ewarn "your networks. To do this you can rely on Gnome control center,"
-			ewarn "nm-connection-editor or nmtui tools for example once updated"
-			ewarn "NetworkManager version is installed."
-		fi
-	else
-		if ! version_is_at_least 0.9.10.0-r1 ${REPLACING_VERSIONS}; then
-			ewarn "Ifnet plugin is now disabled because of it being unattended"
-			ewarn "and unmaintained for a long time, leading to some unfixed bugs"
-			ewarn "and new problems appearing. We will now use upstream 'keyfile'"
-			ewarn "plugin."
-			ewarn "Because of this, you will likely need to reconfigure some of"
-			ewarn "your networks. To do this you can rely on Gnome control center,"
-			ewarn "nm-connection-editor or nmtui tools for example once updated"
-			ewarn "NetworkManager version is installed."
-		fi
-	fi
-
-	# NM fallbacks to plugin specified at compile time (upstream bug #738611)
-	# but still show a warning to remember people to have cleaner config file
-	if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
-		if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
-			ewarn
-			ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
-			ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
-			ewarn
-		fi
-	fi
-
-	# NM shows lots of errors making nmcli neither unusable, bug #528748 upstream bug #690457
-	if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
-		ewarn "You have psk-flags=1 setting in above files, you will need to"
-		ewarn "either reconfigure affected networks or, at least, set the flag"
-		ewarn "value to '0'."
-	fi
-}

diff --git a/net-misc/networkmanager/networkmanager-1.0.6-r1.ebuild b/net-misc/networkmanager/networkmanager-1.0.6-r1.ebuild
deleted file mode 100644
index facc263..0000000
--- a/net-misc/networkmanager/networkmanager-1.0.6-r1.ebuild
+++ /dev/null
@@ -1,348 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-GCONF_DEBUG="no"
-GNOME_ORG_MODULE="NetworkManager"
-GNOME2_LA_PUNT="yes"
-VALA_USE_DEPEND="vapigen"
-PYTHON_COMPAT=( python{2_7,3_3,3_4} )
-
-inherit autotools bash-completion-r1 eutils gnome2 linux-info multilib python-any-r1 systemd \
-	user readme.gentoo toolchain-funcs vala versionator virtualx udev multilib-minimal
-
-DESCRIPTION="Universal network configuration daemon for laptops, desktops, servers and virtualization hosts"
-HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
-
-LICENSE="GPL-2+"
-SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
-
-IUSE="bluetooth connection-sharing consolekit +dhclient dhcpcd gnutls +introspection \
-kernel_linux +nss +modemmanager ncurses +ppp resolvconf selinux systemd teamd test \
-vala +wext +wifi zeroconf" # wimax
-
-KEYWORDS="~alpha amd64 arm ~arm64 ~ia64 ppc ppc64 ~sparc x86"
-
-REQUIRED_USE="
-	modemmanager? ( ppp )
-	wext? ( wifi )
-	^^ ( nss gnutls )
-	^^ ( dhclient dhcpcd )
-"
-
-# gobject-introspection-0.10.3 is needed due to gnome bug 642300
-# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
-# TODO: Qt support?
-COMMON_DEPEND="
-	>=sys-apps/dbus-1.2[${MULTILIB_USEDEP}]
-	>=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}]
-	>=dev-libs/glib-2.37.6:2[${MULTILIB_USEDEP}]
-	>=dev-libs/libnl-3.2.8:3=
-	>=sys-auth/polkit-0.106
-	net-libs/libndp
-	>=net-libs/libsoup-2.26:2.4=
-	net-misc/iputils
-	sys-libs/readline:0
-	>=virtual/libgudev-165:=[${MULTILIB_USEDEP}]
-	bluetooth? ( >=net-wireless/bluez-5 )
-	connection-sharing? (
-		net-dns/dnsmasq[dhcp]
-		net-firewall/iptables )
-	gnutls? (
-		dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
-		net-libs/gnutls:=[${MULTILIB_USEDEP}] )
-	modemmanager? ( >=net-misc/modemmanager-0.7.991 )
-	ncurses? ( >=dev-libs/newt-0.52.15 )
-	nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
-	dhclient? ( >=net-misc/dhcp-4[client] )
-	dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 )
-	introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
-	ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] net-dialup/rp-pppoe )
-	resolvconf? ( net-dns/openresolv )
-	systemd? ( >=sys-apps/systemd-209:0= )
-	!systemd? ( || ( sys-power/upower sys-power/upower-pm-utils ) )
-	teamd? ( >=net-misc/libteam-1.9 )
-	zeroconf? ( net-dns/avahi:=[autoipd] )
-"
-RDEPEND="${COMMON_DEPEND}
-	consolekit? ( sys-auth/consolekit )
-	wifi? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
-"
-DEPEND="${COMMON_DEPEND}
-	dev-util/gdbus-codegen
-	dev-util/gtk-doc-am
-	>=dev-util/intltool-0.40
-	>=sys-devel/gettext-0.17
-	>=sys-kernel/linux-headers-2.6.29
-	virtual/pkgconfig
-	vala? ( $(vala_depend) )
-	test? (
-		$(python_gen_any_dep '
-			dev-python/dbus-python[${PYTHON_USEDEP}]
-			dev-python/pygobject:2[${PYTHON_USEDEP}]')
-	)
-"
-
-sysfs_deprecated_check() {
-	ebegin "Checking for SYSFS_DEPRECATED support"
-
-	if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
-		eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
-		eerror "or NetworkManager will not work correctly."
-		eerror "See https://bugs.gentoo.org/333639 for more info."
-		die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
-	fi
-	eend $?
-}
-
-pkg_pretend() {
-	if use kernel_linux; then
-		get_version
-		if linux_config_exists; then
-			sysfs_deprecated_check
-		else
-			ewarn "Was unable to determine your kernel .config"
-			ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
-			ewarn "See https://bugs.gentoo.org/333639 for more info."
-		fi
-
-	fi
-}
-
-pkg_setup() {
-	enewgroup plugdev
-}
-
-src_prepare() {
-	DOC_CONTENTS="To modify system network connections without needing to enter the
-		root password, add your user account to the 'plugdev' group."
-
-	# vpn-connection: set the MTU for the VPN IP interface (from nm-1.0 branch)
-	epatch "${FILESDIR}"/${P}-vpn-mtu.patch
-
-	# Force use of /run, avoid eautoreconf, upstream bug #737139, fixed in 'master'
-	sed -e 's:$localstatedir/run/:/run/:' -i configure || die
-
-	# Don't build examples, they are not needed and can cause build failure
-	sed -e '/^\s*examples\s*\\/d' -i Makefile.{am,in} || die
-
-	use vala && vala_src_prepare
-
-	epatch_user # don't remove, users often want custom patches for NM
-
-	eautoreconf
-
-	gnome2_src_prepare
-}
-
-multilib_src_configure() {
-	local myconf=()
-
-	# Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
-	if use ppp; then
-		local PPPD_VER=`best_version net-dialup/ppp`
-		PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
-		PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
-		myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
-	fi
-
-	# unit files directory needs to be passed only when systemd is enabled,
-	# otherwise systemd support is not disabled completely, bug #524534
-	use systemd && myconf+=( "$(systemd_with_unitdir)" )
-
-	if multilib_is_native_abi; then
-		# work-around man out-of-source brokenness, must be done before configure
-		mkdir man || die
-		find "${S}"/man -name '*.?' -exec ln -s {} man/ ';' || die
-	else
-		# libnl, libndp are only used for executables, not libraries
-		myconf+=( LIB{NL,NDP}_{CFLAGS,LIBS}=' ' )
-	fi
-
-	# TODO: enable wimax when we have a libnl:3 compatible revision of it
-	# wimax will be removed, bug #522822
-	# ifnet plugin always disabled until someone volunteers to actively
-	# maintain and fix it
-	ECONF_SOURCE=${S} \
-	gnome2_src_configure \
-		--disable-more-warnings \
-		--disable-static \
-		--localstatedir=/var \
-		--disable-lto \
-		--disable-config-plugin-ibft \
-		--disable-ifnet \
-		--without-netconfig \
-		--with-dbus-sys-dir=/etc/dbus-1/system.d \
-		--with-udev-dir="$(get_udevdir)" \
-		--with-config-plugins-default=keyfile \
-		--with-iptables=/sbin/iptables \
-		$(multilib_native_with libsoup) \
-		$(multilib_native_enable concheck) \
-		--with-crypto=$(usex nss nss gnutls) \
-		--with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex consolekit consolekit no)) \
-		--with-suspend-resume=$(multilib_native_usex systemd systemd upower) \
-		$(multilib_native_use_enable bluetooth bluez5-dun) \
-		$(multilib_native_use_enable introspection) \
-		$(multilib_native_use_enable ppp) \
-		--disable-wimax \
-		$(use_with dhclient) \
-		$(use_with dhcpcd) \
-		$(multilib_native_use_with modemmanager modem-manager-1) \
-		$(multilib_native_use_with ncurses nmtui) \
-		$(multilib_native_use_with resolvconf) \
-		$(multilib_native_use_with selinux) \
-		$(multilib_native_use_enable teamd teamdctl) \
-		$(multilib_native_use_enable test tests) \
-		$(multilib_native_use_enable vala) \
-		--without-valgrind \
-		$(multilib_native_use_with wext) \
-		$(multilib_native_use_enable wifi) \
-		"${myconf[@]}"
-
-	# work-around gtk-doc out-of-source brokedness
-	if multilib_is_native_abi; then
-		local d
-		for d in api libnm libnm-util libnm-glib; do
-			ln -s "${S}"/docs/${d}/html docs/${d}/html || die
-		done
-	fi
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi; then
-		emake
-	else
-		emake all-am
-		emake -C include
-		emake -C introspection # generated headers, needed for libnm
-		emake -C libnm-core
-		emake -C libnm
-		emake -C libnm-util
-		emake -C libnm-glib
-	fi
-}
-
-multilib_src_test() {
-	if multilib_is_native_abi; then
-		python_setup
-		Xemake check
-	fi
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi; then
-		# Install completions at proper place, bug #465100
-		gnome2_src_install completiondir="$(get_bashcompdir)"
-	else
-		emake DESTDIR="${D}" install-am
-		emake DESTDIR="${D}" install -C include
-		emake DESTDIR="${D}" install -C introspection
-		emake DESTDIR="${D}" install -C libnm-core
-		emake DESTDIR="${D}" install -C libnm
-		emake DESTDIR="${D}" install -C libnm-util
-		emake DESTDIR="${D}" install -C libnm-glib
-	fi
-}
-
-multilib_src_install_all() {
-	! use systemd && readme.gentoo_create_doc
-
-	newinitd "${FILESDIR}/init.d.NetworkManager" NetworkManager
-	newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
-
-	# /var/run/NetworkManager is used by some distros, but not by Gentoo
-	rmdir -v "${ED}/var/run/NetworkManager" || die "rmdir failed"
-	rmdir -v "${ED}/var/run" || die "rmdir failed"
-
-	# Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
-	keepdir /etc/NetworkManager/dispatcher.d
-
-	# Provide openrc net dependency only when nm is connected
-	exeinto /etc/NetworkManager/dispatcher.d
-	newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
-	sed -e "s:@EPREFIX@:${EPREFIX}:g" \
-		-i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
-
-	keepdir /etc/NetworkManager/system-connections
-	chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
-
-	# Allow users in plugdev group to modify system connections
-	insinto /usr/share/polkit-1/rules.d/
-	doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
-}
-
-pkg_postinst() {
-	gnome2_pkg_postinst
-	! use systemd && readme.gentoo_print_elog
-
-	if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
-		ewarn "The ${PN} system configuration file has moved to a new location."
-		ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
-		ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
-		ewarn
-		ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
-	fi
-
-	# The polkit rules file moved to /usr/share
-	old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
-	if [[ -f "${old_rules}" ]]; then
-		case "$(md5sum ${old_rules})" in
-		  574d0cfa7e911b1f7792077003060240* )
-			# Automatically delete the old rules.d file if the user did not change it
-			elog
-			elog "Removing old ${old_rules} ..."
-			rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
-			;;
-		  * )
-			elog "The ${old_rules}"
-			elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
-			elog "If you edited ${old_rules}"
-			elog "without changing its behavior, you may want to remove it."
-			;;
-		esac
-	fi
-
-	# ifnet plugin was disabled for systemd users with 0.9.8.6 version
-	# and for all people with 0.9.10.0-r1 (see ChangeLog for full explanations)
-	if use systemd; then
-		if ! version_is_at_least 0.9.8.6 ${REPLACING_VERSIONS}; then
-			ewarn "Ifnet plugin won't be used with systemd support enabled"
-			ewarn "as it is meant to be used with openRC and can cause collisions"
-			ewarn "(like bug #485658)."
-			ewarn "Because of this, you will likely need to reconfigure some of"
-			ewarn "your networks. To do this you can rely on Gnome control center,"
-			ewarn "nm-connection-editor or nmtui tools for example once updated"
-			ewarn "NetworkManager version is installed."
-		fi
-	else
-		if ! version_is_at_least 0.9.10.0-r1 ${REPLACING_VERSIONS}; then
-			ewarn "Ifnet plugin is now disabled because of it being unattended"
-			ewarn "and unmaintained for a long time, leading to some unfixed bugs"
-			ewarn "and new problems appearing. We will now use upstream 'keyfile'"
-			ewarn "plugin."
-			ewarn "Because of this, you will likely need to reconfigure some of"
-			ewarn "your networks. To do this you can rely on Gnome control center,"
-			ewarn "nm-connection-editor or nmtui tools for example once updated"
-			ewarn "NetworkManager version is installed."
-		fi
-	fi
-
-	# NM fallbacks to plugin specified at compile time (upstream bug #738611)
-	# but still show a warning to remember people to have cleaner config file
-	if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
-		if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
-			ewarn
-			ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
-			ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
-			ewarn
-		fi
-	fi
-
-	# NM shows lots of errors making nmcli neither unusable, bug #528748 upstream bug #690457
-	if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
-		ewarn "You have psk-flags=1 setting in above files, you will need to"
-		ewarn "either reconfigure affected networks or, at least, set the flag"
-		ewarn "value to '0'."
-	fi
-}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/
@ 2016-09-17 14:28 Pacho Ramos
  0 siblings, 0 replies; 14+ messages in thread
From: Pacho Ramos @ 2016-09-17 14:28 UTC (permalink / raw
  To: gentoo-commits

commit:     43f6353228bf92b8bf3d9a4c3b7d028130786be6
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 17 14:27:18 2016 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sat Sep 17 14:27:18 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43f63532

net-misc/networkmanager: Fix issues with wifi connection and dhcp (#593518 by Sven)

Package-Manager: portage-2.3.0

 .../files/networkmanager-1.4.0-dhcp-helper.patch   | 1570 ++++++++++++++++++++
 .../files/networkmanager-1.4.0-wifi-mac1.patch     |  245 +++
 .../files/networkmanager-1.4.0-wifi-mac2.patch     |  279 ++++
 .../networkmanager/networkmanager-1.4.0-r1.ebuild  |  349 +++++
 4 files changed, 2443 insertions(+)

diff --git a/net-misc/networkmanager/files/networkmanager-1.4.0-dhcp-helper.patch b/net-misc/networkmanager/files/networkmanager-1.4.0-dhcp-helper.patch
new file mode 100644
index 00000000..53e146a
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-1.4.0-dhcp-helper.patch
@@ -0,0 +1,1570 @@
+From a3d96601876e5dc34e68bf6777c770f83cac19fb Mon Sep 17 00:00:00 2001
+From: Thomas Haller <thaller@redhat.com>
+Date: Tue, 6 Sep 2016 10:56:32 +0200
+Subject: [PATCH 01/11] logging: don't round subsecond part in logging
+ timestamp
+
+tv.tv_usec is guaranteed to have less then 6 digits, however rounding it up
+we might reach 1000000 and thus the value becomes mis-aligned. To round
+correctly, we would have to carry over a potential overflow to the seconds.
+But that seems too much effort for little gain. Just truncate the value.
+
+(cherry picked from commit c1b4b99a3c758f320c369a8daadb219eeb50ee83)
+(cherry picked from commit 99e30bdf700220e98db76602645a9844360e3fab)
+---
+ src/nm-logging.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/nm-logging.c b/src/nm-logging.c
+index 3db8d20..6ecc160 100644
+--- a/src/nm-logging.c
++++ b/src/nm-logging.c
+@@ -512,7 +512,7 @@ _nm_log_impl (const char *file,
+ 	va_end (args);
+ 
+ 	g_get_current_time (&tv);
+-	nm_sprintf_buf (s_buf_timestamp, " [%ld.%04ld]", tv.tv_sec, (tv.tv_usec + 50) / 100);
++	nm_sprintf_buf (s_buf_timestamp, " [%ld.%04ld]", tv.tv_sec, tv.tv_usec / 100);
+ 
+ 	switch (global.log_backend) {
+ #if SYSTEMD_JOURNAL
+-- 
+2.7.4
+
+
+From b3bf5c5a771e1f105037323daa9f4e4696bce44c Mon Sep 17 00:00:00 2001
+From: Thomas Haller <thaller@redhat.com>
+Date: Mon, 5 Sep 2016 14:12:41 +0200
+Subject: [PATCH 02/11] shared: add NM_MIN()/NM_MAX() macros to replace glib's
+ MIN()/MAX()
+
+(cherry picked from commit b2016fd2a52b82d45324526c965e7545d026cebe)
+(cherry picked from commit 811aaead4ca6f2f815f49b7353fa7a88554dca42)
+---
+ shared/nm-utils/nm-macros-internal.h | 44 ++++++++++++++++++++++++++++++++++++
+ 1 file changed, 44 insertions(+)
+
+diff --git a/shared/nm-utils/nm-macros-internal.h b/shared/nm-utils/nm-macros-internal.h
+index 73075c6..8811c91 100644
+--- a/shared/nm-utils/nm-macros-internal.h
++++ b/shared/nm-utils/nm-macros-internal.h
+@@ -526,6 +526,50 @@ nm_strcmp_p_with_data (gconstpointer a, gconstpointer b, gpointer user_data)
+ 
+ /*****************************************************************************/
+ 
++/* Taken from systemd's UNIQ_T and UNIQ macros. */
++
++#define NM_UNIQ_T(x, uniq) G_PASTE(__unique_prefix_, G_PASTE(x, uniq))
++#define NM_UNIQ __COUNTER__
++
++/*****************************************************************************/
++
++/* glib's MIN()/MAX() macros don't have function-like behavior, in that they evaluate
++ * the argument possibly twice.
++ *
++ * Taken from systemd's MIN()/MAX() macros. */
++
++#define NM_MIN(a, b) __NM_MIN(NM_UNIQ, a, NM_UNIQ, b)
++#define __NM_MIN(aq, a, bq, b) \
++	({ \
++		typeof (a) NM_UNIQ_T(A, aq) = (a); \
++		typeof (b) NM_UNIQ_T(B, bq) = (b); \
++		((NM_UNIQ_T(A, aq) < NM_UNIQ_T(B, bq)) ? NM_UNIQ_T(A, aq) : NM_UNIQ_T(B, bq)); \
++	})
++
++#define NM_MAX(a, b) __NM_MAX(NM_UNIQ, a, NM_UNIQ, b)
++#define __NM_MAX(aq, a, bq, b) \
++	({ \
++		typeof (a) NM_UNIQ_T(A, aq) = (a); \
++		typeof (b) NM_UNIQ_T(B, bq) = (b); \
++		((NM_UNIQ_T(A, aq) > NM_UNIQ_T(B, bq)) ? NM_UNIQ_T(A, aq) : NM_UNIQ_T(B, bq)); \
++	})
++
++#define NM_CLAMP(x, low, high) __NM_CLAMP(NM_UNIQ, x, NM_UNIQ, low, NM_UNIQ, high)
++#define __NM_CLAMP(xq, x, lowq, low, highq, high) \
++	({ \
++		typeof(x)NM_UNIQ_T(X,xq) = (x); \
++		typeof(low) NM_UNIQ_T(LOW,lowq) = (low); \
++		typeof(high) NM_UNIQ_T(HIGH,highq) = (high); \
++		\
++		( (NM_UNIQ_T(X,xq) > NM_UNIQ_T(HIGH,highq)) \
++		  ? NM_UNIQ_T(HIGH,highq) \
++		  : (NM_UNIQ_T(X,xq) < NM_UNIQ_T(LOW,lowq)) \
++		     ? NM_UNIQ_T(LOW,lowq) \
++		     : NM_UNIQ_T(X,xq)); \
++	})
++
++/*****************************************************************************/
++
+ static inline guint
+ nm_encode_version (guint major, guint minor, guint micro) {
+ 	/* analog to the preprocessor macro NM_ENCODE_VERSION(). */
+-- 
+2.7.4
+
+
+From d0b31408a5e1eeb7c3e09e3e79a90cf09c80b934 Mon Sep 17 00:00:00 2001
+From: Thomas Haller <thaller@redhat.com>
+Date: Mon, 5 Sep 2016 16:49:50 +0200
+Subject: [PATCH 03/11] shared: add _NM_GET_PRIVATE() macro
+
+(cherry picked from commit 2cae9ba348ed6ea4d41ebd714d8c55f4d49feae9)
+(cherry picked from commit 5bac57496c0ee458456f5cf68560263cea6c23de)
+---
+ shared/nm-utils/nm-macros-internal.h | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+diff --git a/shared/nm-utils/nm-macros-internal.h b/shared/nm-utils/nm-macros-internal.h
+index 8811c91..5b020e9 100644
+--- a/shared/nm-utils/nm-macros-internal.h
++++ b/shared/nm-utils/nm-macros-internal.h
+@@ -356,6 +356,24 @@ _notify (obj_type *obj, _PropertyEnums prop) \
+ 
+ /*****************************************************************************/
+ 
++#define __NM_GET_PRIVATE(self, type, is_check, result_cmd) \
++	({ \
++		/* preserve the const-ness of self. Unfortunately, that
++		 * way, @self cannot be a void pointer */ \
++		typeof (self) _self = (self); \
++		\
++		/* Get compiler error if variable is of wrong type */ \
++		_nm_unused const type *_self2 = (_self); \
++		\
++		nm_assert (is_check (_self)); \
++		( result_cmd ); \
++	})
++
++#define _NM_GET_PRIVATE(self, type, is_check)     __NM_GET_PRIVATE(self, type, is_check, &_self->_priv)
++#define _NM_GET_PRIVATE_PTR(self, type, is_check) __NM_GET_PRIVATE(self, type, is_check,  _self->_priv)
++
++/*****************************************************************************/
++
+ static inline gpointer
+ nm_g_object_ref (gpointer obj)
+ {
+-- 
+2.7.4
+
+
+From 24d94264bdc6c036e732e201b167c1c7d20794e1 Mon Sep 17 00:00:00 2001
+From: Thomas Haller <thaller@redhat.com>
+Date: Mon, 5 Sep 2016 16:55:07 +0200
+Subject: [PATCH 04/11] core: use _NM_GET_PRIVATE() macros
+
+(cherry picked from commit cdf6ad40572f23be6f8b6971bd57b1002ffb9aaf)
+(cherry picked from commit 3940d63a7e6bff088bb3fb5e81c8cb2792b19b3a)
+---
+ src/devices/nm-device-ethernet.c    | 13 +------------
+ src/devices/nm-device-veth.c        | 13 +------------
+ src/devices/nm-device.c             | 31 ++++++++++---------------------
+ src/devices/nm-device.h             |  2 +-
+ src/devices/wifi/nm-device-wifi.c   | 13 +------------
+ src/devices/wifi/nm-wifi-ap.c       | 13 +------------
+ src/dns-manager/nm-dns-manager.c    | 13 +------------
+ src/nm-auth-subject.c               | 13 +------------
+ src/nm-checkpoint.c                 | 15 ++-------------
+ src/nm-ip4-config.c                 | 13 +------------
+ src/nm-ip6-config.c                 | 13 +------------
+ src/nm-manager.c                    | 15 ++-------------
+ src/rdisc/nm-lndp-rdisc.c           | 13 +------------
+ src/rdisc/nm-rdisc.c                | 13 +------------
+ src/vpn-manager/nm-vpn-connection.c | 13 +------------
+ 15 files changed, 26 insertions(+), 180 deletions(-)
+
+diff --git a/src/devices/nm-device-ethernet.c b/src/devices/nm-device-ethernet.c
+index 90d472d..b213a0c 100644
+--- a/src/devices/nm-device-ethernet.c
++++ b/src/devices/nm-device-ethernet.c
+@@ -127,18 +127,7 @@ NM_GOBJECT_PROPERTIES_DEFINE (NMDeviceEthernet,
+ 
+ G_DEFINE_TYPE (NMDeviceEthernet, nm_device_ethernet, NM_TYPE_DEVICE)
+ 
+-#define NM_DEVICE_ETHERNET_GET_PRIVATE(self) \
+-	({ \
+-		/* preserve the const-ness of self. Unfortunately, that
+-		 * way, @self cannot be a void pointer */ \
+-		typeof (self) _self = (self); \
+-		\
+-		/* Get compiler error if variable is of wrong type */ \
+-		_nm_unused const NMDeviceEthernet *_self2 = (_self); \
+-		\
+-		nm_assert (NM_IS_DEVICE_ETHERNET (_self)); \
+-		_self->_priv; \
+-	})
++#define NM_DEVICE_ETHERNET_GET_PRIVATE(self) _NM_GET_PRIVATE_PTR(self, NMDeviceEthernet, NM_IS_DEVICE_ETHERNET)
+ 
+ /*****************************************************************************/
+ 
+diff --git a/src/devices/nm-device-veth.c b/src/devices/nm-device-veth.c
+index cca86fb..5692331 100644
+--- a/src/devices/nm-device-veth.c
++++ b/src/devices/nm-device-veth.c
+@@ -62,18 +62,7 @@ NM_GOBJECT_PROPERTIES_DEFINE (NMDeviceVeth,
+ 
+ G_DEFINE_TYPE (NMDeviceVeth, nm_device_veth, NM_TYPE_DEVICE_ETHERNET)
+ 
+-#define NM_DEVICE_VETH_GET_PRIVATE(self) \
+-	({ \
+-		/* preserve the const-ness of self. Unfortunately, that
+-		 * way, @self cannot be a void pointer */ \
+-		typeof (self) _self = (self); \
+-		\
+-		/* Get compiler error if variable is of wrong type */ \
+-		_nm_unused const NMDeviceVeth *_self2 = (_self); \
+-		\
+-		nm_assert (NM_IS_DEVICE_VETH (_self)); \
+-		&_self->_priv; \
+-	})
++#define NM_DEVICE_VETH_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceVeth, NM_IS_DEVICE_VETH)
+ 
+ /*****************************************************************************/
+ 
+diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
+index 6939332..674563f 100644
+--- a/src/devices/nm-device.c
++++ b/src/devices/nm-device.c
+@@ -75,18 +75,7 @@ _LOG_DECLARE_SELF (NMDevice);
+ 
+ G_DEFINE_ABSTRACT_TYPE (NMDevice, nm_device, NM_TYPE_EXPORTED_OBJECT)
+ 
+-#define NM_DEVICE_GET_PRIVATE(self) \
+-	({ \
+-		/* preserve the const-ness of self. Unfortunately, that
+-		 * way, @self cannot be a void pointer */ \
+-		typeof (self) _self = (self); \
+-		\
+-		/* Get compiler error if variable is of wrong type */ \
+-		_nm_unused const NMDevice *_self2 = (_self); \
+-		\
+-		nm_assert (NM_IS_DEVICE (_self)); \
+-		_self->priv; \
+-	})
++#define NM_DEVICE_GET_PRIVATE(self) _NM_GET_PRIVATE_PTR(self, NMDevice, NM_IS_DEVICE)
+ 
+ enum {
+ 	STATE_CHANGED,
+@@ -2029,7 +2018,7 @@ link_type_compatible (NMDevice *self,
+ 		return FALSE;
+ 	}
+ 
+-	device_type = self->priv->link_type;
++	device_type = self->_priv->link_type;
+ 	if (device_type > NM_LINK_TYPE_UNKNOWN && device_type != link_type) {
+ 		g_set_error (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_FAILED,
+ 		             "Needed link type 0x%x does not match the platform link type 0x%X",
+@@ -10058,7 +10047,7 @@ nm_device_set_unmanaged_by_user_udev (NMDevice *self)
+ 	int ifindex;
+ 	gboolean platform_unmanaged = FALSE;
+ 
+-	ifindex = self->priv->ifindex;
++	ifindex = self->_priv->ifindex;
+ 
+ 	if (   ifindex <= 0
+ 	    || !nm_platform_link_get_unmanaged (NM_PLATFORM_GET, ifindex, &platform_unmanaged))
+@@ -10145,7 +10134,7 @@ nm_device_reapply_settings_immediately (NMDevice *self)
+ 	if (g_strcmp0 ((zone = nm_setting_connection_get_zone (s_con_settings)),
+ 	               nm_setting_connection_get_zone (s_con_applied)) != 0) {
+ 
+-		version_id = nm_active_connection_version_id_bump ((NMActiveConnection *) self->priv->act_request);
++		version_id = nm_active_connection_version_id_bump ((NMActiveConnection *) self->_priv->act_request);
+ 		_LOGD (LOGD_DEVICE, "reapply setting: zone = %s%s%s (version-id %llu)", NM_PRINT_FMT_QUOTE_STRING (zone), (long long unsigned) version_id);
+ 
+ 		g_object_set (G_OBJECT (s_con_applied),
+@@ -10157,7 +10146,7 @@ nm_device_reapply_settings_immediately (NMDevice *self)
+ 
+ 	if ((metered = nm_setting_connection_get_metered (s_con_settings)) != nm_setting_connection_get_metered (s_con_applied)) {
+ 
+-		version_id = nm_active_connection_version_id_bump ((NMActiveConnection *) self->priv->act_request);
++		version_id = nm_active_connection_version_id_bump ((NMActiveConnection *) self->_priv->act_request);
+ 		_LOGD (LOGD_DEVICE, "reapply setting: metered = %d (version-id %llu)", (int) metered, (long long unsigned) version_id);
+ 
+ 		g_object_set (G_OBJECT (s_con_applied),
+@@ -10336,22 +10325,22 @@ nm_device_check_connection_available (NMDevice *self,
+ static gboolean
+ available_connections_del_all (NMDevice *self)
+ {
+-	if (g_hash_table_size (self->priv->available_connections) == 0)
++	if (g_hash_table_size (self->_priv->available_connections) == 0)
+ 		return FALSE;
+-	g_hash_table_remove_all (self->priv->available_connections);
++	g_hash_table_remove_all (self->_priv->available_connections);
+ 	return TRUE;
+ }
+ 
+ static gboolean
+ available_connections_add (NMDevice *self, NMConnection *connection)
+ {
+-	return nm_g_hash_table_add (self->priv->available_connections, g_object_ref (connection));
++	return nm_g_hash_table_add (self->_priv->available_connections, g_object_ref (connection));
+ }
+ 
+ static gboolean
+ available_connections_del (NMDevice *self, NMConnection *connection)
+ {
+-	return g_hash_table_remove (self->priv->available_connections, connection);
++	return g_hash_table_remove (self->_priv->available_connections, connection);
+ }
+ 
+ static gboolean
+@@ -12097,7 +12086,7 @@ nm_device_init (NMDevice *self)
+ 
+ 	priv = G_TYPE_INSTANCE_GET_PRIVATE (self, NM_TYPE_DEVICE, NMDevicePrivate);
+ 
+-	self->priv = priv;
++	self->_priv = priv;
+ 
+ 	priv->type = NM_DEVICE_TYPE_UNKNOWN;
+ 	priv->capabilities = NM_DEVICE_CAP_NM_SUPPORTED;
+diff --git a/src/devices/nm-device.h b/src/devices/nm-device.h
+index 34d31ca..be12ce7 100644
+--- a/src/devices/nm-device.h
++++ b/src/devices/nm-device.h
+@@ -125,7 +125,7 @@ struct _NMDevice {
+ 	NMExportedObject parent;
+ 
+ 	/* private */
+-	struct _NMDevicePrivate *priv;
++	struct _NMDevicePrivate *_priv;
+ };
+ 
+ /* The flags have an relaxing meaning, that means, specifying more flags, can make
+diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c
+index 49c380a..f97e668 100644
+--- a/src/devices/wifi/nm-device-wifi.c
++++ b/src/devices/wifi/nm-device-wifi.c
+@@ -138,18 +138,7 @@ struct _NMDeviceWifiClass
+ 
+ G_DEFINE_TYPE (NMDeviceWifi, nm_device_wifi, NM_TYPE_DEVICE)
+ 
+-#define NM_DEVICE_WIFI_GET_PRIVATE(self) \
+-	({ \
+-		/* preserve the const-ness of self. Unfortunately, that
+-		 * way, @self cannot be a void pointer */ \
+-		typeof (self) _self = (self); \
+-		\
+-		/* Get compiler error if variable is of wrong type */ \
+-		_nm_unused const NMDeviceWifi *_self2 = (_self); \
+-		\
+-		nm_assert (NM_IS_DEVICE_WIFI (_self)); \
+-		&_self->_priv; \
+-	})
++#define NM_DEVICE_WIFI_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceWifi, NM_IS_DEVICE_WIFI)
+ 
+ /*****************************************************************************/
+ 
+diff --git a/src/devices/wifi/nm-wifi-ap.c b/src/devices/wifi/nm-wifi-ap.c
+index e1beb85..2232f82 100644
+--- a/src/devices/wifi/nm-wifi-ap.c
++++ b/src/devices/wifi/nm-wifi-ap.c
+@@ -68,18 +68,7 @@ struct _NMAccessPointClass{
+ 	NMExportedObjectClass parent;
+ };
+ 
+-#define NM_AP_GET_PRIVATE(self) \
+-	({ \
+-		/* preserve the const-ness of self. Unfortunately, that
+-		 * way, @self cannot be a void pointer */ \
+-		typeof (self) _self = (self); \
+-		\
+-		/* Get compiler error if variable is of wrong type */ \
+-		_nm_unused const NMAccessPoint *_self2 = (_self); \
+-		\
+-		nm_assert (NM_IS_AP (_self)); \
+-		&_self->_priv; \
+-	})
++#define NM_AP_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMAccessPoint, NM_IS_AP)
+ 
+ G_DEFINE_TYPE (NMAccessPoint, nm_ap, NM_TYPE_EXPORTED_OBJECT)
+ 
+diff --git a/src/dns-manager/nm-dns-manager.c b/src/dns-manager/nm-dns-manager.c
+index 3efd5ac..ce8f4d9 100644
+--- a/src/dns-manager/nm-dns-manager.c
++++ b/src/dns-manager/nm-dns-manager.c
+@@ -151,18 +151,7 @@ G_DEFINE_TYPE (NMDnsManager, nm_dns_manager, G_TYPE_OBJECT)
+ 
+ NM_DEFINE_SINGLETON_INSTANCE (NMDnsManager);
+ 
+-#define NM_DNS_MANAGER_GET_PRIVATE(self) \
+-	({ \
+-		/* preserve the const-ness of self. Unfortunately, that
+-		 * way, @self cannot be a void pointer */ \
+-		typeof (self) _self = (self); \
+-		\
+-		/* Get compiler error if variable is of wrong type */ \
+-		_nm_unused const NMDnsManager *_self2 = (_self); \
+-		\
+-		nm_assert (NM_IS_DNS_MANAGER (_self)); \
+-		&_self->_priv; \
+-	})
++#define NM_DNS_MANAGER_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDnsManager, NM_IS_DNS_MANAGER)
+ 
+ /*****************************************************************************/
+ 
+diff --git a/src/nm-auth-subject.c b/src/nm-auth-subject.c
+index eb496b2..54d3595 100644
+--- a/src/nm-auth-subject.c
++++ b/src/nm-auth-subject.c
+@@ -68,18 +68,7 @@ struct _NMAuthSubjectClass {
+ 
+ G_DEFINE_TYPE (NMAuthSubject, nm_auth_subject, G_TYPE_OBJECT)
+ 
+-#define NM_AUTH_SUBJECT_GET_PRIVATE(self) \
+-	({ \
+-		/* preserve the const-ness of self. Unfortunately, that
+-		 * way, @self cannot be a void pointer */ \
+-		typeof (self) _self = (self); \
+-		\
+-		/* Get compiler error if variable is of wrong type */ \
+-		_nm_unused const NMAuthSubject *_self2 = (_self); \
+-		\
+-		nm_assert (NM_IS_AUTH_SUBJECT (_self)); \
+-		&_self->_priv; \
+-	})
++#define NM_AUTH_SUBJECT_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMAuthSubject, NM_IS_AUTH_SUBJECT)
+ 
+ /**************************************************************/
+ 
+diff --git a/src/nm-checkpoint.c b/src/nm-checkpoint.c
+index cb1adc3..605e070 100644
+--- a/src/nm-checkpoint.c
++++ b/src/nm-checkpoint.c
+@@ -70,7 +70,7 @@ typedef struct {
+ 
+ struct _NMCheckpoint {
+ 	NMExportedObject parent;
+-	NMCheckpointPrivate priv;
++	NMCheckpointPrivate _priv;
+ };
+ 
+ typedef struct {
+@@ -79,18 +79,7 @@ typedef struct {
+ 
+ G_DEFINE_TYPE (NMCheckpoint, nm_checkpoint, NM_TYPE_EXPORTED_OBJECT)
+ 
+-#define NM_CHECKPOINT_GET_PRIVATE(self) \
+-	({ \
+-		/* preserve the const-ness of self. Unfortunately, that
+-		 * way, @self cannot be a void pointer */ \
+-		typeof (self) _self = (self); \
+-		\
+-		/* Get compiler error if variable is of wrong type */ \
+-		_nm_unused const NMCheckpoint *_self2 = (_self); \
+-		\
+-		nm_assert (NM_IS_CHECKPOINT (_self)); \
+-		&_self->priv; \
+-	})
++#define NM_CHECKPOINT_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMCheckpoint, NM_IS_CHECKPOINT)
+ 
+ NM_GOBJECT_PROPERTIES_DEFINE_BASE (
+ 	PROP_DEVICES,
+diff --git a/src/nm-ip4-config.c b/src/nm-ip4-config.c
+index 22d1d07..a4d4361 100644
+--- a/src/nm-ip4-config.c
++++ b/src/nm-ip4-config.c
+@@ -68,18 +68,7 @@ struct _NMIP4ConfigClass {
+ 
+ G_DEFINE_TYPE (NMIP4Config, nm_ip4_config, NM_TYPE_EXPORTED_OBJECT)
+ 
+-#define NM_IP4_CONFIG_GET_PRIVATE(self) \
+-	({ \
+-		/* preserve the const-ness of self. Unfortunately, that
+-		 * way, @self cannot be a void pointer */ \
+-		typeof (self) _self = (self); \
+-		\
+-		/* Get compiler error if variable is of wrong type */ \
+-		_nm_unused const NMIP4Config *_self2 = (_self); \
+-		\
+-		nm_assert (NM_IS_IP4_CONFIG (_self)); \
+-		&_self->_priv; \
+-	})
++#define NM_IP4_CONFIG_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMIP4Config, NM_IS_IP4_CONFIG)
+ 
+ /* internal guint32 are assigned to gobject properties of type uint. Ensure, that uint is large enough */
+ G_STATIC_ASSERT (sizeof (uint) >= sizeof (guint32));
+diff --git a/src/nm-ip6-config.c b/src/nm-ip6-config.c
+index ac9e6cd..8002d61 100644
+--- a/src/nm-ip6-config.c
++++ b/src/nm-ip6-config.c
+@@ -61,18 +61,7 @@ struct _NMIP6ConfigClass {
+ 
+ G_DEFINE_TYPE (NMIP6Config, nm_ip6_config, NM_TYPE_EXPORTED_OBJECT)
+ 
+-#define NM_IP6_CONFIG_GET_PRIVATE(self) \
+-	({ \
+-		/* preserve the const-ness of self. Unfortunately, that
+-		 * way, @self cannot be a void pointer */ \
+-		typeof (self) _self = (self); \
+-		\
+-		/* Get compiler error if variable is of wrong type */ \
+-		_nm_unused const NMIP6Config *_self2 = (_self); \
+-		\
+-		nm_assert (NM_IS_IP6_CONFIG (_self)); \
+-		&_self->_priv; \
+-	})
++#define NM_IP6_CONFIG_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMIP6Config, NM_IS_IP6_CONFIG)
+ 
+ NM_GOBJECT_PROPERTIES_DEFINE (NMIP6Config,
+ 	PROP_IFINDEX,
+diff --git a/src/nm-manager.c b/src/nm-manager.c
+index 5794bb9..9ad6517 100644
+--- a/src/nm-manager.c
++++ b/src/nm-manager.c
+@@ -158,21 +158,10 @@ typedef struct {
+ 	NMExportedObjectClass parent;
+ } NMManagerClass;
+ 
+-#define NM_MANAGER_GET_PRIVATE(self) \
+-	({ \
+-		/* preserve the const-ness of self. Unfortunately, that
+-		 * way, @self cannot be a void pointer */ \
+-		typeof (self) _self = (self); \
+-		\
+-		/* Get compiler error if variable is of wrong type */ \
+-		_nm_unused const NMManager *_self2 = (_self); \
+-		\
+-		nm_assert (NM_IS_MANAGER (_self)); \
+-		&_self->_priv; \
+-	})
+-
+ G_DEFINE_TYPE (NMManager, nm_manager, NM_TYPE_EXPORTED_OBJECT)
+ 
++#define NM_MANAGER_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMManager, NM_IS_MANAGER)
++
+ enum {
+ 	DEVICE_ADDED,
+ 	INTERNAL_DEVICE_ADDED,
+diff --git a/src/rdisc/nm-lndp-rdisc.c b/src/rdisc/nm-lndp-rdisc.c
+index 12c2e30..db2965b 100644
+--- a/src/rdisc/nm-lndp-rdisc.c
++++ b/src/rdisc/nm-lndp-rdisc.c
+@@ -60,18 +60,7 @@ struct _NMLndpRDiscClass {
+ 
+ G_DEFINE_TYPE (NMLndpRDisc, nm_lndp_rdisc, NM_TYPE_RDISC)
+ 
+-#define NM_LNDP_RDISC_GET_PRIVATE(self) \
+-	({ \
+-		/* preserve the const-ness of self. Unfortunately, that
+-		 * way, @self cannot be a void pointer */ \
+-		typeof (self) _self = (self); \
+-		\
+-		/* Get compiler error if variable is of wrong type */ \
+-		_nm_unused const NMLndpRDisc *_self2 = (_self); \
+-		\
+-		nm_assert (NM_IS_LNDP_RDISC (_self)); \
+-		&_self->_priv; \
+-	})
++#define NM_LNDP_RDISC_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMLndpRDisc, NM_IS_LNDP_RDISC)
+ 
+ /*****************************************************************************/
+ 
+diff --git a/src/rdisc/nm-rdisc.c b/src/rdisc/nm-rdisc.c
+index cf993bc..3bc6975 100644
+--- a/src/rdisc/nm-rdisc.c
++++ b/src/rdisc/nm-rdisc.c
+@@ -87,18 +87,7 @@ static guint signals[LAST_SIGNAL] = { 0 };
+ 
+ G_DEFINE_TYPE (NMRDisc, nm_rdisc, G_TYPE_OBJECT)
+ 
+-#define NM_RDISC_GET_PRIVATE(self) \
+-	({ \
+-		/* preserve the const-ness of self. Unfortunately, that
+-		 * way, @self cannot be a void pointer */ \
+-		typeof (self) _self = (self); \
+-		\
+-		/* Get compiler error if variable is of wrong type */ \
+-		_nm_unused const NMRDisc *_self2 = (_self); \
+-		\
+-		nm_assert (NM_IS_RDISC (_self)); \
+-		_self->_priv; \
+-	})
++#define NM_RDISC_GET_PRIVATE(self) _NM_GET_PRIVATE_PTR(self, NMRDisc, NM_IS_RDISC)
+ 
+ /*****************************************************************************/
+ 
+diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c
+index 92c5bd8..69b45dc 100644
+--- a/src/vpn-manager/nm-vpn-connection.c
++++ b/src/vpn-manager/nm-vpn-connection.c
+@@ -168,18 +168,7 @@ struct _NMVpnConnectionClass {
+ 
+ G_DEFINE_TYPE (NMVpnConnection, nm_vpn_connection, NM_TYPE_ACTIVE_CONNECTION)
+ 
+-#define NM_VPN_CONNECTION_GET_PRIVATE(self) \
+-	({ \
+-		/* preserve the const-ness of self. Unfortunately, that
+-		 * way, @self cannot be a void pointer */ \
+-		typeof (self) _self = (self); \
+-		\
+-		/* Get compiler error if variable is of wrong type */ \
+-		_nm_unused const NMVpnConnection *_self2 = (_self); \
+-		\
+-		nm_assert (NM_IS_VPN_CONNECTION (_self)); \
+-		&_self->_priv; \
+-	})
++#define NM_VPN_CONNECTION_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMVpnConnection, NM_IS_VPN_CONNECTION)
+ 
+ /*****************************************************************************/
+ 
+-- 
+2.7.4
+
+
+From f25940f2518c3789a5f18d1b458e53a95dc88af7 Mon Sep 17 00:00:00 2001
+From: Thomas Haller <thaller@redhat.com>
+Date: Mon, 5 Sep 2016 16:42:59 +0200
+Subject: [PATCH 05/11] dhcp-listener: refactor type definition and embed
+ private data in @self
+
+(cherry picked from commit 822f01a8fdb63831c887d5db9fb06eb840f53c88)
+(cherry picked from commit 75e13f0e15b7618d7fafbe3f1b990871be0950a7)
+---
+ src/dhcp-manager/nm-dhcp-listener.c | 50 +++++++++++++++++++++----------------
+ src/dhcp-manager/nm-dhcp-listener.h |  4 +--
+ 2 files changed, 31 insertions(+), 23 deletions(-)
+
+diff --git a/src/dhcp-manager/nm-dhcp-listener.c b/src/dhcp-manager/nm-dhcp-listener.c
+index eadff3e..d3616cb 100644
+--- a/src/dhcp-manager/nm-dhcp-listener.c
++++ b/src/dhcp-manager/nm-dhcp-listener.c
+@@ -13,12 +13,14 @@
+  * with this program; if not, write to the Free Software Foundation, Inc.,
+  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+  *
+- * Copyright 2014 Red Hat, Inc.
++ * Copyright 2014 - 2016 Red Hat, Inc.
+  *
+  */
+ 
+ #include "nm-default.h"
+ 
++#include "nm-dhcp-listener.h"
++
+ #include <sys/socket.h>
+ #include <sys/wait.h>
+ #include <signal.h>
+@@ -27,7 +29,6 @@
+ #include <errno.h>
+ #include <unistd.h>
+ 
+-#include "nm-dhcp-listener.h"
+ #include "nm-core-internal.h"
+ #include "nm-bus-manager.h"
+ #include "NetworkManagerUtils.h"
+@@ -36,6 +37,8 @@
+ #define PRIV_SOCK_PATH            NMRUNDIR "/private-dhcp"
+ #define PRIV_SOCK_TAG             "dhcp"
+ 
++/*****************************************************************************/
++
+ typedef struct {
+ 	NMBusManager *      dbus_mgr;
+ 	gulong              new_conn_id;
+@@ -43,17 +46,26 @@ typedef struct {
+ 	GHashTable *        signal_handlers;
+ } NMDhcpListenerPrivate;
+ 
+-#define NM_DHCP_LISTENER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DHCP_LISTENER, NMDhcpListenerPrivate))
++struct _NMDhcpListener {
++	GObject parent;
++	NMDhcpListenerPrivate _priv;
++};
++
++struct _NMDhcpListenerClass {
++	GObjectClass parent_class;
++};
+ 
+ G_DEFINE_TYPE (NMDhcpListener, nm_dhcp_listener, G_TYPE_OBJECT)
+ 
++#define NM_DHCP_LISTENER_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDhcpListener, NM_IS_DHCP_LISTENER)
++
+ enum {
+ 	EVENT,
+ 	LAST_SIGNAL
+ };
+ static guint signals[LAST_SIGNAL] = { 0 };
+ 
+-/***************************************************/
++/*****************************************************************************/
+ 
+ static char *
+ get_option (GVariant *options, const char *key)
+@@ -188,7 +200,7 @@ nm_dhcp_listener_init (NMDhcpListener *self)
+ {
+ 	NMDhcpListenerPrivate *priv = NM_DHCP_LISTENER_GET_PRIVATE (self);
+ 
+-	/* Maps GDBusConnection :: GDBusProxy */
++	/* Maps GDBusConnection :: signal-id */
+ 	priv->signal_handlers = g_hash_table_new (NULL, NULL);
+ 
+ 	priv->dbus_mgr = nm_bus_manager_get ();
+@@ -208,7 +220,7 @@ nm_dhcp_listener_init (NMDhcpListener *self)
+ static void
+ dispose (GObject *object)
+ {
+-	NMDhcpListenerPrivate *priv = NM_DHCP_LISTENER_GET_PRIVATE (object);
++	NMDhcpListenerPrivate *priv = NM_DHCP_LISTENER_GET_PRIVATE ((NMDhcpListener *) object);
+ 
+ 	nm_clear_g_signal_handler (priv->dbus_mgr, &priv->new_conn_id);
+ 	nm_clear_g_signal_handler (priv->dbus_mgr, &priv->dis_conn_id);
+@@ -224,22 +236,18 @@ nm_dhcp_listener_class_init (NMDhcpListenerClass *listener_class)
+ {
+ 	GObjectClass *object_class = G_OBJECT_CLASS (listener_class);
+ 
+-	g_type_class_add_private (listener_class, sizeof (NMDhcpListenerPrivate));
+-
+-	/* virtual methods */
+ 	object_class->dispose = dispose;
+ 
+-	/* signals */
+ 	signals[EVENT] =
+-		g_signal_new (NM_DHCP_LISTENER_EVENT,
+-		              G_OBJECT_CLASS_TYPE (object_class),
+-		              G_SIGNAL_RUN_LAST, 0,
+-		              g_signal_accumulator_true_handled,
+-		              NULL, NULL,
+-		              G_TYPE_BOOLEAN,     /* listeners return TRUE if handled */
+-		              4,
+-		              G_TYPE_STRING,      /* iface */
+-		              G_TYPE_INT,         /* pid */
+-		              G_TYPE_VARIANT,     /* options */
+-		              G_TYPE_STRING);     /* reason */
++	    g_signal_new (NM_DHCP_LISTENER_EVENT,
++	                  G_OBJECT_CLASS_TYPE (object_class),
++	                  G_SIGNAL_RUN_LAST, 0,
++	                  g_signal_accumulator_true_handled,
++	                  NULL, NULL,
++	                  G_TYPE_BOOLEAN,     /* listeners return TRUE if handled */
++	                  4,
++	                  G_TYPE_STRING,      /* iface */
++	                  G_TYPE_INT,         /* pid */
++	                  G_TYPE_VARIANT,     /* options */
++	                  G_TYPE_STRING);     /* reason */
+ }
+diff --git a/src/dhcp-manager/nm-dhcp-listener.h b/src/dhcp-manager/nm-dhcp-listener.h
+index ff31fe3..3018b97 100644
+--- a/src/dhcp-manager/nm-dhcp-listener.h
++++ b/src/dhcp-manager/nm-dhcp-listener.h
+@@ -26,8 +26,8 @@
+ 
+ #define NM_DHCP_LISTENER_EVENT "event"
+ 
+-typedef GObject NMDhcpListener;
+-typedef GObjectClass NMDhcpListenerClass;
++typedef struct _NMDhcpListener NMDhcpListener;
++typedef struct _NMDhcpListenerClass NMDhcpListenerClass;
+ 
+ GType nm_dhcp_listener_get_type (void);
+ 
+-- 
+2.7.4
+
+
+From 6d59141bd7459320a63ba606587d757cbd0aa74d Mon Sep 17 00:00:00 2001
+From: Thomas Haller <thaller@redhat.com>
+Date: Mon, 5 Sep 2016 17:17:09 +0200
+Subject: [PATCH 06/11] dhcp-listener: add logging macros to nm-dhcp-listener.c
+
+(cherry picked from commit d37cd04fe059e9d99c7103f4e22a9a945f8d4d98)
+(cherry picked from commit 3920a90e4a63b69bda583c28cc6bdfef1a9f0470)
+---
+ src/dhcp-manager/nm-dhcp-listener.c | 39 ++++++++++++++++++++++++++-----------
+ 1 file changed, 28 insertions(+), 11 deletions(-)
+
+diff --git a/src/dhcp-manager/nm-dhcp-listener.c b/src/dhcp-manager/nm-dhcp-listener.c
+index d3616cb..79d3513 100644
+--- a/src/dhcp-manager/nm-dhcp-listener.c
++++ b/src/dhcp-manager/nm-dhcp-listener.c
+@@ -55,16 +55,35 @@ struct _NMDhcpListenerClass {
+ 	GObjectClass parent_class;
+ };
+ 
+-G_DEFINE_TYPE (NMDhcpListener, nm_dhcp_listener, G_TYPE_OBJECT)
+-
+-#define NM_DHCP_LISTENER_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDhcpListener, NM_IS_DHCP_LISTENER)
+-
+ enum {
+ 	EVENT,
+ 	LAST_SIGNAL
+ };
+ static guint signals[LAST_SIGNAL] = { 0 };
+ 
++G_DEFINE_TYPE (NMDhcpListener, nm_dhcp_listener, G_TYPE_OBJECT)
++
++#define NM_DHCP_LISTENER_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDhcpListener, NM_IS_DHCP_LISTENER)
++
++NM_DEFINE_SINGLETON_GETTER (NMDhcpListener, nm_dhcp_listener_get, NM_TYPE_DHCP_LISTENER);
++
++/*****************************************************************************/
++
++#define _NMLOG_PREFIX_NAME    "dhcp-listener"
++#define _NMLOG_DOMAIN         LOGD_DHCP
++#define _NMLOG(level, ...) \
++    G_STMT_START { \
++        const NMDhcpListener *_self = (self); \
++        char _prefix[64]; \
++        \
++        nm_log ((level), (_NMLOG_DOMAIN), \
++                "%s: " _NM_UTILS_MACRO_FIRST(__VA_ARGS__), \
++                (_self != singleton_instance \
++                    ? nm_sprintf_buf (_prefix, "%s[%p]", _NMLOG_PREFIX_NAME, _self) \
++                    : _NMLOG_PREFIX_NAME )\
++                _NM_UTILS_MACRO_REST(__VA_ARGS__)); \
++    } G_STMT_END
++
+ /*****************************************************************************/
+ 
+ static char *
+@@ -123,20 +142,20 @@ handle_event (GDBusConnection  *connection,
+ 
+ 	iface = get_option (options, "interface");
+ 	if (iface == NULL) {
+-		nm_log_warn (LOGD_DHCP, "dhcp-event: didn't have associated interface.");
++		_LOGW ("dhcp-event: didn't have associated interface.");
+ 		goto out;
+ 	}
+ 
+ 	pid_str = get_option (options, "pid");
+ 	pid = _nm_utils_ascii_str_to_int64 (pid_str, 10, 0, G_MAXINT32, -1);
+ 	if (pid == -1) {
+-		nm_log_warn (LOGD_DHCP, "dhcp-event: couldn't convert PID '%s' to an integer", pid_str ? pid_str : "(null)");
++		_LOGW ("dhcp-event: couldn't convert PID '%s' to an integer", pid_str ? pid_str : "(null)");
+ 		goto out;
+ 	}
+ 
+ 	reason = get_option (options, "reason");
+ 	if (reason == NULL) {
+-		nm_log_warn (LOGD_DHCP, "dhcp-event: (pid %d) DHCP event didn't have a reason", pid);
++		_LOGW ("dhcp-event: (pid %d) DHCP event didn't have a reason", pid);
+ 		goto out;
+ 	}
+ 
+@@ -144,9 +163,9 @@ handle_event (GDBusConnection  *connection,
+ 	if (!handled) {
+ 		if (g_ascii_strcasecmp (reason, "RELEASE") == 0) {
+ 			/* Ignore event when the dhcp client gets killed and we receive its last message */
+-			nm_log_dbg (LOGD_DHCP, "dhcp-event: (pid %d) unhandled RELEASE DHCP event for interface %s", pid, iface);
++			_LOGD ("dhcp-event: (pid %d) unhandled RELEASE DHCP event for interface %s", pid, iface);
+ 		} else
+-			nm_log_warn (LOGD_DHCP, "dhcp-event: (pid %d) unhandled DHCP event for interface %s", pid, iface);
++			_LOGW ("dhcp-event: (pid %d) unhandled DHCP event for interface %s", pid, iface);
+ 	}
+ 
+ out:
+@@ -193,8 +212,6 @@ dis_connection_cb (NMBusManager *mgr,
+ 
+ /***************************************************/
+ 
+-NM_DEFINE_SINGLETON_GETTER (NMDhcpListener, nm_dhcp_listener_get, NM_TYPE_DHCP_LISTENER);
+-
+ static void
+ nm_dhcp_listener_init (NMDhcpListener *self)
+ {
+-- 
+2.7.4
+
+
+From 5ac925ed8c718aa9ec0ab405680ed858fd79f8a6 Mon Sep 17 00:00:00 2001
+From: Thomas Haller <thaller@redhat.com>
+Date: Mon, 5 Sep 2016 17:24:28 +0200
+Subject: [PATCH 07/11] dhcp-listener/trivial: rename field to track
+ connections in NMDhcpListener
+
+It's not "signal-handles", as it currently tracks the registration ID of
+type int. Rename it, it is effectively the list of connections that we
+track.
+
+(cherry picked from commit 2dd3a5245f91a7c25ae1a36a86638195500f00a8)
+(cherry picked from commit 0ebdfd6cf1f1ba3c9753db4d9dd8979bb458a689)
+---
+ src/dhcp-manager/nm-dhcp-listener.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/dhcp-manager/nm-dhcp-listener.c b/src/dhcp-manager/nm-dhcp-listener.c
+index 79d3513..b09bc20 100644
+--- a/src/dhcp-manager/nm-dhcp-listener.c
++++ b/src/dhcp-manager/nm-dhcp-listener.c
+@@ -43,7 +43,7 @@ typedef struct {
+ 	NMBusManager *      dbus_mgr;
+ 	gulong              new_conn_id;
+ 	gulong              dis_conn_id;
+-	GHashTable *        signal_handlers;
++	GHashTable *        connections;
+ } NMDhcpListenerPrivate;
+ 
+ struct _NMDhcpListener {
+@@ -192,7 +192,7 @@ new_connection_cb (NMBusManager *mgr,
+ 	                                         NULL,
+ 	                                         G_DBUS_SIGNAL_FLAGS_NONE,
+ 	                                         handle_event, self, NULL);
+-	g_hash_table_insert (priv->signal_handlers, connection, GUINT_TO_POINTER (id));
++	g_hash_table_insert (priv->connections, connection, GUINT_TO_POINTER (id));
+ }
+ 
+ static void
+@@ -203,10 +203,10 @@ dis_connection_cb (NMBusManager *mgr,
+ 	NMDhcpListenerPrivate *priv = NM_DHCP_LISTENER_GET_PRIVATE (self);
+ 	guint id;
+ 
+-	id = GPOINTER_TO_UINT (g_hash_table_lookup (priv->signal_handlers, connection));
++	id = GPOINTER_TO_UINT (g_hash_table_lookup (priv->connections, connection));
+ 	if (id) {
+ 		g_dbus_connection_signal_unsubscribe (connection, id);
+-		g_hash_table_remove (priv->signal_handlers, connection);
++		g_hash_table_remove (priv->connections, connection);
+ 	}
+ }
+ 
+@@ -218,7 +218,7 @@ nm_dhcp_listener_init (NMDhcpListener *self)
+ 	NMDhcpListenerPrivate *priv = NM_DHCP_LISTENER_GET_PRIVATE (self);
+ 
+ 	/* Maps GDBusConnection :: signal-id */
+-	priv->signal_handlers = g_hash_table_new (NULL, NULL);
++	priv->connections = g_hash_table_new (NULL, NULL);
+ 
+ 	priv->dbus_mgr = nm_bus_manager_get ();
+ 
+@@ -243,7 +243,7 @@ dispose (GObject *object)
+ 	nm_clear_g_signal_handler (priv->dbus_mgr, &priv->dis_conn_id);
+ 	priv->dbus_mgr = NULL;
+ 
+-	g_clear_pointer (&priv->signal_handlers, g_hash_table_destroy);
++	g_clear_pointer (&priv->connections, g_hash_table_destroy);
+ 
+ 	G_OBJECT_CLASS (nm_dhcp_listener_parent_class)->dispose (object);
+ }
+-- 
+2.7.4
+
+
+From 35518c37de240061c26364b98e464ba140dcdc69 Mon Sep 17 00:00:00 2001
+From: Thomas Haller <thaller@redhat.com>
+Date: Mon, 5 Sep 2016 11:06:04 +0200
+Subject: [PATCH 08/11] dhcp-helper: refactor error handling
+
+Don't exit(1) from fatal_error() because that skips destroying
+local variables in main(). Just return regularly.
+
+(cherry picked from commit bb489163db36889a6fb80789e4e5b9dd8a15dbdd)
+(cherry picked from commit a8d87ef87f2931f07e6fa6dd0df56bf3d1fdf79e)
+---
+ src/dhcp-manager/nm-dhcp-helper.c | 30 +++++++++++++++---------------
+ 1 file changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/src/dhcp-manager/nm-dhcp-helper.c b/src/dhcp-manager/nm-dhcp-helper.c
+index 7667084..8c512e7 100644
+--- a/src/dhcp-manager/nm-dhcp-helper.c
++++ b/src/dhcp-manager/nm-dhcp-helper.c
+@@ -74,26 +74,26 @@ build_signal_parameters (void)
+ }
+ 
+ static void
+-fatal_error (void)
++kill_pid (void)
+ {
+-	const char *pid_str = getenv ("pid");
+-	int pid = 0;
++	const char *pid_str;
++	pid_t pid = 0;
+ 
++	pid_str = getenv ("pid");
+ 	if (pid_str)
+ 		pid = strtol (pid_str, NULL, 10);
+ 	if (pid) {
+ 		g_printerr ("Fatal error occured, killing dhclient instance with pid %d.\n", pid);
+ 		kill (pid, SIGTERM);
+ 	}
+-
+-	exit (1);
+ }
+ 
+ int
+ main (int argc, char *argv[])
+ {
+-	GDBusConnection *connection;
+-	GError *error = NULL;
++	gs_unref_object GDBusConnection *connection = NULL;
++	gs_free_error GError *error = NULL;
++	gboolean success = FALSE;
+ 
+ 	nm_g_type_init ();
+ 
+@@ -104,8 +104,7 @@ main (int argc, char *argv[])
+ 		g_dbus_error_strip_remote_error (error);
+ 		g_printerr ("Error: could not connect to NetworkManager D-Bus socket: %s\n",
+ 		            error->message);
+-		g_error_free (error);
+-		fatal_error ();
++		goto out;
+ 	}
+ 
+ 	if (!g_dbus_connection_emit_signal (connection,
+@@ -117,18 +116,19 @@ main (int argc, char *argv[])
+ 	                                    &error)) {
+ 		g_dbus_error_strip_remote_error (error);
+ 		g_printerr ("Error: Could not send DHCP Event signal: %s\n", error->message);
+-		g_error_free (error);
+-		fatal_error ();
++		goto out;
+ 	}
+ 
+ 	if (!g_dbus_connection_flush_sync (connection, NULL, &error)) {
+ 		g_dbus_error_strip_remote_error (error);
+ 		g_printerr ("Error: Could not flush D-Bus connection: %s\n", error->message);
+-		g_error_free (error);
+-		fatal_error ();
++		goto out;
+ 	}
+ 
+-	g_object_unref (connection);
+-	return 0;
++	success = TRUE;
++out:
++	if (!success)
++		kill_pid ();
++	return success ? EXIT_SUCCESS : EXIT_FAILURE;
+ }
+ 
+-- 
+2.7.4
+
+
+From e342765675214ef1fbcdd9e30d916c687a75fd6e Mon Sep 17 00:00:00 2001
+From: Thomas Haller <thaller@redhat.com>
+Date: Mon, 5 Sep 2016 13:38:58 +0200
+Subject: [PATCH 09/11] dhcp-helper: refactor logging to use logging macros
+
+(cherry picked from commit cc89996c9e826c9c8d12d5fb7bc8a2a578209eb0)
+(cherry picked from commit 9d44dafc3cef8fe1b7d41c9af0f6fa30254924f1)
+---
+ src/dhcp-manager/nm-dhcp-helper.c | 45 ++++++++++++++++++++++++++++++++++-----
+ 1 file changed, 40 insertions(+), 5 deletions(-)
+
+diff --git a/src/dhcp-manager/nm-dhcp-helper.c b/src/dhcp-manager/nm-dhcp-helper.c
+index 8c512e7..383c985 100644
+--- a/src/dhcp-manager/nm-dhcp-helper.c
++++ b/src/dhcp-manager/nm-dhcp-helper.c
+@@ -25,8 +25,43 @@
+ #include <string.h>
+ #include <signal.h>
+ 
++#include "nm-utils/nm-vpn-plugin-macros.h"
++
+ #define NM_DHCP_CLIENT_DBUS_IFACE   "org.freedesktop.nm_dhcp_client"
+ 
++/*****************************************************************************/
++
++#ifdef NM_MORE_LOGGING
++#define _NMLOG_ENABLED(level) TRUE
++#else
++#define _NMLOG_ENABLED(level) ((level) <= LOG_ERR)
++#endif
++
++#define _NMLOG(always_enabled, level, ...) \
++	G_STMT_START { \
++		if ((always_enabled) || _NMLOG_ENABLED (level)) { \
++			GTimeVal _tv; \
++			\
++			g_get_current_time (&_tv); \
++			g_print ("nm-dhcp-helper[%ld] %-7s [%ld.%04ld] " _NM_UTILS_MACRO_FIRST (__VA_ARGS__) "\n", \
++			         (long) getpid (), \
++			         nm_utils_syslog_to_str (level), \
++			         _tv.tv_sec, _tv.tv_usec / 100 \
++			         _NM_UTILS_MACRO_REST (__VA_ARGS__)); \
++		} \
++	} G_STMT_END
++
++#define _LOGD(...) _NMLOG(TRUE,  LOG_INFO,    __VA_ARGS__)
++#define _LOGI(...) _NMLOG(TRUE,  LOG_NOTICE,  __VA_ARGS__)
++#define _LOGW(...) _NMLOG(TRUE,  LOG_WARNING, __VA_ARGS__)
++#define _LOGE(...) _NMLOG(TRUE,  LOG_ERR,     __VA_ARGS__)
++
++#define _LOGd(...) _NMLOG(FALSE, LOG_INFO,    __VA_ARGS__)
++#define _LOGi(...) _NMLOG(FALSE, LOG_NOTICE,  __VA_ARGS__)
++#define _LOGw(...) _NMLOG(FALSE, LOG_WARNING, __VA_ARGS__)
++
++/*****************************************************************************/
++
+ static const char * ignore[] = {"PATH", "SHLVL", "_", "PWD", "dhc_dbus", NULL};
+ 
+ static GVariant *
+@@ -83,7 +118,7 @@ kill_pid (void)
+ 	if (pid_str)
+ 		pid = strtol (pid_str, NULL, 10);
+ 	if (pid) {
+-		g_printerr ("Fatal error occured, killing dhclient instance with pid %d.\n", pid);
++		_LOGI ("a fatal error occured, kill dhclient instance with pid %d\n", pid);
+ 		kill (pid, SIGTERM);
+ 	}
+ }
+@@ -102,8 +137,8 @@ main (int argc, char *argv[])
+ 	                                                     NULL, NULL, &error);
+ 	if (!connection) {
+ 		g_dbus_error_strip_remote_error (error);
+-		g_printerr ("Error: could not connect to NetworkManager D-Bus socket: %s\n",
+-		            error->message);
++		_LOGE ("could not connect to NetworkManager D-Bus socket: %s",
++		       error->message);
+ 		goto out;
+ 	}
+ 
+@@ -115,13 +150,13 @@ main (int argc, char *argv[])
+ 	                                    build_signal_parameters (),
+ 	                                    &error)) {
+ 		g_dbus_error_strip_remote_error (error);
+-		g_printerr ("Error: Could not send DHCP Event signal: %s\n", error->message);
++		_LOGE ("could not send DHCP Event signal: %s", error->message);
+ 		goto out;
+ 	}
+ 
+ 	if (!g_dbus_connection_flush_sync (connection, NULL, &error)) {
+ 		g_dbus_error_strip_remote_error (error);
+-		g_printerr ("Error: Could not flush D-Bus connection: %s\n", error->message);
++		_LOGE ("could not flush D-Bus connection: %s", error->message);
+ 		goto out;
+ 	}
+ 
+-- 
+2.7.4
+
+
+From 8fb42bd50ad41167498332e48bea548cdf76453c Mon Sep 17 00:00:00 2001
+From: Thomas Haller <thaller@redhat.com>
+Date: Mon, 5 Sep 2016 11:54:46 +0200
+Subject: [PATCH 10/11] dhcp: add new header "nm-dhcp-helper-api.h"
+
+(cherry picked from commit 7684b68c49812ed7b2ec493889fae04db066b665)
+(cherry picked from commit 3ac3125aff9987b3ac0284daaa3faae93291a603)
+---
+ src/Makefile.am                       |  1 +
+ src/dhcp-manager/Makefile.am          |  5 ++++-
+ src/dhcp-manager/nm-dhcp-helper-api.h | 31 +++++++++++++++++++++++++++++++
+ src/dhcp-manager/nm-dhcp-helper.c     |  2 +-
+ src/dhcp-manager/nm-dhcp-listener.c   |  2 +-
+ 5 files changed, 38 insertions(+), 3 deletions(-)
+ create mode 100644 src/dhcp-manager/nm-dhcp-helper-api.h
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index c460caf..8d29b19 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -335,6 +335,7 @@ libNetworkManager_la_SOURCES = \
+ 	dhcp-manager/nm-dhcp-client.c \
+ 	dhcp-manager/nm-dhcp-client.h \
+ 	dhcp-manager/nm-dhcp-client-logging.h \
++	dhcp-manager/nm-dhcp-helper-api.h \
+ 	dhcp-manager/nm-dhcp-utils.c \
+ 	dhcp-manager/nm-dhcp-utils.h \
+ 	dhcp-manager/nm-dhcp-listener.c \
+diff --git a/src/dhcp-manager/Makefile.am b/src/dhcp-manager/Makefile.am
+index b4590b4..4295412 100644
+--- a/src/dhcp-manager/Makefile.am
++++ b/src/dhcp-manager/Makefile.am
+@@ -1,6 +1,9 @@
+ libexec_PROGRAMS = nm-dhcp-helper
+ 
+-nm_dhcp_helper_SOURCES = nm-dhcp-helper.c
++nm_dhcp_helper_SOURCES = \
++	nm-dhcp-helper.c \
++	nm-dhcp-helper-api.h \
++	$(NULL)
+ 
+ nm_dhcp_helper_CPPFLAGS = \
+ 	$(GLIB_CFLAGS) \
+diff --git a/src/dhcp-manager/nm-dhcp-helper-api.h b/src/dhcp-manager/nm-dhcp-helper-api.h
+new file mode 100644
+index 0000000..a6323db
+--- /dev/null
++++ b/src/dhcp-manager/nm-dhcp-helper-api.h
+@@ -0,0 +1,31 @@
++/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
++/* NetworkManager -- Network link manager
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the
++ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
++ * Boston, MA 02110-1301 USA.
++ *
++ * (C) Copyright 2016 Red Hat, Inc.
++ */
++
++#ifndef __NM_DHCP_HELPER_API_H__
++#define __NM_DHCP_HELPER_API_H__
++
++/******************************************************************************/
++
++#define NM_DHCP_CLIENT_DBUS_IFACE "org.freedesktop.nm_dhcp_client"
++
++/******************************************************************************/
++
++#endif /* __NM_DHCP_HELPER_API_H__ */
+diff --git a/src/dhcp-manager/nm-dhcp-helper.c b/src/dhcp-manager/nm-dhcp-helper.c
+index 383c985..e53fe27 100644
+--- a/src/dhcp-manager/nm-dhcp-helper.c
++++ b/src/dhcp-manager/nm-dhcp-helper.c
+@@ -27,7 +27,7 @@
+ 
+ #include "nm-utils/nm-vpn-plugin-macros.h"
+ 
+-#define NM_DHCP_CLIENT_DBUS_IFACE   "org.freedesktop.nm_dhcp_client"
++#include "nm-dhcp-helper-api.h"
+ 
+ /*****************************************************************************/
+ 
+diff --git a/src/dhcp-manager/nm-dhcp-listener.c b/src/dhcp-manager/nm-dhcp-listener.c
+index b09bc20..7e9de49 100644
+--- a/src/dhcp-manager/nm-dhcp-listener.c
++++ b/src/dhcp-manager/nm-dhcp-listener.c
+@@ -29,11 +29,11 @@
+ #include <errno.h>
+ #include <unistd.h>
+ 
++#include "nm-dhcp-helper-api.h"
+ #include "nm-core-internal.h"
+ #include "nm-bus-manager.h"
+ #include "NetworkManagerUtils.h"
+ 
+-#define NM_DHCP_CLIENT_DBUS_IFACE "org.freedesktop.nm_dhcp_client"
+ #define PRIV_SOCK_PATH            NMRUNDIR "/private-dhcp"
+ #define PRIV_SOCK_TAG             "dhcp"
+ 
+-- 
+2.7.4
+
+
+From 901ac5654ae51fd44b575c21201f41f5e6f2bbd8 Mon Sep 17 00:00:00 2001
+From: Thomas Haller <thaller@redhat.com>
+Date: Mon, 5 Sep 2016 12:32:40 +0200
+Subject: [PATCH 11/11] dhcp: call synchronous Notify D-Bus method from
+ nm-dhcp-helper
+
+A D-Bus signal is asynchronous and it can happen that nm-dhcp-helper
+emits the "Event" signal before the server is able to register a handler:
+
+   NM_DHCP_HELPER=/usr/libexec/nm-dhcp-helper
+   nmcli general logging level TRACE
+   for i in `seq 1 500`; do $NM_DHCP_HELPER & done
+   journalctl -u NetworkManager --since '1 min ago' | grep "didn't have associated interface" | wc -l
+    499
+
+Avoid that, by calling the synchronous D-Bus method "Notify".
+
+Interestingly, this race seem to exist since 2007.
+
+Actually, we called g_dbus_connection_signal_subscribe() from inside
+GDBusServer:new-connection signal. So it is not clear how such a race
+could exist. I was not able to reproduce it by putting a sleep
+before g_dbus_connection_signal_subscribe(). On the other hand, there
+is bug rh#1372854 and above reproducer which strongly indicates that
+events can be lost under certain circumstances.
+Now we instead g_dbus_connection_register_object() from the
+new-connection signal. According to my tests there was no more race
+as also backed by glib's documentation. Still, keep a simple retry-loop
+in nm-dhcp-helper just to be sure.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1372854
+https://bugzilla.redhat.com/show_bug.cgi?id=1373276
+(cherry picked from commit 2856a658b38df88494187c811415a198a424e1f2)
+(cherry picked from commit e678bd29a4e5fdd83b7d99392d54ecb5fcabc287)
+---
+ src/dhcp-manager/nm-dhcp-helper-api.h |  5 ++
+ src/dhcp-manager/nm-dhcp-helper.c     | 78 +++++++++++++++++++++++-----
+ src/dhcp-manager/nm-dhcp-listener.c   | 97 ++++++++++++++++++++++++++++-------
+ src/nm-bus-manager.c                  |  6 ++-
+ 4 files changed, 153 insertions(+), 33 deletions(-)
+
+diff --git a/src/dhcp-manager/nm-dhcp-helper-api.h b/src/dhcp-manager/nm-dhcp-helper-api.h
+index a6323db..a3eb171 100644
+--- a/src/dhcp-manager/nm-dhcp-helper-api.h
++++ b/src/dhcp-manager/nm-dhcp-helper-api.h
+@@ -26,6 +26,11 @@
+ 
+ #define NM_DHCP_CLIENT_DBUS_IFACE "org.freedesktop.nm_dhcp_client"
+ 
++#define NM_DHCP_HELPER_SERVER_BUS_NAME          "org.freedesktop.nm_dhcp_server"
++#define NM_DHCP_HELPER_SERVER_OBJECT_PATH       "/org/freedesktop/nm_dhcp_server"
++#define NM_DHCP_HELPER_SERVER_INTERFACE_NAME    "org.freedesktop.nm_dhcp_server"
++#define NM_DHCP_HELPER_SERVER_METHOD_NOTIFY     "Notify"
++
+ /******************************************************************************/
+ 
+ #endif /* __NM_DHCP_HELPER_API_H__ */
+diff --git a/src/dhcp-manager/nm-dhcp-helper.c b/src/dhcp-manager/nm-dhcp-helper.c
+index e53fe27..9c6f69b 100644
+--- a/src/dhcp-manager/nm-dhcp-helper.c
++++ b/src/dhcp-manager/nm-dhcp-helper.c
+@@ -105,7 +105,7 @@ build_signal_parameters (void)
+ 		g_free (name);
+ 	}
+ 
+-	return g_variant_new ("(a{sv})", &builder);
++	return g_variant_ref_sink (g_variant_new ("(a{sv})", &builder));
+ }
+ 
+ static void
+@@ -128,7 +128,11 @@ main (int argc, char *argv[])
+ {
+ 	gs_unref_object GDBusConnection *connection = NULL;
+ 	gs_free_error GError *error = NULL;
++	gs_unref_variant GVariant *parameters = NULL;
++	gs_unref_variant GVariant *result = NULL;
+ 	gboolean success = FALSE;
++	guint try_count = 0;
++	gint64 time_end;
+ 
+ 	nm_g_type_init ();
+ 
+@@ -142,25 +146,73 @@ main (int argc, char *argv[])
+ 		goto out;
+ 	}
+ 
+-	if (!g_dbus_connection_emit_signal (connection,
+-	                                    NULL,
+-	                                    "/",
+-	                                    NM_DHCP_CLIENT_DBUS_IFACE,
+-	                                    "Event",
+-	                                    build_signal_parameters (),
+-	                                    &error)) {
+-		g_dbus_error_strip_remote_error (error);
+-		_LOGE ("could not send DHCP Event signal: %s", error->message);
+-		goto out;
+-	}
++	parameters = build_signal_parameters ();
++
++	time_end = g_get_monotonic_time () + (200 * 1000L); /* retry for at most 200 milliseconds */
++
++do_notify:
++	try_count++;
++	result = g_dbus_connection_call_sync (connection,
++	                                      NULL,
++	                                      NM_DHCP_HELPER_SERVER_OBJECT_PATH,
++	                                      NM_DHCP_HELPER_SERVER_INTERFACE_NAME,
++	                                      NM_DHCP_HELPER_SERVER_METHOD_NOTIFY,
++	                                      parameters,
++	                                      NULL,
++	                                      G_DBUS_CALL_FLAGS_NONE,
++	                                      1000,
++	                                      NULL,
++	                                      &error);
++
++	if (!result) {
++		gs_free char *s_err = NULL;
++
++		s_err = g_dbus_error_get_remote_error (error);
++		if (NM_IN_STRSET (s_err, "org.freedesktop.DBus.Error.UnknownMethod")) {
++			gint64 remaining_time = time_end - g_get_monotonic_time ();
++
++			/* I am not sure that a race can actually happen, as we register the object
++			 * on the server side during GDBusServer:new-connection signal.
++			 *
++			 * However, there was also a race for subscribing to an event, so let's just
++			 * do some retry. */
++			if (remaining_time > 0) {
++				_LOGi ("failure to call notify: %s (retry %u)", error->message, try_count);
++				g_usleep (NM_MIN (NM_CLAMP ((gint64) (100L * (1L << try_count)), 5000, 25000), remaining_time));
++				g_clear_error (&error);
++				goto do_notify;
++			}
++		}
++		_LOGW ("failure to call notify: %s (try signal via Event)", error->message);
++		g_clear_error (&error);
++
++		/* for backward compatibilty, try to emit the signal. There is no stable
++		 * API between the dhcp-helper and NetworkManager. However, while upgrading
++		 * the NetworkManager package, a newer helper might want to notify an
++		 * older server, which still uses the "Event". */
++		if (!g_dbus_connection_emit_signal (connection,
++		                                    NULL,
++		                                    "/",
++		                                    NM_DHCP_CLIENT_DBUS_IFACE,
++		                                    "Event",
++		                                    parameters,
++		                                    &error)) {
++			g_dbus_error_strip_remote_error (error);
++			_LOGE ("could not send DHCP Event signal: %s", error->message);
++			goto out;
++		}
++		/* We were able to send the asynchronous Event. Consider that a success. */
++		success = TRUE;
++	} else
++		success = TRUE;
+ 
+ 	if (!g_dbus_connection_flush_sync (connection, NULL, &error)) {
+ 		g_dbus_error_strip_remote_error (error);
+ 		_LOGE ("could not flush D-Bus connection: %s", error->message);
++		success = FALSE;
+ 		goto out;
+ 	}
+ 
+-	success = TRUE;
+ out:
+ 	if (!success)
+ 		kill_pid ();
+diff --git a/src/dhcp-manager/nm-dhcp-listener.c b/src/dhcp-manager/nm-dhcp-listener.c
+index 7e9de49..0df4197 100644
+--- a/src/dhcp-manager/nm-dhcp-listener.c
++++ b/src/dhcp-manager/nm-dhcp-listener.c
+@@ -119,13 +119,14 @@ get_option (GVariant *options, const char *key)
+ }
+ 
+ static void
+-handle_event (GDBusConnection  *connection,
+-              const char       *sender_name,
+-              const char       *object_path,
+-              const char       *interface_name,
+-              const char       *signal_name,
+-              GVariant         *parameters,
+-              gpointer          user_data)
++_method_call (GDBusConnection *connection,
++              const char *sender,
++              const char *object_path,
++              const char *interface_name,
++              const char *method_name,
++              GVariant *parameters,
++              GDBusMethodInvocation *invocation,
++              gpointer user_data)
+ {
+ 	NMDhcpListener *self = NM_DHCP_LISTENER (user_data);
+ 	char *iface = NULL;
+@@ -135,8 +136,12 @@ handle_event (GDBusConnection  *connection,
+ 	gboolean handled = FALSE;
+ 	GVariant *options;
+ 
++	if (!nm_streq0 (interface_name, NM_DHCP_HELPER_SERVER_INTERFACE_NAME))
++		g_return_if_reached ();
++	if (!nm_streq0 (method_name, NM_DHCP_HELPER_SERVER_METHOD_NOTIFY))
++		g_return_if_reached ();
+ 	if (!g_variant_is_of_type (parameters, G_VARIANT_TYPE ("(a{sv})")))
+-		return;
++		g_return_if_reached ();
+ 
+ 	g_variant_get (parameters, "(@a{sv})", &options);
+ 
+@@ -173,6 +178,57 @@ out:
+ 	g_free (pid_str);
+ 	g_free (reason);
+ 	g_variant_unref (options);
++	g_dbus_method_invocation_return_value (invocation, NULL);
++}
++
++static guint
++_dbus_connection_register_object (NMDhcpListener *self,
++                                  GDBusConnection *connection,
++                                  GError **error)
++{
++	static GDBusArgInfo arg_info_notify_in = {
++		.ref_count = -1,
++		.name = "data",
++		.signature = "a{sv}",
++		.annotations = NULL,
++	};
++	static GDBusArgInfo *arg_infos_notify[] = {
++		&arg_info_notify_in,
++		NULL,
++	};
++	static GDBusMethodInfo method_info_notify = {
++		.ref_count = -1,
++		.name = NM_DHCP_HELPER_SERVER_METHOD_NOTIFY,
++		.in_args = arg_infos_notify,
++		.out_args = NULL,
++		.annotations = NULL,
++	};
++	static GDBusMethodInfo *method_infos[] = {
++		&method_info_notify,
++		NULL,
++	};
++	static GDBusInterfaceInfo interface_info = {
++		.ref_count = -1,
++		.name = NM_DHCP_HELPER_SERVER_INTERFACE_NAME,
++		.methods = method_infos,
++		.signals = NULL,
++		.properties = NULL,
++		.annotations = NULL,
++	};
++
++	static GDBusInterfaceVTable interface_vtable = {
++		.method_call = _method_call,
++		.get_property = NULL,
++		.set_property = NULL,
++	};
++
++	return g_dbus_connection_register_object (connection,
++	                                          NM_DHCP_HELPER_SERVER_OBJECT_PATH,
++	                                          &interface_info,
++	                                          &interface_vtable,
++	                                          self,
++	                                          NULL,
++	                                          error);
+ }
+ 
+ static void
+@@ -182,17 +238,20 @@ new_connection_cb (NMBusManager *mgr,
+                    NMDhcpListener *self)
+ {
+ 	NMDhcpListenerPrivate *priv = NM_DHCP_LISTENER_GET_PRIVATE (self);
+-	guint id;
++	guint registration_id;
++	GError *error = NULL;
++
++	/* it is important to register the object during the new-connection signal,
++	 * as this avoids races with the connecting object. */
++	registration_id = _dbus_connection_register_object (self, connection, &error);
++	if (!registration_id) {
++		_LOGE ("failure to register %s for connection %p: %s",
++		       NM_DHCP_HELPER_SERVER_OBJECT_PATH, connection, error->message);
++		g_error_free (error);
++		return;
++	}
+ 
+-	id = g_dbus_connection_signal_subscribe (connection,
+-	                                         NULL,
+-	                                         NM_DHCP_CLIENT_DBUS_IFACE,
+-	                                         "Event",
+-	                                         NULL,
+-	                                         NULL,
+-	                                         G_DBUS_SIGNAL_FLAGS_NONE,
+-	                                         handle_event, self, NULL);
+-	g_hash_table_insert (priv->connections, connection, GUINT_TO_POINTER (id));
++	g_hash_table_insert (priv->connections, connection, GUINT_TO_POINTER (registration_id));
+ }
+ 
+ static void
+@@ -205,7 +264,7 @@ dis_connection_cb (NMBusManager *mgr,
+ 
+ 	id = GPOINTER_TO_UINT (g_hash_table_lookup (priv->connections, connection));
+ 	if (id) {
+-		g_dbus_connection_signal_unsubscribe (connection, id);
++		g_dbus_connection_unregister_object (connection, id);
+ 		g_hash_table_remove (priv->connections, connection);
+ 	}
+ }
+diff --git a/src/nm-bus-manager.c b/src/nm-bus-manager.c
+index 449de4e..270792e 100644
+--- a/src/nm-bus-manager.c
++++ b/src/nm-bus-manager.c
+@@ -221,7 +221,11 @@ private_server_new_connection (GDBusServer *server,
+ 
+ 	_LOGD ("(%s) accepted connection %p on private socket", s->tag, conn);
+ 
+-	/* Emit this for the manager */
++	/* Emit this for the manager.
++	 *
++	 * It is essential to do this from the "new-connection" signal handler, as
++	 * at that point no messages from the connection are yet processed
++	 * (which avoids races with registering objects). */
+ 	g_signal_emit (s->manager,
+ 	               signals[PRIVATE_CONNECTION_NEW],
+ 	               s->detail,
+-- 
+2.7.4
+

diff --git a/net-misc/networkmanager/files/networkmanager-1.4.0-wifi-mac1.patch b/net-misc/networkmanager/files/networkmanager-1.4.0-wifi-mac1.patch
new file mode 100644
index 00000000..9c1e774
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-1.4.0-wifi-mac1.patch
@@ -0,0 +1,245 @@
+From c52f385566e558ee3edc98d20225155b362d212f Mon Sep 17 00:00:00 2001
+From: Thomas Haller <thaller@redhat.com>
+Date: Sun, 28 Aug 2016 13:52:32 +0200
+Subject: [PATCH 1/4] platform: split processing result from do_change_link()
+
+(cherry picked from commit 3dc09446771a3434ed948bdd5e6ca9f6ef9a9e76)
+(cherry picked from commit 471521ca84187cd32afcd20aebe5a369fe7368dc)
+---
+ src/platform/nm-linux-platform.c | 35 +++++++++++++++++++++++++++--------
+ 1 file changed, 27 insertions(+), 8 deletions(-)
+
+diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
+index 98c4e46..eeb24ca 100644
+--- a/src/platform/nm-linux-platform.c
++++ b/src/platform/nm-linux-platform.c
+@@ -4060,18 +4060,14 @@ out:
+ 	return !!nmp_cache_lookup_obj (priv->cache, obj_id);
+ }
+ 
+-static NMPlatformError
+-do_change_link (NMPlatform *platform,
+-                int ifindex,
+-                struct nl_msg *nlmsg)
++static WaitForNlResponseResult
++do_change_link_request (NMPlatform *platform,
++                        int ifindex,
++                        struct nl_msg *nlmsg)
+ {
+ 	nm_auto_pop_netns NMPNetns *netns = NULL;
+ 	WaitForNlResponseResult seq_result = WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN;
+ 	int nle;
+-	char s_buf[256];
+-	NMPlatformError result = NM_PLATFORM_ERROR_SUCCESS;
+-	NMLogLevel log_level = LOGL_DEBUG;
+-	const char *log_result = "failure", *log_detail = "";
+ 
+ 	if (!nm_platform_netns_push (platform, &netns))
+ 		return NM_PLATFORM_ERROR_UNSPECIFIED;
+@@ -4098,6 +4094,18 @@ retry:
+ 		nlmsg_hdr (nlmsg)->nlmsg_type = RTM_SETLINK;
+ 		goto retry;
+ 	}
++	return seq_result;
++}
++
++static NMPlatformError
++do_change_link_result (NMPlatform *platform,
++                       int ifindex,
++                       WaitForNlResponseResult seq_result)
++{
++	char s_buf[256];
++	NMPlatformError result = NM_PLATFORM_ERROR_SUCCESS;
++	NMLogLevel log_level = LOGL_DEBUG;
++	const char *log_result = "failure", *log_detail = "";
+ 
+ 	if (seq_result == WAIT_FOR_NL_RESPONSE_RESULT_RESPONSE_OK) {
+ 		log_result = "success";
+@@ -4123,6 +4131,17 @@ retry:
+ 	return result;
+ }
+ 
++static NMPlatformError
++do_change_link (NMPlatform *platform,
++                int ifindex,
++                struct nl_msg *nlmsg)
++{
++	WaitForNlResponseResult seq_result;
++
++	seq_result = do_change_link_request (platform, ifindex, nlmsg);
++	return do_change_link_result (platform, ifindex, seq_result);
++}
++
+ static gboolean
+ link_add (NMPlatform *platform,
+           const char *name,
+-- 
+2.7.4
+
+
+From 559ed361a30650f263668aadb86233fb405f0b29 Mon Sep 17 00:00:00 2001
+From: Thomas Haller <thaller@redhat.com>
+Date: Sun, 28 Aug 2016 14:08:42 +0200
+Subject: [PATCH 2/4] platform: workaround kernel wrongly returning ENFILE when
+ changing MAC address
+
+https://bugzilla.gnome.org/show_bug.cgi?id=770456
+(cherry picked from commit 2bef71611bd9fd2e333a7522205f0262ac25680f)
+(cherry picked from commit 06d1679aa9867682297316e7b2cfac6fc8f67c2a)
+---
+ src/platform/nm-linux-platform.c | 27 ++++++++++++++++++++++++++-
+ 1 file changed, 26 insertions(+), 1 deletion(-)
+
+diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
+index eeb24ca..c36e967 100644
+--- a/src/platform/nm-linux-platform.c
++++ b/src/platform/nm-linux-platform.c
+@@ -4449,6 +4449,8 @@ link_set_address (NMPlatform *platform, int ifindex, gconstpointer address, size
+ {
+ 	nm_auto_nlmsg struct nl_msg *nlmsg = NULL;
+ 	gs_free char *mac = NULL;
++	WaitForNlResponseResult seq_result;
++	char s_buf[256];
+ 
+ 	if (!address || !length)
+ 		g_return_val_if_reached (NM_PLATFORM_ERROR_BUG);
+@@ -4468,7 +4470,30 @@ link_set_address (NMPlatform *platform, int ifindex, gconstpointer address, size
+ 
+ 	NLA_PUT (nlmsg, IFLA_ADDRESS, length, address);
+ 
+-	return do_change_link (platform, ifindex, nlmsg);
++	seq_result = do_change_link_request (platform, ifindex, nlmsg);
++
++	if (NM_IN_SET (-((int) seq_result), ENFILE)) {
++		const NMPObject *obj_cache;
++
++		/* workaround ENFILE which may be wrongly returned (bgo #770456).
++		 * If the MAC address is as expected, assume success? */
++
++		obj_cache = nmp_cache_lookup_link (NM_LINUX_PLATFORM_GET_PRIVATE (platform)->cache, ifindex);
++		if (   obj_cache
++		    && obj_cache->link.addr.len == length
++		    && memcmp (obj_cache->link.addr.data, address, length) == 0) {
++			_NMLOG (LOGL_DEBUG,
++			        "do-change-link[%d]: %s changing link: %s%s",
++			        ifindex,
++			        "success",
++			        wait_for_nl_response_to_string (seq_result, s_buf, sizeof (s_buf)),
++			        " (assume success changing address)");
++			return NM_PLATFORM_ERROR_SUCCESS;
++		}
++	}
++
++	return do_change_link_result (platform, ifindex, seq_result);
++
+ nla_put_failure:
+ 	g_return_val_if_reached (NM_PLATFORM_ERROR_UNSPECIFIED);
+ }
+-- 
+2.7.4
+
+
+From afe1a15516f0a5024f161e3ff1046afdfb7e58b8 Mon Sep 17 00:00:00 2001
+From: Thomas Haller <thaller@redhat.com>
+Date: Mon, 29 Aug 2016 17:14:04 +0200
+Subject: [PATCH 3/4] device: fix spelling in logging
+
+(cherry picked from commit d51f2c2a4e99799739e2adbeaf578144b556c4b9)
+(cherry picked from commit b1f5d3d798498c53fe65257490b2df3e3f71e364)
+---
+ src/devices/nm-device.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
+index 199acc6..305a1bb 100644
+--- a/src/devices/nm-device.c
++++ b/src/devices/nm-device.c
+@@ -11820,7 +11820,7 @@ _hw_addr_set (NMDevice *self,
+ 			       operation, addr, detail);
+ 		} else {
+ 			_LOGW (LOGD_DEVICE,
+-			       "set-hw-addr: new MAC address %s not successfully set to %s (%s)",
++			       "set-hw-addr: new MAC address %s not successfully %s (%s)",
+ 			       addr, operation, detail);
+ 			success = FALSE;
+ 		}
+-- 
+2.7.4
+
+
+From ac81b54da92c569db110407a63142565d69963f4 Mon Sep 17 00:00:00 2001
+From: Thomas Haller <thaller@redhat.com>
+Date: Mon, 29 Aug 2016 18:28:34 +0200
+Subject: [PATCH 4/4] device: add hack to wait after changing MAC address
+
+It seems some drivers return success for nm_platform_link_set_address(),
+but at that point the address did not yet actually change *sigh*.
+It changes a bit later, possibly after setting the device up.
+
+Add a workaround to retry reading the MAC address when platform indicates
+success but the address still differs at first.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=770456
+(cherry picked from commit 67b685235847ac49712d77023e23ef5c38e82a9e)
+(cherry picked from commit 3b51959f48f2b40a4d85e1d36fd69a46548369cb)
+---
+ src/devices/nm-device.c | 28 +++++++++++++++++++++++++---
+ 1 file changed, 25 insertions(+), 3 deletions(-)
+
+diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
+index 305a1bb..6939332 100644
+--- a/src/devices/nm-device.c
++++ b/src/devices/nm-device.c
+@@ -11774,6 +11774,7 @@ _hw_addr_set (NMDevice *self,
+ {
+ 	NMDevicePrivate *priv;
+ 	gboolean success = FALSE;
++	gboolean needs_refresh = FALSE;
+ 	NMPlatformError plerr;
+ 	const char *cur_addr;
+ 	guint8 addr_bytes[NM_UTILS_HWADDR_LEN_MAX];
+@@ -11819,10 +11820,10 @@ _hw_addr_set (NMDevice *self,
+ 			_LOGI (LOGD_DEVICE, "set-hw-addr: %s MAC address to %s (%s)",
+ 			       operation, addr, detail);
+ 		} else {
+-			_LOGW (LOGD_DEVICE,
+-			       "set-hw-addr: new MAC address %s not successfully %s (%s)",
++			_LOGD (LOGD_DEVICE,
++			       "set-hw-addr: new MAC address %s not successfully %s (%s) (refresh link)",
+ 			       addr, operation, detail);
+-			success = FALSE;
++			needs_refresh = TRUE;
+ 		}
+ 	} else {
+ 		_NMLOG (plerr == NM_PLATFORM_ERROR_NOT_FOUND ? LOGL_DEBUG : LOGL_WARN,
+@@ -11836,6 +11837,27 @@ _hw_addr_set (NMDevice *self,
+ 			return FALSE;
+ 	}
+ 
++	if (needs_refresh) {
++		/* The platform call indicated success, however the address is not
++		 * as expected. May be a kernel issue and the MAC address takes
++		 * a moment to change (bgo#770456).
++		 *
++		 * Try to reload the link and check again. */
++		nm_platform_link_refresh (NM_PLATFORM_GET, nm_device_get_ip_ifindex (self));
++
++		nm_device_update_hw_address (self);
++		cur_addr = nm_device_get_hw_address (self);
++		if (cur_addr && nm_utils_hwaddr_matches (cur_addr, -1, addr, -1)) {
++			_LOGI (LOGD_DEVICE, "set-hw-addr: %s MAC address to %s (%s)",
++			       operation, addr, detail);
++		} else {
++			_LOGW (LOGD_DEVICE,
++			       "set-hw-addr: new MAC address %s not successfully %s (%s)",
++			       addr, operation, detail);
++			return FALSE;
++		}
++	}
++
+ 	return success;
+ }
+ 
+-- 
+2.7.4
+

diff --git a/net-misc/networkmanager/files/networkmanager-1.4.0-wifi-mac2.patch b/net-misc/networkmanager/files/networkmanager-1.4.0-wifi-mac2.patch
new file mode 100644
index 00000000..2038b2f
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-1.4.0-wifi-mac2.patch
@@ -0,0 +1,279 @@
+From 3c701b60dc169a24cf52c0397560125ddce3d54c Mon Sep 17 00:00:00 2001
+From: Thomas Haller <thaller@redhat.com>
+Date: Wed, 7 Sep 2016 23:47:14 +0200
+Subject: [PATCH 1/2] device: workaround driver issue with delayed change of
+ MAC address
+
+brcmfmac and possibly other drivers don't change the MAC address
+right away, but instead the result is delayed. That is problematic
+because we cannot continue activation before the MAC address is
+settled.
+
+Add a hack to workaround the issue by waiting until the MAC address
+changed.
+
+The previous attempt to workaround this was less intrusive: we would
+just refresh the link once and check the result. But that turns out
+not to be sufficent for all cases. Now, wait and poll.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=770456
+https://bugzilla.redhat.com/show_bug.cgi?id=1374023
+(cherry picked from commit 1a85103765d4eaa0acab6b03658a4f9cfe684a64)
+(cherry picked from commit 8d575403685208aad75f918484ae7adbc1a46085)
+---
+ src/devices/nm-device.c | 85 ++++++++++++++++++++++++++++++++++---------------
+ src/devices/nm-device.h |  2 +-
+ 2 files changed, 61 insertions(+), 26 deletions(-)
+
+diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
+index 674563f..3e549c5 100644
+--- a/src/devices/nm-device.c
++++ b/src/devices/nm-device.c
+@@ -11549,16 +11549,17 @@ nm_device_get_hw_address (NMDevice *self)
+ 	return priv->hw_addr;
+ }
+ 
+-void
++gboolean
+ nm_device_update_hw_address (NMDevice *self)
+ {
+ 	NMDevicePrivate *priv;
+ 	const guint8 *hwaddr;
+ 	gsize hwaddrlen = 0;
++	gboolean changed = FALSE;
+ 
+ 	priv = NM_DEVICE_GET_PRIVATE (self);
+ 	if (priv->ifindex <= 0)
+-		return;
++		return FALSE;
+ 
+ 	hwaddr = nm_platform_link_get_address (NM_PLATFORM_GET, priv->ifindex, &hwaddrlen);
+ 
+@@ -11585,6 +11586,7 @@ nm_device_update_hw_address (NMDevice *self)
+ 				 * update our inital hw-address as well. */
+ 				nm_device_update_initial_hw_address (self);
+ 			}
++			changed = TRUE;
+ 		}
+ 	} else {
+ 		/* Invalid or no hardware address */
+@@ -11597,6 +11599,7 @@ nm_device_update_hw_address (NMDevice *self)
+ 			       "hw-addr: failed reading current MAC address");
+ 		}
+ 	}
++	return changed;
+ }
+ 
+ void
+@@ -11756,6 +11759,15 @@ nm_device_hw_addr_is_explict (NMDevice *self)
+ }
+ 
+ static gboolean
++_hw_addr_matches (NMDevice *self, const char *addr)
++{
++	const char *cur_addr;
++
++	cur_addr = nm_device_get_hw_address (self);
++	return cur_addr && nm_utils_hwaddr_matches (cur_addr, -1, addr, -1);
++}
++
++static gboolean
+ _hw_addr_set (NMDevice *self,
+               const char *addr,
+               const char *operation,
+@@ -11765,7 +11777,6 @@ _hw_addr_set (NMDevice *self,
+ 	gboolean success = FALSE;
+ 	gboolean needs_refresh = FALSE;
+ 	NMPlatformError plerr;
+-	const char *cur_addr;
+ 	guint8 addr_bytes[NM_UTILS_HWADDR_LEN_MAX];
+ 	guint hw_addr_len;
+ 	gboolean was_up;
+@@ -11776,11 +11787,9 @@ _hw_addr_set (NMDevice *self,
+ 
+ 	priv = NM_DEVICE_GET_PRIVATE (self);
+ 
+-	cur_addr = nm_device_get_hw_address (self);
+-
+ 	/* Do nothing if current MAC is same */
+-	if (cur_addr && nm_utils_hwaddr_matches (cur_addr, -1, addr, -1)) {
+-		_LOGT (LOGD_DEVICE, "set-hw-addr: no MAC address change needed (%s)", cur_addr);
++	if (_hw_addr_matches (self, addr)) {
++		_LOGT (LOGD_DEVICE, "set-hw-addr: no MAC address change needed (%s)", addr);
+ 		return TRUE;
+ 	}
+ 
+@@ -11804,8 +11813,7 @@ _hw_addr_set (NMDevice *self,
+ 	if (success) {
+ 		/* MAC address succesfully changed; update the current MAC to match */
+ 		nm_device_update_hw_address (self);
+-		cur_addr = nm_device_get_hw_address (self);
+-		if (cur_addr && nm_utils_hwaddr_matches (cur_addr, -1, addr, -1)) {
++		if (_hw_addr_matches (self, addr)) {
+ 			_LOGI (LOGD_DEVICE, "set-hw-addr: %s MAC address to %s (%s)",
+ 			       operation, addr, detail);
+ 		} else {
+@@ -11827,24 +11835,51 @@ _hw_addr_set (NMDevice *self,
+ 	}
+ 
+ 	if (needs_refresh) {
+-		/* The platform call indicated success, however the address is not
+-		 * as expected. May be a kernel issue and the MAC address takes
+-		 * a moment to change (bgo#770456).
+-		 *
+-		 * Try to reload the link and check again. */
+-		nm_platform_link_refresh (NM_PLATFORM_GET, nm_device_get_ip_ifindex (self));
+-
+-		nm_device_update_hw_address (self);
+-		cur_addr = nm_device_get_hw_address (self);
+-		if (cur_addr && nm_utils_hwaddr_matches (cur_addr, -1, addr, -1)) {
+-			_LOGI (LOGD_DEVICE, "set-hw-addr: %s MAC address to %s (%s)",
+-			       operation, addr, detail);
++		if (_hw_addr_matches (self, addr)) {
++			/* the MAC address already changed during nm_device_bring_up() above. */
+ 		} else {
+-			_LOGW (LOGD_DEVICE,
+-			       "set-hw-addr: new MAC address %s not successfully %s (%s)",
+-			       addr, operation, detail);
+-			return FALSE;
++			gint64 poll_end, now;
++
++			/* The platform call indicated success, however the address is not
++			 * as expected. That is either due to a driver issue (brcmfmac, bgo#770456,
++			 * rh#1374023) or a race where externally the MAC address was reset.
++			 * The race is rather unlikely.
++			 *
++			 * The alternative would be to postpone the activation in case the
++			 * MAC address is not yet ready and poll without blocking. However,
++			 * that is rather complicated and it is not expected that this case
++			 * happens for regular drivers.
++			 * Note that brcmfmac can block NetworkManager for 500 msec while
++			 * taking down the device. Let's add annother 100 msec to that.
++			 *
++			 * wait/poll up to 100 msec until it changes. */
++
++			poll_end = nm_utils_get_monotonic_timestamp_us () + (100 * 1000);
++			for (;;) {
++				if (!nm_platform_link_refresh (NM_PLATFORM_GET, nm_device_get_ip_ifindex (self)))
++					goto handle_fail;
++				if (!nm_device_update_hw_address (self))
++					goto handle_wait;
++				if (!_hw_addr_matches (self, addr))
++					goto handle_fail;
++
++				break;
++handle_wait:
++				now = nm_utils_get_monotonic_timestamp_us ();
++				if (now < poll_end) {
++					g_usleep (NM_MIN (poll_end - now, 500));
++					continue;
++				}
++handle_fail:
++				_LOGW (LOGD_DEVICE,
++				       "set-hw-addr: new MAC address %s not successfully %s (%s)",
++				       addr, operation, detail);
++				return FALSE;
++			}
+ 		}
++
++		_LOGI (LOGD_DEVICE, "set-hw-addr: %s MAC address to %s (%s)",
++		       operation, addr, detail);
+ 	}
+ 
+ 	return success;
+diff --git a/src/devices/nm-device.h b/src/devices/nm-device.h
+index be12ce7..a757a37 100644
+--- a/src/devices/nm-device.h
++++ b/src/devices/nm-device.h
+@@ -588,7 +588,7 @@ void nm_device_reactivate_ip6_config (NMDevice *device,
+                                       NMSettingIPConfig *s_ip6_old,
+                                       NMSettingIPConfig *s_ip6_new);
+ 
+-void nm_device_update_hw_address (NMDevice *self);
++gboolean nm_device_update_hw_address (NMDevice *self);
+ void nm_device_update_initial_hw_address (NMDevice *self);
+ void nm_device_update_permanent_hw_address (NMDevice *self);
+ void nm_device_update_dynamic_ip_setup (NMDevice *self);
+-- 
+2.7.4
+
+
+From d99c3b63e81347fb861e1306eb0b603cfa15223e Mon Sep 17 00:00:00 2001
+From: Thomas Haller <thaller@redhat.com>
+Date: Sun, 11 Sep 2016 09:48:56 +0200
+Subject: [PATCH 2/2] device: wait for MAC address change to complete before
+ setting interface up
+
+Some drivers (brcmfmac) don't change the MAC address right away.
+NetworkManager works around that by waiting synchronously until
+the address changes (commit 1a85103765d4eaa0acab6b03658a4f9cfe684a64).
+
+wpa_supplicant on the other hand, only re-reads the MAC address
+when changing state from DISABLED to ENABLED, which happens when
+the interface comes up.
+
+That is a bug in wpa_supplicant and the driver, but we can work-around by
+waiting until the MAC address actually changed before setting the interface
+IFF_UP. Also note, that there is still a race in wpa_supplicant which might
+miss a change to DISABLED state altogether.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=770504
+https://bugzilla.redhat.com/show_bug.cgi?id=1374023
+(cherry picked from commit 32f7c1d4b9aba597a99128631f07c2985149f303)
+(cherry picked from commit cd8f2ecc617a896d8007e6fe825c676a626a3b8d)
+---
+ src/devices/nm-device.c | 27 ++++++++++++++++-----------
+ 1 file changed, 16 insertions(+), 11 deletions(-)
+
+diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
+index 3e549c5..47e858b 100644
+--- a/src/devices/nm-device.c
++++ b/src/devices/nm-device.c
+@@ -11829,12 +11829,8 @@ _hw_addr_set (NMDevice *self,
+ 		        nm_platform_error_to_string (plerr));
+ 	}
+ 
+-	if (was_up) {
+-		if (!nm_device_bring_up (self, TRUE, NULL))
+-			return FALSE;
+-	}
+-
+ 	if (needs_refresh) {
++		success = TRUE;
+ 		if (_hw_addr_matches (self, addr)) {
+ 			/* the MAC address already changed during nm_device_bring_up() above. */
+ 		} else {
+@@ -11871,15 +11867,24 @@ handle_wait:
+ 					continue;
+ 				}
+ handle_fail:
+-				_LOGW (LOGD_DEVICE,
+-				       "set-hw-addr: new MAC address %s not successfully %s (%s)",
+-				       addr, operation, detail);
+-				return FALSE;
++				success = FALSE;
++				break;
+ 			}
+ 		}
+ 
+-		_LOGI (LOGD_DEVICE, "set-hw-addr: %s MAC address to %s (%s)",
+-		       operation, addr, detail);
++		if (success) {
++			_LOGI (LOGD_DEVICE, "set-hw-addr: %s MAC address to %s (%s)",
++			       operation, addr, detail);
++		} else {
++			_LOGW (LOGD_DEVICE,
++			       "set-hw-addr: new MAC address %s not successfully %s (%s)",
++			       addr, operation, detail);
++		}
++	}
++
++	if (was_up) {
++		if (!nm_device_bring_up (self, TRUE, NULL))
++			return FALSE;
+ 	}
+ 
+ 	return success;
+-- 
+2.7.4
+

diff --git a/net-misc/networkmanager/networkmanager-1.4.0-r1.ebuild b/net-misc/networkmanager/networkmanager-1.4.0-r1.ebuild
new file mode 100644
index 00000000..f116489
--- /dev/null
+++ b/net-misc/networkmanager/networkmanager-1.4.0-r1.ebuild
@@ -0,0 +1,349 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+GNOME_ORG_MODULE="NetworkManager"
+GNOME2_LA_PUNT="yes"
+VALA_USE_DEPEND="vapigen"
+PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
+
+inherit bash-completion-r1 gnome2 linux-info multilib python-any-r1 systemd \
+	user readme.gentoo-r1 toolchain-funcs vala versionator virtualx udev multilib-minimal
+
+DESCRIPTION="A set of co-operative tools that make networking simple and straightforward"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
+
+IUSE="audit bluetooth connection-sharing consolekit +dhclient gnutls +introspection \
+json kernel_linux +nss +modemmanager ncurses ofono +ppp resolvconf selinux \
+systemd teamd test vala +wext +wifi"
+
+REQUIRED_USE="
+	modemmanager? ( ppp )
+	vala? ( introspection )
+	wext? ( wifi )
+	^^ ( nss gnutls )
+"
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
+
+# gobject-introspection-0.10.3 is needed due to gnome bug 642300
+# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
+# TODO: need multilib janson (linked to libnm.so)
+COMMON_DEPEND="
+	>=sys-apps/dbus-1.2[${MULTILIB_USEDEP}]
+	>=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}]
+	>=dev-libs/glib-2.37.6:2[${MULTILIB_USEDEP}]
+	>=dev-libs/libnl-3.2.8:3=
+	>=sys-auth/polkit-0.106
+	net-libs/libndp
+	>=net-libs/libsoup-2.40:2.4=
+	net-misc/iputils
+	sys-libs/readline:0
+	>=virtual/libgudev-165:=[${MULTILIB_USEDEP}]
+	audit? ( sys-process/audit )
+	bluetooth? ( >=net-wireless/bluez-5 )
+	connection-sharing? (
+		net-dns/dnsmasq[dhcp]
+		net-firewall/iptables )
+	consolekit? ( >=sys-auth/consolekit-1.0.0 )
+	dhclient? ( >=net-misc/dhcp-4[client] )
+	gnutls? (
+		dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
+		>=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}] )
+	introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
+	json? ( dev-libs/jansson )
+	modemmanager? ( >=net-misc/modemmanager-0.7.991 )
+	ncurses? ( >=dev-libs/newt-0.52.15 )
+	nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
+	ofono? ( net-misc/ofono )
+	ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] )
+	resolvconf? ( net-dns/openresolv )
+	selinux? ( sys-libs/libselinux )
+	systemd? ( >=sys-apps/systemd-209:0= )
+	!systemd? (
+		!consolekit? ( || ( sys-power/upower sys-power/upower-pm-utils ) )
+	)
+	teamd? ( >=net-misc/libteam-1.9 )
+"
+RDEPEND="${COMMON_DEPEND}
+	wifi? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
+"
+DEPEND="${COMMON_DEPEND}
+	dev-util/gdbus-codegen
+	dev-util/gtk-doc-am
+	>=dev-util/intltool-0.40
+	>=sys-devel/gettext-0.17
+	>=sys-kernel/linux-headers-2.6.29
+	virtual/pkgconfig[${MULTILIB_USEDEP}]
+	vala? ( $(vala_depend) )
+	test? (
+		$(python_gen_any_dep '
+			dev-python/dbus-python[${PYTHON_USEDEP}]
+			dev-python/pygobject:3[${PYTHON_USEDEP}]')
+	)
+"
+
+PATCHES=(
+	# Fix with Fedora patches for:
+	# https://bugzilla.gnome.org/show_bug.cgi?id=770456
+	"${FILESDIR}"/${P}-wifi-mac{1,2}.patch
+	# and dhcp (both fixed in 1.4.1)
+	"${FILESDIR}"/${P}-dhcp-helper.patch
+)
+
+python_check_deps() {
+	if use test; then
+		has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
+		has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]"
+	else
+		return 0
+	fi
+}
+
+sysfs_deprecated_check() {
+	ebegin "Checking for SYSFS_DEPRECATED support"
+
+	if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
+		eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
+		eerror "or NetworkManager will not work correctly."
+		eerror "See https://bugs.gentoo.org/333639 for more info."
+		die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
+	fi
+	eend $?
+}
+
+pkg_pretend() {
+	if use kernel_linux; then
+		get_version
+		if linux_config_exists; then
+			sysfs_deprecated_check
+		else
+			ewarn "Was unable to determine your kernel .config"
+			ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
+			ewarn "See https://bugs.gentoo.org/333639 for more info."
+		fi
+
+	fi
+}
+
+pkg_setup() {
+	enewgroup plugdev
+
+	use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	DOC_CONTENTS="To modify system network connections without needing to enter the
+		root password, add your user account to the 'plugdev' group."
+
+	use vala && vala_src_prepare
+	gnome2_src_prepare
+}
+
+multilib_src_configure() {
+	local myconf=()
+
+	# Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
+	if use ppp; then
+		local PPPD_VER=`best_version net-dialup/ppp`
+		PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
+		PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
+		myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
+	fi
+
+	# unit files directory needs to be passed only when systemd is enabled,
+	# otherwise systemd support is not disabled completely, bug #524534
+	use systemd && myconf+=( --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" )
+
+	if multilib_is_native_abi; then
+		# work-around man out-of-source brokenness, must be done before configure
+		mkdir man || die
+		find "${S}"/man -name '*.?' -exec ln -s {} man/ ';' || die
+	else
+		# libnl, libndp are only used for executables, not libraries
+		myconf+=( LIB{NL,NDP}_{CFLAGS,LIBS}=' ' )
+	fi
+
+	# ifnet plugin always disabled until someone volunteers to actively
+	# maintain and fix it
+	# Also disable dhcpcd support as it's also completely unmaintained
+	# and facing bugs like #563938 and many others
+	#
+	# We need --with-libnm-glib (and dbus-glib dep) as reverse deps are
+	# still not ready for removing that lib
+	ECONF_SOURCE=${S} \
+	runstatedir="/run" \
+		gnome2_src_configure \
+		--disable-more-warnings \
+		--disable-static \
+		--localstatedir=/var \
+		--disable-lto \
+		--disable-config-plugin-ibft \
+		--disable-ifnet \
+		--disable-qt \
+		--without-netconfig \
+		--with-dbus-sys-dir=/etc/dbus-1/system.d \
+		--with-libnm-glib \
+		--with-nmcli=yes \
+		--with-udev-dir="$(get_udevdir)" \
+		--with-config-plugins-default=keyfile \
+		--with-iptables=/sbin/iptables \
+		$(multilib_native_with libsoup) \
+		$(multilib_native_enable concheck) \
+		--with-crypto=$(usex nss nss gnutls) \
+		--with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex consolekit consolekit no)) \
+		--with-suspend-resume=$(multilib_native_usex systemd systemd $(multilib_native_usex consolekit consolekit upower)) \
+		$(multilib_native_use_with audit libaudit) \
+		$(multilib_native_use_enable bluetooth bluez5-dun) \
+		$(multilib_native_use_enable introspection) \
+		$(multilib_native_use_enable json json-validation) \
+		$(multilib_native_use_enable ppp) \
+		$(use_with dhclient) \
+		--without-dhcpcd \
+		$(multilib_native_use_with modemmanager modem-manager-1) \
+		$(multilib_native_use_with ncurses nmtui) \
+		$(multilib_native_use_with ofono) \
+		$(multilib_native_use_with resolvconf) \
+		$(multilib_native_use_with selinux) \
+		$(multilib_native_use_with systemd systemd-journal) \
+		$(multilib_native_use_enable teamd teamdctl) \
+		$(multilib_native_use_enable test tests) \
+		$(multilib_native_use_enable vala) \
+		--without-valgrind \
+		$(multilib_native_use_with wext) \
+		$(multilib_native_use_enable wifi) \
+		"${myconf[@]}"
+
+	# work-around gtk-doc out-of-source brokedness
+	if multilib_is_native_abi; then
+		local d
+		for d in api libnm libnm-util libnm-glib; do
+			ln -s "${S}"/docs/${d}/html docs/${d}/html || die
+		done
+	fi
+
+	# Disable examples
+	# https://bugzilla.gnome.org/show_bug.cgi?id=769711
+	cat > examples/Makefile <<-EOF
+	.PHONY: all check install
+	all:
+	check:
+	install:
+	EOF
+}
+
+multilib_src_compile() {
+	if multilib_is_native_abi; then
+		emake
+	else
+		emake all-am
+		emake -C shared
+		emake -C introspection # generated headers, needed for libnm
+		emake -C libnm-core
+		emake -C libnm
+		emake -C libnm-util
+		emake -C libnm-glib
+	fi
+}
+
+multilib_src_test() {
+	if use test && multilib_is_native_abi; then
+		python_setup
+		virtx emake check
+	fi
+}
+
+multilib_src_install() {
+	if multilib_is_native_abi; then
+		# Install completions at proper place, bug #465100
+		gnome2_src_install completiondir="$(get_bashcompdir)"
+	else
+		emake DESTDIR="${D}" install-am
+		emake DESTDIR="${D}" install -C shared
+		emake DESTDIR="${D}" install -C introspection
+		emake DESTDIR="${D}" install -C libnm-core
+		emake DESTDIR="${D}" install -C libnm
+		emake DESTDIR="${D}" install -C libnm-util
+		emake DESTDIR="${D}" install -C libnm-glib
+	fi
+}
+
+multilib_src_install_all() {
+	! use systemd && readme.gentoo_create_doc
+
+	newinitd "${FILESDIR}/init.d.NetworkManager" NetworkManager
+	newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
+
+	# Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
+	keepdir /etc/NetworkManager/dispatcher.d
+
+	# Provide openrc net dependency only when nm is connected
+	exeinto /etc/NetworkManager/dispatcher.d
+	newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
+	sed -e "s:@EPREFIX@:${EPREFIX}:g" \
+		-i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
+
+	keepdir /etc/NetworkManager/system-connections
+	chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
+
+	# Allow users in plugdev group to modify system connections
+	insinto /usr/share/polkit-1/rules.d/
+	doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
+
+	# Remove empty /run/NetworkManager
+	rmdir "${D}"/run/NetworkManager "${D}"/run || die
+}
+
+pkg_postinst() {
+	gnome2_pkg_postinst
+	! use systemd && readme.gentoo_print_elog
+
+	if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
+		ewarn "The ${PN} system configuration file has moved to a new location."
+		ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
+		ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
+		ewarn
+		ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
+	fi
+
+	# The polkit rules file moved to /usr/share
+	old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
+	if [[ -f "${old_rules}" ]]; then
+		case "$(md5sum ${old_rules})" in
+		  574d0cfa7e911b1f7792077003060240* )
+			# Automatically delete the old rules.d file if the user did not change it
+			elog
+			elog "Removing old ${old_rules} ..."
+			rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
+			;;
+		  * )
+			elog "The ${old_rules}"
+			elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
+			elog "If you edited ${old_rules}"
+			elog "without changing its behavior, you may want to remove it."
+			;;
+		esac
+	fi
+
+	# NM fallbacks to plugin specified at compile time (upstream bug #738611)
+	# but still show a warning to remember people to have cleaner config file
+	if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
+		if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
+			ewarn
+			ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
+			ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
+			ewarn
+		fi
+	fi
+
+	# NM shows lots of errors making nmcli neither unusable, bug #528748 upstream bug #690457
+	if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
+		ewarn "You have psk-flags=1 setting in above files, you will need to"
+		ewarn "either reconfigure affected networks or, at least, set the flag"
+		ewarn "value to '0'."
+	fi
+}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/
@ 2016-09-29 18:31 Pacho Ramos
  0 siblings, 0 replies; 14+ messages in thread
From: Pacho Ramos @ 2016-09-29 18:31 UTC (permalink / raw
  To: gentoo-commits

commit:     e9606f0e918e2ade8431684f3e40bc800cd0efcb
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 29 17:47:36 2016 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Thu Sep 29 18:31:13 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9606f0e

net-misc/networkmanager: Drop old

Package-Manager: portage-2.3.0

 net-misc/networkmanager/Manifest                   |   1 -
 net-misc/networkmanager/files/1.2.4-upower.patch   |  67 ----
 ...anager-1.2.2-sleep-monitor-upower-include.patch |  30 --
 .../networkmanager/networkmanager-1.2.4.ebuild     | 333 --------------------
 .../networkmanager/networkmanager-1.4.0.ebuild     | 341 ---------------------
 5 files changed, 772 deletions(-)

diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest
index c37c3c3..0c9fa51 100644
--- a/net-misc/networkmanager/Manifest
+++ b/net-misc/networkmanager/Manifest
@@ -1,3 +1,2 @@
 DIST NetworkManager-1.0.12.tar.xz 3490836 SHA256 3a470f8c60109b1acb5784ddc2423501706b5fe34c793a6faee87e591eb04a9e SHA512 926c0139dc7ade7bbc512f0d2e386a42a278aceff68996bc3a18fb1940f5d516f0ff2768459d6f50fd5669d72c15202307396bb3cf8b67c3dbac19db484b971c WHIRLPOOL 6178af61fb30a7e8b72cc05296a014a5be5b10fed41cd5385f0bebae1fa22519c83cf8c359479372f063fc2b891715015454c53cd4f1f1516fc03bca76a552ac
-DIST NetworkManager-1.2.4.tar.xz 3728788 SHA256 19bfb7306dd472d010443a8027d91f9fd50fe6e0c5aa4ea8083845de0fa38faa SHA512 83fa179c0f360c7f40504cf58275e28638b5a986458c99adc85567595ca170ac3d081ffa0c99e5619c97d4a3228e5318e613330894547ad3438eaa2bfcc1f28b WHIRLPOOL 625cf2a32f5fb1e5ae537f2285f6945ca14f438959fb5556b490a90fe16eddcfb22e84c82f8f0f479f2387ec54ba292b18f28c0676375d729f9bb6a435d9e12b
 DIST NetworkManager-1.4.0.tar.xz 3699568 SHA256 c4d5e075998a291074501602a5068a7e54d9e0f2658aba079d58145d65be531d SHA512 2580e885684f6ad464eebdf9e0dab5432d4d45f0f4127af7f8947be16fc5ce84a5cc090e195b68619c14e218d9cffcde1615400c19326e58bdac8fdf7b53fb46 WHIRLPOOL 39607ac0606039c242b2033b9e540c3beb88e7f48fdb8188d942341a57e097dc0e9c7bde248b6d9ae65bd3ac94df83b5e7d7a371baf7f32c8542581c3bdf778c

diff --git a/net-misc/networkmanager/files/1.2.4-upower.patch b/net-misc/networkmanager/files/1.2.4-upower.patch
deleted file mode 100644
index a08e34a..00000000
--- a/net-misc/networkmanager/files/1.2.4-upower.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From f864c58cfe87533c69dcf00e3ea236809392a8e0 Mon Sep 17 00:00:00 2001
-From: Beniamino Galvani <bgalvani@redhat.com>
-Date: Thu, 4 Aug 2016 16:25:30 +0200
-Subject: build: fix build with '--with-suspend-resume=upower'
-
-Now we have a single file for all suspend APIs and the selection is
-done through the preprocessor: remove stale AM_CONDITIONALs and define
-SUSPEND_RESUME_UPOWER when needed.
-
-Fixes: c76eb3e8f7a80b69c570b513ee3eb16bea1b34bd
-(cherry picked from commit e4b2c989dc51818e52906b5120ea6a0659274631)
-
-diff --git a/configure.ac b/configure.ac
-index 46775c3..7869f07 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -472,7 +472,9 @@ if test "z$with_suspend_resume" = "z"; then
- fi
- 
- case $with_suspend_resume in
--    upower) ;;
-+    upower)
-+        AC_DEFINE([SUSPEND_RESUME_UPOWER], 1, [Define to 1 to use UPower suspend api])
-+	;;
-     systemd)
-         PKG_CHECK_MODULES(SYSTEMD_INHIBIT, [libsystemd >= 209],,
-                           [PKG_CHECK_MODULES(SYSTEMD_INHIBIT, [libsystemd-login >= 183])])
-@@ -485,9 +487,6 @@ case $with_suspend_resume in
-         AC_MSG_ERROR(--with-suspend-resume must be one of [upower, systemd, consolekit])
-         ;;
- esac
--AM_CONDITIONAL(SUSPEND_RESUME_UPOWER, test "x$with_suspend_resume" = "xupower")
--AM_CONDITIONAL(SUSPEND_RESUME_SYSTEMD, test "x$with_suspend_resume" = "xsystemd")
--AM_CONDITIONAL(SUSPEND_RESUME_CONSOLEKIT, test "x$with_suspend_resume" = "xconsolekit")
- 
- # SELinux support
- AC_ARG_WITH(selinux, AS_HELP_STRING([--with-selinux=yes|no|auto], [Build with SELinux (default: auto)]),,[with_selinux=auto])
--- 
-cgit v0.10.2
-
---- a/config.h.in
-+++ b/config.h.in
-@@ -216,6 +216,9 @@
- /* Define to 1 to use systemd suspend api */
- #undef SUSPEND_RESUME_SYSTEMD
- 
-+/* Define to 1 to use UPower suspend api */
-+#undef SUSPEND_RESUME_UPOWER
-+
- /* Define to 1 if libsystemd-journald is available */
- #undef SYSTEMD_JOURNAL
- 
---- a/configure
-+++ b/configure
-@@ -22776,7 +22776,11 @@
- fi
- 
- case $with_suspend_resume in
--    upower) ;;
-+    upower)
-+
-+$as_echo "#define SUSPEND_RESUME_UPOWER 1" >>confdefs.h
-+
-+       ;;
-     systemd)
- 
- pkg_failed=no

diff --git a/net-misc/networkmanager/files/networkmanager-1.2.2-sleep-monitor-upower-include.patch b/net-misc/networkmanager/files/networkmanager-1.2.2-sleep-monitor-upower-include.patch
deleted file mode 100644
index 52a21c4..00000000
--- a/net-misc/networkmanager/files/networkmanager-1.2.2-sleep-monitor-upower-include.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 10ba492047b1ad80adeeb878e7f155a13638da7f Mon Sep 17 00:00:00 2001
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Wed, 18 May 2016 10:43:51 +0200
-Subject: [PATCH] sleep-monitor-upower: add missing include
-
-Otherwise building fails with:
-
-  nm-sleep-monitor-upower.c:132:45: error: expected declaration specifiers or '...' before 'nm_sleep_monitor_get'
-  nm-sleep-monitor-upower.c:132:67: error: expected declaration specifiers or '...' before '(' token
-
-https://mail.gnome.org/archives/networkmanager-list/2016-May/msg00053.html
----
- src/nm-sleep-monitor-upower.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/nm-sleep-monitor-upower.c b/src/nm-sleep-monitor-upower.c
-index 5f0ff24..8d07190 100644
---- a/src/nm-sleep-monitor-upower.c
-+++ b/src/nm-sleep-monitor-upower.c
-@@ -24,6 +24,7 @@
- #include <sys/stat.h>
- 
- #include "nm-core-internal.h"
-+#include "NetworkManagerUtils.h"
- 
- #include "nm-sleep-monitor.h"
- 
--- 
-2.9.0
-

diff --git a/net-misc/networkmanager/networkmanager-1.2.4.ebuild b/net-misc/networkmanager/networkmanager-1.2.4.ebuild
deleted file mode 100644
index 773be0e..00000000
--- a/net-misc/networkmanager/networkmanager-1.2.4.ebuild
+++ /dev/null
@@ -1,333 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=6
-GNOME_ORG_MODULE="NetworkManager"
-GNOME2_LA_PUNT="yes"
-VALA_USE_DEPEND="vapigen"
-PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
-
-inherit bash-completion-r1 gnome2 linux-info multilib python-any-r1 systemd \
-	user readme.gentoo-r1 toolchain-funcs vala versionator virtualx udev multilib-minimal
-
-DESCRIPTION="A set of co-operative tools that make networking simple and straightforward"
-HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
-
-LICENSE="GPL-2+"
-SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
-
-IUSE="bluetooth connection-sharing consolekit +dhclient gnutls +introspection \
-kernel_linux +nss +modemmanager ncurses +ppp resolvconf selinux systemd teamd test \
-vala +wext +wifi"
-
-REQUIRED_USE="
-	modemmanager? ( ppp )
-	wext? ( wifi )
-	^^ ( nss gnutls )
-"
-
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
-
-# gobject-introspection-0.10.3 is needed due to gnome bug 642300
-# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
-COMMON_DEPEND="
-	>=sys-apps/dbus-1.2[${MULTILIB_USEDEP}]
-	>=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}]
-	>=dev-libs/glib-2.37.6:2[${MULTILIB_USEDEP}]
-	>=dev-libs/libnl-3.2.8:3=
-	>=sys-auth/polkit-0.106
-	net-libs/libndp
-	>=net-libs/libsoup-2.40:2.4=
-	net-misc/iputils
-	sys-libs/readline:0=
-	>=virtual/libgudev-165:=[${MULTILIB_USEDEP}]
-	bluetooth? ( >=net-wireless/bluez-5 )
-	connection-sharing? (
-		net-dns/dnsmasq[dhcp]
-		net-firewall/iptables )
-	gnutls? (
-		dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
-		>=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}] )
-	modemmanager? ( >=net-misc/modemmanager-0.7.991 )
-	ncurses? ( >=dev-libs/newt-0.52.15 )
-	nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
-	dhclient? ( >=net-misc/dhcp-4[client] )
-	introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
-	ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] )
-	resolvconf? ( net-dns/openresolv )
-	systemd? ( >=sys-apps/systemd-209:0= )
-	!systemd? ( || ( sys-power/upower sys-power/upower-pm-utils ) )
-	teamd? ( >=net-misc/libteam-1.9 )
-"
-RDEPEND="${COMMON_DEPEND}
-	consolekit? ( sys-auth/consolekit )
-	wifi? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
-"
-DEPEND="${COMMON_DEPEND}
-	dev-util/gdbus-codegen
-	dev-util/gtk-doc-am
-	>=dev-util/intltool-0.40
-	>=sys-devel/gettext-0.17
-	>=sys-kernel/linux-headers-2.6.29
-	virtual/pkgconfig
-	vala? ( $(vala_depend) )
-	test? (
-		$(python_gen_any_dep '
-			dev-python/dbus-python[${PYTHON_USEDEP}]
-			dev-python/pygobject:3[${PYTHON_USEDEP}]')
-	)
-"
-
-python_check_deps() {
-	if use test; then
-		has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
-		has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]"
-	else
-		return 0
-	fi
-}
-
-sysfs_deprecated_check() {
-	ebegin "Checking for SYSFS_DEPRECATED support"
-
-	if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
-		eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
-		eerror "or NetworkManager will not work correctly."
-		eerror "See https://bugs.gentoo.org/333639 for more info."
-		die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
-	fi
-	eend $?
-}
-
-pkg_pretend() {
-	if use kernel_linux; then
-		get_version
-		if linux_config_exists; then
-			sysfs_deprecated_check
-		else
-			ewarn "Was unable to determine your kernel .config"
-			ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
-			ewarn "See https://bugs.gentoo.org/333639 for more info."
-		fi
-
-	fi
-}
-
-pkg_setup() {
-	enewgroup plugdev
-}
-
-src_prepare() {
-	DOC_CONTENTS="To modify system network connections without needing to enter the
-		root password, add your user account to the 'plugdev' group."
-
-	local PATCHES=(
-		# https://bugs.gentoo.org/590432
-		"${FILESDIR}/1.2.4-upower.patch"
-	)
-
-	use vala && vala_src_prepare
-	gnome2_src_prepare
-}
-
-multilib_src_configure() {
-	local myconf=()
-
-	# Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
-	if use ppp; then
-		local PPPD_VER=`best_version net-dialup/ppp`
-		PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
-		PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
-		myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
-	fi
-
-	# unit files directory needs to be passed only when systemd is enabled,
-	# otherwise systemd support is not disabled completely, bug #524534
-	use systemd && myconf+=( --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" )
-
-	if multilib_is_native_abi; then
-		# work-around man out-of-source brokenness, must be done before configure
-		mkdir man || die
-		find "${S}"/man -name '*.?' -exec ln -s {} man/ ';' || die
-	else
-		# libnl, libndp are only used for executables, not libraries
-		myconf+=( LIB{NL,NDP}_{CFLAGS,LIBS}=' ' )
-	fi
-
-	# ifnet plugin always disabled until someone volunteers to actively
-	# maintain and fix it
-	# Also disable dhcpcd support as it's also completely unmaintained
-	# and facing bugs like #563938 and many others
-	#
-	# We need --with-libnm-glib (and dbus-glib dep) as reverse deps are
-	# still not ready for removing that lib
-	ECONF_SOURCE=${S} \
-	runstatedir="/run" \
-		gnome2_src_configure \
-		--disable-more-warnings \
-		--disable-static \
-		--localstatedir=/var \
-		--disable-lto \
-		--disable-config-plugin-ibft \
-		--disable-ifnet \
-		--disable-qt \
-		--without-netconfig \
-		--with-dbus-sys-dir=/etc/dbus-1/system.d \
-		--with-libnm-glib \
-		--with-nmcli=yes \
-		--with-udev-dir="$(get_udevdir)" \
-		--with-config-plugins-default=keyfile \
-		--with-iptables=/sbin/iptables \
-		$(multilib_native_with libsoup) \
-		$(multilib_native_enable concheck) \
-		--with-crypto=$(usex nss nss gnutls) \
-		--with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex consolekit consolekit no)) \
-		--with-suspend-resume=$(multilib_native_usex systemd systemd upower) \
-		$(multilib_native_use_enable bluetooth bluez5-dun) \
-		$(multilib_native_use_enable introspection) \
-		$(multilib_native_use_enable ppp) \
-		$(use_with dhclient) \
-		--without-dhcpcd \
-		$(multilib_native_use_with modemmanager modem-manager-1) \
-		$(multilib_native_use_with ncurses nmtui) \
-		$(multilib_native_use_with resolvconf) \
-		$(multilib_native_use_with selinux) \
-		$(multilib_native_use_with systemd systemd-journal) \
-		$(multilib_native_use_enable teamd teamdctl) \
-		$(multilib_native_use_enable test tests) \
-		$(multilib_native_use_enable vala) \
-		--without-valgrind \
-		$(multilib_native_use_with wext) \
-		$(multilib_native_use_enable wifi) \
-		"${myconf[@]}"
-
-	# work-around gtk-doc out-of-source brokedness
-	if multilib_is_native_abi; then
-		local d
-		for d in api libnm libnm-util libnm-glib; do
-			ln -s "${S}"/docs/${d}/html docs/${d}/html || die
-		done
-	fi
-
-	# Disable examples
-	# https://bugzilla.gnome.org/show_bug.cgi?id=769711
-	cat > examples/Makefile <<-EOF
-	.PHONY: all check install
-	all:
-	check:
-	install:
-	EOF
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi; then
-		emake
-	else
-		emake all-am
-		emake -C shared
-		emake -C introspection # generated headers, needed for libnm
-		emake -C libnm-core
-		emake -C libnm
-		emake -C libnm-util
-		emake -C libnm-glib
-	fi
-}
-
-multilib_src_test() {
-	if use test && multilib_is_native_abi; then
-		python_setup
-		virtx emake check
-	fi
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi; then
-		# Install completions at proper place, bug #465100
-		gnome2_src_install completiondir="$(get_bashcompdir)"
-	else
-		emake DESTDIR="${D}" install-am
-		emake DESTDIR="${D}" install -C shared
-		emake DESTDIR="${D}" install -C introspection
-		emake DESTDIR="${D}" install -C libnm-core
-		emake DESTDIR="${D}" install -C libnm
-		emake DESTDIR="${D}" install -C libnm-util
-		emake DESTDIR="${D}" install -C libnm-glib
-	fi
-}
-
-multilib_src_install_all() {
-	! use systemd && readme.gentoo_create_doc
-
-	newinitd "${FILESDIR}/init.d.NetworkManager" NetworkManager
-	newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
-
-	# Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
-	keepdir /etc/NetworkManager/dispatcher.d
-
-	# Provide openrc net dependency only when nm is connected
-	exeinto /etc/NetworkManager/dispatcher.d
-	newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
-	sed -e "s:@EPREFIX@:${EPREFIX}:g" \
-		-i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
-
-	keepdir /etc/NetworkManager/system-connections
-	chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
-
-	# Allow users in plugdev group to modify system connections
-	insinto /usr/share/polkit-1/rules.d/
-	doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
-
-	# Remove empty /run/NetworkManager
-	rmdir "${D}"/run/NetworkManager "${D}"/run || die
-}
-
-pkg_postinst() {
-	gnome2_pkg_postinst
-	! use systemd && readme.gentoo_print_elog
-
-	if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
-		ewarn "The ${PN} system configuration file has moved to a new location."
-		ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
-		ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
-		ewarn
-		ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
-	fi
-
-	# The polkit rules file moved to /usr/share
-	old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
-	if [[ -f "${old_rules}" ]]; then
-		case "$(md5sum ${old_rules})" in
-		  574d0cfa7e911b1f7792077003060240* )
-			# Automatically delete the old rules.d file if the user did not change it
-			elog
-			elog "Removing old ${old_rules} ..."
-			rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
-			;;
-		  * )
-			elog "The ${old_rules}"
-			elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
-			elog "If you edited ${old_rules}"
-			elog "without changing its behavior, you may want to remove it."
-			;;
-		esac
-	fi
-
-	# NM fallbacks to plugin specified at compile time (upstream bug #738611)
-	# but still show a warning to remember people to have cleaner config file
-	if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
-		if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
-			ewarn
-			ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
-			ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
-			ewarn
-		fi
-	fi
-
-	# NM shows lots of errors making nmcli neither unusable, bug #528748 upstream bug #690457
-	if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
-		ewarn "You have psk-flags=1 setting in above files, you will need to"
-		ewarn "either reconfigure affected networks or, at least, set the flag"
-		ewarn "value to '0'."
-	fi
-}

diff --git a/net-misc/networkmanager/networkmanager-1.4.0.ebuild b/net-misc/networkmanager/networkmanager-1.4.0.ebuild
deleted file mode 100644
index c735125..00000000
--- a/net-misc/networkmanager/networkmanager-1.4.0.ebuild
+++ /dev/null
@@ -1,341 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=6
-GNOME_ORG_MODULE="NetworkManager"
-GNOME2_LA_PUNT="yes"
-VALA_USE_DEPEND="vapigen"
-PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
-
-inherit bash-completion-r1 gnome2 linux-info multilib python-any-r1 systemd \
-	user readme.gentoo-r1 toolchain-funcs vala versionator virtualx udev multilib-minimal
-
-DESCRIPTION="A set of co-operative tools that make networking simple and straightforward"
-HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
-
-LICENSE="GPL-2+"
-SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
-
-IUSE="audit bluetooth connection-sharing consolekit +dhclient gnutls +introspection \
-json kernel_linux +nss +modemmanager ncurses ofono +ppp resolvconf selinux \
-systemd teamd test vala +wext +wifi"
-
-REQUIRED_USE="
-	modemmanager? ( ppp )
-	vala? ( introspection )
-	wext? ( wifi )
-	^^ ( nss gnutls )
-"
-
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
-
-# gobject-introspection-0.10.3 is needed due to gnome bug 642300
-# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
-# TODO: need multilib janson (linked to libnm.so)
-COMMON_DEPEND="
-	>=sys-apps/dbus-1.2[${MULTILIB_USEDEP}]
-	>=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}]
-	>=dev-libs/glib-2.37.6:2[${MULTILIB_USEDEP}]
-	>=dev-libs/libnl-3.2.8:3=
-	>=sys-auth/polkit-0.106
-	net-libs/libndp
-	>=net-libs/libsoup-2.40:2.4=
-	net-misc/iputils
-	sys-libs/readline:0=
-	>=virtual/libgudev-165:=[${MULTILIB_USEDEP}]
-	audit? ( sys-process/audit )
-	bluetooth? ( >=net-wireless/bluez-5 )
-	connection-sharing? (
-		net-dns/dnsmasq[dhcp]
-		net-firewall/iptables )
-	consolekit? ( >=sys-auth/consolekit-1.0.0 )
-	dhclient? ( >=net-misc/dhcp-4[client] )
-	gnutls? (
-		dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
-		>=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}] )
-	introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
-	json? ( dev-libs/jansson )
-	modemmanager? ( >=net-misc/modemmanager-0.7.991 )
-	ncurses? ( >=dev-libs/newt-0.52.15 )
-	nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
-	ofono? ( net-misc/ofono )
-	ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] )
-	resolvconf? ( net-dns/openresolv )
-	selinux? ( sys-libs/libselinux )
-	systemd? ( >=sys-apps/systemd-209:0= )
-	!systemd? (
-		!consolekit? ( || ( sys-power/upower sys-power/upower-pm-utils ) )
-	)
-	teamd? ( >=net-misc/libteam-1.9 )
-"
-RDEPEND="${COMMON_DEPEND}
-	wifi? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
-"
-DEPEND="${COMMON_DEPEND}
-	dev-util/gdbus-codegen
-	dev-util/gtk-doc-am
-	>=dev-util/intltool-0.40
-	>=sys-devel/gettext-0.17
-	>=sys-kernel/linux-headers-2.6.29
-	virtual/pkgconfig[${MULTILIB_USEDEP}]
-	vala? ( $(vala_depend) )
-	test? (
-		$(python_gen_any_dep '
-			dev-python/dbus-python[${PYTHON_USEDEP}]
-			dev-python/pygobject:3[${PYTHON_USEDEP}]')
-	)
-"
-
-python_check_deps() {
-	if use test; then
-		has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
-		has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]"
-	else
-		return 0
-	fi
-}
-
-sysfs_deprecated_check() {
-	ebegin "Checking for SYSFS_DEPRECATED support"
-
-	if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
-		eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
-		eerror "or NetworkManager will not work correctly."
-		eerror "See https://bugs.gentoo.org/333639 for more info."
-		die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
-	fi
-	eend $?
-}
-
-pkg_pretend() {
-	if use kernel_linux; then
-		get_version
-		if linux_config_exists; then
-			sysfs_deprecated_check
-		else
-			ewarn "Was unable to determine your kernel .config"
-			ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
-			ewarn "See https://bugs.gentoo.org/333639 for more info."
-		fi
-
-	fi
-}
-
-pkg_setup() {
-	enewgroup plugdev
-
-	use test && python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	DOC_CONTENTS="To modify system network connections without needing to enter the
-		root password, add your user account to the 'plugdev' group."
-
-	use vala && vala_src_prepare
-	gnome2_src_prepare
-}
-
-multilib_src_configure() {
-	local myconf=()
-
-	# Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
-	if use ppp; then
-		local PPPD_VER=`best_version net-dialup/ppp`
-		PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
-		PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
-		myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
-	fi
-
-	# unit files directory needs to be passed only when systemd is enabled,
-	# otherwise systemd support is not disabled completely, bug #524534
-	use systemd && myconf+=( --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" )
-
-	if multilib_is_native_abi; then
-		# work-around man out-of-source brokenness, must be done before configure
-		mkdir man || die
-		find "${S}"/man -name '*.?' -exec ln -s {} man/ ';' || die
-	else
-		# libnl, libndp are only used for executables, not libraries
-		myconf+=( LIB{NL,NDP}_{CFLAGS,LIBS}=' ' )
-	fi
-
-	# ifnet plugin always disabled until someone volunteers to actively
-	# maintain and fix it
-	# Also disable dhcpcd support as it's also completely unmaintained
-	# and facing bugs like #563938 and many others
-	#
-	# We need --with-libnm-glib (and dbus-glib dep) as reverse deps are
-	# still not ready for removing that lib
-	ECONF_SOURCE=${S} \
-	runstatedir="/run" \
-		gnome2_src_configure \
-		--disable-more-warnings \
-		--disable-static \
-		--localstatedir=/var \
-		--disable-lto \
-		--disable-config-plugin-ibft \
-		--disable-ifnet \
-		--disable-qt \
-		--without-netconfig \
-		--with-dbus-sys-dir=/etc/dbus-1/system.d \
-		--with-libnm-glib \
-		--with-nmcli=yes \
-		--with-udev-dir="$(get_udevdir)" \
-		--with-config-plugins-default=keyfile \
-		--with-iptables=/sbin/iptables \
-		$(multilib_native_with libsoup) \
-		$(multilib_native_enable concheck) \
-		--with-crypto=$(usex nss nss gnutls) \
-		--with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex consolekit consolekit no)) \
-		--with-suspend-resume=$(multilib_native_usex systemd systemd $(multilib_native_usex consolekit consolekit upower)) \
-		$(multilib_native_use_with audit libaudit) \
-		$(multilib_native_use_enable bluetooth bluez5-dun) \
-		$(multilib_native_use_enable introspection) \
-		$(multilib_native_use_enable json json-validation) \
-		$(multilib_native_use_enable ppp) \
-		$(use_with dhclient) \
-		--without-dhcpcd \
-		$(multilib_native_use_with modemmanager modem-manager-1) \
-		$(multilib_native_use_with ncurses nmtui) \
-		$(multilib_native_use_with ofono) \
-		$(multilib_native_use_with resolvconf) \
-		$(multilib_native_use_with selinux) \
-		$(multilib_native_use_with systemd systemd-journal) \
-		$(multilib_native_use_enable teamd teamdctl) \
-		$(multilib_native_use_enable test tests) \
-		$(multilib_native_use_enable vala) \
-		--without-valgrind \
-		$(multilib_native_use_with wext) \
-		$(multilib_native_use_enable wifi) \
-		"${myconf[@]}"
-
-	# work-around gtk-doc out-of-source brokedness
-	if multilib_is_native_abi; then
-		local d
-		for d in api libnm libnm-util libnm-glib; do
-			ln -s "${S}"/docs/${d}/html docs/${d}/html || die
-		done
-	fi
-
-	# Disable examples
-	# https://bugzilla.gnome.org/show_bug.cgi?id=769711
-	cat > examples/Makefile <<-EOF
-	.PHONY: all check install
-	all:
-	check:
-	install:
-	EOF
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi; then
-		emake
-	else
-		emake all-am
-		emake -C shared
-		emake -C introspection # generated headers, needed for libnm
-		emake -C libnm-core
-		emake -C libnm
-		emake -C libnm-util
-		emake -C libnm-glib
-	fi
-}
-
-multilib_src_test() {
-	if use test && multilib_is_native_abi; then
-		python_setup
-		virtx emake check
-	fi
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi; then
-		# Install completions at proper place, bug #465100
-		gnome2_src_install completiondir="$(get_bashcompdir)"
-	else
-		emake DESTDIR="${D}" install-am
-		emake DESTDIR="${D}" install -C shared
-		emake DESTDIR="${D}" install -C introspection
-		emake DESTDIR="${D}" install -C libnm-core
-		emake DESTDIR="${D}" install -C libnm
-		emake DESTDIR="${D}" install -C libnm-util
-		emake DESTDIR="${D}" install -C libnm-glib
-	fi
-}
-
-multilib_src_install_all() {
-	! use systemd && readme.gentoo_create_doc
-
-	newinitd "${FILESDIR}/init.d.NetworkManager" NetworkManager
-	newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
-
-	# Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
-	keepdir /etc/NetworkManager/dispatcher.d
-
-	# Provide openrc net dependency only when nm is connected
-	exeinto /etc/NetworkManager/dispatcher.d
-	newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
-	sed -e "s:@EPREFIX@:${EPREFIX}:g" \
-		-i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
-
-	keepdir /etc/NetworkManager/system-connections
-	chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
-
-	# Allow users in plugdev group to modify system connections
-	insinto /usr/share/polkit-1/rules.d/
-	doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
-
-	# Remove empty /run/NetworkManager
-	rmdir "${D}"/run/NetworkManager "${D}"/run || die
-}
-
-pkg_postinst() {
-	gnome2_pkg_postinst
-	! use systemd && readme.gentoo_print_elog
-
-	if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
-		ewarn "The ${PN} system configuration file has moved to a new location."
-		ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
-		ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
-		ewarn
-		ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
-	fi
-
-	# The polkit rules file moved to /usr/share
-	old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
-	if [[ -f "${old_rules}" ]]; then
-		case "$(md5sum ${old_rules})" in
-		  574d0cfa7e911b1f7792077003060240* )
-			# Automatically delete the old rules.d file if the user did not change it
-			elog
-			elog "Removing old ${old_rules} ..."
-			rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
-			;;
-		  * )
-			elog "The ${old_rules}"
-			elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
-			elog "If you edited ${old_rules}"
-			elog "without changing its behavior, you may want to remove it."
-			;;
-		esac
-	fi
-
-	# NM fallbacks to plugin specified at compile time (upstream bug #738611)
-	# but still show a warning to remember people to have cleaner config file
-	if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
-		if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
-			ewarn
-			ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
-			ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
-			ewarn
-		fi
-	fi
-
-	# NM shows lots of errors making nmcli neither unusable, bug #528748 upstream bug #690457
-	if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
-		ewarn "You have psk-flags=1 setting in above files, you will need to"
-		ewarn "either reconfigure affected networks or, at least, set the flag"
-		ewarn "value to '0'."
-	fi
-}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/
@ 2017-01-21 15:35 Pacho Ramos
  0 siblings, 0 replies; 14+ messages in thread
From: Pacho Ramos @ 2017-01-21 15:35 UTC (permalink / raw
  To: gentoo-commits

commit:     ab9e689bb80ff7ec7372d4439823abaa068fa1aa
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 21 15:34:11 2017 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sat Jan 21 15:35:03 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab9e689b

net-misc/networkmanager: Try to use consolekit service if built with that support to prevent race conditions (#595806)

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 .../networkmanager/files/init.d.NetworkManager-r1  |  58 ++++
 .../networkmanager/networkmanager-1.4.4-r1.ebuild  | 342 +++++++++++++++++++++
 2 files changed, 400 insertions(+)

diff --git a/net-misc/networkmanager/files/init.d.NetworkManager-r1 b/net-misc/networkmanager/files/init.d.NetworkManager-r1
new file mode 100644
index 00000000..fbb8973
--- /dev/null
+++ b/net-misc/networkmanager/files/init.d.NetworkManager-r1
@@ -0,0 +1,58 @@
+#!/sbin/openrc-run
+# Copyright (c) 2008 Saleem Abdulrasool <compnerd@compnerd.org>
+# Distributed under the terms of the GNU General Purpose License v2
+# $Id$
+
+description="NetworkManager daemon. The service is marked as started only \
+when a network connection is established."
+
+depend() {
+	need dbus
+	use consolekit
+	provide net
+}
+
+start() {
+	# If we are re-called by a dispatcher event, we want to mark the service
+	# as started without starting the daemon again
+	yesno "${IN_BACKGROUND}" && return 0
+
+	[ -z "${INACTIVE_TIMEOUT}" ] && INACTIVE_TIMEOUT="1"
+
+	ebegin "Starting NetworkManager"
+	start-stop-daemon --start --quiet --pidfile /run/NetworkManager/NetworkManager.pid \
+		--exec /usr/sbin/NetworkManager -- --pid-file /run/NetworkManager/NetworkManager.pid
+	local _retval=$?
+	eend "${_retval}"
+	if [ "x${_retval}" = 'x0' ] && ! nm-online -t "${INACTIVE_TIMEOUT}"; then
+		einfo "Marking NetworkManager as inactive. It will automatically be marked"
+		einfo "as started after a network connection has been established."
+		mark_service_inactive
+	fi
+	return "${_retval}"
+}
+
+stop() {
+	# If we are re-called by a dispatcher event, we want to mark the service
+	# as inactive without stopping the daemon
+	if yesno "${IN_BACKGROUND}"; then
+		mark_service_inactive "${SVCNAME}"
+		return 0
+	fi
+
+	ebegin "Stopping NetworkManager"
+	local pidfile=/run/NetworkManager/NetworkManager.pid
+	if [ ! -e "${pidfile}" ] && [ -e /var/run/NetworkManager.pid ]; then 
+		# Try stopping the pid file used by <0.9.7
+		pidfile=/var/run/NetworkManager.pid
+		start-stop-daemon --stop --quiet --pidfile "${pidfile}"
+		ret=$?
+		[ ${ret} = 0 ] && [ -e "${pidfile}" ] && rm "${pidfile}"
+		eend ${ret}
+	else
+		start-stop-daemon --stop --quiet --pidfile "${pidfile}"
+		eend $?
+	fi
+}
+
+# vim: set ft=gentoo-init-d ts=4 :

diff --git a/net-misc/networkmanager/networkmanager-1.4.4-r1.ebuild b/net-misc/networkmanager/networkmanager-1.4.4-r1.ebuild
new file mode 100644
index 00000000..c16817c
--- /dev/null
+++ b/net-misc/networkmanager/networkmanager-1.4.4-r1.ebuild
@@ -0,0 +1,342 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+GNOME_ORG_MODULE="NetworkManager"
+GNOME2_LA_PUNT="yes"
+VALA_USE_DEPEND="vapigen"
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+
+inherit bash-completion-r1 gnome2 linux-info multilib python-any-r1 systemd \
+	user readme.gentoo-r1 toolchain-funcs vala versionator virtualx udev multilib-minimal
+
+DESCRIPTION="A set of co-operative tools that make networking simple and straightforward"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
+
+IUSE="audit bluetooth connection-sharing consolekit +dhclient gnutls +introspection \
+json kernel_linux +nss +modemmanager ncurses ofono +ppp resolvconf selinux \
+systemd teamd test vala +wext +wifi"
+
+REQUIRED_USE="
+	modemmanager? ( ppp )
+	vala? ( introspection )
+	wext? ( wifi )
+	^^ ( nss gnutls )
+"
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+
+# gobject-introspection-0.10.3 is needed due to gnome bug 642300
+# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
+# TODO: need multilib janson (linked to libnm.so)
+COMMON_DEPEND="
+	>=sys-apps/dbus-1.2[${MULTILIB_USEDEP}]
+	>=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}]
+	>=dev-libs/glib-2.37.6:2[${MULTILIB_USEDEP}]
+	>=dev-libs/libnl-3.2.8:3=
+	>=sys-auth/polkit-0.106
+	net-libs/libndp
+	>=net-libs/libsoup-2.40:2.4=
+	net-misc/iputils
+	sys-apps/util-linux[${MULTILIB_USEDEP}]
+	sys-libs/readline:0=
+	>=virtual/libgudev-165:=[${MULTILIB_USEDEP}]
+	audit? ( sys-process/audit )
+	bluetooth? ( >=net-wireless/bluez-5 )
+	connection-sharing? (
+		net-dns/dnsmasq[dhcp]
+		net-firewall/iptables )
+	consolekit? ( >=sys-auth/consolekit-1.0.0 )
+	dhclient? ( >=net-misc/dhcp-4[client] )
+	gnutls? (
+		dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
+		>=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}] )
+	introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
+	json? ( dev-libs/jansson )
+	modemmanager? ( >=net-misc/modemmanager-0.7.991:0= )
+	ncurses? ( >=dev-libs/newt-0.52.15 )
+	nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
+	ofono? ( net-misc/ofono )
+	ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] )
+	resolvconf? ( net-dns/openresolv )
+	selinux? ( sys-libs/libselinux )
+	systemd? ( >=sys-apps/systemd-209:0= )
+	teamd? ( >=net-misc/libteam-1.9 )
+"
+RDEPEND="${COMMON_DEPEND}
+	wifi? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
+"
+DEPEND="${COMMON_DEPEND}
+	dev-util/gdbus-codegen
+	dev-util/gtk-doc-am
+	>=dev-util/intltool-0.40
+	>=sys-devel/gettext-0.17
+	>=sys-kernel/linux-headers-2.6.29
+	virtual/pkgconfig[${MULTILIB_USEDEP}]
+	vala? ( $(vala_depend) )
+	test? (
+		$(python_gen_any_dep '
+			dev-python/dbus-python[${PYTHON_USEDEP}]
+			dev-python/pygobject:3[${PYTHON_USEDEP}]')
+	)
+"
+
+python_check_deps() {
+	if use test; then
+		has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
+		has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]"
+	else
+		return 0
+	fi
+}
+
+sysfs_deprecated_check() {
+	ebegin "Checking for SYSFS_DEPRECATED support"
+
+	if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
+		eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
+		eerror "or NetworkManager will not work correctly."
+		eerror "See https://bugs.gentoo.org/333639 for more info."
+		die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
+	fi
+	eend $?
+}
+
+pkg_pretend() {
+	if use kernel_linux; then
+		get_version
+		if linux_config_exists; then
+			sysfs_deprecated_check
+		else
+			ewarn "Was unable to determine your kernel .config"
+			ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
+			ewarn "See https://bugs.gentoo.org/333639 for more info."
+		fi
+
+	fi
+}
+
+pkg_setup() {
+	if use connection-sharing; then
+		CONFIG_CHECK="~NF_NAT_IPV4 ~NF_NAT_MASQUERADE_IPV4"
+		linux-info_pkg_setup
+	fi
+	enewgroup plugdev
+	use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	DOC_CONTENTS="To modify system network connections without needing to enter the
+		root password, add your user account to the 'plugdev' group."
+
+	use vala && vala_src_prepare
+	gnome2_src_prepare
+}
+
+multilib_src_configure() {
+	local myconf=()
+
+	# Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
+	if use ppp; then
+		local PPPD_VER=`best_version net-dialup/ppp`
+		PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
+		PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
+		myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
+	fi
+
+	# unit files directory needs to be passed only when systemd is enabled,
+	# otherwise systemd support is not disabled completely, bug #524534
+	use systemd && myconf+=( --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" )
+
+	if multilib_is_native_abi; then
+		# work-around man out-of-source brokenness, must be done before configure
+		mkdir man || die
+		find "${S}"/man -name '*.?' -exec ln -s {} man/ ';' || die
+	else
+		# libnl, libndp are only used for executables, not libraries
+		myconf+=( LIB{NL,NDP}_{CFLAGS,LIBS}=' ' )
+	fi
+
+	# ifnet plugin always disabled until someone volunteers to actively
+	# maintain and fix it
+	# Also disable dhcpcd support as it's also completely unmaintained
+	# and facing bugs like #563938 and many others
+	#
+	# We need --with-libnm-glib (and dbus-glib dep) as reverse deps are
+	# still not ready for removing that lib
+	ECONF_SOURCE=${S} \
+	runstatedir="/run" \
+		gnome2_src_configure \
+			--disable-more-warnings \
+			--disable-static \
+			--localstatedir=/var \
+			--disable-lto \
+			--disable-config-plugin-ibft \
+			--disable-ifnet \
+			--disable-qt \
+			--without-netconfig \
+			--with-dbus-sys-dir=/etc/dbus-1/system.d \
+			--with-libnm-glib \
+			--with-nmcli=yes \
+			--with-udev-dir="$(get_udevdir)" \
+			--with-config-plugins-default=keyfile \
+			--with-iptables=/sbin/iptables \
+			$(multilib_native_with libsoup) \
+			$(multilib_native_enable concheck) \
+			--with-crypto=$(usex nss nss gnutls) \
+			--with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex consolekit consolekit no)) \
+			--with-suspend-resume=$(multilib_native_usex systemd systemd consolekit) \
+			$(multilib_native_use_with audit libaudit) \
+			$(multilib_native_use_enable bluetooth bluez5-dun) \
+			$(multilib_native_use_enable introspection) \
+			$(multilib_native_use_enable json json-validation) \
+			$(multilib_native_use_enable ppp) \
+			$(use_with dhclient) \
+			--without-dhcpcd \
+			$(multilib_native_use_with modemmanager modem-manager-1) \
+			$(multilib_native_use_with ncurses nmtui) \
+			$(multilib_native_use_with ofono) \
+			$(multilib_native_use_with resolvconf) \
+			$(multilib_native_use_with selinux) \
+			$(multilib_native_use_with systemd systemd-journal) \
+			$(multilib_native_use_enable teamd teamdctl) \
+			$(multilib_native_use_enable test tests) \
+			$(multilib_native_use_enable vala) \
+			--without-valgrind \
+			$(multilib_native_use_with wext) \
+			$(multilib_native_use_enable wifi) \
+			"${myconf[@]}"
+
+	# work-around gtk-doc out-of-source brokedness
+	if multilib_is_native_abi; then
+		local d
+		for d in api libnm libnm-util libnm-glib; do
+			ln -s "${S}"/docs/${d}/html docs/${d}/html || die
+		done
+	fi
+
+	# Disable examples
+	# https://bugzilla.gnome.org/show_bug.cgi?id=769711
+	cat > examples/Makefile <<-EOF
+	.PHONY: all check install
+	all:
+	check:
+	install:
+	EOF
+}
+
+multilib_src_compile() {
+	if multilib_is_native_abi; then
+		emake
+	else
+		emake all-am
+		emake -C shared
+		emake -C introspection # generated headers, needed for libnm
+		emake -C libnm-core
+		emake -C libnm
+		emake -C libnm-util
+		emake -C libnm-glib
+	fi
+}
+
+multilib_src_test() {
+	if use test && multilib_is_native_abi; then
+		python_setup
+		virtx emake check
+	fi
+}
+
+multilib_src_install() {
+	if multilib_is_native_abi; then
+		# Install completions at proper place, bug #465100
+		gnome2_src_install completiondir="$(get_bashcompdir)"
+	else
+		emake DESTDIR="${D}" install-am
+		emake DESTDIR="${D}" install -C shared
+		emake DESTDIR="${D}" install -C introspection
+		emake DESTDIR="${D}" install -C libnm-core
+		emake DESTDIR="${D}" install -C libnm
+		emake DESTDIR="${D}" install -C libnm-util
+		emake DESTDIR="${D}" install -C libnm-glib
+	fi
+}
+
+multilib_src_install_all() {
+	! use systemd && readme.gentoo_create_doc
+
+	newinitd "${FILESDIR}/init.d.NetworkManager-r1" NetworkManager
+	newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
+
+	# Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
+	keepdir /etc/NetworkManager/dispatcher.d
+
+	# Provide openrc net dependency only when nm is connected
+	exeinto /etc/NetworkManager/dispatcher.d
+	newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
+	sed -e "s:@EPREFIX@:${EPREFIX}:g" \
+		-i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
+
+	keepdir /etc/NetworkManager/system-connections
+	chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
+
+	# Allow users in plugdev group to modify system connections
+	insinto /usr/share/polkit-1/rules.d/
+	doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
+
+	# Remove empty /run/NetworkManager
+	rmdir "${D}"/run/NetworkManager "${D}"/run || die
+}
+
+pkg_postinst() {
+	gnome2_pkg_postinst
+	! use systemd && readme.gentoo_print_elog
+
+	if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
+		ewarn "The ${PN} system configuration file has moved to a new location."
+		ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
+		ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
+		ewarn
+		ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
+	fi
+
+	# The polkit rules file moved to /usr/share
+	old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
+	if [[ -f "${old_rules}" ]]; then
+		case "$(md5sum ${old_rules})" in
+		  574d0cfa7e911b1f7792077003060240* )
+			# Automatically delete the old rules.d file if the user did not change it
+			elog
+			elog "Removing old ${old_rules} ..."
+			rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
+			;;
+		  * )
+			elog "The ${old_rules}"
+			elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
+			elog "If you edited ${old_rules}"
+			elog "without changing its behavior, you may want to remove it."
+			;;
+		esac
+	fi
+
+	# NM fallbacks to plugin specified at compile time (upstream bug #738611)
+	# but still show a warning to remember people to have cleaner config file
+	if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
+		if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
+			ewarn
+			ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
+			ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
+			ewarn
+		fi
+	fi
+
+	# NM shows lots of errors making nmcli neither unusable, bug #528748 upstream bug #690457
+	if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
+		ewarn "You have psk-flags=1 setting in above files, you will need to"
+		ewarn "either reconfigure affected networks or, at least, set the flag"
+		ewarn "value to '0'."
+	fi
+}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/
@ 2017-06-03 21:32 Mike Gilbert
  0 siblings, 0 replies; 14+ messages in thread
From: Mike Gilbert @ 2017-06-03 21:32 UTC (permalink / raw
  To: gentoo-commits

commit:     a6b3c3fa467f54a4ae55904a63ba9f39b0d47672
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat Jun  3 21:30:42 2017 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Jun  3 21:32:00 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6b3c3fa

net-misc/networkmanager: remove old

Package-Manager: Portage-2.3.6_p1, Repoman-2.3.2_p69

 net-misc/networkmanager/Manifest                   |    1 -
 .../networkmanager/files/init.d.NetworkManager     |   57 -
 .../files/networkmanager-1.4.0-dhcp-helper.patch   | 1570 --------------------
 .../files/networkmanager-1.4.0-wifi-mac1.patch     |  245 ---
 .../files/networkmanager-1.4.0-wifi-mac2.patch     |  279 ----
 .../networkmanager/networkmanager-1.4.0-r1.ebuild  |  349 -----
 6 files changed, 2501 deletions(-)

diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest
index 27288c5deec..829a7b0153f 100644
--- a/net-misc/networkmanager/Manifest
+++ b/net-misc/networkmanager/Manifest
@@ -1,3 +1,2 @@
-DIST NetworkManager-1.4.0.tar.xz 3699568 SHA256 c4d5e075998a291074501602a5068a7e54d9e0f2658aba079d58145d65be531d SHA512 2580e885684f6ad464eebdf9e0dab5432d4d45f0f4127af7f8947be16fc5ce84a5cc090e195b68619c14e218d9cffcde1615400c19326e58bdac8fdf7b53fb46 WHIRLPOOL 39607ac0606039c242b2033b9e540c3beb88e7f48fdb8188d942341a57e097dc0e9c7bde248b6d9ae65bd3ac94df83b5e7d7a371baf7f32c8542581c3bdf778c
 DIST NetworkManager-1.4.4.tar.xz 3762664 SHA256 829378f318cc008d138a23ca6a9191928ce75344e7e47a2f2c35f4ac82133309 SHA512 a73e423e88b0e2694a46dc04f492a656d766796aa987b2e4644147a5939a6fdeb22ff5d8b36c723444bc0ab3d8740b80fa82c2f5e07f073998841695978d6e14 WHIRLPOOL d5e4ca3868c2aa8bceec2029c573b61ccc2fbc9f9a84cb8360ecf7d7503011f0501e9bffd54b163de8e84606ad7977b3c187adb78beed3a44bf2a3ee9821631f
 DIST NetworkManager-1.8.0.tar.xz 3811100 SHA256 fa5a5c6a36cdf95b12df34cc575bd61a74f297ede9be22cac4807a1aff3cf69e SHA512 1f261a9bbba1013ec7ac88672f2ebdfdb9447874eb711ccfa7383534f003f37aabbcddb51aa868e14cec1d76c33d33a99d681a3858ea6239112fe6fce81a9c6c WHIRLPOOL 3e94a50cd50582f9cad26937ee8d597fe275a857882b1fe7ee3a85e3a30cedf16f559064f92afcb00e1703c42b34c0438a0b798538dcedf8cd29da596390b93a

diff --git a/net-misc/networkmanager/files/init.d.NetworkManager b/net-misc/networkmanager/files/init.d.NetworkManager
deleted file mode 100644
index 3377cc7c1de..00000000000
--- a/net-misc/networkmanager/files/init.d.NetworkManager
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/sbin/openrc-run
-# Copyright (c) 2008 Saleem Abdulrasool <compnerd@compnerd.org>
-# Copyright 2013-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-description="NetworkManager daemon. The service is marked as started only \
-when a network connection is established."
-
-depend() {
-	need dbus
-	provide net
-}
-
-start() {
-	# If we are re-called by a dispatcher event, we want to mark the service
-	# as started without starting the daemon again
-	yesno "${IN_BACKGROUND}" && return 0
-
-	[ -z "${INACTIVE_TIMEOUT}" ] && INACTIVE_TIMEOUT="1"
-
-	ebegin "Starting NetworkManager"
-	start-stop-daemon --start --quiet --pidfile /run/NetworkManager/NetworkManager.pid \
-		--exec /usr/sbin/NetworkManager -- --pid-file /run/NetworkManager/NetworkManager.pid
-	local _retval=$?
-	eend "${_retval}"
-	if [ "x${_retval}" = 'x0' ] && ! nm-online -t "${INACTIVE_TIMEOUT}"; then
-		einfo "Marking NetworkManager as inactive. It will automatically be marked"
-		einfo "as started after a network connection has been established."
-		mark_service_inactive
-	fi
-	return "${_retval}"
-}
-
-stop() {
-	# If we are re-called by a dispatcher event, we want to mark the service
-	# as inactive without stopping the daemon
-	if yesno "${IN_BACKGROUND}"; then
-		mark_service_inactive "${SVCNAME}"
-		return 0
-	fi
-
-	ebegin "Stopping NetworkManager"
-	local pidfile=/run/NetworkManager/NetworkManager.pid
-	if [ ! -e "${pidfile}" ] && [ -e /var/run/NetworkManager.pid ]; then 
-		# Try stopping the pid file used by <0.9.7
-		pidfile=/var/run/NetworkManager.pid
-		start-stop-daemon --stop --quiet --pidfile "${pidfile}"
-		ret=$?
-		[ ${ret} = 0 ] && [ -e "${pidfile}" ] && rm "${pidfile}"
-		eend ${ret}
-	else
-		start-stop-daemon --stop --quiet --pidfile "${pidfile}"
-		eend $?
-	fi
-}
-
-# vim: set ft=gentoo-init-d ts=4 :

diff --git a/net-misc/networkmanager/files/networkmanager-1.4.0-dhcp-helper.patch b/net-misc/networkmanager/files/networkmanager-1.4.0-dhcp-helper.patch
deleted file mode 100644
index 53e146a5492..00000000000
--- a/net-misc/networkmanager/files/networkmanager-1.4.0-dhcp-helper.patch
+++ /dev/null
@@ -1,1570 +0,0 @@
-From a3d96601876e5dc34e68bf6777c770f83cac19fb Mon Sep 17 00:00:00 2001
-From: Thomas Haller <thaller@redhat.com>
-Date: Tue, 6 Sep 2016 10:56:32 +0200
-Subject: [PATCH 01/11] logging: don't round subsecond part in logging
- timestamp
-
-tv.tv_usec is guaranteed to have less then 6 digits, however rounding it up
-we might reach 1000000 and thus the value becomes mis-aligned. To round
-correctly, we would have to carry over a potential overflow to the seconds.
-But that seems too much effort for little gain. Just truncate the value.
-
-(cherry picked from commit c1b4b99a3c758f320c369a8daadb219eeb50ee83)
-(cherry picked from commit 99e30bdf700220e98db76602645a9844360e3fab)
----
- src/nm-logging.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/nm-logging.c b/src/nm-logging.c
-index 3db8d20..6ecc160 100644
---- a/src/nm-logging.c
-+++ b/src/nm-logging.c
-@@ -512,7 +512,7 @@ _nm_log_impl (const char *file,
- 	va_end (args);
- 
- 	g_get_current_time (&tv);
--	nm_sprintf_buf (s_buf_timestamp, " [%ld.%04ld]", tv.tv_sec, (tv.tv_usec + 50) / 100);
-+	nm_sprintf_buf (s_buf_timestamp, " [%ld.%04ld]", tv.tv_sec, tv.tv_usec / 100);
- 
- 	switch (global.log_backend) {
- #if SYSTEMD_JOURNAL
--- 
-2.7.4
-
-
-From b3bf5c5a771e1f105037323daa9f4e4696bce44c Mon Sep 17 00:00:00 2001
-From: Thomas Haller <thaller@redhat.com>
-Date: Mon, 5 Sep 2016 14:12:41 +0200
-Subject: [PATCH 02/11] shared: add NM_MIN()/NM_MAX() macros to replace glib's
- MIN()/MAX()
-
-(cherry picked from commit b2016fd2a52b82d45324526c965e7545d026cebe)
-(cherry picked from commit 811aaead4ca6f2f815f49b7353fa7a88554dca42)
----
- shared/nm-utils/nm-macros-internal.h | 44 ++++++++++++++++++++++++++++++++++++
- 1 file changed, 44 insertions(+)
-
-diff --git a/shared/nm-utils/nm-macros-internal.h b/shared/nm-utils/nm-macros-internal.h
-index 73075c6..8811c91 100644
---- a/shared/nm-utils/nm-macros-internal.h
-+++ b/shared/nm-utils/nm-macros-internal.h
-@@ -526,6 +526,50 @@ nm_strcmp_p_with_data (gconstpointer a, gconstpointer b, gpointer user_data)
- 
- /*****************************************************************************/
- 
-+/* Taken from systemd's UNIQ_T and UNIQ macros. */
-+
-+#define NM_UNIQ_T(x, uniq) G_PASTE(__unique_prefix_, G_PASTE(x, uniq))
-+#define NM_UNIQ __COUNTER__
-+
-+/*****************************************************************************/
-+
-+/* glib's MIN()/MAX() macros don't have function-like behavior, in that they evaluate
-+ * the argument possibly twice.
-+ *
-+ * Taken from systemd's MIN()/MAX() macros. */
-+
-+#define NM_MIN(a, b) __NM_MIN(NM_UNIQ, a, NM_UNIQ, b)
-+#define __NM_MIN(aq, a, bq, b) \
-+	({ \
-+		typeof (a) NM_UNIQ_T(A, aq) = (a); \
-+		typeof (b) NM_UNIQ_T(B, bq) = (b); \
-+		((NM_UNIQ_T(A, aq) < NM_UNIQ_T(B, bq)) ? NM_UNIQ_T(A, aq) : NM_UNIQ_T(B, bq)); \
-+	})
-+
-+#define NM_MAX(a, b) __NM_MAX(NM_UNIQ, a, NM_UNIQ, b)
-+#define __NM_MAX(aq, a, bq, b) \
-+	({ \
-+		typeof (a) NM_UNIQ_T(A, aq) = (a); \
-+		typeof (b) NM_UNIQ_T(B, bq) = (b); \
-+		((NM_UNIQ_T(A, aq) > NM_UNIQ_T(B, bq)) ? NM_UNIQ_T(A, aq) : NM_UNIQ_T(B, bq)); \
-+	})
-+
-+#define NM_CLAMP(x, low, high) __NM_CLAMP(NM_UNIQ, x, NM_UNIQ, low, NM_UNIQ, high)
-+#define __NM_CLAMP(xq, x, lowq, low, highq, high) \
-+	({ \
-+		typeof(x)NM_UNIQ_T(X,xq) = (x); \
-+		typeof(low) NM_UNIQ_T(LOW,lowq) = (low); \
-+		typeof(high) NM_UNIQ_T(HIGH,highq) = (high); \
-+		\
-+		( (NM_UNIQ_T(X,xq) > NM_UNIQ_T(HIGH,highq)) \
-+		  ? NM_UNIQ_T(HIGH,highq) \
-+		  : (NM_UNIQ_T(X,xq) < NM_UNIQ_T(LOW,lowq)) \
-+		     ? NM_UNIQ_T(LOW,lowq) \
-+		     : NM_UNIQ_T(X,xq)); \
-+	})
-+
-+/*****************************************************************************/
-+
- static inline guint
- nm_encode_version (guint major, guint minor, guint micro) {
- 	/* analog to the preprocessor macro NM_ENCODE_VERSION(). */
--- 
-2.7.4
-
-
-From d0b31408a5e1eeb7c3e09e3e79a90cf09c80b934 Mon Sep 17 00:00:00 2001
-From: Thomas Haller <thaller@redhat.com>
-Date: Mon, 5 Sep 2016 16:49:50 +0200
-Subject: [PATCH 03/11] shared: add _NM_GET_PRIVATE() macro
-
-(cherry picked from commit 2cae9ba348ed6ea4d41ebd714d8c55f4d49feae9)
-(cherry picked from commit 5bac57496c0ee458456f5cf68560263cea6c23de)
----
- shared/nm-utils/nm-macros-internal.h | 18 ++++++++++++++++++
- 1 file changed, 18 insertions(+)
-
-diff --git a/shared/nm-utils/nm-macros-internal.h b/shared/nm-utils/nm-macros-internal.h
-index 8811c91..5b020e9 100644
---- a/shared/nm-utils/nm-macros-internal.h
-+++ b/shared/nm-utils/nm-macros-internal.h
-@@ -356,6 +356,24 @@ _notify (obj_type *obj, _PropertyEnums prop) \
- 
- /*****************************************************************************/
- 
-+#define __NM_GET_PRIVATE(self, type, is_check, result_cmd) \
-+	({ \
-+		/* preserve the const-ness of self. Unfortunately, that
-+		 * way, @self cannot be a void pointer */ \
-+		typeof (self) _self = (self); \
-+		\
-+		/* Get compiler error if variable is of wrong type */ \
-+		_nm_unused const type *_self2 = (_self); \
-+		\
-+		nm_assert (is_check (_self)); \
-+		( result_cmd ); \
-+	})
-+
-+#define _NM_GET_PRIVATE(self, type, is_check)     __NM_GET_PRIVATE(self, type, is_check, &_self->_priv)
-+#define _NM_GET_PRIVATE_PTR(self, type, is_check) __NM_GET_PRIVATE(self, type, is_check,  _self->_priv)
-+
-+/*****************************************************************************/
-+
- static inline gpointer
- nm_g_object_ref (gpointer obj)
- {
--- 
-2.7.4
-
-
-From 24d94264bdc6c036e732e201b167c1c7d20794e1 Mon Sep 17 00:00:00 2001
-From: Thomas Haller <thaller@redhat.com>
-Date: Mon, 5 Sep 2016 16:55:07 +0200
-Subject: [PATCH 04/11] core: use _NM_GET_PRIVATE() macros
-
-(cherry picked from commit cdf6ad40572f23be6f8b6971bd57b1002ffb9aaf)
-(cherry picked from commit 3940d63a7e6bff088bb3fb5e81c8cb2792b19b3a)
----
- src/devices/nm-device-ethernet.c    | 13 +------------
- src/devices/nm-device-veth.c        | 13 +------------
- src/devices/nm-device.c             | 31 ++++++++++---------------------
- src/devices/nm-device.h             |  2 +-
- src/devices/wifi/nm-device-wifi.c   | 13 +------------
- src/devices/wifi/nm-wifi-ap.c       | 13 +------------
- src/dns-manager/nm-dns-manager.c    | 13 +------------
- src/nm-auth-subject.c               | 13 +------------
- src/nm-checkpoint.c                 | 15 ++-------------
- src/nm-ip4-config.c                 | 13 +------------
- src/nm-ip6-config.c                 | 13 +------------
- src/nm-manager.c                    | 15 ++-------------
- src/rdisc/nm-lndp-rdisc.c           | 13 +------------
- src/rdisc/nm-rdisc.c                | 13 +------------
- src/vpn-manager/nm-vpn-connection.c | 13 +------------
- 15 files changed, 26 insertions(+), 180 deletions(-)
-
-diff --git a/src/devices/nm-device-ethernet.c b/src/devices/nm-device-ethernet.c
-index 90d472d..b213a0c 100644
---- a/src/devices/nm-device-ethernet.c
-+++ b/src/devices/nm-device-ethernet.c
-@@ -127,18 +127,7 @@ NM_GOBJECT_PROPERTIES_DEFINE (NMDeviceEthernet,
- 
- G_DEFINE_TYPE (NMDeviceEthernet, nm_device_ethernet, NM_TYPE_DEVICE)
- 
--#define NM_DEVICE_ETHERNET_GET_PRIVATE(self) \
--	({ \
--		/* preserve the const-ness of self. Unfortunately, that
--		 * way, @self cannot be a void pointer */ \
--		typeof (self) _self = (self); \
--		\
--		/* Get compiler error if variable is of wrong type */ \
--		_nm_unused const NMDeviceEthernet *_self2 = (_self); \
--		\
--		nm_assert (NM_IS_DEVICE_ETHERNET (_self)); \
--		_self->_priv; \
--	})
-+#define NM_DEVICE_ETHERNET_GET_PRIVATE(self) _NM_GET_PRIVATE_PTR(self, NMDeviceEthernet, NM_IS_DEVICE_ETHERNET)
- 
- /*****************************************************************************/
- 
-diff --git a/src/devices/nm-device-veth.c b/src/devices/nm-device-veth.c
-index cca86fb..5692331 100644
---- a/src/devices/nm-device-veth.c
-+++ b/src/devices/nm-device-veth.c
-@@ -62,18 +62,7 @@ NM_GOBJECT_PROPERTIES_DEFINE (NMDeviceVeth,
- 
- G_DEFINE_TYPE (NMDeviceVeth, nm_device_veth, NM_TYPE_DEVICE_ETHERNET)
- 
--#define NM_DEVICE_VETH_GET_PRIVATE(self) \
--	({ \
--		/* preserve the const-ness of self. Unfortunately, that
--		 * way, @self cannot be a void pointer */ \
--		typeof (self) _self = (self); \
--		\
--		/* Get compiler error if variable is of wrong type */ \
--		_nm_unused const NMDeviceVeth *_self2 = (_self); \
--		\
--		nm_assert (NM_IS_DEVICE_VETH (_self)); \
--		&_self->_priv; \
--	})
-+#define NM_DEVICE_VETH_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceVeth, NM_IS_DEVICE_VETH)
- 
- /*****************************************************************************/
- 
-diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
-index 6939332..674563f 100644
---- a/src/devices/nm-device.c
-+++ b/src/devices/nm-device.c
-@@ -75,18 +75,7 @@ _LOG_DECLARE_SELF (NMDevice);
- 
- G_DEFINE_ABSTRACT_TYPE (NMDevice, nm_device, NM_TYPE_EXPORTED_OBJECT)
- 
--#define NM_DEVICE_GET_PRIVATE(self) \
--	({ \
--		/* preserve the const-ness of self. Unfortunately, that
--		 * way, @self cannot be a void pointer */ \
--		typeof (self) _self = (self); \
--		\
--		/* Get compiler error if variable is of wrong type */ \
--		_nm_unused const NMDevice *_self2 = (_self); \
--		\
--		nm_assert (NM_IS_DEVICE (_self)); \
--		_self->priv; \
--	})
-+#define NM_DEVICE_GET_PRIVATE(self) _NM_GET_PRIVATE_PTR(self, NMDevice, NM_IS_DEVICE)
- 
- enum {
- 	STATE_CHANGED,
-@@ -2029,7 +2018,7 @@ link_type_compatible (NMDevice *self,
- 		return FALSE;
- 	}
- 
--	device_type = self->priv->link_type;
-+	device_type = self->_priv->link_type;
- 	if (device_type > NM_LINK_TYPE_UNKNOWN && device_type != link_type) {
- 		g_set_error (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_FAILED,
- 		             "Needed link type 0x%x does not match the platform link type 0x%X",
-@@ -10058,7 +10047,7 @@ nm_device_set_unmanaged_by_user_udev (NMDevice *self)
- 	int ifindex;
- 	gboolean platform_unmanaged = FALSE;
- 
--	ifindex = self->priv->ifindex;
-+	ifindex = self->_priv->ifindex;
- 
- 	if (   ifindex <= 0
- 	    || !nm_platform_link_get_unmanaged (NM_PLATFORM_GET, ifindex, &platform_unmanaged))
-@@ -10145,7 +10134,7 @@ nm_device_reapply_settings_immediately (NMDevice *self)
- 	if (g_strcmp0 ((zone = nm_setting_connection_get_zone (s_con_settings)),
- 	               nm_setting_connection_get_zone (s_con_applied)) != 0) {
- 
--		version_id = nm_active_connection_version_id_bump ((NMActiveConnection *) self->priv->act_request);
-+		version_id = nm_active_connection_version_id_bump ((NMActiveConnection *) self->_priv->act_request);
- 		_LOGD (LOGD_DEVICE, "reapply setting: zone = %s%s%s (version-id %llu)", NM_PRINT_FMT_QUOTE_STRING (zone), (long long unsigned) version_id);
- 
- 		g_object_set (G_OBJECT (s_con_applied),
-@@ -10157,7 +10146,7 @@ nm_device_reapply_settings_immediately (NMDevice *self)
- 
- 	if ((metered = nm_setting_connection_get_metered (s_con_settings)) != nm_setting_connection_get_metered (s_con_applied)) {
- 
--		version_id = nm_active_connection_version_id_bump ((NMActiveConnection *) self->priv->act_request);
-+		version_id = nm_active_connection_version_id_bump ((NMActiveConnection *) self->_priv->act_request);
- 		_LOGD (LOGD_DEVICE, "reapply setting: metered = %d (version-id %llu)", (int) metered, (long long unsigned) version_id);
- 
- 		g_object_set (G_OBJECT (s_con_applied),
-@@ -10336,22 +10325,22 @@ nm_device_check_connection_available (NMDevice *self,
- static gboolean
- available_connections_del_all (NMDevice *self)
- {
--	if (g_hash_table_size (self->priv->available_connections) == 0)
-+	if (g_hash_table_size (self->_priv->available_connections) == 0)
- 		return FALSE;
--	g_hash_table_remove_all (self->priv->available_connections);
-+	g_hash_table_remove_all (self->_priv->available_connections);
- 	return TRUE;
- }
- 
- static gboolean
- available_connections_add (NMDevice *self, NMConnection *connection)
- {
--	return nm_g_hash_table_add (self->priv->available_connections, g_object_ref (connection));
-+	return nm_g_hash_table_add (self->_priv->available_connections, g_object_ref (connection));
- }
- 
- static gboolean
- available_connections_del (NMDevice *self, NMConnection *connection)
- {
--	return g_hash_table_remove (self->priv->available_connections, connection);
-+	return g_hash_table_remove (self->_priv->available_connections, connection);
- }
- 
- static gboolean
-@@ -12097,7 +12086,7 @@ nm_device_init (NMDevice *self)
- 
- 	priv = G_TYPE_INSTANCE_GET_PRIVATE (self, NM_TYPE_DEVICE, NMDevicePrivate);
- 
--	self->priv = priv;
-+	self->_priv = priv;
- 
- 	priv->type = NM_DEVICE_TYPE_UNKNOWN;
- 	priv->capabilities = NM_DEVICE_CAP_NM_SUPPORTED;
-diff --git a/src/devices/nm-device.h b/src/devices/nm-device.h
-index 34d31ca..be12ce7 100644
---- a/src/devices/nm-device.h
-+++ b/src/devices/nm-device.h
-@@ -125,7 +125,7 @@ struct _NMDevice {
- 	NMExportedObject parent;
- 
- 	/* private */
--	struct _NMDevicePrivate *priv;
-+	struct _NMDevicePrivate *_priv;
- };
- 
- /* The flags have an relaxing meaning, that means, specifying more flags, can make
-diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c
-index 49c380a..f97e668 100644
---- a/src/devices/wifi/nm-device-wifi.c
-+++ b/src/devices/wifi/nm-device-wifi.c
-@@ -138,18 +138,7 @@ struct _NMDeviceWifiClass
- 
- G_DEFINE_TYPE (NMDeviceWifi, nm_device_wifi, NM_TYPE_DEVICE)
- 
--#define NM_DEVICE_WIFI_GET_PRIVATE(self) \
--	({ \
--		/* preserve the const-ness of self. Unfortunately, that
--		 * way, @self cannot be a void pointer */ \
--		typeof (self) _self = (self); \
--		\
--		/* Get compiler error if variable is of wrong type */ \
--		_nm_unused const NMDeviceWifi *_self2 = (_self); \
--		\
--		nm_assert (NM_IS_DEVICE_WIFI (_self)); \
--		&_self->_priv; \
--	})
-+#define NM_DEVICE_WIFI_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDeviceWifi, NM_IS_DEVICE_WIFI)
- 
- /*****************************************************************************/
- 
-diff --git a/src/devices/wifi/nm-wifi-ap.c b/src/devices/wifi/nm-wifi-ap.c
-index e1beb85..2232f82 100644
---- a/src/devices/wifi/nm-wifi-ap.c
-+++ b/src/devices/wifi/nm-wifi-ap.c
-@@ -68,18 +68,7 @@ struct _NMAccessPointClass{
- 	NMExportedObjectClass parent;
- };
- 
--#define NM_AP_GET_PRIVATE(self) \
--	({ \
--		/* preserve the const-ness of self. Unfortunately, that
--		 * way, @self cannot be a void pointer */ \
--		typeof (self) _self = (self); \
--		\
--		/* Get compiler error if variable is of wrong type */ \
--		_nm_unused const NMAccessPoint *_self2 = (_self); \
--		\
--		nm_assert (NM_IS_AP (_self)); \
--		&_self->_priv; \
--	})
-+#define NM_AP_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMAccessPoint, NM_IS_AP)
- 
- G_DEFINE_TYPE (NMAccessPoint, nm_ap, NM_TYPE_EXPORTED_OBJECT)
- 
-diff --git a/src/dns-manager/nm-dns-manager.c b/src/dns-manager/nm-dns-manager.c
-index 3efd5ac..ce8f4d9 100644
---- a/src/dns-manager/nm-dns-manager.c
-+++ b/src/dns-manager/nm-dns-manager.c
-@@ -151,18 +151,7 @@ G_DEFINE_TYPE (NMDnsManager, nm_dns_manager, G_TYPE_OBJECT)
- 
- NM_DEFINE_SINGLETON_INSTANCE (NMDnsManager);
- 
--#define NM_DNS_MANAGER_GET_PRIVATE(self) \
--	({ \
--		/* preserve the const-ness of self. Unfortunately, that
--		 * way, @self cannot be a void pointer */ \
--		typeof (self) _self = (self); \
--		\
--		/* Get compiler error if variable is of wrong type */ \
--		_nm_unused const NMDnsManager *_self2 = (_self); \
--		\
--		nm_assert (NM_IS_DNS_MANAGER (_self)); \
--		&_self->_priv; \
--	})
-+#define NM_DNS_MANAGER_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDnsManager, NM_IS_DNS_MANAGER)
- 
- /*****************************************************************************/
- 
-diff --git a/src/nm-auth-subject.c b/src/nm-auth-subject.c
-index eb496b2..54d3595 100644
---- a/src/nm-auth-subject.c
-+++ b/src/nm-auth-subject.c
-@@ -68,18 +68,7 @@ struct _NMAuthSubjectClass {
- 
- G_DEFINE_TYPE (NMAuthSubject, nm_auth_subject, G_TYPE_OBJECT)
- 
--#define NM_AUTH_SUBJECT_GET_PRIVATE(self) \
--	({ \
--		/* preserve the const-ness of self. Unfortunately, that
--		 * way, @self cannot be a void pointer */ \
--		typeof (self) _self = (self); \
--		\
--		/* Get compiler error if variable is of wrong type */ \
--		_nm_unused const NMAuthSubject *_self2 = (_self); \
--		\
--		nm_assert (NM_IS_AUTH_SUBJECT (_self)); \
--		&_self->_priv; \
--	})
-+#define NM_AUTH_SUBJECT_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMAuthSubject, NM_IS_AUTH_SUBJECT)
- 
- /**************************************************************/
- 
-diff --git a/src/nm-checkpoint.c b/src/nm-checkpoint.c
-index cb1adc3..605e070 100644
---- a/src/nm-checkpoint.c
-+++ b/src/nm-checkpoint.c
-@@ -70,7 +70,7 @@ typedef struct {
- 
- struct _NMCheckpoint {
- 	NMExportedObject parent;
--	NMCheckpointPrivate priv;
-+	NMCheckpointPrivate _priv;
- };
- 
- typedef struct {
-@@ -79,18 +79,7 @@ typedef struct {
- 
- G_DEFINE_TYPE (NMCheckpoint, nm_checkpoint, NM_TYPE_EXPORTED_OBJECT)
- 
--#define NM_CHECKPOINT_GET_PRIVATE(self) \
--	({ \
--		/* preserve the const-ness of self. Unfortunately, that
--		 * way, @self cannot be a void pointer */ \
--		typeof (self) _self = (self); \
--		\
--		/* Get compiler error if variable is of wrong type */ \
--		_nm_unused const NMCheckpoint *_self2 = (_self); \
--		\
--		nm_assert (NM_IS_CHECKPOINT (_self)); \
--		&_self->priv; \
--	})
-+#define NM_CHECKPOINT_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMCheckpoint, NM_IS_CHECKPOINT)
- 
- NM_GOBJECT_PROPERTIES_DEFINE_BASE (
- 	PROP_DEVICES,
-diff --git a/src/nm-ip4-config.c b/src/nm-ip4-config.c
-index 22d1d07..a4d4361 100644
---- a/src/nm-ip4-config.c
-+++ b/src/nm-ip4-config.c
-@@ -68,18 +68,7 @@ struct _NMIP4ConfigClass {
- 
- G_DEFINE_TYPE (NMIP4Config, nm_ip4_config, NM_TYPE_EXPORTED_OBJECT)
- 
--#define NM_IP4_CONFIG_GET_PRIVATE(self) \
--	({ \
--		/* preserve the const-ness of self. Unfortunately, that
--		 * way, @self cannot be a void pointer */ \
--		typeof (self) _self = (self); \
--		\
--		/* Get compiler error if variable is of wrong type */ \
--		_nm_unused const NMIP4Config *_self2 = (_self); \
--		\
--		nm_assert (NM_IS_IP4_CONFIG (_self)); \
--		&_self->_priv; \
--	})
-+#define NM_IP4_CONFIG_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMIP4Config, NM_IS_IP4_CONFIG)
- 
- /* internal guint32 are assigned to gobject properties of type uint. Ensure, that uint is large enough */
- G_STATIC_ASSERT (sizeof (uint) >= sizeof (guint32));
-diff --git a/src/nm-ip6-config.c b/src/nm-ip6-config.c
-index ac9e6cd..8002d61 100644
---- a/src/nm-ip6-config.c
-+++ b/src/nm-ip6-config.c
-@@ -61,18 +61,7 @@ struct _NMIP6ConfigClass {
- 
- G_DEFINE_TYPE (NMIP6Config, nm_ip6_config, NM_TYPE_EXPORTED_OBJECT)
- 
--#define NM_IP6_CONFIG_GET_PRIVATE(self) \
--	({ \
--		/* preserve the const-ness of self. Unfortunately, that
--		 * way, @self cannot be a void pointer */ \
--		typeof (self) _self = (self); \
--		\
--		/* Get compiler error if variable is of wrong type */ \
--		_nm_unused const NMIP6Config *_self2 = (_self); \
--		\
--		nm_assert (NM_IS_IP6_CONFIG (_self)); \
--		&_self->_priv; \
--	})
-+#define NM_IP6_CONFIG_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMIP6Config, NM_IS_IP6_CONFIG)
- 
- NM_GOBJECT_PROPERTIES_DEFINE (NMIP6Config,
- 	PROP_IFINDEX,
-diff --git a/src/nm-manager.c b/src/nm-manager.c
-index 5794bb9..9ad6517 100644
---- a/src/nm-manager.c
-+++ b/src/nm-manager.c
-@@ -158,21 +158,10 @@ typedef struct {
- 	NMExportedObjectClass parent;
- } NMManagerClass;
- 
--#define NM_MANAGER_GET_PRIVATE(self) \
--	({ \
--		/* preserve the const-ness of self. Unfortunately, that
--		 * way, @self cannot be a void pointer */ \
--		typeof (self) _self = (self); \
--		\
--		/* Get compiler error if variable is of wrong type */ \
--		_nm_unused const NMManager *_self2 = (_self); \
--		\
--		nm_assert (NM_IS_MANAGER (_self)); \
--		&_self->_priv; \
--	})
--
- G_DEFINE_TYPE (NMManager, nm_manager, NM_TYPE_EXPORTED_OBJECT)
- 
-+#define NM_MANAGER_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMManager, NM_IS_MANAGER)
-+
- enum {
- 	DEVICE_ADDED,
- 	INTERNAL_DEVICE_ADDED,
-diff --git a/src/rdisc/nm-lndp-rdisc.c b/src/rdisc/nm-lndp-rdisc.c
-index 12c2e30..db2965b 100644
---- a/src/rdisc/nm-lndp-rdisc.c
-+++ b/src/rdisc/nm-lndp-rdisc.c
-@@ -60,18 +60,7 @@ struct _NMLndpRDiscClass {
- 
- G_DEFINE_TYPE (NMLndpRDisc, nm_lndp_rdisc, NM_TYPE_RDISC)
- 
--#define NM_LNDP_RDISC_GET_PRIVATE(self) \
--	({ \
--		/* preserve the const-ness of self. Unfortunately, that
--		 * way, @self cannot be a void pointer */ \
--		typeof (self) _self = (self); \
--		\
--		/* Get compiler error if variable is of wrong type */ \
--		_nm_unused const NMLndpRDisc *_self2 = (_self); \
--		\
--		nm_assert (NM_IS_LNDP_RDISC (_self)); \
--		&_self->_priv; \
--	})
-+#define NM_LNDP_RDISC_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMLndpRDisc, NM_IS_LNDP_RDISC)
- 
- /*****************************************************************************/
- 
-diff --git a/src/rdisc/nm-rdisc.c b/src/rdisc/nm-rdisc.c
-index cf993bc..3bc6975 100644
---- a/src/rdisc/nm-rdisc.c
-+++ b/src/rdisc/nm-rdisc.c
-@@ -87,18 +87,7 @@ static guint signals[LAST_SIGNAL] = { 0 };
- 
- G_DEFINE_TYPE (NMRDisc, nm_rdisc, G_TYPE_OBJECT)
- 
--#define NM_RDISC_GET_PRIVATE(self) \
--	({ \
--		/* preserve the const-ness of self. Unfortunately, that
--		 * way, @self cannot be a void pointer */ \
--		typeof (self) _self = (self); \
--		\
--		/* Get compiler error if variable is of wrong type */ \
--		_nm_unused const NMRDisc *_self2 = (_self); \
--		\
--		nm_assert (NM_IS_RDISC (_self)); \
--		_self->_priv; \
--	})
-+#define NM_RDISC_GET_PRIVATE(self) _NM_GET_PRIVATE_PTR(self, NMRDisc, NM_IS_RDISC)
- 
- /*****************************************************************************/
- 
-diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c
-index 92c5bd8..69b45dc 100644
---- a/src/vpn-manager/nm-vpn-connection.c
-+++ b/src/vpn-manager/nm-vpn-connection.c
-@@ -168,18 +168,7 @@ struct _NMVpnConnectionClass {
- 
- G_DEFINE_TYPE (NMVpnConnection, nm_vpn_connection, NM_TYPE_ACTIVE_CONNECTION)
- 
--#define NM_VPN_CONNECTION_GET_PRIVATE(self) \
--	({ \
--		/* preserve the const-ness of self. Unfortunately, that
--		 * way, @self cannot be a void pointer */ \
--		typeof (self) _self = (self); \
--		\
--		/* Get compiler error if variable is of wrong type */ \
--		_nm_unused const NMVpnConnection *_self2 = (_self); \
--		\
--		nm_assert (NM_IS_VPN_CONNECTION (_self)); \
--		&_self->_priv; \
--	})
-+#define NM_VPN_CONNECTION_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMVpnConnection, NM_IS_VPN_CONNECTION)
- 
- /*****************************************************************************/
- 
--- 
-2.7.4
-
-
-From f25940f2518c3789a5f18d1b458e53a95dc88af7 Mon Sep 17 00:00:00 2001
-From: Thomas Haller <thaller@redhat.com>
-Date: Mon, 5 Sep 2016 16:42:59 +0200
-Subject: [PATCH 05/11] dhcp-listener: refactor type definition and embed
- private data in @self
-
-(cherry picked from commit 822f01a8fdb63831c887d5db9fb06eb840f53c88)
-(cherry picked from commit 75e13f0e15b7618d7fafbe3f1b990871be0950a7)
----
- src/dhcp-manager/nm-dhcp-listener.c | 50 +++++++++++++++++++++----------------
- src/dhcp-manager/nm-dhcp-listener.h |  4 +--
- 2 files changed, 31 insertions(+), 23 deletions(-)
-
-diff --git a/src/dhcp-manager/nm-dhcp-listener.c b/src/dhcp-manager/nm-dhcp-listener.c
-index eadff3e..d3616cb 100644
---- a/src/dhcp-manager/nm-dhcp-listener.c
-+++ b/src/dhcp-manager/nm-dhcp-listener.c
-@@ -13,12 +13,14 @@
-  * with this program; if not, write to the Free Software Foundation, Inc.,
-  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-  *
-- * Copyright 2014 Red Hat, Inc.
-+ * Copyright 2014 - 2016 Red Hat, Inc.
-  *
-  */
- 
- #include "nm-default.h"
- 
-+#include "nm-dhcp-listener.h"
-+
- #include <sys/socket.h>
- #include <sys/wait.h>
- #include <signal.h>
-@@ -27,7 +29,6 @@
- #include <errno.h>
- #include <unistd.h>
- 
--#include "nm-dhcp-listener.h"
- #include "nm-core-internal.h"
- #include "nm-bus-manager.h"
- #include "NetworkManagerUtils.h"
-@@ -36,6 +37,8 @@
- #define PRIV_SOCK_PATH            NMRUNDIR "/private-dhcp"
- #define PRIV_SOCK_TAG             "dhcp"
- 
-+/*****************************************************************************/
-+
- typedef struct {
- 	NMBusManager *      dbus_mgr;
- 	gulong              new_conn_id;
-@@ -43,17 +46,26 @@ typedef struct {
- 	GHashTable *        signal_handlers;
- } NMDhcpListenerPrivate;
- 
--#define NM_DHCP_LISTENER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DHCP_LISTENER, NMDhcpListenerPrivate))
-+struct _NMDhcpListener {
-+	GObject parent;
-+	NMDhcpListenerPrivate _priv;
-+};
-+
-+struct _NMDhcpListenerClass {
-+	GObjectClass parent_class;
-+};
- 
- G_DEFINE_TYPE (NMDhcpListener, nm_dhcp_listener, G_TYPE_OBJECT)
- 
-+#define NM_DHCP_LISTENER_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDhcpListener, NM_IS_DHCP_LISTENER)
-+
- enum {
- 	EVENT,
- 	LAST_SIGNAL
- };
- static guint signals[LAST_SIGNAL] = { 0 };
- 
--/***************************************************/
-+/*****************************************************************************/
- 
- static char *
- get_option (GVariant *options, const char *key)
-@@ -188,7 +200,7 @@ nm_dhcp_listener_init (NMDhcpListener *self)
- {
- 	NMDhcpListenerPrivate *priv = NM_DHCP_LISTENER_GET_PRIVATE (self);
- 
--	/* Maps GDBusConnection :: GDBusProxy */
-+	/* Maps GDBusConnection :: signal-id */
- 	priv->signal_handlers = g_hash_table_new (NULL, NULL);
- 
- 	priv->dbus_mgr = nm_bus_manager_get ();
-@@ -208,7 +220,7 @@ nm_dhcp_listener_init (NMDhcpListener *self)
- static void
- dispose (GObject *object)
- {
--	NMDhcpListenerPrivate *priv = NM_DHCP_LISTENER_GET_PRIVATE (object);
-+	NMDhcpListenerPrivate *priv = NM_DHCP_LISTENER_GET_PRIVATE ((NMDhcpListener *) object);
- 
- 	nm_clear_g_signal_handler (priv->dbus_mgr, &priv->new_conn_id);
- 	nm_clear_g_signal_handler (priv->dbus_mgr, &priv->dis_conn_id);
-@@ -224,22 +236,18 @@ nm_dhcp_listener_class_init (NMDhcpListenerClass *listener_class)
- {
- 	GObjectClass *object_class = G_OBJECT_CLASS (listener_class);
- 
--	g_type_class_add_private (listener_class, sizeof (NMDhcpListenerPrivate));
--
--	/* virtual methods */
- 	object_class->dispose = dispose;
- 
--	/* signals */
- 	signals[EVENT] =
--		g_signal_new (NM_DHCP_LISTENER_EVENT,
--		              G_OBJECT_CLASS_TYPE (object_class),
--		              G_SIGNAL_RUN_LAST, 0,
--		              g_signal_accumulator_true_handled,
--		              NULL, NULL,
--		              G_TYPE_BOOLEAN,     /* listeners return TRUE if handled */
--		              4,
--		              G_TYPE_STRING,      /* iface */
--		              G_TYPE_INT,         /* pid */
--		              G_TYPE_VARIANT,     /* options */
--		              G_TYPE_STRING);     /* reason */
-+	    g_signal_new (NM_DHCP_LISTENER_EVENT,
-+	                  G_OBJECT_CLASS_TYPE (object_class),
-+	                  G_SIGNAL_RUN_LAST, 0,
-+	                  g_signal_accumulator_true_handled,
-+	                  NULL, NULL,
-+	                  G_TYPE_BOOLEAN,     /* listeners return TRUE if handled */
-+	                  4,
-+	                  G_TYPE_STRING,      /* iface */
-+	                  G_TYPE_INT,         /* pid */
-+	                  G_TYPE_VARIANT,     /* options */
-+	                  G_TYPE_STRING);     /* reason */
- }
-diff --git a/src/dhcp-manager/nm-dhcp-listener.h b/src/dhcp-manager/nm-dhcp-listener.h
-index ff31fe3..3018b97 100644
---- a/src/dhcp-manager/nm-dhcp-listener.h
-+++ b/src/dhcp-manager/nm-dhcp-listener.h
-@@ -26,8 +26,8 @@
- 
- #define NM_DHCP_LISTENER_EVENT "event"
- 
--typedef GObject NMDhcpListener;
--typedef GObjectClass NMDhcpListenerClass;
-+typedef struct _NMDhcpListener NMDhcpListener;
-+typedef struct _NMDhcpListenerClass NMDhcpListenerClass;
- 
- GType nm_dhcp_listener_get_type (void);
- 
--- 
-2.7.4
-
-
-From 6d59141bd7459320a63ba606587d757cbd0aa74d Mon Sep 17 00:00:00 2001
-From: Thomas Haller <thaller@redhat.com>
-Date: Mon, 5 Sep 2016 17:17:09 +0200
-Subject: [PATCH 06/11] dhcp-listener: add logging macros to nm-dhcp-listener.c
-
-(cherry picked from commit d37cd04fe059e9d99c7103f4e22a9a945f8d4d98)
-(cherry picked from commit 3920a90e4a63b69bda583c28cc6bdfef1a9f0470)
----
- src/dhcp-manager/nm-dhcp-listener.c | 39 ++++++++++++++++++++++++++-----------
- 1 file changed, 28 insertions(+), 11 deletions(-)
-
-diff --git a/src/dhcp-manager/nm-dhcp-listener.c b/src/dhcp-manager/nm-dhcp-listener.c
-index d3616cb..79d3513 100644
---- a/src/dhcp-manager/nm-dhcp-listener.c
-+++ b/src/dhcp-manager/nm-dhcp-listener.c
-@@ -55,16 +55,35 @@ struct _NMDhcpListenerClass {
- 	GObjectClass parent_class;
- };
- 
--G_DEFINE_TYPE (NMDhcpListener, nm_dhcp_listener, G_TYPE_OBJECT)
--
--#define NM_DHCP_LISTENER_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDhcpListener, NM_IS_DHCP_LISTENER)
--
- enum {
- 	EVENT,
- 	LAST_SIGNAL
- };
- static guint signals[LAST_SIGNAL] = { 0 };
- 
-+G_DEFINE_TYPE (NMDhcpListener, nm_dhcp_listener, G_TYPE_OBJECT)
-+
-+#define NM_DHCP_LISTENER_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMDhcpListener, NM_IS_DHCP_LISTENER)
-+
-+NM_DEFINE_SINGLETON_GETTER (NMDhcpListener, nm_dhcp_listener_get, NM_TYPE_DHCP_LISTENER);
-+
-+/*****************************************************************************/
-+
-+#define _NMLOG_PREFIX_NAME    "dhcp-listener"
-+#define _NMLOG_DOMAIN         LOGD_DHCP
-+#define _NMLOG(level, ...) \
-+    G_STMT_START { \
-+        const NMDhcpListener *_self = (self); \
-+        char _prefix[64]; \
-+        \
-+        nm_log ((level), (_NMLOG_DOMAIN), \
-+                "%s: " _NM_UTILS_MACRO_FIRST(__VA_ARGS__), \
-+                (_self != singleton_instance \
-+                    ? nm_sprintf_buf (_prefix, "%s[%p]", _NMLOG_PREFIX_NAME, _self) \
-+                    : _NMLOG_PREFIX_NAME )\
-+                _NM_UTILS_MACRO_REST(__VA_ARGS__)); \
-+    } G_STMT_END
-+
- /*****************************************************************************/
- 
- static char *
-@@ -123,20 +142,20 @@ handle_event (GDBusConnection  *connection,
- 
- 	iface = get_option (options, "interface");
- 	if (iface == NULL) {
--		nm_log_warn (LOGD_DHCP, "dhcp-event: didn't have associated interface.");
-+		_LOGW ("dhcp-event: didn't have associated interface.");
- 		goto out;
- 	}
- 
- 	pid_str = get_option (options, "pid");
- 	pid = _nm_utils_ascii_str_to_int64 (pid_str, 10, 0, G_MAXINT32, -1);
- 	if (pid == -1) {
--		nm_log_warn (LOGD_DHCP, "dhcp-event: couldn't convert PID '%s' to an integer", pid_str ? pid_str : "(null)");
-+		_LOGW ("dhcp-event: couldn't convert PID '%s' to an integer", pid_str ? pid_str : "(null)");
- 		goto out;
- 	}
- 
- 	reason = get_option (options, "reason");
- 	if (reason == NULL) {
--		nm_log_warn (LOGD_DHCP, "dhcp-event: (pid %d) DHCP event didn't have a reason", pid);
-+		_LOGW ("dhcp-event: (pid %d) DHCP event didn't have a reason", pid);
- 		goto out;
- 	}
- 
-@@ -144,9 +163,9 @@ handle_event (GDBusConnection  *connection,
- 	if (!handled) {
- 		if (g_ascii_strcasecmp (reason, "RELEASE") == 0) {
- 			/* Ignore event when the dhcp client gets killed and we receive its last message */
--			nm_log_dbg (LOGD_DHCP, "dhcp-event: (pid %d) unhandled RELEASE DHCP event for interface %s", pid, iface);
-+			_LOGD ("dhcp-event: (pid %d) unhandled RELEASE DHCP event for interface %s", pid, iface);
- 		} else
--			nm_log_warn (LOGD_DHCP, "dhcp-event: (pid %d) unhandled DHCP event for interface %s", pid, iface);
-+			_LOGW ("dhcp-event: (pid %d) unhandled DHCP event for interface %s", pid, iface);
- 	}
- 
- out:
-@@ -193,8 +212,6 @@ dis_connection_cb (NMBusManager *mgr,
- 
- /***************************************************/
- 
--NM_DEFINE_SINGLETON_GETTER (NMDhcpListener, nm_dhcp_listener_get, NM_TYPE_DHCP_LISTENER);
--
- static void
- nm_dhcp_listener_init (NMDhcpListener *self)
- {
--- 
-2.7.4
-
-
-From 5ac925ed8c718aa9ec0ab405680ed858fd79f8a6 Mon Sep 17 00:00:00 2001
-From: Thomas Haller <thaller@redhat.com>
-Date: Mon, 5 Sep 2016 17:24:28 +0200
-Subject: [PATCH 07/11] dhcp-listener/trivial: rename field to track
- connections in NMDhcpListener
-
-It's not "signal-handles", as it currently tracks the registration ID of
-type int. Rename it, it is effectively the list of connections that we
-track.
-
-(cherry picked from commit 2dd3a5245f91a7c25ae1a36a86638195500f00a8)
-(cherry picked from commit 0ebdfd6cf1f1ba3c9753db4d9dd8979bb458a689)
----
- src/dhcp-manager/nm-dhcp-listener.c | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/src/dhcp-manager/nm-dhcp-listener.c b/src/dhcp-manager/nm-dhcp-listener.c
-index 79d3513..b09bc20 100644
---- a/src/dhcp-manager/nm-dhcp-listener.c
-+++ b/src/dhcp-manager/nm-dhcp-listener.c
-@@ -43,7 +43,7 @@ typedef struct {
- 	NMBusManager *      dbus_mgr;
- 	gulong              new_conn_id;
- 	gulong              dis_conn_id;
--	GHashTable *        signal_handlers;
-+	GHashTable *        connections;
- } NMDhcpListenerPrivate;
- 
- struct _NMDhcpListener {
-@@ -192,7 +192,7 @@ new_connection_cb (NMBusManager *mgr,
- 	                                         NULL,
- 	                                         G_DBUS_SIGNAL_FLAGS_NONE,
- 	                                         handle_event, self, NULL);
--	g_hash_table_insert (priv->signal_handlers, connection, GUINT_TO_POINTER (id));
-+	g_hash_table_insert (priv->connections, connection, GUINT_TO_POINTER (id));
- }
- 
- static void
-@@ -203,10 +203,10 @@ dis_connection_cb (NMBusManager *mgr,
- 	NMDhcpListenerPrivate *priv = NM_DHCP_LISTENER_GET_PRIVATE (self);
- 	guint id;
- 
--	id = GPOINTER_TO_UINT (g_hash_table_lookup (priv->signal_handlers, connection));
-+	id = GPOINTER_TO_UINT (g_hash_table_lookup (priv->connections, connection));
- 	if (id) {
- 		g_dbus_connection_signal_unsubscribe (connection, id);
--		g_hash_table_remove (priv->signal_handlers, connection);
-+		g_hash_table_remove (priv->connections, connection);
- 	}
- }
- 
-@@ -218,7 +218,7 @@ nm_dhcp_listener_init (NMDhcpListener *self)
- 	NMDhcpListenerPrivate *priv = NM_DHCP_LISTENER_GET_PRIVATE (self);
- 
- 	/* Maps GDBusConnection :: signal-id */
--	priv->signal_handlers = g_hash_table_new (NULL, NULL);
-+	priv->connections = g_hash_table_new (NULL, NULL);
- 
- 	priv->dbus_mgr = nm_bus_manager_get ();
- 
-@@ -243,7 +243,7 @@ dispose (GObject *object)
- 	nm_clear_g_signal_handler (priv->dbus_mgr, &priv->dis_conn_id);
- 	priv->dbus_mgr = NULL;
- 
--	g_clear_pointer (&priv->signal_handlers, g_hash_table_destroy);
-+	g_clear_pointer (&priv->connections, g_hash_table_destroy);
- 
- 	G_OBJECT_CLASS (nm_dhcp_listener_parent_class)->dispose (object);
- }
--- 
-2.7.4
-
-
-From 35518c37de240061c26364b98e464ba140dcdc69 Mon Sep 17 00:00:00 2001
-From: Thomas Haller <thaller@redhat.com>
-Date: Mon, 5 Sep 2016 11:06:04 +0200
-Subject: [PATCH 08/11] dhcp-helper: refactor error handling
-
-Don't exit(1) from fatal_error() because that skips destroying
-local variables in main(). Just return regularly.
-
-(cherry picked from commit bb489163db36889a6fb80789e4e5b9dd8a15dbdd)
-(cherry picked from commit a8d87ef87f2931f07e6fa6dd0df56bf3d1fdf79e)
----
- src/dhcp-manager/nm-dhcp-helper.c | 30 +++++++++++++++---------------
- 1 file changed, 15 insertions(+), 15 deletions(-)
-
-diff --git a/src/dhcp-manager/nm-dhcp-helper.c b/src/dhcp-manager/nm-dhcp-helper.c
-index 7667084..8c512e7 100644
---- a/src/dhcp-manager/nm-dhcp-helper.c
-+++ b/src/dhcp-manager/nm-dhcp-helper.c
-@@ -74,26 +74,26 @@ build_signal_parameters (void)
- }
- 
- static void
--fatal_error (void)
-+kill_pid (void)
- {
--	const char *pid_str = getenv ("pid");
--	int pid = 0;
-+	const char *pid_str;
-+	pid_t pid = 0;
- 
-+	pid_str = getenv ("pid");
- 	if (pid_str)
- 		pid = strtol (pid_str, NULL, 10);
- 	if (pid) {
- 		g_printerr ("Fatal error occured, killing dhclient instance with pid %d.\n", pid);
- 		kill (pid, SIGTERM);
- 	}
--
--	exit (1);
- }
- 
- int
- main (int argc, char *argv[])
- {
--	GDBusConnection *connection;
--	GError *error = NULL;
-+	gs_unref_object GDBusConnection *connection = NULL;
-+	gs_free_error GError *error = NULL;
-+	gboolean success = FALSE;
- 
- 	nm_g_type_init ();
- 
-@@ -104,8 +104,7 @@ main (int argc, char *argv[])
- 		g_dbus_error_strip_remote_error (error);
- 		g_printerr ("Error: could not connect to NetworkManager D-Bus socket: %s\n",
- 		            error->message);
--		g_error_free (error);
--		fatal_error ();
-+		goto out;
- 	}
- 
- 	if (!g_dbus_connection_emit_signal (connection,
-@@ -117,18 +116,19 @@ main (int argc, char *argv[])
- 	                                    &error)) {
- 		g_dbus_error_strip_remote_error (error);
- 		g_printerr ("Error: Could not send DHCP Event signal: %s\n", error->message);
--		g_error_free (error);
--		fatal_error ();
-+		goto out;
- 	}
- 
- 	if (!g_dbus_connection_flush_sync (connection, NULL, &error)) {
- 		g_dbus_error_strip_remote_error (error);
- 		g_printerr ("Error: Could not flush D-Bus connection: %s\n", error->message);
--		g_error_free (error);
--		fatal_error ();
-+		goto out;
- 	}
- 
--	g_object_unref (connection);
--	return 0;
-+	success = TRUE;
-+out:
-+	if (!success)
-+		kill_pid ();
-+	return success ? EXIT_SUCCESS : EXIT_FAILURE;
- }
- 
--- 
-2.7.4
-
-
-From e342765675214ef1fbcdd9e30d916c687a75fd6e Mon Sep 17 00:00:00 2001
-From: Thomas Haller <thaller@redhat.com>
-Date: Mon, 5 Sep 2016 13:38:58 +0200
-Subject: [PATCH 09/11] dhcp-helper: refactor logging to use logging macros
-
-(cherry picked from commit cc89996c9e826c9c8d12d5fb7bc8a2a578209eb0)
-(cherry picked from commit 9d44dafc3cef8fe1b7d41c9af0f6fa30254924f1)
----
- src/dhcp-manager/nm-dhcp-helper.c | 45 ++++++++++++++++++++++++++++++++++-----
- 1 file changed, 40 insertions(+), 5 deletions(-)
-
-diff --git a/src/dhcp-manager/nm-dhcp-helper.c b/src/dhcp-manager/nm-dhcp-helper.c
-index 8c512e7..383c985 100644
---- a/src/dhcp-manager/nm-dhcp-helper.c
-+++ b/src/dhcp-manager/nm-dhcp-helper.c
-@@ -25,8 +25,43 @@
- #include <string.h>
- #include <signal.h>
- 
-+#include "nm-utils/nm-vpn-plugin-macros.h"
-+
- #define NM_DHCP_CLIENT_DBUS_IFACE   "org.freedesktop.nm_dhcp_client"
- 
-+/*****************************************************************************/
-+
-+#ifdef NM_MORE_LOGGING
-+#define _NMLOG_ENABLED(level) TRUE
-+#else
-+#define _NMLOG_ENABLED(level) ((level) <= LOG_ERR)
-+#endif
-+
-+#define _NMLOG(always_enabled, level, ...) \
-+	G_STMT_START { \
-+		if ((always_enabled) || _NMLOG_ENABLED (level)) { \
-+			GTimeVal _tv; \
-+			\
-+			g_get_current_time (&_tv); \
-+			g_print ("nm-dhcp-helper[%ld] %-7s [%ld.%04ld] " _NM_UTILS_MACRO_FIRST (__VA_ARGS__) "\n", \
-+			         (long) getpid (), \
-+			         nm_utils_syslog_to_str (level), \
-+			         _tv.tv_sec, _tv.tv_usec / 100 \
-+			         _NM_UTILS_MACRO_REST (__VA_ARGS__)); \
-+		} \
-+	} G_STMT_END
-+
-+#define _LOGD(...) _NMLOG(TRUE,  LOG_INFO,    __VA_ARGS__)
-+#define _LOGI(...) _NMLOG(TRUE,  LOG_NOTICE,  __VA_ARGS__)
-+#define _LOGW(...) _NMLOG(TRUE,  LOG_WARNING, __VA_ARGS__)
-+#define _LOGE(...) _NMLOG(TRUE,  LOG_ERR,     __VA_ARGS__)
-+
-+#define _LOGd(...) _NMLOG(FALSE, LOG_INFO,    __VA_ARGS__)
-+#define _LOGi(...) _NMLOG(FALSE, LOG_NOTICE,  __VA_ARGS__)
-+#define _LOGw(...) _NMLOG(FALSE, LOG_WARNING, __VA_ARGS__)
-+
-+/*****************************************************************************/
-+
- static const char * ignore[] = {"PATH", "SHLVL", "_", "PWD", "dhc_dbus", NULL};
- 
- static GVariant *
-@@ -83,7 +118,7 @@ kill_pid (void)
- 	if (pid_str)
- 		pid = strtol (pid_str, NULL, 10);
- 	if (pid) {
--		g_printerr ("Fatal error occured, killing dhclient instance with pid %d.\n", pid);
-+		_LOGI ("a fatal error occured, kill dhclient instance with pid %d\n", pid);
- 		kill (pid, SIGTERM);
- 	}
- }
-@@ -102,8 +137,8 @@ main (int argc, char *argv[])
- 	                                                     NULL, NULL, &error);
- 	if (!connection) {
- 		g_dbus_error_strip_remote_error (error);
--		g_printerr ("Error: could not connect to NetworkManager D-Bus socket: %s\n",
--		            error->message);
-+		_LOGE ("could not connect to NetworkManager D-Bus socket: %s",
-+		       error->message);
- 		goto out;
- 	}
- 
-@@ -115,13 +150,13 @@ main (int argc, char *argv[])
- 	                                    build_signal_parameters (),
- 	                                    &error)) {
- 		g_dbus_error_strip_remote_error (error);
--		g_printerr ("Error: Could not send DHCP Event signal: %s\n", error->message);
-+		_LOGE ("could not send DHCP Event signal: %s", error->message);
- 		goto out;
- 	}
- 
- 	if (!g_dbus_connection_flush_sync (connection, NULL, &error)) {
- 		g_dbus_error_strip_remote_error (error);
--		g_printerr ("Error: Could not flush D-Bus connection: %s\n", error->message);
-+		_LOGE ("could not flush D-Bus connection: %s", error->message);
- 		goto out;
- 	}
- 
--- 
-2.7.4
-
-
-From 8fb42bd50ad41167498332e48bea548cdf76453c Mon Sep 17 00:00:00 2001
-From: Thomas Haller <thaller@redhat.com>
-Date: Mon, 5 Sep 2016 11:54:46 +0200
-Subject: [PATCH 10/11] dhcp: add new header "nm-dhcp-helper-api.h"
-
-(cherry picked from commit 7684b68c49812ed7b2ec493889fae04db066b665)
-(cherry picked from commit 3ac3125aff9987b3ac0284daaa3faae93291a603)
----
- src/Makefile.am                       |  1 +
- src/dhcp-manager/Makefile.am          |  5 ++++-
- src/dhcp-manager/nm-dhcp-helper-api.h | 31 +++++++++++++++++++++++++++++++
- src/dhcp-manager/nm-dhcp-helper.c     |  2 +-
- src/dhcp-manager/nm-dhcp-listener.c   |  2 +-
- 5 files changed, 38 insertions(+), 3 deletions(-)
- create mode 100644 src/dhcp-manager/nm-dhcp-helper-api.h
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index c460caf..8d29b19 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -335,6 +335,7 @@ libNetworkManager_la_SOURCES = \
- 	dhcp-manager/nm-dhcp-client.c \
- 	dhcp-manager/nm-dhcp-client.h \
- 	dhcp-manager/nm-dhcp-client-logging.h \
-+	dhcp-manager/nm-dhcp-helper-api.h \
- 	dhcp-manager/nm-dhcp-utils.c \
- 	dhcp-manager/nm-dhcp-utils.h \
- 	dhcp-manager/nm-dhcp-listener.c \
-diff --git a/src/dhcp-manager/Makefile.am b/src/dhcp-manager/Makefile.am
-index b4590b4..4295412 100644
---- a/src/dhcp-manager/Makefile.am
-+++ b/src/dhcp-manager/Makefile.am
-@@ -1,6 +1,9 @@
- libexec_PROGRAMS = nm-dhcp-helper
- 
--nm_dhcp_helper_SOURCES = nm-dhcp-helper.c
-+nm_dhcp_helper_SOURCES = \
-+	nm-dhcp-helper.c \
-+	nm-dhcp-helper-api.h \
-+	$(NULL)
- 
- nm_dhcp_helper_CPPFLAGS = \
- 	$(GLIB_CFLAGS) \
-diff --git a/src/dhcp-manager/nm-dhcp-helper-api.h b/src/dhcp-manager/nm-dhcp-helper-api.h
-new file mode 100644
-index 0000000..a6323db
---- /dev/null
-+++ b/src/dhcp-manager/nm-dhcp-helper-api.h
-@@ -0,0 +1,31 @@
-+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-+/* NetworkManager -- Network link manager
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with this library; if not, write to the
-+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-+ * Boston, MA 02110-1301 USA.
-+ *
-+ * (C) Copyright 2016 Red Hat, Inc.
-+ */
-+
-+#ifndef __NM_DHCP_HELPER_API_H__
-+#define __NM_DHCP_HELPER_API_H__
-+
-+/******************************************************************************/
-+
-+#define NM_DHCP_CLIENT_DBUS_IFACE "org.freedesktop.nm_dhcp_client"
-+
-+/******************************************************************************/
-+
-+#endif /* __NM_DHCP_HELPER_API_H__ */
-diff --git a/src/dhcp-manager/nm-dhcp-helper.c b/src/dhcp-manager/nm-dhcp-helper.c
-index 383c985..e53fe27 100644
---- a/src/dhcp-manager/nm-dhcp-helper.c
-+++ b/src/dhcp-manager/nm-dhcp-helper.c
-@@ -27,7 +27,7 @@
- 
- #include "nm-utils/nm-vpn-plugin-macros.h"
- 
--#define NM_DHCP_CLIENT_DBUS_IFACE   "org.freedesktop.nm_dhcp_client"
-+#include "nm-dhcp-helper-api.h"
- 
- /*****************************************************************************/
- 
-diff --git a/src/dhcp-manager/nm-dhcp-listener.c b/src/dhcp-manager/nm-dhcp-listener.c
-index b09bc20..7e9de49 100644
---- a/src/dhcp-manager/nm-dhcp-listener.c
-+++ b/src/dhcp-manager/nm-dhcp-listener.c
-@@ -29,11 +29,11 @@
- #include <errno.h>
- #include <unistd.h>
- 
-+#include "nm-dhcp-helper-api.h"
- #include "nm-core-internal.h"
- #include "nm-bus-manager.h"
- #include "NetworkManagerUtils.h"
- 
--#define NM_DHCP_CLIENT_DBUS_IFACE "org.freedesktop.nm_dhcp_client"
- #define PRIV_SOCK_PATH            NMRUNDIR "/private-dhcp"
- #define PRIV_SOCK_TAG             "dhcp"
- 
--- 
-2.7.4
-
-
-From 901ac5654ae51fd44b575c21201f41f5e6f2bbd8 Mon Sep 17 00:00:00 2001
-From: Thomas Haller <thaller@redhat.com>
-Date: Mon, 5 Sep 2016 12:32:40 +0200
-Subject: [PATCH 11/11] dhcp: call synchronous Notify D-Bus method from
- nm-dhcp-helper
-
-A D-Bus signal is asynchronous and it can happen that nm-dhcp-helper
-emits the "Event" signal before the server is able to register a handler:
-
-   NM_DHCP_HELPER=/usr/libexec/nm-dhcp-helper
-   nmcli general logging level TRACE
-   for i in `seq 1 500`; do $NM_DHCP_HELPER & done
-   journalctl -u NetworkManager --since '1 min ago' | grep "didn't have associated interface" | wc -l
-    499
-
-Avoid that, by calling the synchronous D-Bus method "Notify".
-
-Interestingly, this race seem to exist since 2007.
-
-Actually, we called g_dbus_connection_signal_subscribe() from inside
-GDBusServer:new-connection signal. So it is not clear how such a race
-could exist. I was not able to reproduce it by putting a sleep
-before g_dbus_connection_signal_subscribe(). On the other hand, there
-is bug rh#1372854 and above reproducer which strongly indicates that
-events can be lost under certain circumstances.
-Now we instead g_dbus_connection_register_object() from the
-new-connection signal. According to my tests there was no more race
-as also backed by glib's documentation. Still, keep a simple retry-loop
-in nm-dhcp-helper just to be sure.
-
-https://bugzilla.redhat.com/show_bug.cgi?id=1372854
-https://bugzilla.redhat.com/show_bug.cgi?id=1373276
-(cherry picked from commit 2856a658b38df88494187c811415a198a424e1f2)
-(cherry picked from commit e678bd29a4e5fdd83b7d99392d54ecb5fcabc287)
----
- src/dhcp-manager/nm-dhcp-helper-api.h |  5 ++
- src/dhcp-manager/nm-dhcp-helper.c     | 78 +++++++++++++++++++++++-----
- src/dhcp-manager/nm-dhcp-listener.c   | 97 ++++++++++++++++++++++++++++-------
- src/nm-bus-manager.c                  |  6 ++-
- 4 files changed, 153 insertions(+), 33 deletions(-)
-
-diff --git a/src/dhcp-manager/nm-dhcp-helper-api.h b/src/dhcp-manager/nm-dhcp-helper-api.h
-index a6323db..a3eb171 100644
---- a/src/dhcp-manager/nm-dhcp-helper-api.h
-+++ b/src/dhcp-manager/nm-dhcp-helper-api.h
-@@ -26,6 +26,11 @@
- 
- #define NM_DHCP_CLIENT_DBUS_IFACE "org.freedesktop.nm_dhcp_client"
- 
-+#define NM_DHCP_HELPER_SERVER_BUS_NAME          "org.freedesktop.nm_dhcp_server"
-+#define NM_DHCP_HELPER_SERVER_OBJECT_PATH       "/org/freedesktop/nm_dhcp_server"
-+#define NM_DHCP_HELPER_SERVER_INTERFACE_NAME    "org.freedesktop.nm_dhcp_server"
-+#define NM_DHCP_HELPER_SERVER_METHOD_NOTIFY     "Notify"
-+
- /******************************************************************************/
- 
- #endif /* __NM_DHCP_HELPER_API_H__ */
-diff --git a/src/dhcp-manager/nm-dhcp-helper.c b/src/dhcp-manager/nm-dhcp-helper.c
-index e53fe27..9c6f69b 100644
---- a/src/dhcp-manager/nm-dhcp-helper.c
-+++ b/src/dhcp-manager/nm-dhcp-helper.c
-@@ -105,7 +105,7 @@ build_signal_parameters (void)
- 		g_free (name);
- 	}
- 
--	return g_variant_new ("(a{sv})", &builder);
-+	return g_variant_ref_sink (g_variant_new ("(a{sv})", &builder));
- }
- 
- static void
-@@ -128,7 +128,11 @@ main (int argc, char *argv[])
- {
- 	gs_unref_object GDBusConnection *connection = NULL;
- 	gs_free_error GError *error = NULL;
-+	gs_unref_variant GVariant *parameters = NULL;
-+	gs_unref_variant GVariant *result = NULL;
- 	gboolean success = FALSE;
-+	guint try_count = 0;
-+	gint64 time_end;
- 
- 	nm_g_type_init ();
- 
-@@ -142,25 +146,73 @@ main (int argc, char *argv[])
- 		goto out;
- 	}
- 
--	if (!g_dbus_connection_emit_signal (connection,
--	                                    NULL,
--	                                    "/",
--	                                    NM_DHCP_CLIENT_DBUS_IFACE,
--	                                    "Event",
--	                                    build_signal_parameters (),
--	                                    &error)) {
--		g_dbus_error_strip_remote_error (error);
--		_LOGE ("could not send DHCP Event signal: %s", error->message);
--		goto out;
--	}
-+	parameters = build_signal_parameters ();
-+
-+	time_end = g_get_monotonic_time () + (200 * 1000L); /* retry for at most 200 milliseconds */
-+
-+do_notify:
-+	try_count++;
-+	result = g_dbus_connection_call_sync (connection,
-+	                                      NULL,
-+	                                      NM_DHCP_HELPER_SERVER_OBJECT_PATH,
-+	                                      NM_DHCP_HELPER_SERVER_INTERFACE_NAME,
-+	                                      NM_DHCP_HELPER_SERVER_METHOD_NOTIFY,
-+	                                      parameters,
-+	                                      NULL,
-+	                                      G_DBUS_CALL_FLAGS_NONE,
-+	                                      1000,
-+	                                      NULL,
-+	                                      &error);
-+
-+	if (!result) {
-+		gs_free char *s_err = NULL;
-+
-+		s_err = g_dbus_error_get_remote_error (error);
-+		if (NM_IN_STRSET (s_err, "org.freedesktop.DBus.Error.UnknownMethod")) {
-+			gint64 remaining_time = time_end - g_get_monotonic_time ();
-+
-+			/* I am not sure that a race can actually happen, as we register the object
-+			 * on the server side during GDBusServer:new-connection signal.
-+			 *
-+			 * However, there was also a race for subscribing to an event, so let's just
-+			 * do some retry. */
-+			if (remaining_time > 0) {
-+				_LOGi ("failure to call notify: %s (retry %u)", error->message, try_count);
-+				g_usleep (NM_MIN (NM_CLAMP ((gint64) (100L * (1L << try_count)), 5000, 25000), remaining_time));
-+				g_clear_error (&error);
-+				goto do_notify;
-+			}
-+		}
-+		_LOGW ("failure to call notify: %s (try signal via Event)", error->message);
-+		g_clear_error (&error);
-+
-+		/* for backward compatibilty, try to emit the signal. There is no stable
-+		 * API between the dhcp-helper and NetworkManager. However, while upgrading
-+		 * the NetworkManager package, a newer helper might want to notify an
-+		 * older server, which still uses the "Event". */
-+		if (!g_dbus_connection_emit_signal (connection,
-+		                                    NULL,
-+		                                    "/",
-+		                                    NM_DHCP_CLIENT_DBUS_IFACE,
-+		                                    "Event",
-+		                                    parameters,
-+		                                    &error)) {
-+			g_dbus_error_strip_remote_error (error);
-+			_LOGE ("could not send DHCP Event signal: %s", error->message);
-+			goto out;
-+		}
-+		/* We were able to send the asynchronous Event. Consider that a success. */
-+		success = TRUE;
-+	} else
-+		success = TRUE;
- 
- 	if (!g_dbus_connection_flush_sync (connection, NULL, &error)) {
- 		g_dbus_error_strip_remote_error (error);
- 		_LOGE ("could not flush D-Bus connection: %s", error->message);
-+		success = FALSE;
- 		goto out;
- 	}
- 
--	success = TRUE;
- out:
- 	if (!success)
- 		kill_pid ();
-diff --git a/src/dhcp-manager/nm-dhcp-listener.c b/src/dhcp-manager/nm-dhcp-listener.c
-index 7e9de49..0df4197 100644
---- a/src/dhcp-manager/nm-dhcp-listener.c
-+++ b/src/dhcp-manager/nm-dhcp-listener.c
-@@ -119,13 +119,14 @@ get_option (GVariant *options, const char *key)
- }
- 
- static void
--handle_event (GDBusConnection  *connection,
--              const char       *sender_name,
--              const char       *object_path,
--              const char       *interface_name,
--              const char       *signal_name,
--              GVariant         *parameters,
--              gpointer          user_data)
-+_method_call (GDBusConnection *connection,
-+              const char *sender,
-+              const char *object_path,
-+              const char *interface_name,
-+              const char *method_name,
-+              GVariant *parameters,
-+              GDBusMethodInvocation *invocation,
-+              gpointer user_data)
- {
- 	NMDhcpListener *self = NM_DHCP_LISTENER (user_data);
- 	char *iface = NULL;
-@@ -135,8 +136,12 @@ handle_event (GDBusConnection  *connection,
- 	gboolean handled = FALSE;
- 	GVariant *options;
- 
-+	if (!nm_streq0 (interface_name, NM_DHCP_HELPER_SERVER_INTERFACE_NAME))
-+		g_return_if_reached ();
-+	if (!nm_streq0 (method_name, NM_DHCP_HELPER_SERVER_METHOD_NOTIFY))
-+		g_return_if_reached ();
- 	if (!g_variant_is_of_type (parameters, G_VARIANT_TYPE ("(a{sv})")))
--		return;
-+		g_return_if_reached ();
- 
- 	g_variant_get (parameters, "(@a{sv})", &options);
- 
-@@ -173,6 +178,57 @@ out:
- 	g_free (pid_str);
- 	g_free (reason);
- 	g_variant_unref (options);
-+	g_dbus_method_invocation_return_value (invocation, NULL);
-+}
-+
-+static guint
-+_dbus_connection_register_object (NMDhcpListener *self,
-+                                  GDBusConnection *connection,
-+                                  GError **error)
-+{
-+	static GDBusArgInfo arg_info_notify_in = {
-+		.ref_count = -1,
-+		.name = "data",
-+		.signature = "a{sv}",
-+		.annotations = NULL,
-+	};
-+	static GDBusArgInfo *arg_infos_notify[] = {
-+		&arg_info_notify_in,
-+		NULL,
-+	};
-+	static GDBusMethodInfo method_info_notify = {
-+		.ref_count = -1,
-+		.name = NM_DHCP_HELPER_SERVER_METHOD_NOTIFY,
-+		.in_args = arg_infos_notify,
-+		.out_args = NULL,
-+		.annotations = NULL,
-+	};
-+	static GDBusMethodInfo *method_infos[] = {
-+		&method_info_notify,
-+		NULL,
-+	};
-+	static GDBusInterfaceInfo interface_info = {
-+		.ref_count = -1,
-+		.name = NM_DHCP_HELPER_SERVER_INTERFACE_NAME,
-+		.methods = method_infos,
-+		.signals = NULL,
-+		.properties = NULL,
-+		.annotations = NULL,
-+	};
-+
-+	static GDBusInterfaceVTable interface_vtable = {
-+		.method_call = _method_call,
-+		.get_property = NULL,
-+		.set_property = NULL,
-+	};
-+
-+	return g_dbus_connection_register_object (connection,
-+	                                          NM_DHCP_HELPER_SERVER_OBJECT_PATH,
-+	                                          &interface_info,
-+	                                          &interface_vtable,
-+	                                          self,
-+	                                          NULL,
-+	                                          error);
- }
- 
- static void
-@@ -182,17 +238,20 @@ new_connection_cb (NMBusManager *mgr,
-                    NMDhcpListener *self)
- {
- 	NMDhcpListenerPrivate *priv = NM_DHCP_LISTENER_GET_PRIVATE (self);
--	guint id;
-+	guint registration_id;
-+	GError *error = NULL;
-+
-+	/* it is important to register the object during the new-connection signal,
-+	 * as this avoids races with the connecting object. */
-+	registration_id = _dbus_connection_register_object (self, connection, &error);
-+	if (!registration_id) {
-+		_LOGE ("failure to register %s for connection %p: %s",
-+		       NM_DHCP_HELPER_SERVER_OBJECT_PATH, connection, error->message);
-+		g_error_free (error);
-+		return;
-+	}
- 
--	id = g_dbus_connection_signal_subscribe (connection,
--	                                         NULL,
--	                                         NM_DHCP_CLIENT_DBUS_IFACE,
--	                                         "Event",
--	                                         NULL,
--	                                         NULL,
--	                                         G_DBUS_SIGNAL_FLAGS_NONE,
--	                                         handle_event, self, NULL);
--	g_hash_table_insert (priv->connections, connection, GUINT_TO_POINTER (id));
-+	g_hash_table_insert (priv->connections, connection, GUINT_TO_POINTER (registration_id));
- }
- 
- static void
-@@ -205,7 +264,7 @@ dis_connection_cb (NMBusManager *mgr,
- 
- 	id = GPOINTER_TO_UINT (g_hash_table_lookup (priv->connections, connection));
- 	if (id) {
--		g_dbus_connection_signal_unsubscribe (connection, id);
-+		g_dbus_connection_unregister_object (connection, id);
- 		g_hash_table_remove (priv->connections, connection);
- 	}
- }
-diff --git a/src/nm-bus-manager.c b/src/nm-bus-manager.c
-index 449de4e..270792e 100644
---- a/src/nm-bus-manager.c
-+++ b/src/nm-bus-manager.c
-@@ -221,7 +221,11 @@ private_server_new_connection (GDBusServer *server,
- 
- 	_LOGD ("(%s) accepted connection %p on private socket", s->tag, conn);
- 
--	/* Emit this for the manager */
-+	/* Emit this for the manager.
-+	 *
-+	 * It is essential to do this from the "new-connection" signal handler, as
-+	 * at that point no messages from the connection are yet processed
-+	 * (which avoids races with registering objects). */
- 	g_signal_emit (s->manager,
- 	               signals[PRIVATE_CONNECTION_NEW],
- 	               s->detail,
--- 
-2.7.4
-

diff --git a/net-misc/networkmanager/files/networkmanager-1.4.0-wifi-mac1.patch b/net-misc/networkmanager/files/networkmanager-1.4.0-wifi-mac1.patch
deleted file mode 100644
index 9c1e774c448..00000000000
--- a/net-misc/networkmanager/files/networkmanager-1.4.0-wifi-mac1.patch
+++ /dev/null
@@ -1,245 +0,0 @@
-From c52f385566e558ee3edc98d20225155b362d212f Mon Sep 17 00:00:00 2001
-From: Thomas Haller <thaller@redhat.com>
-Date: Sun, 28 Aug 2016 13:52:32 +0200
-Subject: [PATCH 1/4] platform: split processing result from do_change_link()
-
-(cherry picked from commit 3dc09446771a3434ed948bdd5e6ca9f6ef9a9e76)
-(cherry picked from commit 471521ca84187cd32afcd20aebe5a369fe7368dc)
----
- src/platform/nm-linux-platform.c | 35 +++++++++++++++++++++++++++--------
- 1 file changed, 27 insertions(+), 8 deletions(-)
-
-diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
-index 98c4e46..eeb24ca 100644
---- a/src/platform/nm-linux-platform.c
-+++ b/src/platform/nm-linux-platform.c
-@@ -4060,18 +4060,14 @@ out:
- 	return !!nmp_cache_lookup_obj (priv->cache, obj_id);
- }
- 
--static NMPlatformError
--do_change_link (NMPlatform *platform,
--                int ifindex,
--                struct nl_msg *nlmsg)
-+static WaitForNlResponseResult
-+do_change_link_request (NMPlatform *platform,
-+                        int ifindex,
-+                        struct nl_msg *nlmsg)
- {
- 	nm_auto_pop_netns NMPNetns *netns = NULL;
- 	WaitForNlResponseResult seq_result = WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN;
- 	int nle;
--	char s_buf[256];
--	NMPlatformError result = NM_PLATFORM_ERROR_SUCCESS;
--	NMLogLevel log_level = LOGL_DEBUG;
--	const char *log_result = "failure", *log_detail = "";
- 
- 	if (!nm_platform_netns_push (platform, &netns))
- 		return NM_PLATFORM_ERROR_UNSPECIFIED;
-@@ -4098,6 +4094,18 @@ retry:
- 		nlmsg_hdr (nlmsg)->nlmsg_type = RTM_SETLINK;
- 		goto retry;
- 	}
-+	return seq_result;
-+}
-+
-+static NMPlatformError
-+do_change_link_result (NMPlatform *platform,
-+                       int ifindex,
-+                       WaitForNlResponseResult seq_result)
-+{
-+	char s_buf[256];
-+	NMPlatformError result = NM_PLATFORM_ERROR_SUCCESS;
-+	NMLogLevel log_level = LOGL_DEBUG;
-+	const char *log_result = "failure", *log_detail = "";
- 
- 	if (seq_result == WAIT_FOR_NL_RESPONSE_RESULT_RESPONSE_OK) {
- 		log_result = "success";
-@@ -4123,6 +4131,17 @@ retry:
- 	return result;
- }
- 
-+static NMPlatformError
-+do_change_link (NMPlatform *platform,
-+                int ifindex,
-+                struct nl_msg *nlmsg)
-+{
-+	WaitForNlResponseResult seq_result;
-+
-+	seq_result = do_change_link_request (platform, ifindex, nlmsg);
-+	return do_change_link_result (platform, ifindex, seq_result);
-+}
-+
- static gboolean
- link_add (NMPlatform *platform,
-           const char *name,
--- 
-2.7.4
-
-
-From 559ed361a30650f263668aadb86233fb405f0b29 Mon Sep 17 00:00:00 2001
-From: Thomas Haller <thaller@redhat.com>
-Date: Sun, 28 Aug 2016 14:08:42 +0200
-Subject: [PATCH 2/4] platform: workaround kernel wrongly returning ENFILE when
- changing MAC address
-
-https://bugzilla.gnome.org/show_bug.cgi?id=770456
-(cherry picked from commit 2bef71611bd9fd2e333a7522205f0262ac25680f)
-(cherry picked from commit 06d1679aa9867682297316e7b2cfac6fc8f67c2a)
----
- src/platform/nm-linux-platform.c | 27 ++++++++++++++++++++++++++-
- 1 file changed, 26 insertions(+), 1 deletion(-)
-
-diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
-index eeb24ca..c36e967 100644
---- a/src/platform/nm-linux-platform.c
-+++ b/src/platform/nm-linux-platform.c
-@@ -4449,6 +4449,8 @@ link_set_address (NMPlatform *platform, int ifindex, gconstpointer address, size
- {
- 	nm_auto_nlmsg struct nl_msg *nlmsg = NULL;
- 	gs_free char *mac = NULL;
-+	WaitForNlResponseResult seq_result;
-+	char s_buf[256];
- 
- 	if (!address || !length)
- 		g_return_val_if_reached (NM_PLATFORM_ERROR_BUG);
-@@ -4468,7 +4470,30 @@ link_set_address (NMPlatform *platform, int ifindex, gconstpointer address, size
- 
- 	NLA_PUT (nlmsg, IFLA_ADDRESS, length, address);
- 
--	return do_change_link (platform, ifindex, nlmsg);
-+	seq_result = do_change_link_request (platform, ifindex, nlmsg);
-+
-+	if (NM_IN_SET (-((int) seq_result), ENFILE)) {
-+		const NMPObject *obj_cache;
-+
-+		/* workaround ENFILE which may be wrongly returned (bgo #770456).
-+		 * If the MAC address is as expected, assume success? */
-+
-+		obj_cache = nmp_cache_lookup_link (NM_LINUX_PLATFORM_GET_PRIVATE (platform)->cache, ifindex);
-+		if (   obj_cache
-+		    && obj_cache->link.addr.len == length
-+		    && memcmp (obj_cache->link.addr.data, address, length) == 0) {
-+			_NMLOG (LOGL_DEBUG,
-+			        "do-change-link[%d]: %s changing link: %s%s",
-+			        ifindex,
-+			        "success",
-+			        wait_for_nl_response_to_string (seq_result, s_buf, sizeof (s_buf)),
-+			        " (assume success changing address)");
-+			return NM_PLATFORM_ERROR_SUCCESS;
-+		}
-+	}
-+
-+	return do_change_link_result (platform, ifindex, seq_result);
-+
- nla_put_failure:
- 	g_return_val_if_reached (NM_PLATFORM_ERROR_UNSPECIFIED);
- }
--- 
-2.7.4
-
-
-From afe1a15516f0a5024f161e3ff1046afdfb7e58b8 Mon Sep 17 00:00:00 2001
-From: Thomas Haller <thaller@redhat.com>
-Date: Mon, 29 Aug 2016 17:14:04 +0200
-Subject: [PATCH 3/4] device: fix spelling in logging
-
-(cherry picked from commit d51f2c2a4e99799739e2adbeaf578144b556c4b9)
-(cherry picked from commit b1f5d3d798498c53fe65257490b2df3e3f71e364)
----
- src/devices/nm-device.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
-index 199acc6..305a1bb 100644
---- a/src/devices/nm-device.c
-+++ b/src/devices/nm-device.c
-@@ -11820,7 +11820,7 @@ _hw_addr_set (NMDevice *self,
- 			       operation, addr, detail);
- 		} else {
- 			_LOGW (LOGD_DEVICE,
--			       "set-hw-addr: new MAC address %s not successfully set to %s (%s)",
-+			       "set-hw-addr: new MAC address %s not successfully %s (%s)",
- 			       addr, operation, detail);
- 			success = FALSE;
- 		}
--- 
-2.7.4
-
-
-From ac81b54da92c569db110407a63142565d69963f4 Mon Sep 17 00:00:00 2001
-From: Thomas Haller <thaller@redhat.com>
-Date: Mon, 29 Aug 2016 18:28:34 +0200
-Subject: [PATCH 4/4] device: add hack to wait after changing MAC address
-
-It seems some drivers return success for nm_platform_link_set_address(),
-but at that point the address did not yet actually change *sigh*.
-It changes a bit later, possibly after setting the device up.
-
-Add a workaround to retry reading the MAC address when platform indicates
-success but the address still differs at first.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=770456
-(cherry picked from commit 67b685235847ac49712d77023e23ef5c38e82a9e)
-(cherry picked from commit 3b51959f48f2b40a4d85e1d36fd69a46548369cb)
----
- src/devices/nm-device.c | 28 +++++++++++++++++++++++++---
- 1 file changed, 25 insertions(+), 3 deletions(-)
-
-diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
-index 305a1bb..6939332 100644
---- a/src/devices/nm-device.c
-+++ b/src/devices/nm-device.c
-@@ -11774,6 +11774,7 @@ _hw_addr_set (NMDevice *self,
- {
- 	NMDevicePrivate *priv;
- 	gboolean success = FALSE;
-+	gboolean needs_refresh = FALSE;
- 	NMPlatformError plerr;
- 	const char *cur_addr;
- 	guint8 addr_bytes[NM_UTILS_HWADDR_LEN_MAX];
-@@ -11819,10 +11820,10 @@ _hw_addr_set (NMDevice *self,
- 			_LOGI (LOGD_DEVICE, "set-hw-addr: %s MAC address to %s (%s)",
- 			       operation, addr, detail);
- 		} else {
--			_LOGW (LOGD_DEVICE,
--			       "set-hw-addr: new MAC address %s not successfully %s (%s)",
-+			_LOGD (LOGD_DEVICE,
-+			       "set-hw-addr: new MAC address %s not successfully %s (%s) (refresh link)",
- 			       addr, operation, detail);
--			success = FALSE;
-+			needs_refresh = TRUE;
- 		}
- 	} else {
- 		_NMLOG (plerr == NM_PLATFORM_ERROR_NOT_FOUND ? LOGL_DEBUG : LOGL_WARN,
-@@ -11836,6 +11837,27 @@ _hw_addr_set (NMDevice *self,
- 			return FALSE;
- 	}
- 
-+	if (needs_refresh) {
-+		/* The platform call indicated success, however the address is not
-+		 * as expected. May be a kernel issue and the MAC address takes
-+		 * a moment to change (bgo#770456).
-+		 *
-+		 * Try to reload the link and check again. */
-+		nm_platform_link_refresh (NM_PLATFORM_GET, nm_device_get_ip_ifindex (self));
-+
-+		nm_device_update_hw_address (self);
-+		cur_addr = nm_device_get_hw_address (self);
-+		if (cur_addr && nm_utils_hwaddr_matches (cur_addr, -1, addr, -1)) {
-+			_LOGI (LOGD_DEVICE, "set-hw-addr: %s MAC address to %s (%s)",
-+			       operation, addr, detail);
-+		} else {
-+			_LOGW (LOGD_DEVICE,
-+			       "set-hw-addr: new MAC address %s not successfully %s (%s)",
-+			       addr, operation, detail);
-+			return FALSE;
-+		}
-+	}
-+
- 	return success;
- }
- 
--- 
-2.7.4
-

diff --git a/net-misc/networkmanager/files/networkmanager-1.4.0-wifi-mac2.patch b/net-misc/networkmanager/files/networkmanager-1.4.0-wifi-mac2.patch
deleted file mode 100644
index 2038b2f0fdc..00000000000
--- a/net-misc/networkmanager/files/networkmanager-1.4.0-wifi-mac2.patch
+++ /dev/null
@@ -1,279 +0,0 @@
-From 3c701b60dc169a24cf52c0397560125ddce3d54c Mon Sep 17 00:00:00 2001
-From: Thomas Haller <thaller@redhat.com>
-Date: Wed, 7 Sep 2016 23:47:14 +0200
-Subject: [PATCH 1/2] device: workaround driver issue with delayed change of
- MAC address
-
-brcmfmac and possibly other drivers don't change the MAC address
-right away, but instead the result is delayed. That is problematic
-because we cannot continue activation before the MAC address is
-settled.
-
-Add a hack to workaround the issue by waiting until the MAC address
-changed.
-
-The previous attempt to workaround this was less intrusive: we would
-just refresh the link once and check the result. But that turns out
-not to be sufficent for all cases. Now, wait and poll.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=770456
-https://bugzilla.redhat.com/show_bug.cgi?id=1374023
-(cherry picked from commit 1a85103765d4eaa0acab6b03658a4f9cfe684a64)
-(cherry picked from commit 8d575403685208aad75f918484ae7adbc1a46085)
----
- src/devices/nm-device.c | 85 ++++++++++++++++++++++++++++++++++---------------
- src/devices/nm-device.h |  2 +-
- 2 files changed, 61 insertions(+), 26 deletions(-)
-
-diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
-index 674563f..3e549c5 100644
---- a/src/devices/nm-device.c
-+++ b/src/devices/nm-device.c
-@@ -11549,16 +11549,17 @@ nm_device_get_hw_address (NMDevice *self)
- 	return priv->hw_addr;
- }
- 
--void
-+gboolean
- nm_device_update_hw_address (NMDevice *self)
- {
- 	NMDevicePrivate *priv;
- 	const guint8 *hwaddr;
- 	gsize hwaddrlen = 0;
-+	gboolean changed = FALSE;
- 
- 	priv = NM_DEVICE_GET_PRIVATE (self);
- 	if (priv->ifindex <= 0)
--		return;
-+		return FALSE;
- 
- 	hwaddr = nm_platform_link_get_address (NM_PLATFORM_GET, priv->ifindex, &hwaddrlen);
- 
-@@ -11585,6 +11586,7 @@ nm_device_update_hw_address (NMDevice *self)
- 				 * update our inital hw-address as well. */
- 				nm_device_update_initial_hw_address (self);
- 			}
-+			changed = TRUE;
- 		}
- 	} else {
- 		/* Invalid or no hardware address */
-@@ -11597,6 +11599,7 @@ nm_device_update_hw_address (NMDevice *self)
- 			       "hw-addr: failed reading current MAC address");
- 		}
- 	}
-+	return changed;
- }
- 
- void
-@@ -11756,6 +11759,15 @@ nm_device_hw_addr_is_explict (NMDevice *self)
- }
- 
- static gboolean
-+_hw_addr_matches (NMDevice *self, const char *addr)
-+{
-+	const char *cur_addr;
-+
-+	cur_addr = nm_device_get_hw_address (self);
-+	return cur_addr && nm_utils_hwaddr_matches (cur_addr, -1, addr, -1);
-+}
-+
-+static gboolean
- _hw_addr_set (NMDevice *self,
-               const char *addr,
-               const char *operation,
-@@ -11765,7 +11777,6 @@ _hw_addr_set (NMDevice *self,
- 	gboolean success = FALSE;
- 	gboolean needs_refresh = FALSE;
- 	NMPlatformError plerr;
--	const char *cur_addr;
- 	guint8 addr_bytes[NM_UTILS_HWADDR_LEN_MAX];
- 	guint hw_addr_len;
- 	gboolean was_up;
-@@ -11776,11 +11787,9 @@ _hw_addr_set (NMDevice *self,
- 
- 	priv = NM_DEVICE_GET_PRIVATE (self);
- 
--	cur_addr = nm_device_get_hw_address (self);
--
- 	/* Do nothing if current MAC is same */
--	if (cur_addr && nm_utils_hwaddr_matches (cur_addr, -1, addr, -1)) {
--		_LOGT (LOGD_DEVICE, "set-hw-addr: no MAC address change needed (%s)", cur_addr);
-+	if (_hw_addr_matches (self, addr)) {
-+		_LOGT (LOGD_DEVICE, "set-hw-addr: no MAC address change needed (%s)", addr);
- 		return TRUE;
- 	}
- 
-@@ -11804,8 +11813,7 @@ _hw_addr_set (NMDevice *self,
- 	if (success) {
- 		/* MAC address succesfully changed; update the current MAC to match */
- 		nm_device_update_hw_address (self);
--		cur_addr = nm_device_get_hw_address (self);
--		if (cur_addr && nm_utils_hwaddr_matches (cur_addr, -1, addr, -1)) {
-+		if (_hw_addr_matches (self, addr)) {
- 			_LOGI (LOGD_DEVICE, "set-hw-addr: %s MAC address to %s (%s)",
- 			       operation, addr, detail);
- 		} else {
-@@ -11827,24 +11835,51 @@ _hw_addr_set (NMDevice *self,
- 	}
- 
- 	if (needs_refresh) {
--		/* The platform call indicated success, however the address is not
--		 * as expected. May be a kernel issue and the MAC address takes
--		 * a moment to change (bgo#770456).
--		 *
--		 * Try to reload the link and check again. */
--		nm_platform_link_refresh (NM_PLATFORM_GET, nm_device_get_ip_ifindex (self));
--
--		nm_device_update_hw_address (self);
--		cur_addr = nm_device_get_hw_address (self);
--		if (cur_addr && nm_utils_hwaddr_matches (cur_addr, -1, addr, -1)) {
--			_LOGI (LOGD_DEVICE, "set-hw-addr: %s MAC address to %s (%s)",
--			       operation, addr, detail);
-+		if (_hw_addr_matches (self, addr)) {
-+			/* the MAC address already changed during nm_device_bring_up() above. */
- 		} else {
--			_LOGW (LOGD_DEVICE,
--			       "set-hw-addr: new MAC address %s not successfully %s (%s)",
--			       addr, operation, detail);
--			return FALSE;
-+			gint64 poll_end, now;
-+
-+			/* The platform call indicated success, however the address is not
-+			 * as expected. That is either due to a driver issue (brcmfmac, bgo#770456,
-+			 * rh#1374023) or a race where externally the MAC address was reset.
-+			 * The race is rather unlikely.
-+			 *
-+			 * The alternative would be to postpone the activation in case the
-+			 * MAC address is not yet ready and poll without blocking. However,
-+			 * that is rather complicated and it is not expected that this case
-+			 * happens for regular drivers.
-+			 * Note that brcmfmac can block NetworkManager for 500 msec while
-+			 * taking down the device. Let's add annother 100 msec to that.
-+			 *
-+			 * wait/poll up to 100 msec until it changes. */
-+
-+			poll_end = nm_utils_get_monotonic_timestamp_us () + (100 * 1000);
-+			for (;;) {
-+				if (!nm_platform_link_refresh (NM_PLATFORM_GET, nm_device_get_ip_ifindex (self)))
-+					goto handle_fail;
-+				if (!nm_device_update_hw_address (self))
-+					goto handle_wait;
-+				if (!_hw_addr_matches (self, addr))
-+					goto handle_fail;
-+
-+				break;
-+handle_wait:
-+				now = nm_utils_get_monotonic_timestamp_us ();
-+				if (now < poll_end) {
-+					g_usleep (NM_MIN (poll_end - now, 500));
-+					continue;
-+				}
-+handle_fail:
-+				_LOGW (LOGD_DEVICE,
-+				       "set-hw-addr: new MAC address %s not successfully %s (%s)",
-+				       addr, operation, detail);
-+				return FALSE;
-+			}
- 		}
-+
-+		_LOGI (LOGD_DEVICE, "set-hw-addr: %s MAC address to %s (%s)",
-+		       operation, addr, detail);
- 	}
- 
- 	return success;
-diff --git a/src/devices/nm-device.h b/src/devices/nm-device.h
-index be12ce7..a757a37 100644
---- a/src/devices/nm-device.h
-+++ b/src/devices/nm-device.h
-@@ -588,7 +588,7 @@ void nm_device_reactivate_ip6_config (NMDevice *device,
-                                       NMSettingIPConfig *s_ip6_old,
-                                       NMSettingIPConfig *s_ip6_new);
- 
--void nm_device_update_hw_address (NMDevice *self);
-+gboolean nm_device_update_hw_address (NMDevice *self);
- void nm_device_update_initial_hw_address (NMDevice *self);
- void nm_device_update_permanent_hw_address (NMDevice *self);
- void nm_device_update_dynamic_ip_setup (NMDevice *self);
--- 
-2.7.4
-
-
-From d99c3b63e81347fb861e1306eb0b603cfa15223e Mon Sep 17 00:00:00 2001
-From: Thomas Haller <thaller@redhat.com>
-Date: Sun, 11 Sep 2016 09:48:56 +0200
-Subject: [PATCH 2/2] device: wait for MAC address change to complete before
- setting interface up
-
-Some drivers (brcmfmac) don't change the MAC address right away.
-NetworkManager works around that by waiting synchronously until
-the address changes (commit 1a85103765d4eaa0acab6b03658a4f9cfe684a64).
-
-wpa_supplicant on the other hand, only re-reads the MAC address
-when changing state from DISABLED to ENABLED, which happens when
-the interface comes up.
-
-That is a bug in wpa_supplicant and the driver, but we can work-around by
-waiting until the MAC address actually changed before setting the interface
-IFF_UP. Also note, that there is still a race in wpa_supplicant which might
-miss a change to DISABLED state altogether.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=770504
-https://bugzilla.redhat.com/show_bug.cgi?id=1374023
-(cherry picked from commit 32f7c1d4b9aba597a99128631f07c2985149f303)
-(cherry picked from commit cd8f2ecc617a896d8007e6fe825c676a626a3b8d)
----
- src/devices/nm-device.c | 27 ++++++++++++++++-----------
- 1 file changed, 16 insertions(+), 11 deletions(-)
-
-diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
-index 3e549c5..47e858b 100644
---- a/src/devices/nm-device.c
-+++ b/src/devices/nm-device.c
-@@ -11829,12 +11829,8 @@ _hw_addr_set (NMDevice *self,
- 		        nm_platform_error_to_string (plerr));
- 	}
- 
--	if (was_up) {
--		if (!nm_device_bring_up (self, TRUE, NULL))
--			return FALSE;
--	}
--
- 	if (needs_refresh) {
-+		success = TRUE;
- 		if (_hw_addr_matches (self, addr)) {
- 			/* the MAC address already changed during nm_device_bring_up() above. */
- 		} else {
-@@ -11871,15 +11867,24 @@ handle_wait:
- 					continue;
- 				}
- handle_fail:
--				_LOGW (LOGD_DEVICE,
--				       "set-hw-addr: new MAC address %s not successfully %s (%s)",
--				       addr, operation, detail);
--				return FALSE;
-+				success = FALSE;
-+				break;
- 			}
- 		}
- 
--		_LOGI (LOGD_DEVICE, "set-hw-addr: %s MAC address to %s (%s)",
--		       operation, addr, detail);
-+		if (success) {
-+			_LOGI (LOGD_DEVICE, "set-hw-addr: %s MAC address to %s (%s)",
-+			       operation, addr, detail);
-+		} else {
-+			_LOGW (LOGD_DEVICE,
-+			       "set-hw-addr: new MAC address %s not successfully %s (%s)",
-+			       addr, operation, detail);
-+		}
-+	}
-+
-+	if (was_up) {
-+		if (!nm_device_bring_up (self, TRUE, NULL))
-+			return FALSE;
- 	}
- 
- 	return success;
--- 
-2.7.4
-

diff --git a/net-misc/networkmanager/networkmanager-1.4.0-r1.ebuild b/net-misc/networkmanager/networkmanager-1.4.0-r1.ebuild
deleted file mode 100644
index 5a79b9c14b9..00000000000
--- a/net-misc/networkmanager/networkmanager-1.4.0-r1.ebuild
+++ /dev/null
@@ -1,349 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-GNOME_ORG_MODULE="NetworkManager"
-GNOME2_LA_PUNT="yes"
-VALA_USE_DEPEND="vapigen"
-PYTHON_COMPAT=( python{2_7,3_4,3_5} )
-
-inherit bash-completion-r1 gnome2 linux-info multilib python-any-r1 systemd \
-	user readme.gentoo-r1 toolchain-funcs vala versionator virtualx udev multilib-minimal
-
-DESCRIPTION="A set of co-operative tools that make networking simple and straightforward"
-HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
-
-LICENSE="GPL-2+"
-SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
-
-IUSE="audit bluetooth connection-sharing consolekit +dhclient gnutls +introspection \
-json kernel_linux +nss +modemmanager ncurses ofono +ppp resolvconf selinux \
-systemd teamd test vala +wext +wifi"
-
-REQUIRED_USE="
-	modemmanager? ( ppp )
-	vala? ( introspection )
-	wext? ( wifi )
-	^^ ( nss gnutls )
-"
-
-KEYWORDS="~alpha amd64 arm ~arm64 ppc ppc64 x86"
-
-# gobject-introspection-0.10.3 is needed due to gnome bug 642300
-# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
-# TODO: need multilib janson (linked to libnm.so)
-COMMON_DEPEND="
-	>=sys-apps/dbus-1.2[${MULTILIB_USEDEP}]
-	>=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}]
-	>=dev-libs/glib-2.37.6:2[${MULTILIB_USEDEP}]
-	>=dev-libs/libnl-3.2.8:3=
-	>=sys-auth/polkit-0.106
-	net-libs/libndp
-	>=net-libs/libsoup-2.40:2.4=
-	net-misc/iputils
-	sys-apps/util-linux[${MULTILIB_USEDEP}]
-	sys-libs/readline:0=
-	>=virtual/libgudev-165:=[${MULTILIB_USEDEP}]
-	audit? ( sys-process/audit )
-	bluetooth? ( >=net-wireless/bluez-5 )
-	connection-sharing? (
-		net-dns/dnsmasq[dhcp]
-		net-firewall/iptables )
-	consolekit? ( >=sys-auth/consolekit-1.0.0 )
-	dhclient? ( >=net-misc/dhcp-4[client] )
-	gnutls? (
-		dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
-		>=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}] )
-	introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
-	json? ( dev-libs/jansson )
-	modemmanager? ( >=net-misc/modemmanager-0.7.991 )
-	ncurses? ( >=dev-libs/newt-0.52.15 )
-	nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
-	ofono? ( net-misc/ofono )
-	ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] )
-	resolvconf? ( net-dns/openresolv )
-	selinux? ( sys-libs/libselinux )
-	systemd? ( >=sys-apps/systemd-209:0= )
-	!systemd? (
-		!consolekit? ( || ( sys-power/upower sys-power/upower-pm-utils ) )
-	)
-	teamd? ( >=net-misc/libteam-1.9 )
-"
-RDEPEND="${COMMON_DEPEND}
-	wifi? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
-"
-DEPEND="${COMMON_DEPEND}
-	dev-util/gdbus-codegen
-	dev-util/gtk-doc-am
-	>=dev-util/intltool-0.40
-	>=sys-devel/gettext-0.17
-	>=sys-kernel/linux-headers-2.6.29
-	virtual/pkgconfig[${MULTILIB_USEDEP}]
-	vala? ( $(vala_depend) )
-	test? (
-		$(python_gen_any_dep '
-			dev-python/dbus-python[${PYTHON_USEDEP}]
-			dev-python/pygobject:3[${PYTHON_USEDEP}]')
-	)
-"
-
-PATCHES=(
-	# Fix with Fedora patches for:
-	# https://bugzilla.gnome.org/show_bug.cgi?id=770456
-	"${FILESDIR}"/${P}-wifi-mac{1,2}.patch
-	# and dhcp (both fixed in 1.4.1)
-	"${FILESDIR}"/${P}-dhcp-helper.patch
-)
-
-python_check_deps() {
-	if use test; then
-		has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
-		has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]"
-	else
-		return 0
-	fi
-}
-
-sysfs_deprecated_check() {
-	ebegin "Checking for SYSFS_DEPRECATED support"
-
-	if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
-		eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
-		eerror "or NetworkManager will not work correctly."
-		eerror "See https://bugs.gentoo.org/333639 for more info."
-		die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
-	fi
-	eend $?
-}
-
-pkg_pretend() {
-	if use kernel_linux; then
-		get_version
-		if linux_config_exists; then
-			sysfs_deprecated_check
-		else
-			ewarn "Was unable to determine your kernel .config"
-			ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
-			ewarn "See https://bugs.gentoo.org/333639 for more info."
-		fi
-
-	fi
-}
-
-pkg_setup() {
-	enewgroup plugdev
-
-	use test && python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	DOC_CONTENTS="To modify system network connections without needing to enter the
-		root password, add your user account to the 'plugdev' group."
-
-	use vala && vala_src_prepare
-	gnome2_src_prepare
-}
-
-multilib_src_configure() {
-	local myconf=()
-
-	# Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
-	if use ppp; then
-		local PPPD_VER=`best_version net-dialup/ppp`
-		PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
-		PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
-		myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
-	fi
-
-	# unit files directory needs to be passed only when systemd is enabled,
-	# otherwise systemd support is not disabled completely, bug #524534
-	use systemd && myconf+=( --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" )
-
-	if multilib_is_native_abi; then
-		# work-around man out-of-source brokenness, must be done before configure
-		mkdir man || die
-		find "${S}"/man -name '*.?' -exec ln -s {} man/ ';' || die
-	else
-		# libnl, libndp are only used for executables, not libraries
-		myconf+=( LIB{NL,NDP}_{CFLAGS,LIBS}=' ' )
-	fi
-
-	# ifnet plugin always disabled until someone volunteers to actively
-	# maintain and fix it
-	# Also disable dhcpcd support as it's also completely unmaintained
-	# and facing bugs like #563938 and many others
-	#
-	# We need --with-libnm-glib (and dbus-glib dep) as reverse deps are
-	# still not ready for removing that lib
-	ECONF_SOURCE=${S} \
-	runstatedir="/run" \
-		gnome2_src_configure \
-		--disable-more-warnings \
-		--disable-static \
-		--localstatedir=/var \
-		--disable-lto \
-		--disable-config-plugin-ibft \
-		--disable-ifnet \
-		--disable-qt \
-		--without-netconfig \
-		--with-dbus-sys-dir=/etc/dbus-1/system.d \
-		--with-libnm-glib \
-		--with-nmcli=yes \
-		--with-udev-dir="$(get_udevdir)" \
-		--with-config-plugins-default=keyfile \
-		--with-iptables=/sbin/iptables \
-		$(multilib_native_with libsoup) \
-		$(multilib_native_enable concheck) \
-		--with-crypto=$(usex nss nss gnutls) \
-		--with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex consolekit consolekit no)) \
-		--with-suspend-resume=$(multilib_native_usex systemd systemd $(multilib_native_usex consolekit consolekit upower)) \
-		$(multilib_native_use_with audit libaudit) \
-		$(multilib_native_use_enable bluetooth bluez5-dun) \
-		$(multilib_native_use_enable introspection) \
-		$(multilib_native_use_enable json json-validation) \
-		$(multilib_native_use_enable ppp) \
-		$(use_with dhclient) \
-		--without-dhcpcd \
-		$(multilib_native_use_with modemmanager modem-manager-1) \
-		$(multilib_native_use_with ncurses nmtui) \
-		$(multilib_native_use_with ofono) \
-		$(multilib_native_use_with resolvconf) \
-		$(multilib_native_use_with selinux) \
-		$(multilib_native_use_with systemd systemd-journal) \
-		$(multilib_native_use_enable teamd teamdctl) \
-		$(multilib_native_use_enable test tests) \
-		$(multilib_native_use_enable vala) \
-		--without-valgrind \
-		$(multilib_native_use_with wext) \
-		$(multilib_native_use_enable wifi) \
-		"${myconf[@]}"
-
-	# work-around gtk-doc out-of-source brokedness
-	if multilib_is_native_abi; then
-		local d
-		for d in api libnm libnm-util libnm-glib; do
-			ln -s "${S}"/docs/${d}/html docs/${d}/html || die
-		done
-	fi
-
-	# Disable examples
-	# https://bugzilla.gnome.org/show_bug.cgi?id=769711
-	cat > examples/Makefile <<-EOF
-	.PHONY: all check install
-	all:
-	check:
-	install:
-	EOF
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi; then
-		emake
-	else
-		emake all-am
-		emake -C shared
-		emake -C introspection # generated headers, needed for libnm
-		emake -C libnm-core
-		emake -C libnm
-		emake -C libnm-util
-		emake -C libnm-glib
-	fi
-}
-
-multilib_src_test() {
-	if use test && multilib_is_native_abi; then
-		python_setup
-		virtx emake check
-	fi
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi; then
-		# Install completions at proper place, bug #465100
-		gnome2_src_install completiondir="$(get_bashcompdir)"
-	else
-		emake DESTDIR="${D}" install-am
-		emake DESTDIR="${D}" install -C shared
-		emake DESTDIR="${D}" install -C introspection
-		emake DESTDIR="${D}" install -C libnm-core
-		emake DESTDIR="${D}" install -C libnm
-		emake DESTDIR="${D}" install -C libnm-util
-		emake DESTDIR="${D}" install -C libnm-glib
-	fi
-}
-
-multilib_src_install_all() {
-	! use systemd && readme.gentoo_create_doc
-
-	newinitd "${FILESDIR}/init.d.NetworkManager" NetworkManager
-	newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
-
-	# Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
-	keepdir /etc/NetworkManager/dispatcher.d
-
-	# Provide openrc net dependency only when nm is connected
-	exeinto /etc/NetworkManager/dispatcher.d
-	newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
-	sed -e "s:@EPREFIX@:${EPREFIX}:g" \
-		-i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
-
-	keepdir /etc/NetworkManager/system-connections
-	chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
-
-	# Allow users in plugdev group to modify system connections
-	insinto /usr/share/polkit-1/rules.d/
-	doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
-
-	# Remove empty /run/NetworkManager
-	rmdir "${D}"/run/NetworkManager "${D}"/run || die
-}
-
-pkg_postinst() {
-	gnome2_pkg_postinst
-	! use systemd && readme.gentoo_print_elog
-
-	if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
-		ewarn "The ${PN} system configuration file has moved to a new location."
-		ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
-		ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
-		ewarn
-		ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
-	fi
-
-	# The polkit rules file moved to /usr/share
-	old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
-	if [[ -f "${old_rules}" ]]; then
-		case "$(md5sum ${old_rules})" in
-		  574d0cfa7e911b1f7792077003060240* )
-			# Automatically delete the old rules.d file if the user did not change it
-			elog
-			elog "Removing old ${old_rules} ..."
-			rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
-			;;
-		  * )
-			elog "The ${old_rules}"
-			elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
-			elog "If you edited ${old_rules}"
-			elog "without changing its behavior, you may want to remove it."
-			;;
-		esac
-	fi
-
-	# NM fallbacks to plugin specified at compile time (upstream bug #738611)
-	# but still show a warning to remember people to have cleaner config file
-	if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
-		if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
-			ewarn
-			ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
-			ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
-			ewarn
-		fi
-	fi
-
-	# NM shows lots of errors making nmcli neither unusable, bug #528748 upstream bug #690457
-	if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
-		ewarn "You have psk-flags=1 setting in above files, you will need to"
-		ewarn "either reconfigure affected networks or, at least, set the flag"
-		ewarn "value to '0'."
-	fi
-}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/
@ 2020-01-19 19:29 Mart Raudsepp
  0 siblings, 0 replies; 14+ messages in thread
From: Mart Raudsepp @ 2020-01-19 19:29 UTC (permalink / raw
  To: gentoo-commits

commit:     2587f0225c6aaa23fcef6a09f4e92c3b2fda3769
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 19 19:25:51 2020 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sun Jan 19 19:28:18 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2587f022

net-misc/networkmanager: improve privacy, iwd1 compat, USE=polkit honor

Closes: https://bugs.gentoo.org/702476
Closes: https://bugs.gentoo.org/702900
Closes: https://bugs.gentoo.org/704810
Package-Manager: Portage-2.3.79, Repoman-2.3.12
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>

 .../networkmanager/files/1.18.4-iwd1-compat.patch  |  81 +++++
 .../networkmanager/networkmanager-1.18.4-r2.ebuild | 349 +++++++++++++++++++++
 2 files changed, 430 insertions(+)

diff --git a/net-misc/networkmanager/files/1.18.4-iwd1-compat.patch b/net-misc/networkmanager/files/1.18.4-iwd1-compat.patch
new file mode 100644
index 00000000000..12c8b873e6a
--- /dev/null
+++ b/net-misc/networkmanager/files/1.18.4-iwd1-compat.patch
@@ -0,0 +1,81 @@
+From 59923ad85d1a1cf2216a4f14649702d24d3f2360 Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak@v3.sk>
+Date: Sat, 2 Nov 2019 06:55:54 +0100
+Subject: [PATCH 1/2] iwd: add some missing error handling
+
+g_dbus_object_manager_get_interface() can happily return NULL and we
+need to check for that.
+---
+ src/devices/wifi/nm-iwd-manager.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/devices/wifi/nm-iwd-manager.c b/src/devices/wifi/nm-iwd-manager.c
+index dd1cad480..e83f8063c 100644
+--- a/src/devices/wifi/nm-iwd-manager.c
++++ b/src/devices/wifi/nm-iwd-manager.c
+@@ -136,6 +136,11 @@ agent_dbus_method_cb (GDBusConnection *connection,
+ 	network = g_dbus_object_manager_get_interface (priv->object_manager,
+ 	                                               network_path,
+ 	                                               NM_IWD_NETWORK_INTERFACE);
++	if (!network) {
++		_LOGE ("unable to find the network object");
++		return;
++	}
++
+ 
+ 	device_path = get_property_string_or_null (G_DBUS_PROXY (network), "Device");
+ 	if (!device_path) {
+@@ -260,6 +265,11 @@ register_agent (NMIwdManager *self)
+ 	                                                     "/",
+ 	                                                     NM_IWD_AGENT_MANAGER_INTERFACE);
+ 
++	if (!agent_manager) {
++		_LOGE ("unable to register the IWD Agent: PSK/8021x Wi-Fi networks may not work");
++		return;
++	}
++
+ 	/* Register our agent */
+ 	g_dbus_proxy_call (G_DBUS_PROXY (agent_manager),
+ 	                   "RegisterAgent",
+-- 
+2.20.1
+
+
+From 186d22a9634e2bf94658ed6f1cf2b332ecb3a32c Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak@v3.sk>
+Date: Sat, 2 Nov 2019 07:01:28 +0100
+Subject: [PATCH 2/2] iwd: unbreak iwd-1.0
+
+The upstream apparently thought it's a great idea to change the agent
+manager path. This fixes things for those unfortunate enough to run
+IWD.
+---
+ src/devices/wifi/nm-iwd-manager.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/src/devices/wifi/nm-iwd-manager.c b/src/devices/wifi/nm-iwd-manager.c
+index e83f8063c..470cb1c90 100644
+--- a/src/devices/wifi/nm-iwd-manager.c
++++ b/src/devices/wifi/nm-iwd-manager.c
+@@ -262,9 +262,17 @@ register_agent (NMIwdManager *self)
+ 	GDBusInterface *agent_manager;
+ 
+ 	agent_manager = g_dbus_object_manager_get_interface (priv->object_manager,
+-	                                                     "/",
++	                                                     "/net/connman/iwd",
+ 	                                                     NM_IWD_AGENT_MANAGER_INTERFACE);
+ 
++	if (!agent_manager) {
++		/* IWD prior to 1.0 dated 30 October, 2019 has the agent manager on a
++		 * different path. */
++		agent_manager = g_dbus_object_manager_get_interface (priv->object_manager,
++		                                                     "/",
++		                                                     NM_IWD_AGENT_MANAGER_INTERFACE);
++	}
++
+ 	if (!agent_manager) {
+ 		_LOGE ("unable to register the IWD Agent: PSK/8021x Wi-Fi networks may not work");
+ 		return;
+-- 
+2.20.1
+

diff --git a/net-misc/networkmanager/networkmanager-1.18.4-r2.ebuild b/net-misc/networkmanager/networkmanager-1.18.4-r2.ebuild
new file mode 100644
index 00000000000..b5aa6112e4e
--- /dev/null
+++ b/net-misc/networkmanager/networkmanager-1.18.4-r2.ebuild
@@ -0,0 +1,349 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+GNOME_ORG_MODULE="NetworkManager"
+GNOME2_LA_PUNT="yes"
+VALA_USE_DEPEND="vapigen"
+PYTHON_COMPAT=( python{2_7,3_6,3_7} )
+
+inherit bash-completion-r1 gnome2 linux-info multilib python-any-r1 systemd readme.gentoo-r1 vala virtualx udev multilib-minimal
+
+DESCRIPTION="A set of co-operative tools that make networking simple and straightforward"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
+
+IUSE="audit bluetooth connection-sharing consolekit +dhclient dhcpcd elogind gnutls +introspection iwd json kernel_linux +nss +modemmanager ncurses ofono ovs policykit +ppp resolvconf selinux systemd teamd test vala +wext +wifi"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="
+	bluetooth? ( modemmanager )
+	iwd? ( wifi )
+	vala? ( introspection )
+	wext? ( wifi )
+	|| ( nss gnutls )
+	?? ( consolekit elogind systemd )
+"
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+
+# gobject-introspection-0.10.3 is needed due to gnome bug 642300
+# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
+COMMON_DEPEND="
+	>=sys-apps/dbus-1.2[${MULTILIB_USEDEP}]
+	>=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}]
+	>=dev-libs/glib-2.40:2[${MULTILIB_USEDEP}]
+	policykit? ( >=sys-auth/polkit-0.106 )
+	net-libs/libndp[${MULTILIB_USEDEP}]
+	>=net-misc/curl-7.24
+	net-misc/iputils
+	sys-apps/util-linux[${MULTILIB_USEDEP}]
+	sys-libs/readline:0=
+	>=virtual/libudev-175:=[${MULTILIB_USEDEP}]
+	audit? ( sys-process/audit )
+	bluetooth? ( >=net-wireless/bluez-5 )
+	connection-sharing? (
+		net-dns/dnsmasq[dbus,dhcp]
+		net-firewall/iptables )
+	consolekit? ( >=sys-auth/consolekit-1.0.0 )
+	dhclient? ( >=net-misc/dhcp-4[client] )
+	dhcpcd? ( net-misc/dhcpcd )
+	elogind? ( >=sys-auth/elogind-219 )
+	introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
+	json? ( >=dev-libs/jansson-2.5[${MULTILIB_USEDEP}] )
+	modemmanager? ( >=net-misc/modemmanager-0.7.991:0= )
+	ncurses? ( >=dev-libs/newt-0.52.15 )
+	nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
+	!nss? ( gnutls? (
+		dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
+		>=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}] ) )
+	ofono? ( net-misc/ofono )
+	ovs? ( dev-libs/jansson )
+	ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] )
+	resolvconf? ( net-dns/openresolv )
+	selinux? ( sys-libs/libselinux )
+	systemd? ( >=sys-apps/systemd-209:0= )
+	teamd? (
+		dev-libs/jansson
+		>=net-misc/libteam-1.9
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	acct-group/plugdev
+	|| (
+		net-misc/iputils[arping(+)]
+		net-analyzer/arping
+	)
+	wifi? (
+		!iwd? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
+		iwd? ( net-wireless/iwd )
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	dev-util/gdbus-codegen
+	dev-util/glib-utils
+	dev-util/gtk-doc-am
+	>=dev-util/intltool-0.40
+	>=sys-devel/gettext-0.17
+	>=sys-kernel/linux-headers-3.18
+	virtual/pkgconfig[${MULTILIB_USEDEP}]
+	introspection? (
+		$(python_gen_any_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]')
+		dev-lang/perl
+		dev-libs/libxslt
+	)
+	vala? ( $(vala_depend) )
+	test? (
+		$(python_gen_any_dep '
+			dev-python/dbus-python[${PYTHON_USEDEP}]
+			dev-python/pygobject:3[${PYTHON_USEDEP}]')
+	)
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-data-fix-the-ID_NET_DRIVER-udev-rule.patch
+	"${FILESDIR}"/${PV}-iwd1-compat.patch # included in 1.21.3+
+)
+
+python_check_deps() {
+	if use introspection; then
+		has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return
+	fi
+	if use test; then
+		has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
+		has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]"
+	fi
+}
+
+sysfs_deprecated_check() {
+	ebegin "Checking for SYSFS_DEPRECATED support"
+
+	if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
+		eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
+		eerror "or NetworkManager will not work correctly."
+		eerror "See https://bugs.gentoo.org/333639 for more info."
+		die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
+	fi
+	eend $?
+}
+
+pkg_pretend() {
+	if use kernel_linux; then
+		get_version
+		if linux_config_exists; then
+			sysfs_deprecated_check
+		else
+			ewarn "Was unable to determine your kernel .config"
+			ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
+			ewarn "See https://bugs.gentoo.org/333639 for more info."
+		fi
+
+	fi
+}
+
+pkg_setup() {
+	if use connection-sharing; then
+		if kernel_is lt 5 1; then
+			CONFIG_CHECK="~NF_NAT_IPV4 ~NF_NAT_MASQUERADE_IPV4"
+		else
+			CONFIG_CHECK="~NF_NAT ~NF_NAT_MASQUERADE"
+		fi
+		linux-info_pkg_setup
+	fi
+	if use introspection || use test; then
+		python-any-r1_pkg_setup
+	fi
+}
+
+src_prepare() {
+	DOC_CONTENTS="To modify system network connections without needing to enter the
+		root password, add your user account to the 'plugdev' group."
+
+	use vala && vala_src_prepare
+	gnome2_src_prepare
+}
+
+multilib_src_configure() {
+	local myconf=(
+		--disable-more-warnings
+		--disable-static
+		--localstatedir=/var
+		--disable-lto
+		--disable-config-plugin-ibft
+		--disable-qt
+		--without-netconfig
+		--with-dbus-sys-dir=/etc/dbus-1/system.d
+		# We need --with-libnm-glib (and dbus-glib dep) as reverse deps are
+		# still not ready for removing that lib, bug #665338
+		--with-libnm-glib
+		$(multilib_native_with nmcli)
+		--with-udev-dir="$(get_udevdir)"
+		--with-config-plugins-default=keyfile
+		--with-iptables=/sbin/iptables
+		--with-ebpf=yes
+		$(multilib_native_enable concheck)
+		--with-crypto=$(usex nss nss gnutls)
+		--with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind $(multilib_native_usex consolekit consolekit no)))
+		# ConsoleKit has no build-time dependency, so use it as the default case.
+		# There is no off switch, and we do not support upower.
+		--with-suspend-resume=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind consolekit))
+		$(multilib_native_use_with audit libaudit)
+		$(multilib_native_use_enable bluetooth bluez5-dun)
+		$(use_with dhclient)
+		$(use_with dhcpcd)
+		$(multilib_native_use_enable introspection)
+		$(use_enable json json-validation)
+		$(multilib_native_use_enable ppp)
+		--without-libpsl
+		$(multilib_native_use_with modemmanager modem-manager-1)
+		$(multilib_native_use_with ncurses nmtui)
+		$(multilib_native_use_with ofono)
+		$(multilib_native_use_enable ovs)
+		$(multilib_native_use_enable policykit polkit)
+		$(multilib_native_use_enable policykit polkit-agent)
+		$(multilib_native_use_with resolvconf)
+		$(multilib_native_use_with selinux)
+		$(multilib_native_use_with systemd systemd-journal)
+		$(multilib_native_use_enable teamd teamdctl)
+		$(multilib_native_use_enable test tests)
+		$(multilib_native_use_enable vala)
+		--without-valgrind
+		$(multilib_native_use_with wifi iwd)
+		$(multilib_native_use_with wext)
+		$(multilib_native_use_enable wifi)
+	)
+
+	# Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
+	if use ppp; then
+		local PPPD_VER=`best_version net-dialup/ppp`
+		PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
+		PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
+		myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
+	fi
+
+	# unit files directory needs to be passed only when systemd is enabled,
+	# otherwise systemd support is not disabled completely, bug #524534
+	use systemd && myconf+=( --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" )
+
+	if multilib_is_native_abi; then
+		# work-around man out-of-source brokenness, must be done before configure
+		ln -s "${S}/docs" docs || die
+		ln -s "${S}/man" man || die
+	fi
+
+	ECONF_SOURCE=${S} runstatedir="/run" gnome2_src_configure "${myconf[@]}"
+}
+
+multilib_src_compile() {
+	if multilib_is_native_abi; then
+		emake
+	else
+		local targets=(
+			libnm/libnm.la
+			libnm-util/libnm-util.la
+			libnm-glib/libnm-glib.la
+			libnm-glib/libnm-glib-vpn.la
+		)
+		emake "${targets[@]}"
+	fi
+}
+
+multilib_src_test() {
+	if use test && multilib_is_native_abi; then
+		python_setup
+		virtx emake check
+	fi
+}
+
+multilib_src_install() {
+	if multilib_is_native_abi; then
+		# Install completions at proper place, bug #465100
+		gnome2_src_install completiondir="$(get_bashcompdir)"
+		insinto /usr/lib/NetworkManager/conf.d #702476
+		doins "${S}"/examples/nm-conf.d/{30-anon,31-mac-addr-change}.conf
+	else
+		local targets=(
+			install-libLTLIBRARIES
+			install-libdeprecatedHEADERS
+			install-libnm_glib_libnmvpnHEADERS
+			install-libnm_glib_libnmincludeHEADERS
+			install-libnm_util_libnm_util_includeHEADERS
+			install-libnmincludeHEADERS
+			install-nodist_libnm_glib_libnmincludeHEADERS
+			install-nodist_libnm_glib_libnmvpnHEADERS
+			install-nodist_libnm_util_libnm_util_includeHEADERS
+			install-nodist_libnmincludeHEADERS
+			install-pkgconfigDATA
+		)
+		emake DESTDIR="${D}" "${targets[@]}"
+	fi
+}
+
+multilib_src_install_all() {
+	einstalldocs
+	! use systemd && readme.gentoo_create_doc
+
+	newinitd "${FILESDIR}/init.d.NetworkManager-r1" NetworkManager
+	newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
+
+	# Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
+	keepdir /etc/NetworkManager/dispatcher.d
+
+	# Provide openrc net dependency only when nm is connected
+	exeinto /etc/NetworkManager/dispatcher.d
+	newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
+	sed -e "s:@EPREFIX@:${EPREFIX}:g" \
+		-i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
+
+	keepdir /etc/NetworkManager/system-connections
+	chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
+
+	# Allow users in plugdev group to modify system connections
+	insinto /usr/share/polkit-1/rules.d/
+	doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
+
+	if use iwd; then
+		# This goes to $nmlibdir/conf.d/ and $nmlibdir is '${prefix}'/lib/$PACKAGE, thus always lib, not get_libdir
+		cat <<-EOF > "${ED%/}"/usr/lib/NetworkManager/conf.d/iwd.conf
+		[device]
+		wifi.backend=iwd
+		EOF
+	fi
+
+	# Empty
+	rmdir "${ED%/}"/var{/lib{/NetworkManager,},} || die
+}
+
+pkg_postinst() {
+	gnome2_pkg_postinst
+	systemd_reenable NetworkManager.service
+	! use systemd && readme.gentoo_print_elog
+
+	if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
+		ewarn "The ${PN} system configuration file has moved to a new location."
+		ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
+		ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
+		ewarn
+		ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
+	fi
+
+	# NM fallbacks to plugin specified at compile time (upstream bug #738611)
+	# but still show a warning to remember people to have cleaner config file
+	if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
+		if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
+			ewarn
+			ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
+			ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
+			ewarn
+		fi
+	fi
+
+	# NM shows lots of errors making nmcli almost unusable, bug #528748 upstream bug #690457
+	if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
+		ewarn "You have psk-flags=1 setting in above files, you will need to"
+		ewarn "either reconfigure affected networks or, at least, set the flag"
+		ewarn "value to '0'."
+	fi
+}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/
@ 2020-04-26  8:09 Mart Raudsepp
  0 siblings, 0 replies; 14+ messages in thread
From: Mart Raudsepp @ 2020-04-26  8:09 UTC (permalink / raw
  To: gentoo-commits

commit:     b509a4872188323ae2f0ee5f5bd5e580f48f3a53
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 26 07:51:21 2020 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sun Apr 26 08:09:05 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b509a487

net-misc/networkmanager: create /run/NetworkManager earlier

NetworkManager itself creates /run/NetworkManager very early on in
its main(), but the OpenRC init file also wants to put the
start-stop-daemon pidfile in it.
It seems to have been working well enough for most people
regardless, but there is still a very real race condition and
bug here, which appears to get triggered for more users with
the p.masked networkmanager versions as well.
Hopefully fix it by creating the directory in start_pre() like other
packages making use of a subdirectory pidfile do, with the same
permissions as NetworkManager itself will/would create it.

Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>

 .../networkmanager/files/init.d.NetworkManager-r2  | 62 ++++++++++++++++++++++
 .../networkmanager/networkmanager-1.18.6.ebuild    |  2 +-
 ...10.ebuild => networkmanager-1.22.10-r11.ebuild} |  2 +-
 3 files changed, 64 insertions(+), 2 deletions(-)

diff --git a/net-misc/networkmanager/files/init.d.NetworkManager-r2 b/net-misc/networkmanager/files/init.d.NetworkManager-r2
new file mode 100644
index 00000000000..f7b95c047cd
--- /dev/null
+++ b/net-misc/networkmanager/files/init.d.NetworkManager-r2
@@ -0,0 +1,62 @@
+#!/sbin/openrc-run
+# Copyright (c) 2008 Saleem Abdulrasool <compnerd@compnerd.org>
+# Copyright 2013-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="NetworkManager daemon. The service is marked as started only \
+when a network connection is established."
+
+depend() {
+	need dbus
+	use consolekit
+	provide net
+}
+
+start_pre() {
+	checkpath -q -d -m 0755 /run/NetworkManager
+}
+
+start() {
+	# If we are re-called by a dispatcher event, we want to mark the service
+	# as started without starting the daemon again
+	yesno "${IN_BACKGROUND}" && return 0
+
+	[ -z "${INACTIVE_TIMEOUT}" ] && INACTIVE_TIMEOUT="1"
+
+	ebegin "Starting NetworkManager"
+	start-stop-daemon --start --quiet --pidfile /run/NetworkManager/NetworkManager.pid \
+		--exec /usr/sbin/NetworkManager -- --pid-file /run/NetworkManager/NetworkManager.pid
+	local _retval=$?
+	eend "${_retval}"
+	if [ "x${_retval}" = 'x0' ] && ! nm-online -t "${INACTIVE_TIMEOUT}"; then
+		einfo "Marking NetworkManager as inactive. It will automatically be marked"
+		einfo "as started after a network connection has been established."
+		mark_service_inactive
+	fi
+	return "${_retval}"
+}
+
+stop() {
+	# If we are re-called by a dispatcher event, we want to mark the service
+	# as inactive without stopping the daemon
+	if yesno "${IN_BACKGROUND}"; then
+		mark_service_inactive "${SVCNAME}"
+		return 0
+	fi
+
+	ebegin "Stopping NetworkManager"
+	local pidfile=/run/NetworkManager/NetworkManager.pid
+	if [ ! -e "${pidfile}" ] && [ -e /var/run/NetworkManager.pid ]; then
+		# Try stopping the pid file used by <0.9.7
+		pidfile=/var/run/NetworkManager.pid
+		start-stop-daemon --stop --quiet --pidfile "${pidfile}"
+		ret=$?
+		[ ${ret} = 0 ] && [ -e "${pidfile}" ] && rm "${pidfile}"
+		eend ${ret}
+	else
+		start-stop-daemon --stop --quiet --pidfile "${pidfile}"
+		eend $?
+	fi
+}
+
+# vim: set ft=gentoo-init-d ts=4 :

diff --git a/net-misc/networkmanager/networkmanager-1.18.6.ebuild b/net-misc/networkmanager/networkmanager-1.18.6.ebuild
index 9280f0f85f6..b410b2553ee 100644
--- a/net-misc/networkmanager/networkmanager-1.18.6.ebuild
+++ b/net-misc/networkmanager/networkmanager-1.18.6.ebuild
@@ -285,7 +285,7 @@ multilib_src_install_all() {
 	einstalldocs
 	! use systemd && readme.gentoo_create_doc
 
-	newinitd "${FILESDIR}/init.d.NetworkManager-r1" NetworkManager
+	newinitd "${FILESDIR}/init.d.NetworkManager-r2" NetworkManager
 	newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
 
 	# Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts

diff --git a/net-misc/networkmanager/networkmanager-1.22.10-r10.ebuild b/net-misc/networkmanager/networkmanager-1.22.10-r11.ebuild
similarity index 99%
rename from net-misc/networkmanager/networkmanager-1.22.10-r10.ebuild
rename to net-misc/networkmanager/networkmanager-1.22.10-r11.ebuild
index a6ae13c86a5..b2cd3babde3 100644
--- a/net-misc/networkmanager/networkmanager-1.22.10-r10.ebuild
+++ b/net-misc/networkmanager/networkmanager-1.22.10-r11.ebuild
@@ -281,7 +281,7 @@ src_configure() {
 src_install() {
 	meson_src_install
 
-	newinitd "${FILESDIR}/init.d.NetworkManager-r1" NetworkManager
+	newinitd "${FILESDIR}/init.d.NetworkManager-r2" NetworkManager
 	newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
 
 	# Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/
@ 2020-10-11 21:44 Mart Raudsepp
  0 siblings, 0 replies; 14+ messages in thread
From: Mart Raudsepp @ 2020-10-11 21:44 UTC (permalink / raw
  To: gentoo-commits

commit:     ac76ca95f55d3bb53d5fe5e46a55361c21c20298
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 11 21:42:56 2020 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sun Oct 11 21:44:14 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac76ca95

net-misc/networkmanager: remove old

Package-Manager: Portage-2.3.103, Repoman-2.3.20
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>

 net-misc/networkmanager/Manifest                   |   5 -
 .../networkmanager/files/1.18.4-iwd1-compat.patch  |  81 -----
 .../networkmanager/files/init.d.NetworkManager-r1  |  58 ----
 ...ager-data-fix-the-ID_NET_DRIVER-udev-rule.patch |  33 --
 .../networkmanager/networkmanager-1.18.4-r4.ebuild | 350 ---------------------
 .../networkmanager/networkmanager-1.18.6-r1.ebuild | 350 ---------------------
 .../networkmanager-1.20.12-r1.ebuild               | 340 --------------------
 .../networkmanager-1.22.14-r1.ebuild               | 342 --------------------
 .../networkmanager/networkmanager-1.24.2-r1.ebuild | 341 --------------------
 9 files changed, 1900 deletions(-)

diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest
index 0719e582e0e..5f26a17ed32 100644
--- a/net-misc/networkmanager/Manifest
+++ b/net-misc/networkmanager/Manifest
@@ -1,8 +1,3 @@
-DIST NetworkManager-1.18.4.tar.xz 4875196 BLAKE2B 9c58d6d7317562332dfa9639f8e236a0a7f6b58e7dad5af83916b1c6178899a6bcf12bc289fb401d84fd6420306364b4c4c0a25eda2a08eef812acde1862a18a SHA512 9fd22775a400ee8d20c75ebddfee842bfbd8780966444dd537e371a65918f41640e921d2c441853afe8f72d693e9b4c1415435136a07004666a6af4799fd3350
-DIST NetworkManager-1.18.6.tar.xz 4845144 BLAKE2B cf66789c025d9ec2007d1fe541acb8fd2b5204796ff8498fc5689124016e84a7e76509bee1b6650c796f0429cce6748c7b99e1976d95ac12bc31a1f1e67289b0 SHA512 92ab648e689dd903279fe676e867d7929f616c96dd478b2132854145a29debfcac5b083d70652ea0c7bccb0eb132534133fc9c005527237c47e2802556a29b92
-DIST NetworkManager-1.20.12.tar.xz 4663320 BLAKE2B c0faab91a50ee38d6c884dd4f753d642e5c21c268814cd6badc8a8dc3b654f54d1ff60b362d6e3cb4b254218618f16dd7a1fde153879907b5b3538a92086e5af SHA512 97dacee9b0720b864c941c139579d84d98d1b2f74dfc97fd0a6ed35ed9ae0b45d40553f8d79c4d7c4d3958228a2e6035555069c94040ecbe4a34457bce8d5f60
 DIST NetworkManager-1.22.10.tar.bz2 6292347 BLAKE2B b6cb06a0630685714cdd3c8b8e1d788a6e979c2d7f232259e682fdc9e1f5569259731fdbbea65b6e8321561ecb8354b6f7a0b10843eb17cbe6f5937af8d9d898 SHA512 61b6214188a3cd281d0d5a5b8bfc402f8a19d8beaa6a3a2bd85983991cc66d62b2c3785d7ca652373903d53331610cd63a45d94bdb355196d939c48f42be29c1
-DIST NetworkManager-1.22.14.tar.xz 4771180 BLAKE2B d0133c2de2fd8a7932be7699bcef7e8e32083e6f908de0eaa3875a862329a1a302245d66dbba8a90a691245897b7a943a35785da21f394a7cf2659eb9cceb866 SHA512 81ccb634c3583406d52c159d1b0903f98c2732f9cd6962f3d6d71940d05cba32e262219de4f09c0cc687beff57bd7ba425f06d9a9c1bfa60aef11d427e91f453
-DIST NetworkManager-1.24.2.tar.xz 4848624 BLAKE2B f8030159d6f645c3015cfb9cf41ffbf30f052592e04c27a2a378e6d7c0ac86f521a5147229b84e68adb7835ebac8b8ad094977f0783b3fa794149190d809a098 SHA512 34fcbdffe5b621ff5d851e6b8de07ddf3f3ad294822adc36d6c36682049cc1f7e0280631ecc38d335871a3ee3483b338106b3a513d46a6cafdf61849027fe923
 DIST NetworkManager-1.26.0.tar.xz 4956796 BLAKE2B 752b6b47387bac5787d06be7f31cc7387798d0c917977c8e72d6d21538a86c167003901d628e596109aec28816f56fd8cd6bf2b46a8d4918a7e6cf1946586550 SHA512 46035fda8f154497ba4a634e4bf7f0a11f579d0d3f4ffdcea7d47ea0bde6dd0183885491f5453255af7b163ae3db4f0c62c3161913a8c30c35b6475887235b6d
 DIST NetworkManager-1.26.2.tar.xz 4972240 BLAKE2B f9f0879ad01d7aee8edc28b33a08d903637b0a9c0738d64480394d0298a02e4fa4277f6a14a7fec62eeb7e1ca50646f47d08f735827b5dbe698070669fd558c4 SHA512 4029bf5224523d851a36766376813c7edc85c2fef3600ceaffc0c7e6faadcfebf843a406ee071bdc59c21bceb7bf3de8c87fca6bb2f2116d9eddbb70e11bf517

diff --git a/net-misc/networkmanager/files/1.18.4-iwd1-compat.patch b/net-misc/networkmanager/files/1.18.4-iwd1-compat.patch
deleted file mode 100644
index 12c8b873e6a..00000000000
--- a/net-misc/networkmanager/files/1.18.4-iwd1-compat.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 59923ad85d1a1cf2216a4f14649702d24d3f2360 Mon Sep 17 00:00:00 2001
-From: Lubomir Rintel <lkundrak@v3.sk>
-Date: Sat, 2 Nov 2019 06:55:54 +0100
-Subject: [PATCH 1/2] iwd: add some missing error handling
-
-g_dbus_object_manager_get_interface() can happily return NULL and we
-need to check for that.
----
- src/devices/wifi/nm-iwd-manager.c | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/src/devices/wifi/nm-iwd-manager.c b/src/devices/wifi/nm-iwd-manager.c
-index dd1cad480..e83f8063c 100644
---- a/src/devices/wifi/nm-iwd-manager.c
-+++ b/src/devices/wifi/nm-iwd-manager.c
-@@ -136,6 +136,11 @@ agent_dbus_method_cb (GDBusConnection *connection,
- 	network = g_dbus_object_manager_get_interface (priv->object_manager,
- 	                                               network_path,
- 	                                               NM_IWD_NETWORK_INTERFACE);
-+	if (!network) {
-+		_LOGE ("unable to find the network object");
-+		return;
-+	}
-+
- 
- 	device_path = get_property_string_or_null (G_DBUS_PROXY (network), "Device");
- 	if (!device_path) {
-@@ -260,6 +265,11 @@ register_agent (NMIwdManager *self)
- 	                                                     "/",
- 	                                                     NM_IWD_AGENT_MANAGER_INTERFACE);
- 
-+	if (!agent_manager) {
-+		_LOGE ("unable to register the IWD Agent: PSK/8021x Wi-Fi networks may not work");
-+		return;
-+	}
-+
- 	/* Register our agent */
- 	g_dbus_proxy_call (G_DBUS_PROXY (agent_manager),
- 	                   "RegisterAgent",
--- 
-2.20.1
-
-
-From 186d22a9634e2bf94658ed6f1cf2b332ecb3a32c Mon Sep 17 00:00:00 2001
-From: Lubomir Rintel <lkundrak@v3.sk>
-Date: Sat, 2 Nov 2019 07:01:28 +0100
-Subject: [PATCH 2/2] iwd: unbreak iwd-1.0
-
-The upstream apparently thought it's a great idea to change the agent
-manager path. This fixes things for those unfortunate enough to run
-IWD.
----
- src/devices/wifi/nm-iwd-manager.c | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/src/devices/wifi/nm-iwd-manager.c b/src/devices/wifi/nm-iwd-manager.c
-index e83f8063c..470cb1c90 100644
---- a/src/devices/wifi/nm-iwd-manager.c
-+++ b/src/devices/wifi/nm-iwd-manager.c
-@@ -262,9 +262,17 @@ register_agent (NMIwdManager *self)
- 	GDBusInterface *agent_manager;
- 
- 	agent_manager = g_dbus_object_manager_get_interface (priv->object_manager,
--	                                                     "/",
-+	                                                     "/net/connman/iwd",
- 	                                                     NM_IWD_AGENT_MANAGER_INTERFACE);
- 
-+	if (!agent_manager) {
-+		/* IWD prior to 1.0 dated 30 October, 2019 has the agent manager on a
-+		 * different path. */
-+		agent_manager = g_dbus_object_manager_get_interface (priv->object_manager,
-+		                                                     "/",
-+		                                                     NM_IWD_AGENT_MANAGER_INTERFACE);
-+	}
-+
- 	if (!agent_manager) {
- 		_LOGE ("unable to register the IWD Agent: PSK/8021x Wi-Fi networks may not work");
- 		return;
--- 
-2.20.1
-

diff --git a/net-misc/networkmanager/files/init.d.NetworkManager-r1 b/net-misc/networkmanager/files/init.d.NetworkManager-r1
deleted file mode 100644
index 3209644c511..00000000000
--- a/net-misc/networkmanager/files/init.d.NetworkManager-r1
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/sbin/openrc-run
-# Copyright (c) 2008 Saleem Abdulrasool <compnerd@compnerd.org>
-# Copyright 2013-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-description="NetworkManager daemon. The service is marked as started only \
-when a network connection is established."
-
-depend() {
-	need dbus
-	use consolekit
-	provide net
-}
-
-start() {
-	# If we are re-called by a dispatcher event, we want to mark the service
-	# as started without starting the daemon again
-	yesno "${IN_BACKGROUND}" && return 0
-
-	[ -z "${INACTIVE_TIMEOUT}" ] && INACTIVE_TIMEOUT="1"
-
-	ebegin "Starting NetworkManager"
-	start-stop-daemon --start --quiet --pidfile /run/NetworkManager/NetworkManager.pid \
-		--exec /usr/sbin/NetworkManager -- --pid-file /run/NetworkManager/NetworkManager.pid
-	local _retval=$?
-	eend "${_retval}"
-	if [ "x${_retval}" = 'x0' ] && ! nm-online -t "${INACTIVE_TIMEOUT}"; then
-		einfo "Marking NetworkManager as inactive. It will automatically be marked"
-		einfo "as started after a network connection has been established."
-		mark_service_inactive
-	fi
-	return "${_retval}"
-}
-
-stop() {
-	# If we are re-called by a dispatcher event, we want to mark the service
-	# as inactive without stopping the daemon
-	if yesno "${IN_BACKGROUND}"; then
-		mark_service_inactive "${SVCNAME}"
-		return 0
-	fi
-
-	ebegin "Stopping NetworkManager"
-	local pidfile=/run/NetworkManager/NetworkManager.pid
-	if [ ! -e "${pidfile}" ] && [ -e /var/run/NetworkManager.pid ]; then 
-		# Try stopping the pid file used by <0.9.7
-		pidfile=/var/run/NetworkManager.pid
-		start-stop-daemon --stop --quiet --pidfile "${pidfile}"
-		ret=$?
-		[ ${ret} = 0 ] && [ -e "${pidfile}" ] && rm "${pidfile}"
-		eend ${ret}
-	else
-		start-stop-daemon --stop --quiet --pidfile "${pidfile}"
-		eend $?
-	fi
-}
-
-# vim: set ft=gentoo-init-d ts=4 :

diff --git a/net-misc/networkmanager/files/networkmanager-data-fix-the-ID_NET_DRIVER-udev-rule.patch b/net-misc/networkmanager/files/networkmanager-data-fix-the-ID_NET_DRIVER-udev-rule.patch
deleted file mode 100644
index 1b94ab478d8..00000000000
--- a/net-misc/networkmanager/files/networkmanager-data-fix-the-ID_NET_DRIVER-udev-rule.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 27d380b70ea839c7badab420361e4e65e023e8e9 Mon Sep 17 00:00:00 2001
-From: Lubomir Rintel <lkundrak@v3.sk>
-Date: Fri, 16 Aug 2019 13:22:09 +0200
-Subject: [PATCH] data: fix the ID_NET_DRIVER udev rule
-
-Systemd v243 is complaining about the wrong substitution there. That is
-sort of harmless, because systemd-udevd in that version doesn't need the
-rule anyway. But still fix it, to avoid a warning.
-
-Also, newer udevd's $PATH doesn't include sbin. That is also okay,
-because we don't need the rule to actually work there. But fix it
-anyway.
-
-https://bugzilla.redhat.com/show_bug.cgi?id=1740655
----
- data/84-nm-drivers.rules | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/data/84-nm-drivers.rules b/data/84-nm-drivers.rules
-index d246ef6ce..e398cb9f2 100644
---- a/data/84-nm-drivers.rules
-+++ b/data/84-nm-drivers.rules
-@@ -7,6 +7,6 @@ ACTION!="add|change", GOTO="nm_drivers_end"
- # Determine ID_NET_DRIVER if there's no ID_NET_DRIVER or DRIVERS (old udev?)
- ENV{ID_NET_DRIVER}=="?*", GOTO="nm_drivers_end"
- DRIVERS=="?*", GOTO="nm_drivers_end"
--PROGRAM="/bin/sh -c 'ethtool -i $1 | sed -n s/^driver:\ //p' -- $env{INTERFACE}", RESULT=="?*", ENV{ID_NET_DRIVER}="%c"
-+PROGRAM="/bin/sh -c '/usr/sbin/ethtool -i $$1 |/usr/bin/sed -n s/^driver:\ //p' -- $env{INTERFACE}", ENV{ID_NET_DRIVER}="%c"
- 
- LABEL="nm_drivers_end"
--- 
-2.21.0
-

diff --git a/net-misc/networkmanager/networkmanager-1.18.4-r4.ebuild b/net-misc/networkmanager/networkmanager-1.18.4-r4.ebuild
deleted file mode 100644
index baec49b2cdb..00000000000
--- a/net-misc/networkmanager/networkmanager-1.18.4-r4.ebuild
+++ /dev/null
@@ -1,350 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-GNOME_ORG_MODULE="NetworkManager"
-GNOME2_LA_PUNT="yes"
-VALA_USE_DEPEND="vapigen"
-PYTHON_COMPAT=( python{3_6,3_7} )
-
-inherit bash-completion-r1 gnome2 linux-info multilib python-any-r1 systemd readme.gentoo-r1 vala virtualx udev multilib-minimal
-
-DESCRIPTION="A set of co-operative tools that make networking simple and straightforward"
-HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
-
-LICENSE="GPL-2+"
-SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
-
-IUSE="audit bluetooth connection-sharing +dhclient dhcpcd elogind gnutls +introspection iwd json kernel_linux +nss +modemmanager ncurses ofono ovs policykit +ppp resolvconf selinux systemd teamd test vala +wext +wifi"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="
-	bluetooth? ( modemmanager )
-	iwd? ( wifi )
-	vala? ( introspection )
-	wext? ( wifi )
-	|| ( nss gnutls )
-	?? ( elogind systemd )
-"
-
-KEYWORDS="~alpha amd64 arm arm64 ~ia64 ppc ppc64 ~sparc x86"
-
-# gobject-introspection-0.10.3 is needed due to gnome bug 642300
-# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
-COMMON_DEPEND="
-	>=sys-apps/dbus-1.2[${MULTILIB_USEDEP}]
-	>=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}]
-	>=dev-libs/glib-2.40:2[${MULTILIB_USEDEP}]
-	policykit? ( >=sys-auth/polkit-0.106 )
-	net-libs/libndp[${MULTILIB_USEDEP}]
-	>=net-misc/curl-7.24
-	net-misc/iputils
-	sys-apps/util-linux[${MULTILIB_USEDEP}]
-	sys-libs/readline:0=
-	>=virtual/libudev-175:=[${MULTILIB_USEDEP}]
-	audit? ( sys-process/audit )
-	bluetooth? ( >=net-wireless/bluez-5 )
-	connection-sharing? (
-		net-dns/dnsmasq[dbus,dhcp]
-		net-firewall/iptables )
-	dhclient? ( >=net-misc/dhcp-4[client] )
-	dhcpcd? ( net-misc/dhcpcd )
-	elogind? ( >=sys-auth/elogind-219 )
-	introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
-	json? ( >=dev-libs/jansson-2.5[${MULTILIB_USEDEP}] )
-	modemmanager? ( >=net-misc/modemmanager-0.7.991:0= )
-	ncurses? ( >=dev-libs/newt-0.52.15 )
-	nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
-	!nss? ( gnutls? (
-		dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
-		>=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}] ) )
-	ofono? ( net-misc/ofono )
-	ovs? ( dev-libs/jansson )
-	ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] )
-	resolvconf? ( net-dns/openresolv )
-	selinux? ( sys-libs/libselinux )
-	systemd? ( >=sys-apps/systemd-209:0= )
-	teamd? (
-		dev-libs/jansson
-		>=net-misc/libteam-1.9
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	acct-group/plugdev
-	|| (
-		net-misc/iputils[arping(+)]
-		net-analyzer/arping
-	)
-	wifi? (
-		!iwd? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
-		iwd? ( net-wireless/iwd )
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	dev-util/gdbus-codegen
-	dev-util/glib-utils
-	dev-util/gtk-doc-am
-	>=dev-util/intltool-0.40
-	>=sys-devel/gettext-0.17
-	>=sys-kernel/linux-headers-3.18
-	virtual/pkgconfig
-	introspection? (
-		$(python_gen_any_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]')
-		dev-lang/perl
-		dev-libs/libxslt
-	)
-	vala? ( $(vala_depend) )
-	test? (
-		$(python_gen_any_dep '
-			dev-python/dbus-python[${PYTHON_USEDEP}]
-			dev-python/pygobject:3[${PYTHON_USEDEP}]')
-	)
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-data-fix-the-ID_NET_DRIVER-udev-rule.patch
-	"${FILESDIR}"/${PV}-iwd1-compat.patch # included in 1.21.3+
-)
-
-python_check_deps() {
-	if use introspection; then
-		has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return
-	fi
-	if use test; then
-		has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
-		has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]"
-	fi
-}
-
-sysfs_deprecated_check() {
-	ebegin "Checking for SYSFS_DEPRECATED support"
-
-	if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
-		eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
-		eerror "or NetworkManager will not work correctly."
-		eerror "See https://bugs.gentoo.org/333639 for more info."
-		die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
-	fi
-	eend $?
-}
-
-pkg_pretend() {
-	if use kernel_linux; then
-		get_version
-		if linux_config_exists; then
-			sysfs_deprecated_check
-		else
-			ewarn "Was unable to determine your kernel .config"
-			ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
-			ewarn "See https://bugs.gentoo.org/333639 for more info."
-		fi
-
-	fi
-}
-
-pkg_setup() {
-	if use connection-sharing; then
-		if kernel_is lt 5 1; then
-			CONFIG_CHECK="~NF_NAT_IPV4 ~NF_NAT_MASQUERADE_IPV4"
-		else
-			CONFIG_CHECK="~NF_NAT ~NF_NAT_MASQUERADE"
-		fi
-		linux-info_pkg_setup
-	fi
-	if use introspection || use test; then
-		python-any-r1_pkg_setup
-	fi
-}
-
-src_prepare() {
-	DOC_CONTENTS="To modify system network connections without needing to enter the
-		root password, add your user account to the 'plugdev' group."
-
-	use vala && vala_src_prepare
-	gnome2_src_prepare
-}
-
-multilib_src_configure() {
-	local myconf=(
-		--disable-more-warnings
-		--disable-static
-		--localstatedir=/var
-		--disable-lto
-		--disable-config-plugin-ibft
-		--disable-qt
-		--without-netconfig
-		--with-dbus-sys-dir=/etc/dbus-1/system.d
-		# We need --with-libnm-glib (and dbus-glib dep) as reverse deps are
-		# still not ready for removing that lib, bug #665338
-		--with-libnm-glib
-		$(multilib_native_with nmcli)
-		--with-udev-dir="$(get_udevdir)"
-		--with-config-plugins-default=keyfile
-		--with-iptables=/sbin/iptables
-		--with-ebpf=yes
-		$(multilib_native_enable concheck)
-		--with-crypto=$(usex nss nss gnutls)
-		# elogind lacks multilib for now, and consolekit doesn't require linking against, so we use it as a fake option
-		# This SHOULD be removable once elogind has that. We abuse the fact that 'consolekit' does nothing at buildtime.
-		# (There is no off switch, and we do not support upower.)
-		# bug #747358
-		--with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind consolekit))
-		--with-suspend-resume=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind consolekit))
-		$(multilib_native_use_with audit libaudit)
-		$(multilib_native_use_enable bluetooth bluez5-dun)
-		$(use_with dhclient)
-		$(use_with dhcpcd)
-		$(multilib_native_use_enable introspection)
-		$(use_enable json json-validation)
-		$(multilib_native_use_enable ppp)
-		--without-libpsl
-		$(multilib_native_use_with modemmanager modem-manager-1)
-		$(multilib_native_use_with ncurses nmtui)
-		$(multilib_native_use_with ofono)
-		$(multilib_native_use_enable ovs)
-		$(multilib_native_use_enable policykit polkit)
-		$(multilib_native_use_enable policykit polkit-agent)
-		$(multilib_native_use_with resolvconf)
-		$(multilib_native_use_with selinux)
-		$(multilib_native_use_with systemd systemd-journal)
-		$(multilib_native_use_enable teamd teamdctl)
-		$(multilib_native_use_enable test tests)
-		$(multilib_native_use_enable vala)
-		--without-valgrind
-		$(multilib_native_use_with wifi iwd)
-		$(multilib_native_use_with wext)
-		$(multilib_native_use_enable wifi)
-	)
-
-	# Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
-	if use ppp; then
-		local PPPD_VER=`best_version net-dialup/ppp`
-		PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
-		PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
-		myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
-	fi
-
-	# unit files directory needs to be passed only when systemd is enabled,
-	# otherwise systemd support is not disabled completely, bug #524534
-	use systemd && myconf+=( --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" )
-
-	if multilib_is_native_abi; then
-		# work-around man out-of-source brokenness, must be done before configure
-		ln -s "${S}/docs" docs || die
-		ln -s "${S}/man" man || die
-	fi
-
-	ECONF_SOURCE=${S} runstatedir="/run" gnome2_src_configure "${myconf[@]}"
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi; then
-		emake
-	else
-		local targets=(
-			libnm/libnm.la
-			libnm-util/libnm-util.la
-			libnm-glib/libnm-glib.la
-			libnm-glib/libnm-glib-vpn.la
-		)
-		emake "${targets[@]}"
-	fi
-}
-
-multilib_src_test() {
-	if use test && multilib_is_native_abi; then
-		python_setup
-		virtx emake check
-	fi
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi; then
-		# Install completions at proper place, bug #465100
-		gnome2_src_install completiondir="$(get_bashcompdir)"
-		insinto /usr/lib/NetworkManager/conf.d #702476
-		doins "${S}"/examples/nm-conf.d/31-mac-addr-change.conf
-	else
-		local targets=(
-			install-libLTLIBRARIES
-			install-libdeprecatedHEADERS
-			install-libnm_glib_libnmvpnHEADERS
-			install-libnm_glib_libnmincludeHEADERS
-			install-libnm_util_libnm_util_includeHEADERS
-			install-libnmincludeHEADERS
-			install-nodist_libnm_glib_libnmincludeHEADERS
-			install-nodist_libnm_glib_libnmvpnHEADERS
-			install-nodist_libnm_util_libnm_util_includeHEADERS
-			install-nodist_libnmincludeHEADERS
-			install-pkgconfigDATA
-		)
-		emake DESTDIR="${D}" "${targets[@]}"
-	fi
-}
-
-multilib_src_install_all() {
-	einstalldocs
-	! use systemd && readme.gentoo_create_doc
-
-	newinitd "${FILESDIR}/init.d.NetworkManager-r1" NetworkManager
-	newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
-
-	# Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
-	keepdir /etc/NetworkManager/dispatcher.d
-
-	# Provide openrc net dependency only when nm is connected
-	exeinto /etc/NetworkManager/dispatcher.d
-	newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
-	sed -e "s:@EPREFIX@:${EPREFIX}:g" \
-		-i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
-
-	keepdir /etc/NetworkManager/system-connections
-	chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
-
-	# Allow users in plugdev group to modify system connections
-	insinto /usr/share/polkit-1/rules.d/
-	doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
-
-	if use iwd; then
-		# This goes to $nmlibdir/conf.d/ and $nmlibdir is '${prefix}'/lib/$PACKAGE, thus always lib, not get_libdir
-		cat <<-EOF > "${ED%/}"/usr/lib/NetworkManager/conf.d/iwd.conf
-		[device]
-		wifi.backend=iwd
-		EOF
-	fi
-
-	# Empty
-	rmdir "${ED%/}"/var{/lib{/NetworkManager,},} || die
-}
-
-pkg_postinst() {
-	gnome2_pkg_postinst
-	systemd_reenable NetworkManager.service
-	! use systemd && readme.gentoo_print_elog
-
-	if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
-		ewarn "The ${PN} system configuration file has moved to a new location."
-		ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
-		ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
-		ewarn
-		ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
-	fi
-
-	# NM fallbacks to plugin specified at compile time (upstream bug #738611)
-	# but still show a warning to remember people to have cleaner config file
-	if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
-		if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
-			ewarn
-			ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
-			ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
-			ewarn
-		fi
-	fi
-
-	# NM shows lots of errors making nmcli almost unusable, bug #528748 upstream bug #690457
-	if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
-		ewarn "You have psk-flags=1 setting in above files, you will need to"
-		ewarn "either reconfigure affected networks or, at least, set the flag"
-		ewarn "value to '0'."
-	fi
-}

diff --git a/net-misc/networkmanager/networkmanager-1.18.6-r1.ebuild b/net-misc/networkmanager/networkmanager-1.18.6-r1.ebuild
deleted file mode 100644
index 2f8cca8565b..00000000000
--- a/net-misc/networkmanager/networkmanager-1.18.6-r1.ebuild
+++ /dev/null
@@ -1,350 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-GNOME_ORG_MODULE="NetworkManager"
-GNOME2_LA_PUNT="yes"
-VALA_USE_DEPEND="vapigen"
-PYTHON_COMPAT=( python{3_6,3_7} )
-
-inherit bash-completion-r1 gnome2 linux-info multilib python-any-r1 systemd readme.gentoo-r1 vala virtualx udev multilib-minimal
-
-DESCRIPTION="A set of co-operative tools that make networking simple and straightforward"
-HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
-
-LICENSE="GPL-2+"
-SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
-
-IUSE="audit bluetooth connection-sharing +dhclient dhcpcd elogind gnutls +introspection iwd json kernel_linux +nss +modemmanager ncurses ofono ovs policykit +ppp resolvconf selinux systemd teamd test vala +wext +wifi"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="
-	bluetooth? ( modemmanager )
-	iwd? ( wifi )
-	vala? ( introspection )
-	wext? ( wifi )
-	|| ( nss gnutls )
-	?? ( elogind systemd )
-"
-
-KEYWORDS="~alpha amd64 arm arm64 ~ia64 ppc ppc64 ~sparc x86"
-
-# gobject-introspection-0.10.3 is needed due to gnome bug 642300
-# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
-COMMON_DEPEND="
-	>=sys-apps/dbus-1.2[${MULTILIB_USEDEP}]
-	>=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}]
-	>=dev-libs/glib-2.40:2[${MULTILIB_USEDEP}]
-	policykit? ( >=sys-auth/polkit-0.106 )
-	net-libs/libndp[${MULTILIB_USEDEP}]
-	>=net-misc/curl-7.24
-	net-misc/iputils
-	sys-apps/util-linux[${MULTILIB_USEDEP}]
-	sys-libs/readline:0=
-	>=virtual/libudev-175:=[${MULTILIB_USEDEP}]
-	audit? ( sys-process/audit )
-	bluetooth? ( >=net-wireless/bluez-5 )
-	connection-sharing? (
-		net-dns/dnsmasq[dbus,dhcp]
-		net-firewall/iptables )
-	dhclient? ( >=net-misc/dhcp-4[client] )
-	dhcpcd? ( net-misc/dhcpcd )
-	elogind? ( >=sys-auth/elogind-219 )
-	introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
-	json? ( >=dev-libs/jansson-2.5[${MULTILIB_USEDEP}] )
-	modemmanager? ( >=net-misc/modemmanager-0.7.991:0= )
-	ncurses? ( >=dev-libs/newt-0.52.15 )
-	nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
-	!nss? ( gnutls? (
-		dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
-		>=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}] ) )
-	ofono? ( net-misc/ofono )
-	ovs? ( dev-libs/jansson )
-	ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] )
-	resolvconf? ( net-dns/openresolv )
-	selinux? ( sys-libs/libselinux )
-	systemd? ( >=sys-apps/systemd-209:0= )
-	teamd? (
-		dev-libs/jansson
-		>=net-misc/libteam-1.9
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	acct-group/plugdev
-	|| (
-		net-misc/iputils[arping(+)]
-		net-analyzer/arping
-	)
-	wifi? (
-		!iwd? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
-		iwd? ( net-wireless/iwd )
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	dev-util/gdbus-codegen
-	dev-util/glib-utils
-	dev-util/gtk-doc-am
-	>=dev-util/intltool-0.40
-	>=sys-devel/gettext-0.17
-	>=sys-kernel/linux-headers-3.18
-	virtual/pkgconfig
-	introspection? (
-		$(python_gen_any_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]')
-		dev-lang/perl
-		dev-libs/libxslt
-	)
-	vala? ( $(vala_depend) )
-	test? (
-		$(python_gen_any_dep '
-			dev-python/dbus-python[${PYTHON_USEDEP}]
-			dev-python/pygobject:3[${PYTHON_USEDEP}]')
-	)
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-data-fix-the-ID_NET_DRIVER-udev-rule.patch
-	"${FILESDIR}"/1.18.4-iwd1-compat.patch # included in 1.21.3+
-)
-
-python_check_deps() {
-	if use introspection; then
-		has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return
-	fi
-	if use test; then
-		has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
-		has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]"
-	fi
-}
-
-sysfs_deprecated_check() {
-	ebegin "Checking for SYSFS_DEPRECATED support"
-
-	if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
-		eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
-		eerror "or NetworkManager will not work correctly."
-		eerror "See https://bugs.gentoo.org/333639 for more info."
-		die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
-	fi
-	eend $?
-}
-
-pkg_pretend() {
-	if use kernel_linux; then
-		get_version
-		if linux_config_exists; then
-			sysfs_deprecated_check
-		else
-			ewarn "Was unable to determine your kernel .config"
-			ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
-			ewarn "See https://bugs.gentoo.org/333639 for more info."
-		fi
-
-	fi
-}
-
-pkg_setup() {
-	if use connection-sharing; then
-		if kernel_is lt 5 1; then
-			CONFIG_CHECK="~NF_NAT_IPV4 ~NF_NAT_MASQUERADE_IPV4"
-		else
-			CONFIG_CHECK="~NF_NAT ~NF_NAT_MASQUERADE"
-		fi
-		linux-info_pkg_setup
-	fi
-	if use introspection || use test; then
-		python-any-r1_pkg_setup
-	fi
-}
-
-src_prepare() {
-	DOC_CONTENTS="To modify system network connections without needing to enter the
-		root password, add your user account to the 'plugdev' group."
-
-	use vala && vala_src_prepare
-	gnome2_src_prepare
-}
-
-multilib_src_configure() {
-	local myconf=(
-		--disable-more-warnings
-		--disable-static
-		--localstatedir=/var
-		--disable-lto
-		--disable-config-plugin-ibft
-		--disable-qt
-		--without-netconfig
-		--with-dbus-sys-dir=/etc/dbus-1/system.d
-		# We need --with-libnm-glib (and dbus-glib dep) as reverse deps are
-		# still not ready for removing that lib, bug #665338
-		--with-libnm-glib
-		$(multilib_native_with nmcli)
-		--with-udev-dir="$(get_udevdir)"
-		--with-config-plugins-default=keyfile
-		--with-iptables=/sbin/iptables
-		--with-ebpf=yes
-		$(multilib_native_enable concheck)
-		--with-crypto=$(usex nss nss gnutls)
-		# elogind lacks multilib for now, and consolekit doesn't require linking against, so we use it as a fake option
-		# This SHOULD be removable once elogind has that. We abuse the fact that 'consolekit' does nothing at buildtime.
-		# (There is no off switch, and we do not support upower.)
-		# bug #747358
-		--with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind consolekit))
-		--with-suspend-resume=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind consolekit))
-		$(multilib_native_use_with audit libaudit)
-		$(multilib_native_use_enable bluetooth bluez5-dun)
-		$(use_with dhclient)
-		$(use_with dhcpcd)
-		$(multilib_native_use_enable introspection)
-		$(use_enable json json-validation)
-		$(multilib_native_use_enable ppp)
-		--without-libpsl
-		$(multilib_native_use_with modemmanager modem-manager-1)
-		$(multilib_native_use_with ncurses nmtui)
-		$(multilib_native_use_with ofono)
-		$(multilib_native_use_enable ovs)
-		$(multilib_native_use_enable policykit polkit)
-		$(multilib_native_use_enable policykit polkit-agent)
-		$(multilib_native_use_with resolvconf)
-		$(multilib_native_use_with selinux)
-		$(multilib_native_use_with systemd systemd-journal)
-		$(multilib_native_use_enable teamd teamdctl)
-		$(multilib_native_use_enable test tests)
-		$(multilib_native_use_enable vala)
-		--without-valgrind
-		$(multilib_native_use_with wifi iwd)
-		$(multilib_native_use_with wext)
-		$(multilib_native_use_enable wifi)
-	)
-
-	# Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
-	if use ppp; then
-		local PPPD_VER=`best_version net-dialup/ppp`
-		PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
-		PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
-		myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
-	fi
-
-	# unit files directory needs to be passed only when systemd is enabled,
-	# otherwise systemd support is not disabled completely, bug #524534
-	use systemd && myconf+=( --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" )
-
-	if multilib_is_native_abi; then
-		# work-around man out-of-source brokenness, must be done before configure
-		ln -s "${S}/docs" docs || die
-		ln -s "${S}/man" man || die
-	fi
-
-	ECONF_SOURCE=${S} runstatedir="/run" gnome2_src_configure "${myconf[@]}"
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi; then
-		emake
-	else
-		local targets=(
-			libnm/libnm.la
-			libnm-util/libnm-util.la
-			libnm-glib/libnm-glib.la
-			libnm-glib/libnm-glib-vpn.la
-		)
-		emake "${targets[@]}"
-	fi
-}
-
-multilib_src_test() {
-	if use test && multilib_is_native_abi; then
-		python_setup
-		virtx emake check
-	fi
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi; then
-		# Install completions at proper place, bug #465100
-		gnome2_src_install completiondir="$(get_bashcompdir)"
-		insinto /usr/lib/NetworkManager/conf.d #702476
-		doins "${S}"/examples/nm-conf.d/31-mac-addr-change.conf
-	else
-		local targets=(
-			install-libLTLIBRARIES
-			install-libdeprecatedHEADERS
-			install-libnm_glib_libnmvpnHEADERS
-			install-libnm_glib_libnmincludeHEADERS
-			install-libnm_util_libnm_util_includeHEADERS
-			install-libnmincludeHEADERS
-			install-nodist_libnm_glib_libnmincludeHEADERS
-			install-nodist_libnm_glib_libnmvpnHEADERS
-			install-nodist_libnm_util_libnm_util_includeHEADERS
-			install-nodist_libnmincludeHEADERS
-			install-pkgconfigDATA
-		)
-		emake DESTDIR="${D}" "${targets[@]}"
-	fi
-}
-
-multilib_src_install_all() {
-	einstalldocs
-	! use systemd && readme.gentoo_create_doc
-
-	newinitd "${FILESDIR}/init.d.NetworkManager-r2" NetworkManager
-	newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
-
-	# Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
-	keepdir /etc/NetworkManager/dispatcher.d
-
-	# Provide openrc net dependency only when nm is connected
-	exeinto /etc/NetworkManager/dispatcher.d
-	newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
-	sed -e "s:@EPREFIX@:${EPREFIX}:g" \
-		-i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
-
-	keepdir /etc/NetworkManager/system-connections
-	chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
-
-	# Allow users in plugdev group to modify system connections
-	insinto /usr/share/polkit-1/rules.d/
-	doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
-
-	if use iwd; then
-		# This goes to $nmlibdir/conf.d/ and $nmlibdir is '${prefix}'/lib/$PACKAGE, thus always lib, not get_libdir
-		cat <<-EOF > "${ED%/}"/usr/lib/NetworkManager/conf.d/iwd.conf
-		[device]
-		wifi.backend=iwd
-		EOF
-	fi
-
-	# Empty
-	rmdir "${ED%/}"/var{/lib{/NetworkManager,},} || die
-}
-
-pkg_postinst() {
-	gnome2_pkg_postinst
-	systemd_reenable NetworkManager.service
-	! use systemd && readme.gentoo_print_elog
-
-	if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
-		ewarn "The ${PN} system configuration file has moved to a new location."
-		ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
-		ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
-		ewarn
-		ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
-	fi
-
-	# NM fallbacks to plugin specified at compile time (upstream bug #738611)
-	# but still show a warning to remember people to have cleaner config file
-	if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
-		if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
-			ewarn
-			ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
-			ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
-			ewarn
-		fi
-	fi
-
-	# NM shows lots of errors making nmcli almost unusable, bug #528748 upstream bug #690457
-	if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
-		ewarn "You have psk-flags=1 setting in above files, you will need to"
-		ewarn "either reconfigure affected networks or, at least, set the flag"
-		ewarn "value to '0'."
-	fi
-}

diff --git a/net-misc/networkmanager/networkmanager-1.20.12-r1.ebuild b/net-misc/networkmanager/networkmanager-1.20.12-r1.ebuild
deleted file mode 100644
index 3ec06c3aefc..00000000000
--- a/net-misc/networkmanager/networkmanager-1.20.12-r1.ebuild
+++ /dev/null
@@ -1,340 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-GNOME_ORG_MODULE="NetworkManager"
-GNOME2_LA_PUNT="yes"
-VALA_USE_DEPEND="vapigen"
-PYTHON_COMPAT=( python3_{6,7,8} )
-
-inherit bash-completion-r1 gnome2 linux-info multilib python-any-r1 systemd readme.gentoo-r1 vala virtualx udev multilib-minimal
-
-DESCRIPTION="A set of co-operative tools that make networking simple and straightforward"
-HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
-
-LICENSE="GPL-2+"
-SLOT="0"
-
-IUSE="audit bluetooth connection-sharing dhclient dhcpcd elogind gnutls +introspection iwd json kernel_linux +nss +modemmanager ncurses ofono ovs policykit +ppp resolvconf selinux systemd teamd test vala +wext +wifi"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="
-	bluetooth? ( modemmanager )
-	iwd? ( wifi )
-	vala? ( introspection )
-	wext? ( wifi )
-	|| ( nss gnutls )
-	?? ( elogind systemd )
-"
-
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
-
-# gobject-introspection-0.10.3 is needed due to gnome bug 642300
-# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
-COMMON_DEPEND="
-	>=dev-libs/glib-2.40:2[${MULTILIB_USEDEP}]
-	policykit? ( >=sys-auth/polkit-0.106 )
-	net-libs/libndp[${MULTILIB_USEDEP}]
-	>=net-misc/curl-7.24
-	net-misc/iputils
-	sys-apps/util-linux[${MULTILIB_USEDEP}]
-	sys-libs/readline:0=
-	>=virtual/libudev-175:=[${MULTILIB_USEDEP}]
-	audit? ( sys-process/audit )
-	bluetooth? ( >=net-wireless/bluez-5 )
-	connection-sharing? (
-		net-dns/dnsmasq[dbus,dhcp]
-		net-firewall/iptables )
-	dhclient? ( >=net-misc/dhcp-4[client] )
-	dhcpcd? ( net-misc/dhcpcd )
-	elogind? ( >=sys-auth/elogind-219 )
-	introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
-	json? ( >=dev-libs/jansson-2.5[${MULTILIB_USEDEP}] )
-	modemmanager? ( >=net-misc/modemmanager-0.7.991:0= )
-	ncurses? ( >=dev-libs/newt-0.52.15 )
-	nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
-	!nss? ( gnutls? (
-		dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
-		>=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}] ) )
-	ofono? ( net-misc/ofono )
-	ovs? ( dev-libs/jansson )
-	ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] )
-	resolvconf? ( net-dns/openresolv )
-	selinux? ( sys-libs/libselinux )
-	systemd? ( >=sys-apps/systemd-209:0= )
-	teamd? (
-		dev-libs/jansson
-		>=net-misc/libteam-1.9
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	acct-group/plugdev
-	|| (
-		net-misc/iputils[arping(+)]
-		net-analyzer/arping
-	)
-	wifi? (
-		!iwd? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
-		iwd? ( net-wireless/iwd )
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	dev-util/gdbus-codegen
-	dev-util/glib-utils
-	dev-util/gtk-doc-am
-	>=dev-util/intltool-0.40
-	>=sys-devel/gettext-0.17
-	>=sys-kernel/linux-headers-3.18
-	virtual/pkgconfig
-	introspection? (
-		$(python_gen_any_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]')
-		dev-lang/perl
-		dev-libs/libxslt
-	)
-	vala? ( $(vala_depend) )
-	test? (
-		$(python_gen_any_dep '
-			dev-python/dbus-python[${PYTHON_USEDEP}]
-			dev-python/pygobject:3[${PYTHON_USEDEP}]')
-	)
-"
-
-python_check_deps() {
-	if use introspection; then
-		has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return
-	fi
-	if use test; then
-		has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
-		has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]"
-	fi
-}
-
-sysfs_deprecated_check() {
-	ebegin "Checking for SYSFS_DEPRECATED support"
-
-	if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
-		eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
-		eerror "or NetworkManager will not work correctly."
-		eerror "See https://bugs.gentoo.org/333639 for more info."
-		die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
-	fi
-	eend $?
-}
-
-pkg_pretend() {
-	if use kernel_linux; then
-		get_version
-		if linux_config_exists; then
-			sysfs_deprecated_check
-		else
-			ewarn "Was unable to determine your kernel .config"
-			ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
-			ewarn "See https://bugs.gentoo.org/333639 for more info."
-		fi
-
-	fi
-}
-
-pkg_setup() {
-	if use connection-sharing; then
-		if kernel_is lt 5 1; then
-			CONFIG_CHECK="~NF_NAT_IPV4 ~NF_NAT_MASQUERADE_IPV4"
-		else
-			CONFIG_CHECK="~NF_NAT ~NF_NAT_MASQUERADE"
-		fi
-		linux-info_pkg_setup
-	fi
-	if use introspection || use test; then
-		python-any-r1_pkg_setup
-	fi
-}
-
-src_prepare() {
-	DOC_CONTENTS="To modify system network connections without needing to enter the
-		root password, add your user account to the 'plugdev' group."
-
-	use vala && vala_src_prepare
-	gnome2_src_prepare
-}
-
-multilib_src_configure() {
-	local myconf=(
-		--disable-more-warnings
-		--disable-static
-		--localstatedir=/var
-		--with-runstatedir=/run
-		--disable-lto
-		--disable-qt
-		--without-netconfig
-		--with-dbus-sys-dir=/etc/dbus-1/system.d
-		$(multilib_native_with nmcli)
-		--with-udev-dir="$(get_udevdir)"
-		--with-config-plugins-default=keyfile
-		--with-iptables=/sbin/iptables
-		--with-ebpf=yes
-		$(multilib_native_enable concheck)
-		--with-crypto=$(usex nss nss gnutls)
-		# elogind lacks multilib for now, and consolekit doesn't require linking against, so we use it as a fake option
-		# This SHOULD be removable once elogind has that. We abuse the fact that 'consolekit' does nothing at buildtime.
-		# (There is no off switch, and we do not support upower.)
-		# bug #747358
-		--with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind consolekit))
-		--with-suspend-resume=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind consolekit))
-		$(multilib_native_use_with audit libaudit)
-		$(multilib_native_use_enable bluetooth bluez5-dun)
-		--without-dhcpcanon
-		$(use_with dhclient)
-		$(use_with dhcpcd)
-		--with-config-dhcp-default=internal
-		$(multilib_native_use_enable introspection)
-		$(use_enable json json-validation)
-		$(multilib_native_use_enable ppp)
-		--without-libpsl
-		$(multilib_native_use_with modemmanager modem-manager-1)
-		$(multilib_native_use_with ncurses nmtui)
-		$(multilib_native_use_with ofono)
-		$(multilib_native_use_enable ovs)
-		$(multilib_native_use_enable policykit polkit)
-		$(multilib_native_use_enable policykit polkit-agent)
-		$(multilib_native_use_with resolvconf)
-		$(multilib_native_use_with selinux)
-		$(multilib_native_use_with systemd systemd-journal)
-		$(multilib_native_use_enable teamd teamdctl)
-		$(multilib_native_use_enable test tests)
-		$(multilib_native_use_enable vala)
-		--without-valgrind
-		$(multilib_native_use_with wifi iwd)
-		$(multilib_native_use_with wext)
-		$(multilib_native_use_enable wifi)
-	)
-
-	# Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
-	if use ppp; then
-		local PPPD_VER=`best_version net-dialup/ppp`
-		PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
-		PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
-		myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
-	fi
-
-	# unit files directory needs to be passed only when systemd is enabled,
-	# otherwise systemd support is not disabled completely, bug #524534
-	use systemd && myconf+=( --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" )
-
-	if multilib_is_native_abi; then
-		# work-around man out-of-source brokenness, must be done before configure
-		ln -s "${S}/docs" docs || die
-		ln -s "${S}/man" man || die
-	fi
-
-	ECONF_SOURCE=${S} gnome2_src_configure "${myconf[@]}"
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi; then
-		emake
-	else
-		local targets=(
-			libnm/libnm.la
-		)
-		emake "${targets[@]}"
-	fi
-}
-
-multilib_src_test() {
-	if use test && multilib_is_native_abi; then
-		python_setup
-		virtx emake check
-	fi
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi; then
-		# Install completions at proper place, bug #465100
-		gnome2_src_install completiondir="$(get_bashcompdir)"
-		insinto /usr/lib/NetworkManager/conf.d #702476
-		doins "${S}"/examples/nm-conf.d/31-mac-addr-change.conf
-	else
-		local targets=(
-			install-libLTLIBRARIES
-			install-libnmincludeHEADERS
-			install-nodist_libnmincludeHEADERS
-			install-pkgconfigDATA
-		)
-		emake DESTDIR="${D}" "${targets[@]}"
-	fi
-}
-
-multilib_src_install_all() {
-	einstalldocs
-	! use systemd && readme.gentoo_create_doc
-
-	newinitd "${FILESDIR}/init.d.NetworkManager-r2" NetworkManager
-	newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
-
-	# Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
-	keepdir /etc/NetworkManager/dispatcher.d
-
-	# Provide openrc net dependency only when nm is connected
-	exeinto /etc/NetworkManager/dispatcher.d
-	newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
-	sed -e "s:@EPREFIX@:${EPREFIX}:g" \
-		-i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
-
-	keepdir /etc/NetworkManager/system-connections
-	chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
-
-	# Allow users in plugdev group to modify system connections
-	insinto /usr/share/polkit-1/rules.d/
-	doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
-
-	if use iwd; then
-		# This goes to $nmlibdir/conf.d/ and $nmlibdir is '${prefix}'/lib/$PACKAGE, thus always lib, not get_libdir
-		cat <<-EOF > "${ED%/}"/usr/lib/NetworkManager/conf.d/iwd.conf
-		[device]
-		wifi.backend=iwd
-		EOF
-	fi
-
-	# Empty
-	rmdir "${ED%/}"/var{/lib{/NetworkManager,},} || die
-}
-
-pkg_postinst() {
-	gnome2_pkg_postinst
-	systemd_reenable NetworkManager.service
-	! use systemd && readme.gentoo_print_elog
-
-	if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
-		ewarn "The ${PN} system configuration file has moved to a new location."
-		ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
-		ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
-		ewarn
-		ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
-	fi
-
-	# NM fallbacks to plugin specified at compile time (upstream bug #738611)
-	# but still show a warning to remember people to have cleaner config file
-	if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
-		if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
-			ewarn
-			ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
-			ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
-			ewarn
-		fi
-	fi
-
-	# NM shows lots of errors making nmcli almost unusable, bug #528748 upstream bug #690457
-	if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
-		ewarn "You have psk-flags=1 setting in above files, you will need to"
-		ewarn "either reconfigure affected networks or, at least, set the flag"
-		ewarn "value to '0'."
-	fi
-
-	if use dhclient || use dhcpcd; then
-		ewarn "You have enabled USE=dhclient and/or USE=dhcpcd, but NetworkManager since"
-		ewarn "version 1.20 defaults to the internal DHCP client. If the internal client"
-		ewarn "works for you, and you're happy with, the alternative USE flags can be"
-		ewarn "disabled. If you want to use dhclient or dhcpcd, then you need to tweak"
-		ewarn "the main.dhcp configuration option to use one of them instead of internal."
-	fi
-}

diff --git a/net-misc/networkmanager/networkmanager-1.22.14-r1.ebuild b/net-misc/networkmanager/networkmanager-1.22.14-r1.ebuild
deleted file mode 100644
index a956d94131e..00000000000
--- a/net-misc/networkmanager/networkmanager-1.22.14-r1.ebuild
+++ /dev/null
@@ -1,342 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-GNOME_ORG_MODULE="NetworkManager"
-GNOME2_LA_PUNT="yes"
-VALA_USE_DEPEND="vapigen"
-PYTHON_COMPAT=( python3_{6,7,8} )
-
-inherit bash-completion-r1 gnome2 linux-info multilib python-any-r1 systemd readme.gentoo-r1 vala virtualx udev multilib-minimal
-
-DESCRIPTION="A set of co-operative tools that make networking simple and straightforward"
-HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
-
-LICENSE="GPL-2+"
-SLOT="0"
-
-IUSE="audit bluetooth connection-sharing dhclient dhcpcd elogind gnutls +introspection iwd json kernel_linux +nss +modemmanager ncurses ofono ovs policykit +ppp resolvconf selinux systemd teamd test vala +wext +wifi"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="
-	bluetooth? ( modemmanager )
-	iwd? ( wifi )
-	vala? ( introspection )
-	wext? ( wifi )
-	|| ( nss gnutls )
-	?? ( elogind systemd )
-"
-
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
-
-# gobject-introspection-0.10.3 is needed due to gnome bug 642300
-# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
-COMMON_DEPEND="
-	>=dev-libs/glib-2.40:2[${MULTILIB_USEDEP}]
-	policykit? ( >=sys-auth/polkit-0.106 )
-	net-libs/libndp[${MULTILIB_USEDEP}]
-	>=net-misc/curl-7.24
-	net-misc/iputils
-	sys-apps/util-linux[${MULTILIB_USEDEP}]
-	sys-libs/readline:0=
-	>=virtual/libudev-175:=[${MULTILIB_USEDEP}]
-	audit? ( sys-process/audit )
-	bluetooth? ( >=net-wireless/bluez-5 )
-	connection-sharing? (
-		net-dns/dnsmasq[dbus,dhcp]
-		net-firewall/iptables )
-	dhclient? ( >=net-misc/dhcp-4[client] )
-	dhcpcd? ( net-misc/dhcpcd )
-	elogind? ( >=sys-auth/elogind-219 )
-	introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
-	json? ( >=dev-libs/jansson-2.5[${MULTILIB_USEDEP}] )
-	modemmanager? ( >=net-misc/modemmanager-0.7.991:0=
-		net-misc/mobile-broadband-provider-info )
-	ncurses? ( >=dev-libs/newt-0.52.15 )
-	nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
-	!nss? ( gnutls? (
-		dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
-		>=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}] ) )
-	ofono? ( net-misc/ofono )
-	ovs? ( dev-libs/jansson )
-	ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] )
-	resolvconf? ( net-dns/openresolv )
-	selinux? ( sys-libs/libselinux )
-	systemd? ( >=sys-apps/systemd-209:0= )
-	teamd? (
-		dev-libs/jansson
-		>=net-misc/libteam-1.9
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	acct-group/plugdev
-	|| (
-		net-misc/iputils[arping(+)]
-		net-analyzer/arping
-	)
-	wifi? (
-		!iwd? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
-		iwd? ( net-wireless/iwd )
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	dev-util/gdbus-codegen
-	dev-util/glib-utils
-	dev-util/gtk-doc-am
-	>=dev-util/intltool-0.40
-	>=sys-devel/gettext-0.17
-	>=sys-kernel/linux-headers-3.18
-	virtual/pkgconfig
-	introspection? (
-		$(python_gen_any_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]')
-		dev-lang/perl
-		dev-libs/libxslt
-	)
-	vala? ( $(vala_depend) )
-	test? (
-		$(python_gen_any_dep '
-			dev-python/dbus-python[${PYTHON_USEDEP}]
-			dev-python/pygobject:3[${PYTHON_USEDEP}]')
-	)
-"
-
-python_check_deps() {
-	if use introspection; then
-		has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return
-	fi
-	if use test; then
-		has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
-		has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]"
-	fi
-}
-
-sysfs_deprecated_check() {
-	ebegin "Checking for SYSFS_DEPRECATED support"
-
-	if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
-		eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
-		eerror "or NetworkManager will not work correctly."
-		eerror "See https://bugs.gentoo.org/333639 for more info."
-		die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
-	fi
-	eend $?
-}
-
-pkg_pretend() {
-	if use kernel_linux; then
-		get_version
-		if linux_config_exists; then
-			sysfs_deprecated_check
-		else
-			ewarn "Was unable to determine your kernel .config"
-			ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
-			ewarn "See https://bugs.gentoo.org/333639 for more info."
-		fi
-
-	fi
-}
-
-pkg_setup() {
-	if use connection-sharing; then
-		if kernel_is lt 5 1; then
-			CONFIG_CHECK="~NF_NAT_IPV4 ~NF_NAT_MASQUERADE_IPV4"
-		else
-			CONFIG_CHECK="~NF_NAT ~NF_NAT_MASQUERADE"
-		fi
-		linux-info_pkg_setup
-	fi
-	if use introspection || use test; then
-		python-any-r1_pkg_setup
-	fi
-}
-
-src_prepare() {
-	DOC_CONTENTS="To modify system network connections without needing to enter the
-		root password, add your user account to the 'plugdev' group."
-
-	use vala && vala_src_prepare
-	gnome2_src_prepare
-}
-
-multilib_src_configure() {
-	local myconf=(
-		--disable-more-warnings
-		--disable-static
-		--localstatedir=/var
-		--with-runstatedir=/run
-		--disable-lto
-		--disable-qt
-		--without-netconfig
-		--with-dbus-sys-dir=/etc/dbus-1/system.d
-		$(multilib_native_with nmcli)
-		--with-udev-dir="$(get_udevdir)"
-		--with-config-plugins-default=keyfile
-		--with-iptables=/sbin/iptables
-		--with-ebpf=yes
-		$(multilib_native_enable concheck)
-		--with-nm-cloud-setup=$(multilib_is_native_abi && echo yes || echo no)
-		--with-crypto=$(usex nss nss gnutls)
-		# elogind lacks multilib for now, and consolekit doesn't require linking against, so we use it as a fake option
-		# This SHOULD be removable once elogind has that. We abuse the fact that 'consolekit' does nothing at buildtime.
-		# (There is no off switch, and we do not support upower.)
-		# bug #747358
-		--with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind consolekit))
-		--with-suspend-resume=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind consolekit))
-		$(multilib_native_use_with audit libaudit)
-		$(multilib_native_use_enable bluetooth bluez5-dun)
-		--without-dhcpcanon
-		$(use_with dhclient)
-		$(use_with dhcpcd)
-		--with-config-dhcp-default=internal
-		$(multilib_native_use_enable introspection)
-		$(use_enable json json-validation)
-		$(multilib_native_use_enable ppp)
-		--without-libpsl
-		$(multilib_native_use_with modemmanager modem-manager-1)
-		$(multilib_native_use_with ncurses nmtui)
-		$(multilib_native_use_with ofono)
-		$(multilib_native_use_enable ovs)
-		$(multilib_native_use_enable policykit polkit)
-		$(multilib_native_use_enable policykit polkit-agent)
-		$(multilib_native_use_with resolvconf)
-		$(multilib_native_use_with selinux)
-		$(multilib_native_use_with systemd systemd-journal)
-		$(multilib_native_use_enable teamd teamdctl)
-		$(multilib_native_use_enable test tests)
-		$(multilib_native_use_enable vala)
-		--without-valgrind
-		$(multilib_native_use_with wifi iwd)
-		$(multilib_native_use_with wext)
-		$(multilib_native_use_enable wifi)
-	)
-
-	# Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
-	if use ppp; then
-		local PPPD_VER=`best_version net-dialup/ppp`
-		PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
-		PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
-		myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
-	fi
-
-	# unit files directory needs to be passed only when systemd is enabled,
-	# otherwise systemd support is not disabled completely, bug #524534
-	use systemd && myconf+=( --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" )
-
-	if multilib_is_native_abi; then
-		# work-around man out-of-source brokenness, must be done before configure
-		ln -s "${S}/docs" docs || die
-		ln -s "${S}/man" man || die
-	fi
-
-	ECONF_SOURCE=${S} gnome2_src_configure "${myconf[@]}"
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi; then
-		emake
-	else
-		local targets=(
-			libnm/libnm.la
-		)
-		emake "${targets[@]}"
-	fi
-}
-
-multilib_src_test() {
-	if use test && multilib_is_native_abi; then
-		python_setup
-		virtx emake check
-	fi
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi; then
-		# Install completions at proper place, bug #465100
-		gnome2_src_install completiondir="$(get_bashcompdir)"
-		insinto /usr/lib/NetworkManager/conf.d #702476
-		doins "${S}"/examples/nm-conf.d/31-mac-addr-change.conf
-	else
-		local targets=(
-			install-libLTLIBRARIES
-			install-libnmincludeHEADERS
-			install-nodist_libnmincludeHEADERS
-			install-pkgconfigDATA
-		)
-		emake DESTDIR="${D}" "${targets[@]}"
-	fi
-}
-
-multilib_src_install_all() {
-	einstalldocs
-	! use systemd && readme.gentoo_create_doc
-
-	newinitd "${FILESDIR}/init.d.NetworkManager-r2" NetworkManager
-	newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
-
-	# Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
-	keepdir /etc/NetworkManager/dispatcher.d
-
-	# Provide openrc net dependency only when nm is connected
-	exeinto /etc/NetworkManager/dispatcher.d
-	newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
-	sed -e "s:@EPREFIX@:${EPREFIX}:g" \
-		-i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
-
-	keepdir /etc/NetworkManager/system-connections
-	chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
-
-	# Allow users in plugdev group to modify system connections
-	insinto /usr/share/polkit-1/rules.d/
-	doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
-
-	if use iwd; then
-		# This goes to $nmlibdir/conf.d/ and $nmlibdir is '${prefix}'/lib/$PACKAGE, thus always lib, not get_libdir
-		cat <<-EOF > "${ED%/}"/usr/lib/NetworkManager/conf.d/iwd.conf
-		[device]
-		wifi.backend=iwd
-		EOF
-	fi
-
-	# Empty
-	rmdir "${ED%/}"/var{/lib{/NetworkManager,},} || die
-}
-
-pkg_postinst() {
-	gnome2_pkg_postinst
-	systemd_reenable NetworkManager.service
-	! use systemd && readme.gentoo_print_elog
-
-	if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
-		ewarn "The ${PN} system configuration file has moved to a new location."
-		ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
-		ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
-		ewarn
-		ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
-	fi
-
-	# NM fallbacks to plugin specified at compile time (upstream bug #738611)
-	# but still show a warning to remember people to have cleaner config file
-	if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
-		if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
-			ewarn
-			ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
-			ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
-			ewarn
-		fi
-	fi
-
-	# NM shows lots of errors making nmcli almost unusable, bug #528748 upstream bug #690457
-	if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
-		ewarn "You have psk-flags=1 setting in above files, you will need to"
-		ewarn "either reconfigure affected networks or, at least, set the flag"
-		ewarn "value to '0'."
-	fi
-
-	if use dhclient || use dhcpcd; then
-		ewarn "You have enabled USE=dhclient and/or USE=dhcpcd, but NetworkManager since"
-		ewarn "version 1.20 defaults to the internal DHCP client. If the internal client"
-		ewarn "works for you, and you're happy with, the alternative USE flags can be"
-		ewarn "disabled. If you want to use dhclient or dhcpcd, then you need to tweak"
-		ewarn "the main.dhcp configuration option to use one of them instead of internal."
-	fi
-}

diff --git a/net-misc/networkmanager/networkmanager-1.24.2-r1.ebuild b/net-misc/networkmanager/networkmanager-1.24.2-r1.ebuild
deleted file mode 100644
index 3c513d596fc..00000000000
--- a/net-misc/networkmanager/networkmanager-1.24.2-r1.ebuild
+++ /dev/null
@@ -1,341 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-GNOME_ORG_MODULE="NetworkManager"
-GNOME2_LA_PUNT="yes"
-VALA_USE_DEPEND="vapigen"
-PYTHON_COMPAT=( python3_{6,7,8} )
-
-inherit bash-completion-r1 gnome2 linux-info multilib python-any-r1 systemd readme.gentoo-r1 vala virtualx udev multilib-minimal
-
-DESCRIPTION="A set of co-operative tools that make networking simple and straightforward"
-HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
-
-LICENSE="GPL-2+"
-SLOT="0"
-
-IUSE="audit bluetooth connection-sharing dhclient dhcpcd elogind gnutls +introspection iwd json kernel_linux +nss +modemmanager ncurses ofono ovs policykit +ppp resolvconf selinux systemd teamd test vala +wext +wifi"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="
-	bluetooth? ( modemmanager )
-	iwd? ( wifi )
-	vala? ( introspection )
-	wext? ( wifi )
-	|| ( nss gnutls )
-	?? ( elogind systemd )
-"
-
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
-
-# gobject-introspection-0.10.3 is needed due to gnome bug 642300
-# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
-COMMON_DEPEND="
-	>=dev-libs/glib-2.40:2[${MULTILIB_USEDEP}]
-	policykit? ( >=sys-auth/polkit-0.106 )
-	net-libs/libndp[${MULTILIB_USEDEP}]
-	>=net-misc/curl-7.24
-	net-misc/iputils
-	sys-apps/util-linux[${MULTILIB_USEDEP}]
-	sys-libs/readline:0=
-	>=virtual/libudev-175:=[${MULTILIB_USEDEP}]
-	audit? ( sys-process/audit )
-	bluetooth? ( >=net-wireless/bluez-5 )
-	connection-sharing? (
-		net-dns/dnsmasq[dbus,dhcp]
-		net-firewall/iptables )
-	dhclient? ( >=net-misc/dhcp-4[client] )
-	dhcpcd? ( net-misc/dhcpcd )
-	elogind? ( >=sys-auth/elogind-219 )
-	introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
-	json? ( >=dev-libs/jansson-2.5[${MULTILIB_USEDEP}] )
-	modemmanager? ( >=net-misc/modemmanager-0.7.991:0=
-		net-misc/mobile-broadband-provider-info )
-	ncurses? ( >=dev-libs/newt-0.52.15 )
-	nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
-	!nss? ( gnutls? (
-		dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
-		>=net-libs/gnutls-2.12:=[${MULTILIB_USEDEP}] ) )
-	ofono? ( net-misc/ofono )
-	ovs? ( dev-libs/jansson )
-	ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] )
-	resolvconf? ( net-dns/openresolv )
-	selinux? ( sys-libs/libselinux )
-	systemd? ( >=sys-apps/systemd-209:0= )
-	teamd? (
-		dev-libs/jansson
-		>=net-misc/libteam-1.9
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	acct-group/plugdev
-	|| (
-		net-misc/iputils[arping(+)]
-		net-analyzer/arping
-	)
-	wifi? (
-		!iwd? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
-		iwd? ( net-wireless/iwd )
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	dev-util/gdbus-codegen
-	dev-util/glib-utils
-	dev-util/gtk-doc-am
-	>=dev-util/intltool-0.40
-	>=sys-devel/gettext-0.17
-	>=sys-kernel/linux-headers-3.18
-	virtual/pkgconfig
-	introspection? (
-		$(python_gen_any_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]')
-		dev-lang/perl
-		dev-libs/libxslt
-	)
-	vala? ( $(vala_depend) )
-	test? (
-		$(python_gen_any_dep '
-			dev-python/dbus-python[${PYTHON_USEDEP}]
-			dev-python/pygobject:3[${PYTHON_USEDEP}]')
-	)
-"
-
-python_check_deps() {
-	if use introspection; then
-		has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return
-	fi
-	if use test; then
-		has_version "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
-		has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]"
-	fi
-}
-
-sysfs_deprecated_check() {
-	ebegin "Checking for SYSFS_DEPRECATED support"
-
-	if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
-		eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
-		eerror "or NetworkManager will not work correctly."
-		eerror "See https://bugs.gentoo.org/333639 for more info."
-		die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
-	fi
-	eend $?
-}
-
-pkg_pretend() {
-	if use kernel_linux; then
-		get_version
-		if linux_config_exists; then
-			sysfs_deprecated_check
-		else
-			ewarn "Was unable to determine your kernel .config"
-			ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
-			ewarn "See https://bugs.gentoo.org/333639 for more info."
-		fi
-
-	fi
-}
-
-pkg_setup() {
-	if use connection-sharing; then
-		if kernel_is lt 5 1; then
-			CONFIG_CHECK="~NF_NAT_IPV4 ~NF_NAT_MASQUERADE_IPV4"
-		else
-			CONFIG_CHECK="~NF_NAT ~NF_NAT_MASQUERADE"
-		fi
-		linux-info_pkg_setup
-	fi
-	if use introspection || use test; then
-		python-any-r1_pkg_setup
-	fi
-}
-
-src_prepare() {
-	DOC_CONTENTS="To modify system network connections without needing to enter the
-		root password, add your user account to the 'plugdev' group."
-
-	use vala && vala_src_prepare
-	gnome2_src_prepare
-}
-
-multilib_src_configure() {
-	local myconf=(
-		--disable-more-warnings
-		--disable-static
-		--localstatedir=/var
-		--with-runstatedir=/run
-		--disable-lto
-		--disable-qt
-		--without-netconfig
-		--with-dbus-sys-dir=/etc/dbus-1/system.d
-		$(multilib_native_with nmcli)
-		--with-udev-dir="$(get_udevdir)"
-		--with-config-plugins-default=keyfile
-		--with-iptables=/sbin/iptables
-		--with-ebpf=yes
-		$(multilib_native_enable concheck)
-		--with-nm-cloud-setup=$(multilib_is_native_abi && echo yes || echo no)
-		--with-crypto=$(usex nss nss gnutls)
-		# elogind lacks multilib for now, and consolekit doesn't require linking against, so we use it as a fake option
-		# This SHOULD be removable once elogind has that. We abuse the fact that 'consolekit' does nothing at buildtime.
-		# (There is no off switch, and we do not support upower.)
-		# bug #747358
-		--with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind consolekit))
-		--with-suspend-resume=$(multilib_native_usex systemd systemd $(multilib_native_usex elogind elogind consolekit))
-		$(multilib_native_use_with audit libaudit)
-		$(multilib_native_use_enable bluetooth bluez5-dun)
-		--without-dhcpcanon
-		$(use_with dhclient)
-		$(use_with dhcpcd)
-		--with-config-dhcp-default=internal
-		$(multilib_native_use_enable introspection)
-		$(use_enable json json-validation)
-		$(multilib_native_use_enable ppp)
-		--without-libpsl
-		$(multilib_native_use_with modemmanager modem-manager-1)
-		$(multilib_native_use_with ncurses nmtui)
-		$(multilib_native_use_with ofono)
-		$(multilib_native_use_enable ovs)
-		$(multilib_native_use_enable policykit polkit)
-		$(multilib_native_use_with resolvconf)
-		$(multilib_native_use_with selinux)
-		$(multilib_native_use_with systemd systemd-journal)
-		$(multilib_native_use_enable teamd teamdctl)
-		$(multilib_native_use_enable test tests)
-		$(multilib_native_use_enable vala)
-		--without-valgrind
-		$(multilib_native_use_with wifi iwd)
-		$(multilib_native_use_with wext)
-		$(multilib_native_use_enable wifi)
-	)
-
-	# Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
-	if use ppp; then
-		local PPPD_VER=`best_version net-dialup/ppp`
-		PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
-		PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
-		myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
-	fi
-
-	# unit files directory needs to be passed only when systemd is enabled,
-	# otherwise systemd support is not disabled completely, bug #524534
-	use systemd && myconf+=( --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" )
-
-	if multilib_is_native_abi; then
-		# work-around man out-of-source brokenness, must be done before configure
-		ln -s "${S}/docs" docs || die
-		ln -s "${S}/man" man || die
-	fi
-
-	ECONF_SOURCE=${S} gnome2_src_configure "${myconf[@]}"
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi; then
-		emake
-	else
-		local targets=(
-			libnm/libnm.la
-		)
-		emake "${targets[@]}"
-	fi
-}
-
-multilib_src_test() {
-	if use test && multilib_is_native_abi; then
-		python_setup
-		virtx emake check
-	fi
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi; then
-		# Install completions at proper place, bug #465100
-		gnome2_src_install completiondir="$(get_bashcompdir)"
-		insinto /usr/lib/NetworkManager/conf.d #702476
-		doins "${S}"/examples/nm-conf.d/31-mac-addr-change.conf
-	else
-		local targets=(
-			install-libLTLIBRARIES
-			install-libnmincludeHEADERS
-			install-nodist_libnmincludeHEADERS
-			install-pkgconfigDATA
-		)
-		emake DESTDIR="${D}" "${targets[@]}"
-	fi
-}
-
-multilib_src_install_all() {
-	einstalldocs
-	! use systemd && readme.gentoo_create_doc
-
-	newinitd "${FILESDIR}/init.d.NetworkManager-r2" NetworkManager
-	newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
-
-	# Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
-	keepdir /etc/NetworkManager/dispatcher.d
-
-	# Provide openrc net dependency only when nm is connected
-	exeinto /etc/NetworkManager/dispatcher.d
-	newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
-	sed -e "s:@EPREFIX@:${EPREFIX}:g" \
-		-i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
-
-	keepdir /etc/NetworkManager/system-connections
-	chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765, upstream bug #754594
-
-	# Allow users in plugdev group to modify system connections
-	insinto /usr/share/polkit-1/rules.d/
-	doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
-
-	if use iwd; then
-		# This goes to $nmlibdir/conf.d/ and $nmlibdir is '${prefix}'/lib/$PACKAGE, thus always lib, not get_libdir
-		cat <<-EOF > "${ED%/}"/usr/lib/NetworkManager/conf.d/iwd.conf
-		[device]
-		wifi.backend=iwd
-		EOF
-	fi
-
-	# Empty
-	rmdir "${ED%/}"/var{/lib{/NetworkManager,},} || die
-}
-
-pkg_postinst() {
-	gnome2_pkg_postinst
-	systemd_reenable NetworkManager.service
-	! use systemd && readme.gentoo_print_elog
-
-	if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
-		ewarn "The ${PN} system configuration file has moved to a new location."
-		ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
-		ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
-		ewarn
-		ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
-	fi
-
-	# NM fallbacks to plugin specified at compile time (upstream bug #738611)
-	# but still show a warning to remember people to have cleaner config file
-	if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
-		if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
-			ewarn
-			ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
-			ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
-			ewarn
-		fi
-	fi
-
-	# NM shows lots of errors making nmcli almost unusable, bug #528748 upstream bug #690457
-	if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
-		ewarn "You have psk-flags=1 setting in above files, you will need to"
-		ewarn "either reconfigure affected networks or, at least, set the flag"
-		ewarn "value to '0'."
-	fi
-
-	if use dhclient || use dhcpcd; then
-		ewarn "You have enabled USE=dhclient and/or USE=dhcpcd, but NetworkManager since"
-		ewarn "version 1.20 defaults to the internal DHCP client. If the internal client"
-		ewarn "works for you, and you're happy with, the alternative USE flags can be"
-		ewarn "disabled. If you want to use dhclient or dhcpcd, then you need to tweak"
-		ewarn "the main.dhcp configuration option to use one of them instead of internal."
-	fi
-}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/
@ 2021-01-26 15:47 Lars Wendler
  0 siblings, 0 replies; 14+ messages in thread
From: Lars Wendler @ 2021-01-26 15:47 UTC (permalink / raw
  To: gentoo-commits

commit:     65a0531d9845d46ae9da794fef7d2c4d17176255
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 26 15:31:45 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Jan 26 15:47:13 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65a0531d

net-misc/networkmanager: Revbump to add support for net-misc/dhcpcd-9

The patch is a backport of what upstream merged into master.
The only change to the official upstream patch is an adjusted NEWS file
in order to avoid a merge conflict.
This patch requires networkmanager to depend on >=dhcpcd-9.3.3 because
it calls dhcpcd with --noconfigure option which was added in 9.3.3
release.

Commit permission kindly granted by mattst88

Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/19230

 .../files/networkmanager-1.28.0-dhcpcd9.patch      | 265 +++++++++++++++++++++
 ...28.0.ebuild => networkmanager-1.28.0-r1.ebuild} |   6 +-
 2 files changed, 270 insertions(+), 1 deletion(-)

diff --git a/net-misc/networkmanager/files/networkmanager-1.28.0-dhcpcd9.patch b/net-misc/networkmanager/files/networkmanager-1.28.0-dhcpcd9.patch
new file mode 100644
index 00000000000..cfa642dd29b
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-1.28.0-dhcpcd9.patch
@@ -0,0 +1,265 @@
+From a58a89213bf4d0cefb155fef1ec9425f7a6ca5c8 Mon Sep 17 00:00:00 2001
+From: Roy Marples <roy@marples.name>
+Date: Tue, 19 Jan 2021 05:04:31 +0000
+Subject: [PATCH] DHCP: Support dhcpcd-9.x
+
+This locks NM into dhcpcd-9.3.3 as that is the first version to support
+the --noconfigure option. Older versions are no longer supported by NM
+because they do modify the host which is undesirable.
+
+Due to the way dhcpcd-9 uses privilege separation and that it re-parents
+itself to PID 1, the main process cannot be reaped or waited for.
+So we rely on dhcpcd correctly cleaning up after itself.
+A new function nm_dhcp_client_stop_watch_child() has been added
+so that dhcpcd can perform similar cleanup to the equivalent stop call.
+
+As part of this change, the STOP and STOPPED reasons are mapped to
+NM_DHCP_STATE_DONE and PREINIT is mapped to a new state NM_DHCP_STATE_NOOP
+which means NM should just ignore this state.
+
+https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/668
+---
+ NEWS                      |  3 ++
+ src/dhcp/nm-dhcp-client.c | 20 +++++++++-
+ src/dhcp/nm-dhcp-client.h |  3 ++
+ src/dhcp/nm-dhcp-dhcpcd.c | 82 ++++++++++++++++++++-------------------
+ 4 files changed, 67 insertions(+), 41 deletions(-)
+
+diff --git a/NEWS b/NEWS
+index 8a48587e5..958bbe91c 100644
+--- a/NEWS
++++ b/NEWS
+@@ -45,6 +45,9 @@ USE AT YOUR OWN RISK.  NOT RECOMMENDED FOR PRODUCTION USE!
+   cmdline argument actually generates a connection which disables both
+   ipv4 and ipv6. Previously the generated connection would disable ipv4
+   but ipv6 would be set to the 'auto' method.
++* The dhcpcd plugin now requires a minimum version of dhcpcd-9.3.3 with
++  the --noconfigure option. Using an older version will cause dhcpcd to
++  exit with a status code of 1.
+ 
+ =============================================
+ NetworkManager-1.26
+diff --git a/src/dhcp/nm-dhcp-client.c b/src/dhcp/nm-dhcp-client.c
+index 46ab48959..56f599abf 100644
+--- a/src/dhcp/nm-dhcp-client.c
++++ b/src/dhcp/nm-dhcp-client.c
+@@ -367,10 +367,13 @@ reason_to_state(NMDhcpClient *self, const char *iface, const char *reason)
+     else if (g_ascii_strcasecmp(reason, "nak") == 0 || g_ascii_strcasecmp(reason, "expire") == 0
+              || g_ascii_strcasecmp(reason, "expire6") == 0)
+         return NM_DHCP_STATE_EXPIRE;
+-    else if (g_ascii_strcasecmp(reason, "end") == 0)
++    else if (g_ascii_strcasecmp(reason, "end") == 0 || g_ascii_strcasecmp(reason, "stop") == 0
++             || g_ascii_strcasecmp(reason, "stopped") == 0)
+         return NM_DHCP_STATE_DONE;
+     else if (g_ascii_strcasecmp(reason, "fail") == 0 || g_ascii_strcasecmp(reason, "abend") == 0)
+         return NM_DHCP_STATE_FAIL;
++    else if (g_ascii_strcasecmp(reason, "preinit") == 0)
++        return NM_DHCP_STATE_NOOP;
+ 
+     _LOGD("unmapped DHCP state '%s'", reason);
+     return NM_DHCP_STATE_UNKNOWN;
+@@ -547,6 +550,18 @@ nm_dhcp_client_watch_child(NMDhcpClient *self, pid_t pid)
+     priv->watch_id = g_child_watch_add(pid, daemon_watch_cb, self);
+ }
+ 
++void
++nm_dhcp_client_stop_watch_child(NMDhcpClient *self, pid_t pid)
++{
++    NMDhcpClientPrivate *priv = NM_DHCP_CLIENT_GET_PRIVATE(self);
++
++    g_return_if_fail(priv->pid == pid);
++    priv->pid = -1;
++
++    watch_cleanup(self);
++    timeout_cleanup(self);
++}
++
+ gboolean
+ nm_dhcp_client_start_ip4(NMDhcpClient *self,
+                          GBytes *      client_id,
+@@ -874,6 +889,9 @@ nm_dhcp_client_handle_event(gpointer      unused,
+           state_to_string(new_state),
+           reason);
+ 
++    if (new_state == NM_DHCP_STATE_NOOP)
++        return TRUE;
++
+     if (NM_IN_SET(new_state, NM_DHCP_STATE_BOUND, NM_DHCP_STATE_EXTENDED)) {
+         GVariantIter iter;
+         const char * name;
+diff --git a/src/dhcp/nm-dhcp-client.h b/src/dhcp/nm-dhcp-client.h
+index 05faa9ea5..46446849a 100644
+--- a/src/dhcp/nm-dhcp-client.h
++++ b/src/dhcp/nm-dhcp-client.h
+@@ -55,6 +55,7 @@ typedef enum {
+     NM_DHCP_STATE_EXPIRE,     /* lease expired or NAKed */
+     NM_DHCP_STATE_FAIL,       /* failed for some reason */
+     NM_DHCP_STATE_TERMINATED, /* client is no longer running */
++    NM_DHCP_STATE_NOOP,       /* state is a non operation for NetworkManager */
+     __NM_DHCP_STATE_MAX,
+     NM_DHCP_STATE_MAX = __NM_DHCP_STATE_MAX - 1,
+ } NMDhcpState;
+@@ -183,6 +184,8 @@ void nm_dhcp_client_start_timeout(NMDhcpClient *self);
+ 
+ void nm_dhcp_client_watch_child(NMDhcpClient *self, pid_t pid);
+ 
++void nm_dhcp_client_stop_watch_child(NMDhcpClient *self, pid_t pid);
++
+ void nm_dhcp_client_set_state(NMDhcpClient *self,
+                               NMDhcpState   new_state,
+                               NMIPConfig *  ip_config,
+diff --git a/src/dhcp/nm-dhcp-dhcpcd.c b/src/dhcp/nm-dhcp-dhcpcd.c
+index b2b5d28bd..7cb003859 100644
+--- a/src/dhcp/nm-dhcp-dhcpcd.c
++++ b/src/dhcp/nm-dhcp-dhcpcd.c
+@@ -1,6 +1,6 @@
+ /* SPDX-License-Identifier: GPL-2.0+ */
+ /*
+- * Copyright (C) 2008 Roy Marples
++ * Copyright (C) 2008,2020 Roy Marples <roy@marples.name>
+  * Copyright (C) 2010 Dan Williams <dcbw@redhat.com>
+  */
+ 
+@@ -40,7 +40,6 @@ static GType nm_dhcp_dhcpcd_get_type(void);
+ /*****************************************************************************/
+ 
+ typedef struct {
+-    char *          pid_file;
+     NMDhcpListener *dhcp_listener;
+ } NMDhcpDhcpcdPrivate;
+ 
+@@ -71,39 +70,37 @@ ip4_start(NMDhcpClient *client,
+           const char *  last_ip4_address,
+           GError **     error)
+ {
+-    NMDhcpDhcpcd *       self                = NM_DHCP_DHCPCD(client);
+-    NMDhcpDhcpcdPrivate *priv                = NM_DHCP_DHCPCD_GET_PRIVATE(self);
+-    gs_unref_ptrarray GPtrArray *argv        = NULL;
+-    pid_t                        pid         = -1;
+-    GError *                     local       = NULL;
+-    gs_free char *               cmd_str     = NULL;
+-    gs_free char *               binary_name = NULL;
++    NMDhcpDhcpcd *    self            = NM_DHCP_DHCPCD(client);
++    gs_unref_ptrarray GPtrArray *argv = NULL;
++    pid_t                        pid;
++    GError *                     local;
++    gs_free char *               cmd_str = NULL;
+     const char *                 iface;
+     const char *                 dhcpcd_path;
+     const char *                 hostname;
+ 
+-    g_return_val_if_fail(priv->pid_file == NULL, FALSE);
++    pid = nm_dhcp_client_get_pid(client);
++    g_return_val_if_fail(pid == -1, FALSE);
+ 
+     iface = nm_dhcp_client_get_iface(client);
+ 
+-    /* dhcpcd does not allow custom pidfiles; the pidfile is always
+-     * RUNSTATEDIR "dhcpcd-<ifname>.pid".
+-     */
+-    priv->pid_file = g_strdup_printf(RUNSTATEDIR "/dhcpcd-%s.pid", iface);
+-
+     dhcpcd_path = nm_dhcp_dhcpcd_get_path();
+     if (!dhcpcd_path) {
+         nm_utils_error_set_literal(error, NM_UTILS_ERROR_UNKNOWN, "dhcpcd binary not found");
+         return FALSE;
+     }
+ 
+-    /* Kill any existing dhcpcd from the pidfile */
+-    binary_name = g_path_get_basename(dhcpcd_path);
+-    nm_dhcp_client_stop_existing(priv->pid_file, binary_name);
+-
+     argv = g_ptr_array_new();
+     g_ptr_array_add(argv, (gpointer) dhcpcd_path);
+ 
++    /* Don't configure anything, we will do that instead.
++     * This requires dhcpcd-9.3.3 or newer.
++     * Older versions only had an option not to install a default route,
++     * dhcpcd still added addresses and other routes so we no longer support that
++     * as it doesn't fit how NetworkManager wants to work.
++     */
++    g_ptr_array_add(argv, (gpointer) "--noconfigure");
++
+     g_ptr_array_add(argv, (gpointer) "-B"); /* Don't background on lease (disable fork()) */
+ 
+     g_ptr_array_add(argv, (gpointer) "-K"); /* Disable built-in carrier detection */
+@@ -113,8 +110,6 @@ ip4_start(NMDhcpClient *client,
+     /* --noarp. Don't request or claim the address by ARP; this also disables IPv4LL. */
+     g_ptr_array_add(argv, (gpointer) "-A");
+ 
+-    g_ptr_array_add(argv, (gpointer) "-G"); /* Let NM handle routing */
+-
+     g_ptr_array_add(argv, (gpointer) "-c"); /* Set script file */
+     g_ptr_array_add(argv, (gpointer) nm_dhcp_helper_path);
+ 
+@@ -146,8 +141,8 @@ ip4_start(NMDhcpClient *client,
+     if (!g_spawn_async(NULL,
+                        (char **) argv->pdata,
+                        NULL,
+-                       G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_STDOUT_TO_DEV_NULL
+-                           | G_SPAWN_STDERR_TO_DEV_NULL,
++                       G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL
++                           | G_SPAWN_DO_NOT_REAP_CHILD,
+                        nm_utils_setpgid,
+                        NULL,
+                        &pid,
+@@ -169,23 +164,32 @@ ip4_start(NMDhcpClient *client,
+ static void
+ stop(NMDhcpClient *client, gboolean release)
+ {
+-    NMDhcpDhcpcd *       self = NM_DHCP_DHCPCD(client);
+-    NMDhcpDhcpcdPrivate *priv = NM_DHCP_DHCPCD_GET_PRIVATE(self);
+-    int                  errsv;
+-
+-    NM_DHCP_CLIENT_CLASS(nm_dhcp_dhcpcd_parent_class)->stop(client, release);
+-
+-    if (priv->pid_file) {
+-        if (remove(priv->pid_file) == -1) {
+-            errsv = errno;
+-            _LOGD("could not remove dhcp pid file \"%s\": %d (%s)",
+-                  priv->pid_file,
+-                  errsv,
+-                  nm_strerror_native(errsv));
+-        }
++    NMDhcpDhcpcd *self = NM_DHCP_DHCPCD(client);
++    pid_t         pid;
++    int           sig, errsv;
++
++    pid = nm_dhcp_client_get_pid(client);
++    sig = release ? SIGALRM : SIGTERM;
++    _LOGD("sending %s to dhcpcd pid %d", sig == SIGALRM ? "SIGALRM" : "SIGTERM", pid);
++
++    /* dhcpcd-9.x features privilege separation.
++     * It's not our job to track all these processes so we rely on dhcpcd
++     * to always cleanup after itself.
++     * Because it also re-parents itself to PID 1, the process cannot be
++     * reaped or waited for.
++     * As such, just send the correct signal.
++     */
++    if (kill(pid, sig) == -1) {
++        errsv = errno;
++        _LOGE("failed to kill dhcpcd %d:%s", errsv, strerror(errsv));
+     }
+ 
+-    /* FIXME: implement release... */
++    /* When this function exits NM expects the PID to be -1.
++     * This means we also need to stop watching the pid.
++     * If we need to know the exit status then we need to refactor NM
++     * to allow a non -1 to mean we're waiting to exit still.
++     */
++    nm_dhcp_client_stop_watch_child(client, pid);
+ }
+ 
+ /*****************************************************************************/
+@@ -214,8 +218,6 @@ dispose(GObject *object)
+         g_clear_object(&priv->dhcp_listener);
+     }
+ 
+-    nm_clear_g_free(&priv->pid_file);
+-
+     G_OBJECT_CLASS(nm_dhcp_dhcpcd_parent_class)->dispose(object);
+ }
+ 
+-- 
+2.30.0
+

diff --git a/net-misc/networkmanager/networkmanager-1.28.0.ebuild b/net-misc/networkmanager/networkmanager-1.28.0-r1.ebuild
similarity index 99%
rename from net-misc/networkmanager/networkmanager-1.28.0.ebuild
rename to net-misc/networkmanager/networkmanager-1.28.0-r1.ebuild
index 58a738efe18..f4c0c507020 100644
--- a/net-misc/networkmanager/networkmanager-1.28.0.ebuild
+++ b/net-misc/networkmanager/networkmanager-1.28.0-r1.ebuild
@@ -45,7 +45,7 @@ COMMON_DEPEND="
 		net-dns/dnsmasq[dbus,dhcp]
 		net-firewall/iptables )
 	dhclient? ( >=net-misc/dhcp-4[client] )
-	dhcpcd? ( net-misc/dhcpcd )
+	dhcpcd? ( >=net-misc/dhcpcd-9.3.3 )
 	elogind? ( >=sys-auth/elogind-219 )
 	introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
 	modemmanager? ( >=net-misc/modemmanager-0.7.991:0=
@@ -100,6 +100,10 @@ BDEPEND="
 	)
 "
 
+PATCHES=(
+	"${FILESDIR}/${PN}-1.28.0-dhcpcd9.patch"
+)
+
 python_check_deps() {
 	if use introspection; then
 		has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/
@ 2024-07-18  8:06 Sam James
  0 siblings, 0 replies; 14+ messages in thread
From: Sam James @ 2024-07-18  8:06 UTC (permalink / raw
  To: gentoo-commits

commit:     89a9f94d3984f7d65caff0ddc3828fe245a7c5f9
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Wed Jul 17 23:17:19 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jul 18 08:04:40 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89a9f94d

net-misc/networkmanager: fix libsystemdless build

Apply upstream PR which ifdefs out unused and problematic functions in the
forked systemd code.

Closes: https://bugs.gentoo.org/936223
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/37595
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...rkmanager-1.48.4-fix-libsystemdless-build.patch | 62 ++++++++++++++++++++++
 .../networkmanager/networkmanager-1.48.4.ebuild    |  4 ++
 2 files changed, 66 insertions(+)

diff --git a/net-misc/networkmanager/files/networkmanager-1.48.4-fix-libsystemdless-build.patch b/net-misc/networkmanager/files/networkmanager-1.48.4-fix-libsystemdless-build.patch
new file mode 100644
index 000000000000..046d73adcb3e
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-1.48.4-fix-libsystemdless-build.patch
@@ -0,0 +1,62 @@
+https://bugs.gentoo.org/936223
+https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1559
+https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1966
+
+From 70d1c34b94baadc3305745cf159ea55f312beacc Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 7 Jun 2024 14:03:15 -0700
+Subject: [PATCH] libnm-systemd-core: Disable sd_dhcp6_client_set_duid_uuid
+ function
+
+When building on musl systems ( with out systemd ), and using LLD linker
+from LLVM project we fail to link with undefined symbols.
+
+This symbol is in sd_id128.c but its disabled, so let disable the functions
+which need this function.
+
+| x86_64-yoe-linux-musl-ld.lld: error: undefined symbol: sd_id128_get_machine_app_specific
+| >>> referenced by sd-dhcp-duid.c:202 (/usr/src/debug/networkmanager/1.48.0/../NetworkManager-1.48.0/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c:202)
+| >>>               libnm-systemd-core.a.p/src_libsystemd-network_sd-dhcp-duid.c.o:(sd_dhcp_duid_set_uuid) in archive src/libnm-systemd-core/libnm-systemd-core.a
+| x86_64-yoe-linux-musl-clang: error: linker command failed with exit code 1 (use -v to see invocation)
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c
++++ b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c
+@@ -193,6 +193,7 @@ int sd_dhcp_duid_set_en(sd_dhcp_duid *duid) {
+         return 0;
+ }
+ 
++#if 0
+ int sd_dhcp_duid_set_uuid(sd_dhcp_duid *duid) {
+         sd_id128_t machine_id;
+         int r;
+@@ -209,6 +210,7 @@ int sd_dhcp_duid_set_uuid(sd_dhcp_duid *duid) {
+         duid->size = offsetof(struct duid, uuid.uuid) + sizeof(machine_id);
+         return 0;
+ }
++#endif
+ 
+ int dhcp_duid_to_string_internal(uint16_t type, const void *data, size_t data_size, char **ret) {
+         _cleanup_free_ char *p = NULL, *x = NULL;
+--- a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c
++++ b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c
+@@ -244,6 +244,7 @@ int sd_dhcp6_client_set_duid_en(sd_dhcp6_client *client) {
+         return 0;
+ }
+ 
++#if 0
+ int sd_dhcp6_client_set_duid_uuid(sd_dhcp6_client *client) {
+         int r;
+ 
+@@ -256,7 +257,7 @@ int sd_dhcp6_client_set_duid_uuid(sd_dhcp6_client *client) {
+ 
+         return 0;
+ }
+-
++#endif
+ int sd_dhcp6_client_set_duid_raw(sd_dhcp6_client *client, uint16_t duid_type, const uint8_t *duid, size_t duid_len) {
+         int r;
+ 
+-- 
+GitLab
+

diff --git a/net-misc/networkmanager/networkmanager-1.48.4.ebuild b/net-misc/networkmanager/networkmanager-1.48.4.ebuild
index c2f656d25ebd..110098ab67bb 100644
--- a/net-misc/networkmanager/networkmanager-1.48.4.ebuild
+++ b/net-misc/networkmanager/networkmanager-1.48.4.ebuild
@@ -122,6 +122,10 @@ BDEPEND="
 	)
 "
 
+PATCHES=(
+	"${FILESDIR}"/networkmanager-1.48.4-fix-libsystemdless-build.patch
+)
+
 python_check_deps() {
 	if use introspection; then
 		python_has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-07-18  8:06 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-11 21:44 [gentoo-commits] repo/gentoo:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/ Mart Raudsepp
  -- strict thread matches above, loose matches on Subject: below --
2024-07-18  8:06 Sam James
2021-01-26 15:47 Lars Wendler
2020-04-26  8:09 Mart Raudsepp
2020-01-19 19:29 Mart Raudsepp
2017-06-03 21:32 Mike Gilbert
2017-01-21 15:35 Pacho Ramos
2016-09-29 18:31 Pacho Ramos
2016-09-17 14:28 Pacho Ramos
2016-07-09 18:39 Pacho Ramos
2016-07-08 20:44 Alexandre Rostovtsev
2016-04-16 11:13 Pacho Ramos
2015-10-03 11:53 Pacho Ramos
2015-09-05 10:33 Pacho Ramos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox