public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/gnome:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/
@ 2011-02-28  7:48 Nirbheek Chauhan
  0 siblings, 0 replies; 6+ messages in thread
From: Nirbheek Chauhan @ 2011-02-28  7:48 UTC (permalink / raw
  To: gentoo-commits

commit:     8f065063968ba60c2e4fe5169e7dbed5b9733464
Author:     Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 28 07:32:47 2011 +0000
Commit:     Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
CommitDate: Mon Feb 28 07:34:48 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=8f065063

net-misc/networkmanager: patch is no longer needed

* https://bugzilla.gnome.org/show_bug.cgi?id=643011

---
 .../files/networkmanager-more-gi-annotations.patch |   43 --------------------
 net-misc/networkmanager/networkmanager-9999.ebuild |    3 -
 2 files changed, 0 insertions(+), 46 deletions(-)

diff --git a/net-misc/networkmanager/files/networkmanager-more-gi-annotations.patch b/net-misc/networkmanager/files/networkmanager-more-gi-annotations.patch
deleted file mode 100644
index e6bac7d..0000000
--- a/net-misc/networkmanager/files/networkmanager-more-gi-annotations.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From a420d59ea24a1eb82a7c1dc96e3cf5b38b0fd757 Mon Sep 17 00:00:00 2001
-From: Giovanni Campagna <gcampagna@src.gnome.org>
-Date: Tue, 22 Feb 2011 23:34:41 +0100
-Subject: [PATCH] libnm-util: another introspection annotation
-
-nm_utils_ssid_to_utf8 has gchar* in the signature, but it accepts
-an array of bytes, not a string. Fix with the appropriate
-annotation.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=643011
----
- libnm-util/nm-utils.c |    9 +++++----
- 1 files changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/libnm-util/nm-utils.c b/libnm-util/nm-utils.c
-index 87c5d5f..c2134db 100644
---- a/libnm-util/nm-utils.c
-+++ b/libnm-util/nm-utils.c
-@@ -304,7 +304,8 @@ nm_utils_deinit (void)
- 
- /**
-  * nm_utils_ssid_to_utf8:
-- * @ssid: pointer to a buffer containing the SSID data
-+ * @ssid: (array length=len) (element-type guint8): pointer to a buffer
-+ *   containing the SSID data
-  * @len: length of the SSID data in @ssid
-  *
-  * WiFi SSIDs are byte arrays, they are _not_ strings.  Thus, an SSID may
-@@ -330,9 +331,9 @@ nm_utils_deinit (void)
-  * Again, this function should be used for debugging and display purposes
-  * _only_.
-  *
-- * Returns: an allocated string containing a UTF-8 representation of the
-- * SSID, which must be freed by the caller using g_free().  Returns NULL
-- * on errors.
-+ * Returns: (transfer full): an allocated string containing a UTF-8 representation
-+ *   of the SSID, which must be freed by the caller using g_free().  Returns
-+ *   NULL on errors.
-  **/
- char *
- nm_utils_ssid_to_utf8 (const char *ssid, guint32 len)
--- 
-1.7.4
\ No newline at end of file

diff --git a/net-misc/networkmanager/networkmanager-9999.ebuild b/net-misc/networkmanager/networkmanager-9999.ebuild
index a058ad6..0cf3ed6 100644
--- a/net-misc/networkmanager/networkmanager-9999.ebuild
+++ b/net-misc/networkmanager/networkmanager-9999.ebuild
@@ -134,9 +134,6 @@ src_prepare() {
 	# FIXME: does not apply
 	#epatch "${FILESDIR}/${PN}-0.8.2-shared-connection.patch"
 
-	# https://bugzilla.gnome.org/show_bug.cgi?id=643011
-	epatch "${FILESDIR}/${PN}-more-gi-annotations.patch"
-
 	gnome2_src_prepare
 }
 



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

* [gentoo-commits] proj/gnome:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/
@ 2011-10-23 23:19 Alexandre Restovtsev
  0 siblings, 0 replies; 6+ messages in thread
From: Alexandre Restovtsev @ 2011-10-23 23:19 UTC (permalink / raw
  To: gentoo-commits

commit:     17226d284963aeea7375a79d2cabce4028c543b8
Author:     Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 23 23:14:12 2011 +0000
Commit:     Alexandre Restovtsev <tetromino <AT> gmail <DOT> com>
CommitDate: Sun Oct 23 23:18:40 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=17226d28

net-misc/networkmanager: allow users in 'plugdev' group to modify system connections

This should prevent the extremely annoying situation when a dropped
wireless connection immediately results in gnome-shell blocking the
screen and asking for the root password.

Thanks to Samuli Suominen for the solution.

---
 ...ktop.NetworkManager.settings.modify.system.pkla |    6 ++++++
 ...90.ebuild => networkmanager-0.9.1.90-r1.ebuild} |   13 +++++++++++++
 2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.pkla b/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.pkla
new file mode 100644
index 0000000..d443327
--- /dev/null
+++ b/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.pkla
@@ -0,0 +1,6 @@
+[Let users in plugdev group modify NetworkManager]
+Identity=unix-group:plugdev
+Action=org.freedesktop.NetworkManager.settings.modify.system
+ResultAny=no
+ResultInactive=no
+ResultActive=yes
\ No newline at end of file

diff --git a/net-misc/networkmanager/networkmanager-0.9.1.90.ebuild b/net-misc/networkmanager/networkmanager-0.9.1.90-r1.ebuild
similarity index 90%
rename from net-misc/networkmanager/networkmanager-0.9.1.90.ebuild
rename to net-misc/networkmanager/networkmanager-0.9.1.90-r1.ebuild
index 73ea51e..1d0734b 100644
--- a/net-misc/networkmanager/networkmanager-0.9.1.90.ebuild
+++ b/net-misc/networkmanager/networkmanager-0.9.1.90-r1.ebuild
@@ -84,6 +84,10 @@ pkg_pretend() {
 	fi
 }
 
+pkg_setup() {
+	enewgroup plugdev
+}
+
 src_prepare() {
 	# Don't build tests
 	epatch "${FILESDIR}/${PN}-0.9_rc3-fix-tests.patch"
@@ -133,6 +137,15 @@ src_install() {
 	insinto /etc/NetworkManager
 	newins "${FILESDIR}/nm-system-settings.conf-ifnet" nm-system-settings.conf
 
+	# Allow users in plugdev group to modify system connections
+	insinto /etc/polkit-1/localauthority/10-vendor.d
+	doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.pkla"
+
 	# Remove useless .la files
 	find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed"
 }
+
+pkg_postinst() {
+	elog "To modify system network connections without needing to enter the"
+	elog "root password, add your user account to the 'plugdev' group."
+}



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

* [gentoo-commits] proj/gnome:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/
@ 2011-10-26 23:49 Alexandre Restovtsev
  0 siblings, 0 replies; 6+ messages in thread
From: Alexandre Restovtsev @ 2011-10-26 23:49 UTC (permalink / raw
  To: gentoo-commits

commit:     60325139d8bcdc47c2cea70664e480ec30fe7bcd
Author:     Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 26 23:45:09 2011 +0000
Commit:     Alexandre Restovtsev <tetromino <AT> gmail <DOT> com>
CommitDate: Wed Oct 26 23:45:09 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=60325139

net-misc/networkmanager: build against libnl3 (#388609)

Build against libnl3 now that it has been unmasked, since nm
automagically detects the libnl version. Add some upstream patches to
allow libnl3 to be detected correctly. Add a patch to consistently use
linux/if.h instead of net/if.h (a good idea in general, and not doing so
leads to build failure with libnl3). Fixes bug #388609, thanks to
Yellowhat <yellowhat46 <AT> gmail.com> for reporting.

---
 .../files/networkmanager-0.9.1.90-if.h.patch       |  117 ++++++++++++++++++++
 .../networkmanager-0.9.1.90-libnl-check-1.patch    |   67 +++++++++++
 .../networkmanager-0.9.1.90-libnl-check-2.patch    |   26 +++++
 .../networkmanager-0.9.1.90-libnl-check-3.patch    |   31 +++++
 ...r1.ebuild => networkmanager-0.9.1.90-r2.ebuild} |    6 +-
 5 files changed, 246 insertions(+), 1 deletions(-)

diff --git a/net-misc/networkmanager/files/networkmanager-0.9.1.90-if.h.patch b/net-misc/networkmanager/files/networkmanager-0.9.1.90-if.h.patch
new file mode 100644
index 0000000..2078569
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-0.9.1.90-if.h.patch
@@ -0,0 +1,117 @@
+commit 00f2b0a9bb806be64c5868af44f43dbe55bdd75b
+Author: Thomas Graf <tgraf@redhat.com>
+Date:   Fri Sep 23 13:46:41 2011 +0200
+
+    core: Include <linux/if.h> instead of <net/if.h>
+    
+    NM already includes <linux/if.h> in some places, f.e. nm-netlink-monitor and
+    we can't mix usage of the two. Stick to using <linux/if.h> as it provides
+    additional flag definitions such as operational link state and link mode.
+    
+    Signed-off-by: Thomas Graf <tgraf@redhat.com>
+    
+    [ Alexandre Rostovtsev <tetromino@gentoo.org>: remove parts of commit
+    unrelated to if.h changes. ]
+
+diff --git a/include/wireless-helper.h b/include/wireless-helper.h
+index d150ef7..2e4509a 100644
+--- a/include/wireless-helper.h
++++ b/include/wireless-helper.h
+@@ -27,6 +27,6 @@
+ #include <sys/types.h>
+ #include <linux/types.h>
+ #include <sys/socket.h>
+-#include <net/if.h>
++#include <linux/if.h>
+ #include <wireless.h>
+ 
+diff --git a/src/nm-device.c b/src/nm-device.c
+index c0b1b87..559606c 100644
+--- a/src/nm-device.c
++++ b/src/nm-device.c
+@@ -25,7 +25,6 @@
+ #include <dbus/dbus.h>
+ #include <netinet/in.h>
+ #include <string.h>
+-#include <net/if.h>
+ #include <unistd.h>
+ #include <errno.h>
+ #include <sys/ioctl.h>
+@@ -34,6 +33,7 @@
+ #include <sys/wait.h>
+ #include <arpa/inet.h>
+ #include <fcntl.h>
++#include <linux/if.h>
+ 
+ #include "nm-glib-compat.h"
+ #include "nm-device-interface.h"
+diff --git a/src/nm-system.c b/src/nm-system.c
+index 0b29468..473fcec 100644
+--- a/src/nm-system.c
++++ b/src/nm-system.c
+@@ -40,7 +40,7 @@
+ #include <netdb.h>
+ #include <glib.h>
+ #include <ctype.h>
+-#include <net/if.h>
++#include <linux/if.h>
+ 
+ #include "nm-system.h"
+ #include "nm-device.h"
+diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c
+index 522c075..3546f8d 100644
+--- a/src/ppp-manager/nm-ppp-manager.c
++++ b/src/ppp-manager/nm-ppp-manager.c
+@@ -32,7 +32,7 @@
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+ #include <asm/types.h>
+-#include <net/if.h>
++#include <linux/if.h>
+ #include <sys/stat.h>
+ 
+ #include <linux/ppp_defs.h>
+diff --git a/src/settings/plugins/ifcfg-rh/reader.c b/src/settings/plugins/ifcfg-rh/reader.c
+index 691a176..910cca3 100644
+--- a/src/settings/plugins/ifcfg-rh/reader.c
++++ b/src/settings/plugins/ifcfg-rh/reader.c
+@@ -28,10 +28,10 @@
+ #include <ctype.h>
+ #include <sys/inotify.h>
+ #include <errno.h>
+-#include <net/if.h>
+ #include <sys/ioctl.h>
+ #include <unistd.h>
+ #include <netinet/ether.h>
++#include <linux/if.h>
+ 
+ #ifndef __user
+ #define __user
+diff --git a/src/wimax/iwmxsdk.c b/src/wimax/iwmxsdk.c
+index ff6b553..9c3a78b 100644
+--- a/src/wimax/iwmxsdk.c
++++ b/src/wimax/iwmxsdk.c
+@@ -27,7 +27,8 @@
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+-#include <net/if.h>
++#include <sys/socket.h>
++#include <linux/if.h>
+ 
+ #include <glib.h>
+ 
+diff --git a/src/wimax/nm-device-wimax.c b/src/wimax/nm-device-wimax.c
+index b6afc27..6654140 100644
+--- a/src/wimax/nm-device-wimax.c
++++ b/src/wimax/nm-device-wimax.c
+@@ -23,7 +23,8 @@
+ #include <unistd.h>
+ #include <sys/ioctl.h>
+ #include <net/ethernet.h>
+-#include <net/if.h>
++#include <sys/socket.h>
++#include <linux/if.h>
+ 
+ #include <WiMaxAPI.h>
+ #include <WiMaxAPIEx.h>

diff --git a/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-1.patch b/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-1.patch
new file mode 100644
index 0000000..1c6785b
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-1.patch
@@ -0,0 +1,67 @@
+commit 6764711cc910d557b75b632d8c83a2d302e32051
+Author: Thomas Graf <tgraf@redhat.com>
+Date:   Fri Sep 23 12:52:39 2011 +0200
+
+    configure: Only check for older libnl versions if newer is unavailable
+    
+    More recent libnl versions can be installed in parallel. Therefore it is
+    possible for more than one libnl check to pass successful. The way
+    the #ifdefs are done this results in code for multiple libnl versions
+    to be included.
+    
+    Signed-off-by: Thomas Graf <tgraf@redhat.com>
+
+diff --git a/configure.ac b/configure.ac
+index 117dd91..57e3aea 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -314,24 +314,6 @@ fi
+ AC_DEFINE_UNQUOTED(NO_CONSOLEKIT, $no_ck, [Define to disable use of ConsoleKit])
+ 
+ have_libnl="no"
+-PKG_CHECK_MODULES(LIBNL1, libnl-1 >= 1.0-pre8, [have_libnl1=yes], [have_libnl1=no])
+-if (test "${have_libnl1}" = "yes"); then
+-	AC_DEFINE(HAVE_LIBNL1, 1, [Define if you require libnl-1 legacy support])
+-	LIBNL_CFLAGS="$LIBNL1_CFLAGS"
+-	LIBNL_LIBS="$LIBNL1_LIBS"
+-	libnl_version="1"
+-	have_libnl="yes"
+-fi
+-
+-PKG_CHECK_MODULES(LIBNL2, libnl-2.0, [have_libnl2=yes], [have_libnl2=no])
+-if (test "${have_libnl2}" = "yes"); then
+-	AC_DEFINE(HAVE_LIBNL2, 1, [Define if you require specific libnl-2 support])
+-	LIBNL_CFLAGS="$LIBNL2_CFLAGS"
+-	LIBNL_LIBS="$LIBNL2_LIBS"
+-	libnl_version="2"
+-	have_libnl="yes"
+-fi
+-
+ PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [have_libnl2=yes], [have_libnl2=no])
+ if (test "${have_libnl2}" = "yes"); then
+ 	AC_DEFINE(HAVE_LIBNL3, 1, [Define if you require specific libnl-3 support])
+@@ -339,6 +321,24 @@ if (test "${have_libnl2}" = "yes"); then
+ 	LIBNL_LIBS="$LIBNL3_LIBS"
+ 	libnl_version="3"
+ 	have_libnl="yes"
++else
++	PKG_CHECK_MODULES(LIBNL2, libnl-2.0, [have_libnl2=yes], [have_libnl2=no])
++	if (test "${have_libnl2}" = "yes"); then
++		AC_DEFINE(HAVE_LIBNL2, 1, [Define if you require specific libnl-2 support])
++		LIBNL_CFLAGS="$LIBNL2_CFLAGS"
++		LIBNL_LIBS="$LIBNL2_LIBS"
++		libnl_version="2"
++		have_libnl="yes"
++	else
++		PKG_CHECK_MODULES(LIBNL1, libnl-1 >= 1.0-pre8, [have_libnl1=yes], [have_libnl1=no])
++		if (test "${have_libnl1}" = "yes"); then
++			AC_DEFINE(HAVE_LIBNL1, 1, [Define if you require libnl-1 legacy support])
++			LIBNL_CFLAGS="$LIBNL1_CFLAGS"
++			LIBNL_LIBS="$LIBNL1_LIBS"
++			libnl_version="1"
++			have_libnl="yes"
++		fi
++	fi
+ fi
+ 
+ if (test "${have_libnl}" = "no"); then

diff --git a/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-2.patch b/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-2.patch
new file mode 100644
index 0000000..06cfc57
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-2.patch
@@ -0,0 +1,26 @@
+commit fcc128516e3c3d81773fbdee76d684ad93cb5071
+Author: Thomas Graf <tgraf@redhat.com>
+Date:   Fri Sep 23 12:58:54 2011 +0200
+
+    configure: Fix typo in libnl3 check
+    
+    Check for libnl3 sets $have_libnl2 variable instead of $have_libnl3. Mostly a
+    cosmetic fix since the only usage also has the typo in it.
+    
+    Signed-off-by: Thomas Graf <tgraf@redhat.com>
+
+diff --git a/configure.ac b/configure.ac
+index 57e3aea..8b6782a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -314,8 +314,8 @@ fi
+ AC_DEFINE_UNQUOTED(NO_CONSOLEKIT, $no_ck, [Define to disable use of ConsoleKit])
+ 
+ have_libnl="no"
+-PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [have_libnl2=yes], [have_libnl2=no])
+-if (test "${have_libnl2}" = "yes"); then
++PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [have_libnl3=yes], [have_libnl3=no])
++if (test "${have_libnl3}" = "yes"); then
+ 	AC_DEFINE(HAVE_LIBNL3, 1, [Define if you require specific libnl-3 support])
+ 	LIBNL_CFLAGS="$LIBNL3_CFLAGS"
+ 	LIBNL_LIBS="$LIBNL3_LIBS"

diff --git a/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-3.patch b/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-3.patch
new file mode 100644
index 0000000..c439701
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-3.patch
@@ -0,0 +1,31 @@
+commit 61099e30f6814f9f4428f5be682aeb1d5cff33f2
+Author: Thomas Graf <tgraf@redhat.com>
+Date:   Fri Sep 23 13:43:01 2011 +0200
+
+    configure: Check for libnl-route-3 package
+    
+    NM not only depends on libnl but also on libnl-route. Therefore check for the
+    corresponding pkg-config file and use its CFLAGS and LIBS. Otherwise fall
+    back to using libnl-2 or libnl-1.
+    
+    Signed-off-by: Thomas Graf <tgraf@redhat.com>
+
+diff --git a/configure.ac b/configure.ac
+index 8b6782a..932164b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -315,10 +315,11 @@ AC_DEFINE_UNQUOTED(NO_CONSOLEKIT, $no_ck, [Define to disable use of ConsoleKit])
+ 
+ have_libnl="no"
+ PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [have_libnl3=yes], [have_libnl3=no])
+-if (test "${have_libnl3}" = "yes"); then
++PKG_CHECK_MODULES(LIBNL_ROUTE3, libnl-route-3.0, [have_libnl_route3=yes], [have_libnl_route3=no])
++if (test "${have_libnl3}" = "yes" -a "${have_libnl_route3}" = "yes"); then
+ 	AC_DEFINE(HAVE_LIBNL3, 1, [Define if you require specific libnl-3 support])
+-	LIBNL_CFLAGS="$LIBNL3_CFLAGS"
+-	LIBNL_LIBS="$LIBNL3_LIBS"
++	LIBNL_CFLAGS="$LIBNL3_CFLAGS $LIBNL_ROUTE3_CFLAGS"
++	LIBNL_LIBS="$LIBNL3_LIBS $LIBNL_ROUTE3_LIBS"
+ 	libnl_version="3"
+ 	have_libnl="yes"
+ else

diff --git a/net-misc/networkmanager/networkmanager-0.9.1.90-r1.ebuild b/net-misc/networkmanager/networkmanager-0.9.1.90-r2.ebuild
similarity index 94%
rename from net-misc/networkmanager/networkmanager-0.9.1.90-r1.ebuild
rename to net-misc/networkmanager/networkmanager-0.9.1.90-r2.ebuild
index 1d0734b..1568963 100644
--- a/net-misc/networkmanager/networkmanager-0.9.1.90-r1.ebuild
+++ b/net-misc/networkmanager/networkmanager-0.9.1.90-r2.ebuild
@@ -29,7 +29,7 @@ COMMON_DEPEND=">=sys-apps/dbus-1.2
 	|| ( >=sys-fs/udev-171[gudev] >=sys-fs/udev-147[extras] )
 	>=dev-libs/glib-2.26
 	>=sys-auth/polkit-0.97
-	>=dev-libs/libnl-1.1
+	dev-libs/libnl:3
 	>=net-wireless/wpa_supplicant-0.7.3-r3[dbus]
 	bluetooth? ( >=net-wireless/bluez-4.82 )
 	avahi? ( net-dns/avahi[autoipd] )
@@ -91,6 +91,10 @@ pkg_setup() {
 src_prepare() {
 	# Don't build tests
 	epatch "${FILESDIR}/${PN}-0.9_rc3-fix-tests.patch"
+	# Fix libnl detection, will be in next release
+	epatch "${FILESDIR}/${P}-libnl-check-"{1,2,3}.patch
+	# Fix <linux/if.h> & <net/if.h> conflict, in next release (bug #388609)
+	epatch "${FILESDIR}/${P}-if.h.patch"
 	# Fix rfkill handling, will be in next release
 	epatch "${FILESDIR}/${P}-rfkill.patch"
 	eautoreconf



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

* [gentoo-commits] proj/gnome:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/
@ 2011-10-27  2:44 Alexandre Restovtsev
  0 siblings, 0 replies; 6+ messages in thread
From: Alexandre Restovtsev @ 2011-10-27  2:44 UTC (permalink / raw
  To: gentoo-commits

commit:     edb312863255b2e4ee69a1f0818d83aa83fa8987
Author:     Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 27 02:42:42 2011 +0000
Commit:     Alexandre Restovtsev <tetromino <AT> gmail <DOT> com>
CommitDate: Thu Oct 27 02:42:42 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=edb31286

net-misc/networkmanager: force building against libnl:1.1

Build against libnl:1.1. Otherwise, networkmanager[wimax] will link to
libnl-3.so and to libiWmxSdk from wimax-1.5.2 which links to libnl.so,
and explode at runtime due to symbol collisions.

---
 .../networkmanager-0.9.1.90-force-libnl1.1.patch   |   33 ++++++++++
 .../networkmanager-0.9.1.90-libnl-check-1.patch    |   67 --------------------
 .../networkmanager-0.9.1.90-libnl-check-2.patch    |   26 --------
 .../networkmanager-0.9.1.90-libnl-check-3.patch    |   31 ---------
 ...r2.ebuild => networkmanager-0.9.1.90-r3.ebuild} |    8 ++-
 5 files changed, 38 insertions(+), 127 deletions(-)

diff --git a/net-misc/networkmanager/files/networkmanager-0.9.1.90-force-libnl1.1.patch b/net-misc/networkmanager/files/networkmanager-0.9.1.90-force-libnl1.1.patch
new file mode 100644
index 0000000..e4da7b3
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-0.9.1.90-force-libnl1.1.patch
@@ -0,0 +1,33 @@
+Build against libnl:1.1 only. Otherwise, networkmanager will link to
+libnl-3.so and to libiWmxSdk (from wimax-1.5.2) which links to libnl.so,
+and then explode spectacularly at runtime due to symbol collisions.
+
+diff --git a/configure.ac b/configure.ac
+index 117dd91..b8b11de 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -323,24 +323,6 @@ if (test "${have_libnl1}" = "yes"); then
+ 	have_libnl="yes"
+ fi
+ 
+-PKG_CHECK_MODULES(LIBNL2, libnl-2.0, [have_libnl2=yes], [have_libnl2=no])
+-if (test "${have_libnl2}" = "yes"); then
+-	AC_DEFINE(HAVE_LIBNL2, 1, [Define if you require specific libnl-2 support])
+-	LIBNL_CFLAGS="$LIBNL2_CFLAGS"
+-	LIBNL_LIBS="$LIBNL2_LIBS"
+-	libnl_version="2"
+-	have_libnl="yes"
+-fi
+-
+-PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [have_libnl2=yes], [have_libnl2=no])
+-if (test "${have_libnl2}" = "yes"); then
+-	AC_DEFINE(HAVE_LIBNL3, 1, [Define if you require specific libnl-3 support])
+-	LIBNL_CFLAGS="$LIBNL3_CFLAGS"
+-	LIBNL_LIBS="$LIBNL3_LIBS"
+-	libnl_version="3"
+-	have_libnl="yes"
+-fi
+-
+ if (test "${have_libnl}" = "no"); then
+ 	AC_MSG_ERROR([libnl development header are required])
+ fi

diff --git a/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-1.patch b/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-1.patch
deleted file mode 100644
index 1c6785b..0000000
--- a/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-1.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-commit 6764711cc910d557b75b632d8c83a2d302e32051
-Author: Thomas Graf <tgraf@redhat.com>
-Date:   Fri Sep 23 12:52:39 2011 +0200
-
-    configure: Only check for older libnl versions if newer is unavailable
-    
-    More recent libnl versions can be installed in parallel. Therefore it is
-    possible for more than one libnl check to pass successful. The way
-    the #ifdefs are done this results in code for multiple libnl versions
-    to be included.
-    
-    Signed-off-by: Thomas Graf <tgraf@redhat.com>
-
-diff --git a/configure.ac b/configure.ac
-index 117dd91..57e3aea 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -314,24 +314,6 @@ fi
- AC_DEFINE_UNQUOTED(NO_CONSOLEKIT, $no_ck, [Define to disable use of ConsoleKit])
- 
- have_libnl="no"
--PKG_CHECK_MODULES(LIBNL1, libnl-1 >= 1.0-pre8, [have_libnl1=yes], [have_libnl1=no])
--if (test "${have_libnl1}" = "yes"); then
--	AC_DEFINE(HAVE_LIBNL1, 1, [Define if you require libnl-1 legacy support])
--	LIBNL_CFLAGS="$LIBNL1_CFLAGS"
--	LIBNL_LIBS="$LIBNL1_LIBS"
--	libnl_version="1"
--	have_libnl="yes"
--fi
--
--PKG_CHECK_MODULES(LIBNL2, libnl-2.0, [have_libnl2=yes], [have_libnl2=no])
--if (test "${have_libnl2}" = "yes"); then
--	AC_DEFINE(HAVE_LIBNL2, 1, [Define if you require specific libnl-2 support])
--	LIBNL_CFLAGS="$LIBNL2_CFLAGS"
--	LIBNL_LIBS="$LIBNL2_LIBS"
--	libnl_version="2"
--	have_libnl="yes"
--fi
--
- PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [have_libnl2=yes], [have_libnl2=no])
- if (test "${have_libnl2}" = "yes"); then
- 	AC_DEFINE(HAVE_LIBNL3, 1, [Define if you require specific libnl-3 support])
-@@ -339,6 +321,24 @@ if (test "${have_libnl2}" = "yes"); then
- 	LIBNL_LIBS="$LIBNL3_LIBS"
- 	libnl_version="3"
- 	have_libnl="yes"
-+else
-+	PKG_CHECK_MODULES(LIBNL2, libnl-2.0, [have_libnl2=yes], [have_libnl2=no])
-+	if (test "${have_libnl2}" = "yes"); then
-+		AC_DEFINE(HAVE_LIBNL2, 1, [Define if you require specific libnl-2 support])
-+		LIBNL_CFLAGS="$LIBNL2_CFLAGS"
-+		LIBNL_LIBS="$LIBNL2_LIBS"
-+		libnl_version="2"
-+		have_libnl="yes"
-+	else
-+		PKG_CHECK_MODULES(LIBNL1, libnl-1 >= 1.0-pre8, [have_libnl1=yes], [have_libnl1=no])
-+		if (test "${have_libnl1}" = "yes"); then
-+			AC_DEFINE(HAVE_LIBNL1, 1, [Define if you require libnl-1 legacy support])
-+			LIBNL_CFLAGS="$LIBNL1_CFLAGS"
-+			LIBNL_LIBS="$LIBNL1_LIBS"
-+			libnl_version="1"
-+			have_libnl="yes"
-+		fi
-+	fi
- fi
- 
- if (test "${have_libnl}" = "no"); then

diff --git a/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-2.patch b/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-2.patch
deleted file mode 100644
index 06cfc57..0000000
--- a/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-2.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-commit fcc128516e3c3d81773fbdee76d684ad93cb5071
-Author: Thomas Graf <tgraf@redhat.com>
-Date:   Fri Sep 23 12:58:54 2011 +0200
-
-    configure: Fix typo in libnl3 check
-    
-    Check for libnl3 sets $have_libnl2 variable instead of $have_libnl3. Mostly a
-    cosmetic fix since the only usage also has the typo in it.
-    
-    Signed-off-by: Thomas Graf <tgraf@redhat.com>
-
-diff --git a/configure.ac b/configure.ac
-index 57e3aea..8b6782a 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -314,8 +314,8 @@ fi
- AC_DEFINE_UNQUOTED(NO_CONSOLEKIT, $no_ck, [Define to disable use of ConsoleKit])
- 
- have_libnl="no"
--PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [have_libnl2=yes], [have_libnl2=no])
--if (test "${have_libnl2}" = "yes"); then
-+PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [have_libnl3=yes], [have_libnl3=no])
-+if (test "${have_libnl3}" = "yes"); then
- 	AC_DEFINE(HAVE_LIBNL3, 1, [Define if you require specific libnl-3 support])
- 	LIBNL_CFLAGS="$LIBNL3_CFLAGS"
- 	LIBNL_LIBS="$LIBNL3_LIBS"

diff --git a/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-3.patch b/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-3.patch
deleted file mode 100644
index c439701..0000000
--- a/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-3.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-commit 61099e30f6814f9f4428f5be682aeb1d5cff33f2
-Author: Thomas Graf <tgraf@redhat.com>
-Date:   Fri Sep 23 13:43:01 2011 +0200
-
-    configure: Check for libnl-route-3 package
-    
-    NM not only depends on libnl but also on libnl-route. Therefore check for the
-    corresponding pkg-config file and use its CFLAGS and LIBS. Otherwise fall
-    back to using libnl-2 or libnl-1.
-    
-    Signed-off-by: Thomas Graf <tgraf@redhat.com>
-
-diff --git a/configure.ac b/configure.ac
-index 8b6782a..932164b 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -315,10 +315,11 @@ AC_DEFINE_UNQUOTED(NO_CONSOLEKIT, $no_ck, [Define to disable use of ConsoleKit])
- 
- have_libnl="no"
- PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [have_libnl3=yes], [have_libnl3=no])
--if (test "${have_libnl3}" = "yes"); then
-+PKG_CHECK_MODULES(LIBNL_ROUTE3, libnl-route-3.0, [have_libnl_route3=yes], [have_libnl_route3=no])
-+if (test "${have_libnl3}" = "yes" -a "${have_libnl_route3}" = "yes"); then
- 	AC_DEFINE(HAVE_LIBNL3, 1, [Define if you require specific libnl-3 support])
--	LIBNL_CFLAGS="$LIBNL3_CFLAGS"
--	LIBNL_LIBS="$LIBNL3_LIBS"
-+	LIBNL_CFLAGS="$LIBNL3_CFLAGS $LIBNL_ROUTE3_CFLAGS"
-+	LIBNL_LIBS="$LIBNL3_LIBS $LIBNL_ROUTE3_LIBS"
- 	libnl_version="3"
- 	have_libnl="yes"
- else

diff --git a/net-misc/networkmanager/networkmanager-0.9.1.90-r2.ebuild b/net-misc/networkmanager/networkmanager-0.9.1.90-r3.ebuild
similarity index 94%
rename from net-misc/networkmanager/networkmanager-0.9.1.90-r2.ebuild
rename to net-misc/networkmanager/networkmanager-0.9.1.90-r3.ebuild
index 1568963..496b53b 100644
--- a/net-misc/networkmanager/networkmanager-0.9.1.90-r2.ebuild
+++ b/net-misc/networkmanager/networkmanager-0.9.1.90-r3.ebuild
@@ -22,6 +22,8 @@ REQUIRED_USE="
 
 # gobject-introspection-0.10.3 is needed due to gnome bug 642300
 # wpa_supplicant-0.7.3-r3 is needed due to bug 359271
+# libnl:1.1 is needed for linking to net-wireless/wimax libraries
+# XXX: on bump, check that net-wireless/wimax is still using libnl:1.1 !
 # TODO: Qt support?
 COMMON_DEPEND=">=sys-apps/dbus-1.2
 	>=dev-libs/dbus-glib-0.75
@@ -29,7 +31,7 @@ COMMON_DEPEND=">=sys-apps/dbus-1.2
 	|| ( >=sys-fs/udev-171[gudev] >=sys-fs/udev-147[extras] )
 	>=dev-libs/glib-2.26
 	>=sys-auth/polkit-0.97
-	dev-libs/libnl:3
+	dev-libs/libnl:1.1
 	>=net-wireless/wpa_supplicant-0.7.3-r3[dbus]
 	bluetooth? ( >=net-wireless/bluez-4.82 )
 	avahi? ( net-dns/avahi[autoipd] )
@@ -91,8 +93,8 @@ pkg_setup() {
 src_prepare() {
 	# Don't build tests
 	epatch "${FILESDIR}/${PN}-0.9_rc3-fix-tests.patch"
-	# Fix libnl detection, will be in next release
-	epatch "${FILESDIR}/${P}-libnl-check-"{1,2,3}.patch
+	# Build against libnl:1.1 for net-wireless/wimax-1.5.2 compatibility
+	epatch "${FILESDIR}/${P}-force-libnl1.1.patch"
 	# Fix <linux/if.h> & <net/if.h> conflict, in next release (bug #388609)
 	epatch "${FILESDIR}/${P}-if.h.patch"
 	# Fix rfkill handling, will be in next release



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

* [gentoo-commits] proj/gnome:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/
@ 2014-04-24 22:35 Gilles Dartiguelongue
  0 siblings, 0 replies; 6+ messages in thread
From: Gilles Dartiguelongue @ 2014-04-24 22:35 UTC (permalink / raw
  To: gentoo-commits

commit:     15bc4da10afa385b2652c704a5de06ef3ce20cc0
Author:     Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 24 22:28:54 2014 +0000
Commit:     Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
CommitDate: Thu Apr 24 22:34:54 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=15bc4da1

net-misc/networkmanager: 0.9.8.8 → 0.9.8.10

---
 ...ktop.NetworkManager.settings.modify.system.pkla |   6 +
 ...top.NetworkManager.settings.modify.system.rules |   7 +
 net-misc/networkmanager/files/10-openrc-status-r4  |  35 +++
 .../networkmanager/files/conf.d.NetworkManager     |   4 +
 .../networkmanager/files/init.d.NetworkManager     |  57 +++++
 .../files/networkmanager-0.9.8.4-pre-sleep.patch   | 131 +++++++++++
 .../files/nm-system-settings.conf-ifnet            |   6 +
 net-misc/networkmanager/metadata.xml               |  29 +++
 .../networkmanager/networkmanager-0.9.8.10.ebuild  | 248 +++++++++++++++++++++
 9 files changed, 523 insertions(+)

diff --git a/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.pkla b/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.pkla
new file mode 100644
index 0000000..d443327
--- /dev/null
+++ b/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.pkla
@@ -0,0 +1,6 @@
+[Let users in plugdev group modify NetworkManager]
+Identity=unix-group:plugdev
+Action=org.freedesktop.NetworkManager.settings.modify.system
+ResultAny=no
+ResultInactive=no
+ResultActive=yes
\ No newline at end of file

diff --git a/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.rules b/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.rules
new file mode 100644
index 0000000..d00b268
--- /dev/null
+++ b/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.rules
@@ -0,0 +1,7 @@
+// Let users in plugdev group modify NetworkManager
+polkit.addRule(function(action, subject) {
+    if (action.id == "org.freedesktop.NetworkManager.settings.modify.system" &&
+        subject.isInGroup("plugdev") && subject.active) {
+        return "yes";
+    }
+});

diff --git a/net-misc/networkmanager/files/10-openrc-status-r4 b/net-misc/networkmanager/files/10-openrc-status-r4
new file mode 100644
index 0000000..e195ccc
--- /dev/null
+++ b/net-misc/networkmanager/files/10-openrc-status-r4
@@ -0,0 +1,35 @@
+#!/bin/sh
+# Copyright (c) 2012 Alexandre Rostovtsev
+# Released under the 2-clause BSD license.
+
+# Ensures that the NetworkManager OpenRC service is marked as started and
+# providing net only when it has a successful connection.
+
+if [ ! -e "/run/openrc/softlevel" ]; then
+	# OpenRC is not running
+	exit 0
+fi
+
+# Ensure rc-service is in PATH
+PATH="${PATH}:@EPREFIX@/sbin:@EPREFIX@/usr/sbin"
+
+# Exit if the NetworkManager OpenRC service is not running
+rc-service NetworkManager status 2>&1 | grep -Eq "status: (starting|started|inactive|stopping)" || exit 0
+
+# Call rc-service in background mode so that the start/stop functions update
+# NetworkManager service status to started or inactive instead of actually
+# starting or stopping the daemon
+export IN_BACKGROUND=YES
+
+case "$2" in
+	up) nm-online -t 0 -x &&
+		! rc-service NetworkManager status 2>&1 | grep -q started &&
+		exec rc-service NetworkManager start ;;
+	down) nm-online -t 0 -x ||
+		rc-service NetworkManager status 2>&1 | grep -q stopped ||
+		exec rc-service NetworkManager stop ;;
+	pre-sleep) rc-service NetworkManager status 2>&1 | grep -q stopped ||
+		exec rc-service NetworkManager stop ;;
+esac
+exit 0
+# vim: set ts=4:

diff --git a/net-misc/networkmanager/files/conf.d.NetworkManager b/net-misc/networkmanager/files/conf.d.NetworkManager
new file mode 100644
index 0000000..4a99229
--- /dev/null
+++ b/net-misc/networkmanager/files/conf.d.NetworkManager
@@ -0,0 +1,4 @@
+# If NetworkManager does not establish a connection within $INACTIVE_TIMEOUT
+# seconds after starting, the service will be marked as inactive, and it will
+# continue to wait for a connection in background mode.
+INACTIVE_TIMEOUT=1

diff --git a/net-misc/networkmanager/files/init.d.NetworkManager b/net-misc/networkmanager/files/init.d.NetworkManager
new file mode 100755
index 0000000..8465449
--- /dev/null
+++ b/net-misc/networkmanager/files/init.d.NetworkManager
@@ -0,0 +1,57 @@
+#!/sbin/runscript
+# Copyright (c) 2008 Saleem Abdulrasool <compnerd@compnerd.org>
+# Distributed under the terms of the GNU General Purpose License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/files/init.d.NetworkManager,v 1.1 2013/01/28 07:05:05 tetromino Exp $
+
+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-0.9.8.4-pre-sleep.patch b/net-misc/networkmanager/files/networkmanager-0.9.8.4-pre-sleep.patch
new file mode 100644
index 0000000..6e6dfbe
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-0.9.8.4-pre-sleep.patch
@@ -0,0 +1,131 @@
+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/nm-system-settings.conf-ifnet b/net-misc/networkmanager/files/nm-system-settings.conf-ifnet
new file mode 100644
index 0000000..4d14ee7
--- /dev/null
+++ b/net-misc/networkmanager/files/nm-system-settings.conf-ifnet
@@ -0,0 +1,6 @@
+[main]
+plugins=ifnet,keyfile
+
+[ifnet]
+managed=true
+auto_refresh=false

diff --git a/net-misc/networkmanager/metadata.xml b/net-misc/networkmanager/metadata.xml
new file mode 100644
index 0000000..13d26ab
--- /dev/null
+++ b/net-misc/networkmanager/metadata.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>gnome</herd>
+	<use>
+		<flag name="connection-sharing">Use <pkg>net-dns/dnsmasq</pkg> and
+			<pkg>net-firewall/iptables</pkg> for connection sharing</flag>
+		<flag name="consolekit">Use <pkg>sys-auth/consolekit</pkg> for session
+			tracking</flag>
+		<flag name="dhclient">Use dhclient from <pkg>net-misc/dhcp</pkg> for
+			getting ip</flag>
+		<flag name="dhcpcd">Use <pkg>net-misc/dhcpcd</pkg> for getting ip</flag>
+		<flag name="modemmanager">Enable support for mobile broadband devices
+			using <pkg>net-misc/modemmanager</pkg></flag>
+		<flag name="nss">Use <pkg>dev-libs/nss</pkg> for cryptography</flag>
+		<flag name="ppp">Enable support for mobile broadband and PPPoE
+			connections using <pkg>net-dialup/ppp</pkg></flag>
+		<flag name="resolvconf">Use <pkg>net-dns/openresolv</pkg> for managing
+			DNS information</flag>
+		<flag name="vala">Enable bindings for <pkg>dev-lang/vala</pkg></flag>
+		<flag name="wifi">Enable support for wifi and 802.1x security using
+		    <pkg>net-wireless/wpa_supplicant</pkg></flag>
+		<flag name="wext">Enable support for the deprecated Wext (Wireless
+			Extensions) API; needed for some older drivers (e.g. ipw2200,
+			ndiswrapper)</flag>
+		<flag name="wimax">Enable support for WiMAX connections using
+			<pkg>net-wireless/wimax</pkg></flag>
+	</use>
+</pkgmetadata>

diff --git a/net-misc/networkmanager/networkmanager-0.9.8.10.ebuild b/net-misc/networkmanager/networkmanager-0.9.8.10.ebuild
new file mode 100644
index 0000000..0885924
--- /dev/null
+++ b/net-misc/networkmanager/networkmanager-0.9.8.10.ebuild
@@ -0,0 +1,248 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+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="http://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/udev-165[gudev]
+	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-apps/systemd-183 )
+"
+RDEPEND="${COMMON_DEPEND}
+	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 http://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 http://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"
+
+	# 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="$(udev_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
+}


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

* [gentoo-commits] proj/gnome:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/
@ 2014-10-25 21:07 Gilles Dartiguelongue
  0 siblings, 0 replies; 6+ messages in thread
From: Gilles Dartiguelongue @ 2014-10-25 21:07 UTC (permalink / raw
  To: gentoo-commits

commit:     72326d37370b1aa84c4fa0fba8ecdfdf7893f625
Author:     Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 25 20:38:50 2014 +0000
Commit:     Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
CommitDate: Sat Oct 25 20:38:50 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=72326d37

net-misc/networkmanager: moved to gentoo-x86

---
 ...ktop.NetworkManager.settings.modify.system.pkla |   6 -
 ...top.NetworkManager.settings.modify.system.rules |   7 -
 net-misc/networkmanager/files/10-openrc-status-r4  |  35 ---
 .../networkmanager/files/conf.d.NetworkManager     |   4 -
 .../networkmanager/files/init.d.NetworkManager     |  57 -----
 .../files/networkmanager-0.9.8.4-pre-sleep.patch   | 131 -----------
 .../files/nm-system-settings.conf-ifnet            |   6 -
 .../networkmanager/networkmanager-0.9.8.10.ebuild  | 248 ---------------------
 8 files changed, 494 deletions(-)

diff --git a/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.pkla b/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.pkla
deleted file mode 100644
index d443327..0000000
--- a/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.pkla
+++ /dev/null
@@ -1,6 +0,0 @@
-[Let users in plugdev group modify NetworkManager]
-Identity=unix-group:plugdev
-Action=org.freedesktop.NetworkManager.settings.modify.system
-ResultAny=no
-ResultInactive=no
-ResultActive=yes
\ No newline at end of file

diff --git a/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.rules b/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.rules
deleted file mode 100644
index d00b268..0000000
--- a/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.rules
+++ /dev/null
@@ -1,7 +0,0 @@
-// Let users in plugdev group modify NetworkManager
-polkit.addRule(function(action, subject) {
-    if (action.id == "org.freedesktop.NetworkManager.settings.modify.system" &&
-        subject.isInGroup("plugdev") && subject.active) {
-        return "yes";
-    }
-});

diff --git a/net-misc/networkmanager/files/10-openrc-status-r4 b/net-misc/networkmanager/files/10-openrc-status-r4
deleted file mode 100644
index e195ccc..0000000
--- a/net-misc/networkmanager/files/10-openrc-status-r4
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-# Copyright (c) 2012 Alexandre Rostovtsev
-# Released under the 2-clause BSD license.
-
-# Ensures that the NetworkManager OpenRC service is marked as started and
-# providing net only when it has a successful connection.
-
-if [ ! -e "/run/openrc/softlevel" ]; then
-	# OpenRC is not running
-	exit 0
-fi
-
-# Ensure rc-service is in PATH
-PATH="${PATH}:@EPREFIX@/sbin:@EPREFIX@/usr/sbin"
-
-# Exit if the NetworkManager OpenRC service is not running
-rc-service NetworkManager status 2>&1 | grep -Eq "status: (starting|started|inactive|stopping)" || exit 0
-
-# Call rc-service in background mode so that the start/stop functions update
-# NetworkManager service status to started or inactive instead of actually
-# starting or stopping the daemon
-export IN_BACKGROUND=YES
-
-case "$2" in
-	up) nm-online -t 0 -x &&
-		! rc-service NetworkManager status 2>&1 | grep -q started &&
-		exec rc-service NetworkManager start ;;
-	down) nm-online -t 0 -x ||
-		rc-service NetworkManager status 2>&1 | grep -q stopped ||
-		exec rc-service NetworkManager stop ;;
-	pre-sleep) rc-service NetworkManager status 2>&1 | grep -q stopped ||
-		exec rc-service NetworkManager stop ;;
-esac
-exit 0
-# vim: set ts=4:

diff --git a/net-misc/networkmanager/files/conf.d.NetworkManager b/net-misc/networkmanager/files/conf.d.NetworkManager
deleted file mode 100644
index 4a99229..0000000
--- a/net-misc/networkmanager/files/conf.d.NetworkManager
+++ /dev/null
@@ -1,4 +0,0 @@
-# If NetworkManager does not establish a connection within $INACTIVE_TIMEOUT
-# seconds after starting, the service will be marked as inactive, and it will
-# continue to wait for a connection in background mode.
-INACTIVE_TIMEOUT=1

diff --git a/net-misc/networkmanager/files/init.d.NetworkManager b/net-misc/networkmanager/files/init.d.NetworkManager
deleted file mode 100755
index 8465449..0000000
--- a/net-misc/networkmanager/files/init.d.NetworkManager
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/sbin/runscript
-# Copyright (c) 2008 Saleem Abdulrasool <compnerd@compnerd.org>
-# Distributed under the terms of the GNU General Purpose License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/files/init.d.NetworkManager,v 1.1 2013/01/28 07:05:05 tetromino Exp $
-
-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-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/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.ebuild b/net-misc/networkmanager/networkmanager-0.9.8.10.ebuild
deleted file mode 100644
index 0885924..0000000
--- a/net-misc/networkmanager/networkmanager-0.9.8.10.ebuild
+++ /dev/null
@@ -1,248 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-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="http://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/udev-165[gudev]
-	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-apps/systemd-183 )
-"
-RDEPEND="${COMMON_DEPEND}
-	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 http://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 http://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"
-
-	# 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="$(udev_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
-}


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

end of thread, other threads:[~2014-10-25 21:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-24 22:35 [gentoo-commits] proj/gnome:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/ Gilles Dartiguelongue
  -- strict thread matches above, loose matches on Subject: below --
2014-10-25 21:07 Gilles Dartiguelongue
2011-10-27  2:44 Alexandre Restovtsev
2011-10-26 23:49 Alexandre Restovtsev
2011-10-23 23:19 Alexandre Restovtsev
2011-02-28  7:48 Nirbheek Chauhan

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