From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RK2RX-0007R2-VJ for garchives@archives.gentoo.org; Sat, 29 Oct 2011 06:31:00 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 23AF921C025; Sat, 29 Oct 2011 06:30:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id C7D0E21C025 for ; Sat, 29 Oct 2011 06:30:49 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EF8071B4020 for ; Sat, 29 Oct 2011 06:30:48 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 2306) id C440F2004C; Sat, 29 Oct 2011 06:30:47 +0000 (UTC) From: "Alexandre Rostovtsev (tetromino)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, tetromino@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in net-misc/networkmanager/files: networkmanager-0.9.1.90-force-libnl1.1.patch networkmanager-0.9.1.90-rfkill.patch networkmanager-0.9.1.90-if.h.patch 01-org.freedesktop.NetworkManager.settings.modify.system.pkla X-VCS-Repository: gentoo-x86 X-VCS-Files: networkmanager-0.9.1.90-force-libnl1.1.patch networkmanager-0.9.1.90-rfkill.patch networkmanager-0.9.1.90-if.h.patch 01-org.freedesktop.NetworkManager.settings.modify.system.pkla X-VCS-Directories: net-misc/networkmanager/files X-VCS-Committer: tetromino X-VCS-Committer-Name: Alexandre Rostovtsev Content-Type: text/plain; charset=utf8 Message-Id: <20111029063047.C440F2004C@flycatcher.gentoo.org> Date: Sat, 29 Oct 2011 06:30:47 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 85b2d4765789226266a2fdc07787ed6e tetromino 11/10/29 06:30:47 Added: networkmanager-0.9.1.90-force-libnl1.1.patch networkmanager-0.9.1.90-rfkill.patch networkmanager-0.9.1.90-if.h.patch 01-org.freedesktop.NetworkManager.settings.modify= .system.pkla Log: Bump to 0.9.1.90 from the gnome overlay. Allow users in plugdev group t= o modify system connections (so dropped wireless connections no longer br= ing up a modal root password prompt), thanks to Samuli Suominen for the s= olution. Numerous code changes. =20 (Portage version: 2.2.0_alpha71/cvs/Linux x86_64) Revision Changes Path 1.1 net-misc/networkmanager/files/networkmanager-0.9.1.9= 0-force-libnl1.1.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkma= nager/files/networkmanager-0.9.1.90-force-libnl1.1.patch?rev=3D1.1&view=3D= markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkma= nager/files/networkmanager-0.9.1.90-force-libnl1.1.patch?rev=3D1.1&conten= t-type=3Dtext/plain Index: networkmanager-0.9.1.90-force-libnl1.1.patch =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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}" =3D "yes"); then have_libnl=3D"yes" fi =20 -PKG_CHECK_MODULES(LIBNL2, libnl-2.0, [have_libnl2=3Dyes], [have_libnl2=3D= no]) -if (test "${have_libnl2}" =3D "yes"); then - AC_DEFINE(HAVE_LIBNL2, 1, [Define if you require specific libnl-2 suppo= rt]) - LIBNL_CFLAGS=3D"$LIBNL2_CFLAGS" - LIBNL_LIBS=3D"$LIBNL2_LIBS" - libnl_version=3D"2" - have_libnl=3D"yes" -fi - -PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [have_libnl2=3Dyes], [have_libnl2=3D= no]) -if (test "${have_libnl2}" =3D "yes"); then - AC_DEFINE(HAVE_LIBNL3, 1, [Define if you require specific libnl-3 suppo= rt]) - LIBNL_CFLAGS=3D"$LIBNL3_CFLAGS" - LIBNL_LIBS=3D"$LIBNL3_LIBS" - libnl_version=3D"3" - have_libnl=3D"yes" -fi - if (test "${have_libnl}" =3D "no"); then AC_MSG_ERROR([libnl development header are required]) fi 1.1 net-misc/networkmanager/files/networkmanager-0.9.1.9= 0-rfkill.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkma= nager/files/networkmanager-0.9.1.90-rfkill.patch?rev=3D1.1&view=3Dmarkup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkma= nager/files/networkmanager-0.9.1.90-rfkill.patch?rev=3D1.1&content-type=3D= text/plain Index: networkmanager-0.9.1.90-rfkill.patch =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >From 339229e4c698c61e20a28bfc33d8501490891427 Mon Sep 17 00:00:00 2001 From: Gary Ching-Pang Lin Date: Tue, 20 Sep 2011 08:36:35 +0000 Subject: core: improving handling of rfkill (bgo #655773) This commit improves the handling of rfkill. - The original two passes check gathers the states of platform and non-platform switches in two separate loops. Now we gather the both states in one loop and determine the final states later. - A new rule is used to determine the states of switches. if (platform_state =3D=3D UNBLOCKED) choose non_platform_state; else choose platform_state; The state is UNBLOCKED if and only if both the platform and non-platform switches are unblocked, so the ambiguous state in bgo#655773 will not happen. Original code always preferred the platform switch state over the device switch state, so if the platform switch was UNBLOCKED but the device was BLOCKED, NM would treat the device as UNBLOCKED and try to activate it, and obviously fail. --- diff --git a/src/nm-udev-manager.c b/src/nm-udev-manager.c index 72501c2..3e855b7 100644 --- a/src/nm-udev-manager.c +++ b/src/nm-udev-manager.c @@ -195,78 +195,50 @@ recheck_killswitches (NMUdevManager *self) NMUdevManagerPrivate *priv =3D NM_UDEV_MANAGER_GET_PRIVATE (self); GSList *iter; RfKillState poll_states[RFKILL_TYPE_MAX]; + RfKillState platform_states[RFKILL_TYPE_MAX]; gboolean platform_checked[RFKILL_TYPE_MAX]; int i; =20 /* Default state is unblocked */ for (i =3D 0; i < RFKILL_TYPE_MAX; i++) { poll_states[i] =3D RFKILL_UNBLOCKED; + platform_states[i] =3D RFKILL_UNBLOCKED; platform_checked[i] =3D FALSE; } =20 - /* Perform two passes here; the first pass is for non-platform switches= , - * which typically if hardkilled cannot be changed except by a physical - * hardware switch. The second pass checks platform killswitches, whic= h - * take precedence over device killswitches, because typically platform - * killswitches control device killswitches. That is, a hardblocked de= vice - * switch can often be unblocked by a platform switch. Thus if we have - * a hardblocked device switch and a softblocked platform switch, the - * combined state should be softblocked since the platform switch can b= e - * unblocked to change the device switch. - */ - - /* Device switches first */ + /* Poll the states of all killswitches */ for (iter =3D priv->killswitches; iter; iter =3D g_slist_next (iter)) { Killswitch *ks =3D iter->data; GUdevDevice *device; RfKillState dev_state; int sysfs_state; =20 - if (ks->platform =3D=3D FALSE) { - device =3D g_udev_client_query_by_subsystem_and_name (priv->client, "= rfkill", ks->name); - if (device) { - sysfs_state =3D g_udev_device_get_property_as_int (device, "RFKILL_S= TATE"); - dev_state =3D sysfs_state_to_nm_state (sysfs_state); + device =3D g_udev_client_query_by_subsystem_and_name (priv->client, "r= fkill", ks->name); + if (device) { + sysfs_state =3D g_udev_device_get_property_as_int (device, "RFKILL_ST= ATE"); + dev_state =3D sysfs_state_to_nm_state (sysfs_state); + if (ks->platform =3D=3D FALSE) { if (dev_state > poll_states[ks->rtype]) poll_states[ks->rtype] =3D dev_state; - g_object_unref (device); - } - } - } - - /* Platform switches next; their state overwrites device state */ - for (iter =3D priv->killswitches; iter; iter =3D g_slist_next (iter)) { - Killswitch *ks =3D iter->data; - GUdevDevice *device; - RfKillState dev_state; - int sysfs_state; - - if (ks->platform =3D=3D TRUE) { - device =3D g_udev_client_query_by_subsystem_and_name (priv->client, "= rfkill", ks->name); - if (device) { - sysfs_state =3D g_udev_device_get_property_as_int (device, "RFKILL_S= TATE"); - dev_state =3D sysfs_state_to_nm_state (sysfs_state); - - if (platform_checked[ks->rtype] =3D=3D FALSE) { - /* Overwrite device state with platform state for first - * platform switch found. - */ - poll_states[ks->rtype] =3D dev_state; - platform_checked[ks->rtype] =3D TRUE; - } else { - /* If there are multiple platform switches of the same type, - * take the "worst" state for all of that type. - */ - if (dev_state > poll_states[ks->rtype]) - poll_states[ks->rtype] =3D dev_state; - } - g_object_unref (device); + } else { + platform_checked[ks->rtype] =3D TRUE; + if (dev_state > platform_states[ks->rtype]) + platform_states[ks->rtype] =3D dev_state; } + g_object_unref (device); } } =20 /* Log and emit change signal for final rfkill states */ for (i =3D 0; i < RFKILL_TYPE_MAX; i++) { + if (platform_checked[i] =3D=3D TRUE) { + /* blocked platform switch state overrides device state, otherwise + * let the device state stand. (bgo #655773) + */ + if (platform_states[i] !=3D RFKILL_UNBLOCKED) + poll_states[i] =3D platform_states[i]; + } + if (poll_states[i] !=3D priv->rfkill_states[i]) { nm_log_dbg (LOGD_RFKILL, "%s rfkill state now '%s'", rfkill_type_to_desc (i), -- cgit v0.9.0.2-2-gbebe 1.1 net-misc/networkmanager/files/networkmanager-0.9.1.9= 0-if.h.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkma= nager/files/networkmanager-0.9.1.90-if.h.patch?rev=3D1.1&view=3Dmarkup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkma= nager/files/networkmanager-0.9.1.90-if.h.patch?rev=3D1.1&content-type=3Dt= ext/plain Index: networkmanager-0.9.1.90-if.h.patch =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D commit 00f2b0a9bb806be64c5868af44f43dbe55bdd75b Author: Thomas Graf Date: Fri Sep 23 13:46:41 2011 +0200 core: Include instead of =20 NM already includes in some places, f.e. nm-netlink-moni= tor and we can't mix usage of the two. Stick to using as it prov= ides additional flag definitions such as operational link state and link m= ode. =20 Signed-off-by: Thomas Graf =20 [ Alexandre Rostovtsev : 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 #include #include -#include +#include #include =20 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 #include #include -#include #include #include #include @@ -34,6 +33,7 @@ #include #include #include +#include =20 #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 #include #include -#include +#include =20 #include "nm-system.h" #include "nm-device.h" diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-ma= nager.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 #include #include -#include +#include #include =20 #include diff --git a/src/settings/plugins/ifcfg-rh/reader.c b/src/settings/plugin= s/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 #include #include -#include #include #include #include +#include =20 #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 #include #include -#include +#include +#include =20 #include =20 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 #include #include -#include +#include +#include =20 #include #include 1.1 net-misc/networkmanager/files/01-org.freedesktop.Net= workManager.settings.modify.system.pkla file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkma= nager/files/01-org.freedesktop.NetworkManager.settings.modify.system.pkla= ?rev=3D1.1&view=3Dmarkup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkma= nager/files/01-org.freedesktop.NetworkManager.settings.modify.system.pkla= ?rev=3D1.1&content-type=3Dtext/plain Index: 01-org.freedesktop.NetworkManager.settings.modify.system.pkla =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [Let users in plugdev group modify NetworkManager] Identity=3Dunix-group:plugdev Action=3Dorg.freedesktop.NetworkManager.settings.modify.system ResultAny=3Dno ResultInactive=3Dno ResultActive=3Dyes