1 |
tetromino 11/10/29 06:30:47 |
2 |
|
3 |
Added: networkmanager-0.9.1.90-force-libnl1.1.patch |
4 |
networkmanager-0.9.1.90-rfkill.patch |
5 |
networkmanager-0.9.1.90-if.h.patch |
6 |
01-org.freedesktop.NetworkManager.settings.modify.system.pkla |
7 |
Log: |
8 |
Bump to 0.9.1.90 from the gnome overlay. Allow users in plugdev group to modify system connections (so dropped wireless connections no longer bring up a modal root password prompt), thanks to Samuli Suominen for the solution. Numerous code changes. |
9 |
|
10 |
(Portage version: 2.2.0_alpha71/cvs/Linux x86_64) |
11 |
|
12 |
Revision Changes Path |
13 |
1.1 net-misc/networkmanager/files/networkmanager-0.9.1.90-force-libnl1.1.patch |
14 |
|
15 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkmanager/files/networkmanager-0.9.1.90-force-libnl1.1.patch?rev=1.1&view=markup |
16 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkmanager/files/networkmanager-0.9.1.90-force-libnl1.1.patch?rev=1.1&content-type=text/plain |
17 |
|
18 |
Index: networkmanager-0.9.1.90-force-libnl1.1.patch |
19 |
=================================================================== |
20 |
Build against libnl:1.1 only. Otherwise, networkmanager will link to |
21 |
libnl-3.so and to libiWmxSdk (from wimax-1.5.2) which links to libnl.so, |
22 |
and then explode spectacularly at runtime due to symbol collisions. |
23 |
|
24 |
diff --git a/configure.ac b/configure.ac |
25 |
index 117dd91..b8b11de 100644 |
26 |
--- a/configure.ac |
27 |
+++ b/configure.ac |
28 |
@@ -323,24 +323,6 @@ if (test "${have_libnl1}" = "yes"); then |
29 |
have_libnl="yes" |
30 |
fi |
31 |
|
32 |
-PKG_CHECK_MODULES(LIBNL2, libnl-2.0, [have_libnl2=yes], [have_libnl2=no]) |
33 |
-if (test "${have_libnl2}" = "yes"); then |
34 |
- AC_DEFINE(HAVE_LIBNL2, 1, [Define if you require specific libnl-2 support]) |
35 |
- LIBNL_CFLAGS="$LIBNL2_CFLAGS" |
36 |
- LIBNL_LIBS="$LIBNL2_LIBS" |
37 |
- libnl_version="2" |
38 |
- have_libnl="yes" |
39 |
-fi |
40 |
- |
41 |
-PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [have_libnl2=yes], [have_libnl2=no]) |
42 |
-if (test "${have_libnl2}" = "yes"); then |
43 |
- AC_DEFINE(HAVE_LIBNL3, 1, [Define if you require specific libnl-3 support]) |
44 |
- LIBNL_CFLAGS="$LIBNL3_CFLAGS" |
45 |
- LIBNL_LIBS="$LIBNL3_LIBS" |
46 |
- libnl_version="3" |
47 |
- have_libnl="yes" |
48 |
-fi |
49 |
- |
50 |
if (test "${have_libnl}" = "no"); then |
51 |
AC_MSG_ERROR([libnl development header are required]) |
52 |
fi |
53 |
|
54 |
|
55 |
|
56 |
1.1 net-misc/networkmanager/files/networkmanager-0.9.1.90-rfkill.patch |
57 |
|
58 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkmanager/files/networkmanager-0.9.1.90-rfkill.patch?rev=1.1&view=markup |
59 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkmanager/files/networkmanager-0.9.1.90-rfkill.patch?rev=1.1&content-type=text/plain |
60 |
|
61 |
Index: networkmanager-0.9.1.90-rfkill.patch |
62 |
=================================================================== |
63 |
From 339229e4c698c61e20a28bfc33d8501490891427 Mon Sep 17 00:00:00 2001 |
64 |
From: Gary Ching-Pang Lin <chingpang@×××××.com> |
65 |
Date: Tue, 20 Sep 2011 08:36:35 +0000 |
66 |
Subject: core: improving handling of rfkill (bgo #655773) |
67 |
|
68 |
This commit improves the handling of rfkill. |
69 |
|
70 |
- The original two passes check gathers the states of platform |
71 |
and non-platform switches in two separate loops. Now we gather |
72 |
the both states in one loop and determine the final states later. |
73 |
|
74 |
- A new rule is used to determine the states of switches. |
75 |
|
76 |
if (platform_state == UNBLOCKED) |
77 |
choose non_platform_state; |
78 |
else |
79 |
choose platform_state; |
80 |
|
81 |
The state is UNBLOCKED if and only if both the platform and |
82 |
non-platform switches are unblocked, so the ambiguous state in |
83 |
bgo#655773 will not happen. |
84 |
|
85 |
Original code always preferred the platform switch state over |
86 |
the device switch state, so if the platform switch was UNBLOCKED |
87 |
but the device was BLOCKED, NM would treat the device as |
88 |
UNBLOCKED and try to activate it, and obviously fail. |
89 |
--- |
90 |
diff --git a/src/nm-udev-manager.c b/src/nm-udev-manager.c |
91 |
index 72501c2..3e855b7 100644 |
92 |
--- a/src/nm-udev-manager.c |
93 |
+++ b/src/nm-udev-manager.c |
94 |
@@ -195,78 +195,50 @@ recheck_killswitches (NMUdevManager *self) |
95 |
NMUdevManagerPrivate *priv = NM_UDEV_MANAGER_GET_PRIVATE (self); |
96 |
GSList *iter; |
97 |
RfKillState poll_states[RFKILL_TYPE_MAX]; |
98 |
+ RfKillState platform_states[RFKILL_TYPE_MAX]; |
99 |
gboolean platform_checked[RFKILL_TYPE_MAX]; |
100 |
int i; |
101 |
|
102 |
/* Default state is unblocked */ |
103 |
for (i = 0; i < RFKILL_TYPE_MAX; i++) { |
104 |
poll_states[i] = RFKILL_UNBLOCKED; |
105 |
+ platform_states[i] = RFKILL_UNBLOCKED; |
106 |
platform_checked[i] = FALSE; |
107 |
} |
108 |
|
109 |
- /* Perform two passes here; the first pass is for non-platform switches, |
110 |
- * which typically if hardkilled cannot be changed except by a physical |
111 |
- * hardware switch. The second pass checks platform killswitches, which |
112 |
- * take precedence over device killswitches, because typically platform |
113 |
- * killswitches control device killswitches. That is, a hardblocked device |
114 |
- * switch can often be unblocked by a platform switch. Thus if we have |
115 |
- * a hardblocked device switch and a softblocked platform switch, the |
116 |
- * combined state should be softblocked since the platform switch can be |
117 |
- * unblocked to change the device switch. |
118 |
- */ |
119 |
- |
120 |
- /* Device switches first */ |
121 |
+ /* Poll the states of all killswitches */ |
122 |
for (iter = priv->killswitches; iter; iter = g_slist_next (iter)) { |
123 |
Killswitch *ks = iter->data; |
124 |
GUdevDevice *device; |
125 |
RfKillState dev_state; |
126 |
int sysfs_state; |
127 |
|
128 |
- if (ks->platform == FALSE) { |
129 |
- device = g_udev_client_query_by_subsystem_and_name (priv->client, "rfkill", ks->name); |
130 |
- if (device) { |
131 |
- sysfs_state = g_udev_device_get_property_as_int (device, "RFKILL_STATE"); |
132 |
- dev_state = sysfs_state_to_nm_state (sysfs_state); |
133 |
+ device = g_udev_client_query_by_subsystem_and_name (priv->client, "rfkill", ks->name); |
134 |
+ if (device) { |
135 |
+ sysfs_state = g_udev_device_get_property_as_int (device, "RFKILL_STATE"); |
136 |
+ dev_state = sysfs_state_to_nm_state (sysfs_state); |
137 |
+ if (ks->platform == FALSE) { |
138 |
if (dev_state > poll_states[ks->rtype]) |
139 |
poll_states[ks->rtype] = dev_state; |
140 |
- g_object_unref (device); |
141 |
- } |
142 |
- } |
143 |
- } |
144 |
- |
145 |
- /* Platform switches next; their state overwrites device state */ |
146 |
- for (iter = priv->killswitches; iter; iter = g_slist_next (iter)) { |
147 |
- Killswitch *ks = iter->data; |
148 |
- GUdevDevice *device; |
149 |
- RfKillState dev_state; |
150 |
- int sysfs_state; |
151 |
- |
152 |
- if (ks->platform == TRUE) { |
153 |
- device = g_udev_client_query_by_subsystem_and_name (priv->client, "rfkill", ks->name); |
154 |
- if (device) { |
155 |
- sysfs_state = g_udev_device_get_property_as_int (device, "RFKILL_STATE"); |
156 |
- dev_state = sysfs_state_to_nm_state (sysfs_state); |
157 |
- |
158 |
- if (platform_checked[ks->rtype] == FALSE) { |
159 |
- /* Overwrite device state with platform state for first |
160 |
- * platform switch found. |
161 |
- */ |
162 |
- poll_states[ks->rtype] = dev_state; |
163 |
- platform_checked[ks->rtype] = TRUE; |
164 |
- } else { |
165 |
- /* If there are multiple platform switches of the same type, |
166 |
- * take the "worst" state for all of that type. |
167 |
- */ |
168 |
- if (dev_state > poll_states[ks->rtype]) |
169 |
- poll_states[ks->rtype] = dev_state; |
170 |
- } |
171 |
- g_object_unref (device); |
172 |
+ } else { |
173 |
+ platform_checked[ks->rtype] = TRUE; |
174 |
+ if (dev_state > platform_states[ks->rtype]) |
175 |
+ platform_states[ks->rtype] = dev_state; |
176 |
} |
177 |
+ g_object_unref (device); |
178 |
} |
179 |
} |
180 |
|
181 |
/* Log and emit change signal for final rfkill states */ |
182 |
for (i = 0; i < RFKILL_TYPE_MAX; i++) { |
183 |
+ if (platform_checked[i] == TRUE) { |
184 |
+ /* blocked platform switch state overrides device state, otherwise |
185 |
+ * let the device state stand. (bgo #655773) |
186 |
+ */ |
187 |
+ if (platform_states[i] != RFKILL_UNBLOCKED) |
188 |
+ poll_states[i] = platform_states[i]; |
189 |
+ } |
190 |
+ |
191 |
if (poll_states[i] != priv->rfkill_states[i]) { |
192 |
nm_log_dbg (LOGD_RFKILL, "%s rfkill state now '%s'", |
193 |
rfkill_type_to_desc (i), |
194 |
-- |
195 |
cgit v0.9.0.2-2-gbebe |
196 |
|
197 |
|
198 |
|
199 |
1.1 net-misc/networkmanager/files/networkmanager-0.9.1.90-if.h.patch |
200 |
|
201 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkmanager/files/networkmanager-0.9.1.90-if.h.patch?rev=1.1&view=markup |
202 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkmanager/files/networkmanager-0.9.1.90-if.h.patch?rev=1.1&content-type=text/plain |
203 |
|
204 |
Index: networkmanager-0.9.1.90-if.h.patch |
205 |
=================================================================== |
206 |
commit 00f2b0a9bb806be64c5868af44f43dbe55bdd75b |
207 |
Author: Thomas Graf <tgraf@××××××.com> |
208 |
Date: Fri Sep 23 13:46:41 2011 +0200 |
209 |
|
210 |
core: Include <linux/if.h> instead of <net/if.h> |
211 |
|
212 |
NM already includes <linux/if.h> in some places, f.e. nm-netlink-monitor and |
213 |
we can't mix usage of the two. Stick to using <linux/if.h> as it provides |
214 |
additional flag definitions such as operational link state and link mode. |
215 |
|
216 |
Signed-off-by: Thomas Graf <tgraf@××××××.com> |
217 |
|
218 |
[ Alexandre Rostovtsev <tetromino@g.o>: remove parts of commit |
219 |
unrelated to if.h changes. ] |
220 |
|
221 |
diff --git a/include/wireless-helper.h b/include/wireless-helper.h |
222 |
index d150ef7..2e4509a 100644 |
223 |
--- a/include/wireless-helper.h |
224 |
+++ b/include/wireless-helper.h |
225 |
@@ -27,6 +27,6 @@ |
226 |
#include <sys/types.h> |
227 |
#include <linux/types.h> |
228 |
#include <sys/socket.h> |
229 |
-#include <net/if.h> |
230 |
+#include <linux/if.h> |
231 |
#include <wireless.h> |
232 |
|
233 |
diff --git a/src/nm-device.c b/src/nm-device.c |
234 |
index c0b1b87..559606c 100644 |
235 |
--- a/src/nm-device.c |
236 |
+++ b/src/nm-device.c |
237 |
@@ -25,7 +25,6 @@ |
238 |
#include <dbus/dbus.h> |
239 |
#include <netinet/in.h> |
240 |
#include <string.h> |
241 |
-#include <net/if.h> |
242 |
#include <unistd.h> |
243 |
#include <errno.h> |
244 |
#include <sys/ioctl.h> |
245 |
@@ -34,6 +33,7 @@ |
246 |
#include <sys/wait.h> |
247 |
#include <arpa/inet.h> |
248 |
#include <fcntl.h> |
249 |
+#include <linux/if.h> |
250 |
|
251 |
#include "nm-glib-compat.h" |
252 |
#include "nm-device-interface.h" |
253 |
diff --git a/src/nm-system.c b/src/nm-system.c |
254 |
index 0b29468..473fcec 100644 |
255 |
--- a/src/nm-system.c |
256 |
+++ b/src/nm-system.c |
257 |
@@ -40,7 +40,7 @@ |
258 |
#include <netdb.h> |
259 |
#include <glib.h> |
260 |
#include <ctype.h> |
261 |
-#include <net/if.h> |
262 |
+#include <linux/if.h> |
263 |
|
264 |
#include "nm-system.h" |
265 |
#include "nm-device.h" |
266 |
diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c |
267 |
index 522c075..3546f8d 100644 |
268 |
--- a/src/ppp-manager/nm-ppp-manager.c |
269 |
+++ b/src/ppp-manager/nm-ppp-manager.c |
270 |
@@ -32,7 +32,7 @@ |
271 |
#include <sys/socket.h> |
272 |
#include <sys/ioctl.h> |
273 |
#include <asm/types.h> |
274 |
-#include <net/if.h> |
275 |
+#include <linux/if.h> |
276 |
#include <sys/stat.h> |
277 |
|
278 |
#include <linux/ppp_defs.h> |
279 |
diff --git a/src/settings/plugins/ifcfg-rh/reader.c b/src/settings/plugins/ifcfg-rh/reader.c |
280 |
index 691a176..910cca3 100644 |
281 |
--- a/src/settings/plugins/ifcfg-rh/reader.c |
282 |
+++ b/src/settings/plugins/ifcfg-rh/reader.c |
283 |
@@ -28,10 +28,10 @@ |
284 |
#include <ctype.h> |
285 |
#include <sys/inotify.h> |
286 |
#include <errno.h> |
287 |
-#include <net/if.h> |
288 |
#include <sys/ioctl.h> |
289 |
#include <unistd.h> |
290 |
#include <netinet/ether.h> |
291 |
+#include <linux/if.h> |
292 |
|
293 |
#ifndef __user |
294 |
#define __user |
295 |
diff --git a/src/wimax/iwmxsdk.c b/src/wimax/iwmxsdk.c |
296 |
index ff6b553..9c3a78b 100644 |
297 |
--- a/src/wimax/iwmxsdk.c |
298 |
+++ b/src/wimax/iwmxsdk.c |
299 |
@@ -27,7 +27,8 @@ |
300 |
#include <stdlib.h> |
301 |
#include <errno.h> |
302 |
#include <string.h> |
303 |
-#include <net/if.h> |
304 |
+#include <sys/socket.h> |
305 |
+#include <linux/if.h> |
306 |
|
307 |
#include <glib.h> |
308 |
|
309 |
diff --git a/src/wimax/nm-device-wimax.c b/src/wimax/nm-device-wimax.c |
310 |
index b6afc27..6654140 100644 |
311 |
--- a/src/wimax/nm-device-wimax.c |
312 |
+++ b/src/wimax/nm-device-wimax.c |
313 |
@@ -23,7 +23,8 @@ |
314 |
#include <unistd.h> |
315 |
#include <sys/ioctl.h> |
316 |
#include <net/ethernet.h> |
317 |
-#include <net/if.h> |
318 |
+#include <sys/socket.h> |
319 |
+#include <linux/if.h> |
320 |
|
321 |
#include <WiMaxAPI.h> |
322 |
#include <WiMaxAPIEx.h> |
323 |
|
324 |
|
325 |
|
326 |
1.1 net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.pkla |
327 |
|
328 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.pkla?rev=1.1&view=markup |
329 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.pkla?rev=1.1&content-type=text/plain |
330 |
|
331 |
Index: 01-org.freedesktop.NetworkManager.settings.modify.system.pkla |
332 |
=================================================================== |
333 |
[Let users in plugdev group modify NetworkManager] |
334 |
Identity=unix-group:plugdev |
335 |
Action=org.freedesktop.NetworkManager.settings.modify.system |
336 |
ResultAny=no |
337 |
ResultInactive=no |
338 |
ResultActive=yes |