summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2012-07-05 02:33:10 +0000
committerAlexandre Rostovtsev <tetromino@gentoo.org>2012-07-05 02:33:10 +0000
commit6f0e412da3121825a420bab747cc48aaa10d3ea4 (patch)
treee97415f32fb1ac1a0e6a858d00a7df9a83f31822 /net-misc
parentChange manifest to new hashes. (diff)
downloadgentoo-2-6f0e412da3121825a420bab747cc48aaa10d3ea4.tar.gz
gentoo-2-6f0e412da3121825a420bab747cc48aaa10d3ea4.tar.bz2
gentoo-2-6f0e412da3121825a420bab747cc48aaa10d3ea4.zip
Fix the hang in 10-openrc-status that resulted in networkmanager getting marked as 'inactive' on resuming from suspend; many thanks to Travis Hansen for the solution (bugs #410661, #417283). Fix incompatibility with net-misc/dhcp[-ipv6] (bug #335147, thanks to Rick Harris). Move polkit rules.d file to /usr/share (bug #421577 comment #12, thanks to Dennis Lissov).
(Portage version: 2.2.0_alpha115/cvs/Linux x86_64)
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/networkmanager/ChangeLog15
-rw-r--r--net-misc/networkmanager/files/10-openrc-status-r223
-rw-r--r--net-misc/networkmanager/files/networkmanager-0.9.4.0-dhclient-ipv6.patch34
-rw-r--r--net-misc/networkmanager/networkmanager-0.9.4.0-r4.ebuild (renamed from net-misc/networkmanager/networkmanager-0.9.4.0-r3.ebuild)27
4 files changed, 95 insertions, 4 deletions
diff --git a/net-misc/networkmanager/ChangeLog b/net-misc/networkmanager/ChangeLog
index dd356d8eefd1..06ebe73784a4 100644
--- a/net-misc/networkmanager/ChangeLog
+++ b/net-misc/networkmanager/ChangeLog
@@ -1,6 +1,19 @@
# ChangeLog for net-misc/networkmanager
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/ChangeLog,v 1.137 2012/07/04 07:56:22 tetromino Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/ChangeLog,v 1.138 2012/07/05 02:33:10 tetromino Exp $
+
+*networkmanager-0.9.4.0-r4 (05 Jul 2012)
+
+ 05 Jul 2012; Alexandre Rostovtsev <tetromino@gentoo.org>
+ +files/10-openrc-status-r2, -networkmanager-0.9.4.0-r3.ebuild,
+ +networkmanager-0.9.4.0-r4.ebuild,
+ +files/networkmanager-0.9.4.0-dhclient-ipv6.patch:
+ Fix the hang in 10-openrc-status that resulted in networkmanager getting
+ marked as 'inactive' on resuming from suspend; many thanks to Travis Hansen
+ for the solution (bugs #410661, #417283). Fix incompatibility with
+ net-misc/dhcp[-ipv6] (bug #335147, thanks to Rick Harris). Move polkit
+ rules.d file to /usr/share (bug #421577 comment #12, thanks to Dennis
+ Lissov).
*networkmanager-0.9.4.0-r3 (04 Jul 2012)
diff --git a/net-misc/networkmanager/files/10-openrc-status-r2 b/net-misc/networkmanager/files/10-openrc-status-r2
new file mode 100644
index 000000000000..967c56600a54
--- /dev/null
+++ b/net-misc/networkmanager/files/10-openrc-status-r2
@@ -0,0 +1,23 @@
+#!/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.
+
+# 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 && exec rc-service NetworkManager start ;;
+ down) nm-online -t 0 -x || exec rc-service NetworkManager stop ;;
+ pre-sleep) exec rc-service NetworkManager stop ;;
+esac
diff --git a/net-misc/networkmanager/files/networkmanager-0.9.4.0-dhclient-ipv6.patch b/net-misc/networkmanager/files/networkmanager-0.9.4.0-dhclient-ipv6.patch
new file mode 100644
index 000000000000..9700f1a110b5
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-0.9.4.0-dhclient-ipv6.patch
@@ -0,0 +1,34 @@
+From cc9f8102859cccd95ba7a13c00bc3cc4fb53aa0a Mon Sep 17 00:00:00 2001
+From: Rick Harris <rickfharris@yahoo.com.au>
+Date: Sun, 15 Apr 2012 09:44:55 +0000
+Subject: [PATCH] dhcp: do not require dhclient-4 to be built with DHCPv6
+
+The "-4" flag is the default if dhclient-4 was built with DHCPv6 support
+enabled, and it's invalid if dhclient-4 was built without DHCPv6.
+Therefore, we simply should not use it.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=679428
+---
+ src/dhcp-manager/nm-dhcp-dhclient.c | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/dhcp-manager/nm-dhcp-dhclient.c b/src/dhcp-manager/nm-dhcp-dhclient.c
+index 043cd63..14be5b2 100644
+--- a/src/dhcp-manager/nm-dhcp-dhclient.c
++++ b/src/dhcp-manager/nm-dhcp-dhclient.c
+@@ -490,9 +490,10 @@ dhclient_start (NMDHCPClient *client,
+ g_ptr_array_add (argv, (gpointer) "-6");
+ if (mode_opt)
+ g_ptr_array_add (argv, (gpointer) mode_opt);
+- } else {
+- g_ptr_array_add (argv, (gpointer) "-4");
+ }
++ /* We never want the "-4" flag: it's the default if dhclient was
++ * built with DHCPv6 support, and invalid otherwise.
++ */
+ #endif
+
+ g_ptr_array_add (argv, (gpointer) "-sf"); /* Set script file */
+--
+1.7.8.6
+
diff --git a/net-misc/networkmanager/networkmanager-0.9.4.0-r3.ebuild b/net-misc/networkmanager/networkmanager-0.9.4.0-r4.ebuild
index a6004f05cb1f..6e3a1730ba7e 100644
--- a/net-misc/networkmanager/networkmanager-0.9.4.0-r3.ebuild
+++ b/net-misc/networkmanager/networkmanager-0.9.4.0-r4.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.9.4.0-r3.ebuild,v 1.1 2012/07/04 07:56:22 tetromino Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.9.4.0-r4.ebuild,v 1.1 2012/07/05 02:33:10 tetromino Exp $
EAPI="4"
GNOME_ORG_MODULE="NetworkManager"
@@ -111,6 +111,8 @@ src_prepare() {
epatch "${FILESDIR}/${P}-ip_ppp.h.patch"
# Fix ipv6 default route bug, #417529
epatch "${FILESDIR}/${P}-ipv6-route.patch"
+ # Bug #335147, https://bugzilla.gnome.org/show_bug.cgi?id=679428
+ epatch "${FILESDIR}/${P}-dhclient-ipv6.patch"
epatch_user
@@ -164,7 +166,7 @@ src_install() {
# Provide openrc net dependency only when nm is connected
exeinto /etc/NetworkManager/dispatcher.d
- newexe "${FILESDIR}/10-openrc-status-r1" 10-openrc-status
+ newexe "${FILESDIR}/10-openrc-status-r2" 10-openrc-status
sed -e "s:@EPREFIX@:${EPREFIX}:g" \
-i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
@@ -175,7 +177,7 @@ src_install() {
newins "${FILESDIR}/nm-system-settings.conf-ifnet" NetworkManager.conf
# Allow users in plugdev group to modify system connections
- insinto /etc/polkit-1/rules.d
+ insinto /usr/share/polkit-1/rules.d/
doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
if has_version '<sys-auth/polkit-0.106'; then
insinto /etc/polkit-1/localauthority/10-vendor.d
@@ -200,4 +202,23 @@ pkg_postinst() {
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
}