summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Piasek <dagger@gentoo.org>2010-12-17 12:17:05 +0000
committerRobert Piasek <dagger@gentoo.org>2010-12-17 12:17:05 +0000
commite40a8fc44104d242dc5bf1ccecd266b592ccd9b9 (patch)
tree44172261f0829dab10dc39e9f49a0383c7aa7ae7 /net-misc
parentPatch from Dane Smith <c1pher@gentoo.org> to disable lastfm when curl is not ... (diff)
downloadhistorical-e40a8fc44104d242dc5bf1ccecd266b592ccd9b9.tar.gz
historical-e40a8fc44104d242dc5bf1ccecd266b592ccd9b9.tar.bz2
historical-e40a8fc44104d242dc5bf1ccecd266b592ccd9b9.zip
Backport some patches from upstream. Re-introduce plugdev group patch
Package-Manager: portage-2.1.9.25/cvs/Linux x86_64
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/networkmanager/ChangeLog9
-rw-r--r--net-misc/networkmanager/Manifest19
-rw-r--r--net-misc/networkmanager/files/networkmanager-0.8.2-1.patch384
-rw-r--r--net-misc/networkmanager/files/networkmanager-0.8.2-confchanges.patch25
-rw-r--r--net-misc/networkmanager/networkmanager-0.8.2-r2.ebuild150
5 files changed, 571 insertions, 16 deletions
diff --git a/net-misc/networkmanager/ChangeLog b/net-misc/networkmanager/ChangeLog
index f24feb0a7991..975e9c0e0716 100644
--- a/net-misc/networkmanager/ChangeLog
+++ b/net-misc/networkmanager/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-misc/networkmanager
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/ChangeLog,v 1.89 2010/11/30 09:35:18 qiaomuf Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/ChangeLog,v 1.90 2010/12/17 12:17:05 dagger Exp $
+
+*networkmanager-0.8.2-r2 (17 Dec 2010)
+
+ 17 Dec 2010; Robert Piasek <dagger@gentoo.org>
+ +networkmanager-0.8.2-r2.ebuild, +files/networkmanager-0.8.2-1.patch,
+ +files/networkmanager-0.8.2-confchanges.patch:
+ Backport some patches from upstream. Re-introduce plugdev group patch
*networkmanager-0.8.2-r1 (30 Nov 2010)
diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest
index 3c79304d6f98..bdca1846c828 100644
--- a/net-misc/networkmanager/Manifest
+++ b/net-misc/networkmanager/Manifest
@@ -1,6 +1,3 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
AUX NetworkManagerDispatcher 1198 RMD160 4345870ab40607b9aed80c8da383b604f032b98e SHA1 1dd2250c746b25566fceaab551f4ef8335fe4f55 SHA256 f8cb5d0470619cf1f0812fffcf1bf2091e3c44a757899c07164f80ddd6a2641e
AUX networkmanager-0.8-confchanges.patch 1063 RMD160 25a0d45410fa5590098386556e9947dd15507eda SHA1 ba6eaa63188f97f93bbbb327676d8104bbf7e8c8 SHA256 9fcbe0b9ab4cc38c9057a0dde2f5153efc12515ed4d28920a455dad7fc2b1e09
AUX networkmanager-0.8-nscd-clear-cache.patch 1214 RMD160 2381f455593202a740e634601c0ba8245ecb8fac SHA1 b4a0cec446b6f8fa81c06d5992db61b296f17057 SHA256 2d981bafa96607acb06740d78b8e33afdc675c52b0cf3ce5b098c67566362c99
@@ -11,7 +8,9 @@ AUX networkmanager-0.8.1-dhclient3-fix.patch 295 RMD160 986359b62d5cb7d4ca34b015
AUX networkmanager-0.8.1-dhclient3.patch 4658 RMD160 d229c87a41f882a6162520ee3f2afdc5650c283a SHA1 06ca671ba76cd1591556cdcc96a88060ca89e727 SHA256 45b1c302cea8605cc489a77250404e4457d0747ca3cab9ed993eb51551da3290
AUX networkmanager-0.8.1-dhcp-configure.patch 2447 RMD160 1c222ce867a7f92167b2ffcbc401f8ea83b24193 SHA1 f17b676ad65788b5b665c16b29d01a88e3cdd041 SHA256 7bda5db2d937b2562c98435620774bba487bf8b53da5c035422b2bc2ed21a400
AUX networkmanager-0.8.1-glib-2.25.12-workaround.patch 663 RMD160 b4397b17a6148244dedd341b35185c07ca267f06 SHA1 926acbd76076750ab4ec48ac34fe73679693a4ca SHA256 a00523ad7d6bdced76be82b980788af4c313fc59aff8b9d258343e17ad6bf969
+AUX networkmanager-0.8.2-1.patch 13400 RMD160 90af20d2cfa323263b91be207f4c9abdfd21845d SHA1 d0df4e101935522a7cf728a47fa994e498ba4f37 SHA256 1dc6da9443f767dd288bdf166f2978b31e3b386be2536de0775cf918aabf5111
AUX networkmanager-0.8.2-accept-gw.patch 3679 RMD160 b163afa5215f0eb52ba2562d22c65ec5e0bd3380 SHA1 a71f25413abf0c359439add74a73545790604ac9 SHA256 631ccad5bc4c2d880b5235bc8e6ace494467bad1734023ded9d8bcd52b9177af
+AUX networkmanager-0.8.2-confchanges.patch 1279 RMD160 1ff5b6d663aa4417beaf9c7630d710a17a1812b5 SHA1 634ad19b189509e75362e5cd7f069ca795b4aeba SHA256 7c9ed8dc35b5b6d0414f96902fbe8117408ad556af655c0afc593ec5a1beac28
AUX nm-system-settings.conf 23 RMD160 6d66c702b345bde668a420a15716feea6005fbd1 SHA1 49ba558d20f5ca5a201e027e13b878dd5ac3569c SHA256 44b048804c7c0b8b3b0c29b8632b6ad613c397d0a1635ec918e10c0fbcdadf21
AUX nm-system-settings.conf-ifnet 70 RMD160 c0d2be147383999b62cead86ab4333169e4ef277 SHA1 679ec8052b610969c148a2d34cd4da7a41484a76 SHA256 34f53d9ac1ad65eda6942dc3059117f60f6321059ca23f4fbfcc2f2edcae151f
DIST NetworkManager-0.8.1.tar.bz2 1505134 RMD160 82f5ad1a641fa49acf34604f89154c865f3d5fbc SHA1 778989ed73cfd7ec05714f77121fa8bfc1bf0981 SHA256 dc126fbe3199d47899c4781e4fff32cee404dc7c728c6ade9eaa899bd80f19fa
@@ -21,16 +20,6 @@ DIST networkmanager-ifnet-540e40f.patch 268068 RMD160 954ffb9915fdd8ae650963b66a
EBUILD networkmanager-0.8-r1.ebuild 3516 RMD160 8722fcf8330e8f11a1e3dd83f2e2b53c8f34be5b SHA1 ebb761da259e1e76abe6645f35ff654fc5385984 SHA256 6142178a7ee9177a978c451eb9e02ccdf11de09b2f5b13ca0be79382d07883aa
EBUILD networkmanager-0.8.1-r6.ebuild 4632 RMD160 15481e54c0f3e9502c8357fd6a6b772a53c7ceab SHA1 b656512bcd456c4b621cff0876e846954a6545df SHA256 ec4be6303fd338df4efc0e4c51bce67985b295a14a9b6eea0e0a46460fffe557
EBUILD networkmanager-0.8.2-r1.ebuild 4132 RMD160 1261ce2f0e499ece5e2ea4c010c8627ede1fa754 SHA1 96f9ac6b0ecaf0656386e82458453a97dfb8be61 SHA256 d247e094c0e22b885b78efa2cc8a6c8b32bbb5967f95a46439985d9a9da7362e
-MISC ChangeLog 18655 RMD160 9ddd481dac4f22042472af2120d71cf46a4a93a0 SHA1 589e842769483065d8bb65f8282fa99cead8da1e SHA256 6222777d697232eb069bb545da2475e38fb40945c102987dbaa0b07b20b067c2
+EBUILD networkmanager-0.8.2-r2.ebuild 4248 RMD160 3dad60b3020562ffe57420ec35a00b244c7c7bbc SHA1 6e5a9805a9dc7f5fdc0ecaafc1c19135653afb19 SHA256 493187eaafb50c8c6294afd254beeaca570ad5f57b3b61a9f597356b86475bde
+MISC ChangeLog 18937 RMD160 4c1012515411de2a26230a95f84f73f3e9953994 SHA1 96611f8f465a157c1d203b5a965edad4e2409d88 SHA256 0157d80e238137c734847d8d38ad16d76bc96dbe98ada47bf949bfdd58b71867
MISC metadata.xml 975 RMD160 7f7f8f54c53fe2098dae8ed0a4cd177900289d3f SHA1 11de32f78915bbc01c6b0665b45233d004d75c25 SHA256 e0ce95394f82f5631ecec62c6595dc4dad9afc52cf5e1bb0f30618edfb79becc
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.16 (GNU/Linux)
-
-iQEcBAEBAgAGBQJM9MVtAAoJEDCzDeQXsVfpWyYH/j9cyWGQFt6IFuVc4DvwabXf
-JTHXpFnV4D3sMb7e5OkTtnpRUumtfgR4uE6/WYe/po2JJXgcC1oDBFm1DO6Vd1DF
-29vWLSxhCQi5v0iVP6SVqdBUhuQe96aDNwj3lkvaw4OFvILdyJv8s3CSui/OIfyr
-rqmQzyF2Y4GSVfCE0+qN+ik/h0sHeq4RxujshcZ02fG1rsz7o0h25k1Tkme+S6u/
-mYrLNcu0kznPNA34Ljr0Pi3iAKHtgl6imlyhwISc7C12AL8OoABQ5Q2d4yexZyG6
-ICEcwKuP3KY7H85ycLRO5IbQnzdvijY34VQy6YxW26GjzfN0+mhggtGJwZXMnoU=
-=t2RA
------END PGP SIGNATURE-----
diff --git a/net-misc/networkmanager/files/networkmanager-0.8.2-1.patch b/net-misc/networkmanager/files/networkmanager-0.8.2-1.patch
new file mode 100644
index 000000000000..f1d891d7c89e
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-0.8.2-1.patch
@@ -0,0 +1,384 @@
+From d60a988518cb0851488bc21732271a971877cdcd Mon Sep 17 00:00:00 2001
+From: Dan Williams <dcbw@redhat.com>
+Date: Thu, 18 Nov 2010 22:30:00 +0000
+Subject: dhcpcd: prevent dhcpcd from messing with routing (bgo #634983)
+
+Since NM is already handling that.
+---
+diff --git a/src/dhcp-manager/nm-dhcp-dhcpcd.c b/src/dhcp-manager/nm-dhcp-dhcpcd.c
+index 378a97b..4fb703c 100644
+--- a/src/dhcp-manager/nm-dhcp-dhcpcd.c
++++ b/src/dhcp-manager/nm-dhcp-dhcpcd.c
+@@ -128,6 +128,8 @@ real_ip4_start (NMDHCPClient *client,
+
+ g_ptr_array_add (argv, (gpointer) "-L"); /* Disable built-in IPv4LL since we use avahi-autoipd */
+
++ g_ptr_array_add (argv, (gpointer) "-G"); /* Let NM handle routing */
++
+ g_ptr_array_add (argv, (gpointer) "-c"); /* Set script file */
+ g_ptr_array_add (argv, (gpointer) ACTION_SCRIPT_PATH );
+
+--
+cgit v0.8.3-6-g21f6
+From 83e02840b5ce1cf8c122cc70918ddd57396c91db Mon Sep 17 00:00:00 2001
+From: Dan Williams <dcbw@redhat.com>
+Date: Wed, 24 Nov 2010 04:17:21 +0000
+Subject: core: suppress error message when user settings service is not active
+
+Don't bother trying to initialize the user settings proxy when it
+isn't even active. Would trigger a warning to syslog if PolicyKit
+permissions changed via changes to /usr/share/polkit-1/actions/.
+---
+diff --git a/src/nm-manager.c b/src/nm-manager.c
+index 48f2173..afcc6ad 100644
+--- a/src/nm-manager.c
++++ b/src/nm-manager.c
+@@ -1356,6 +1356,12 @@ user_proxy_init (NMManager *self)
+ g_return_if_fail (self != NULL);
+ g_return_if_fail (priv->user_proxy == NULL);
+
++ /* Don't try to initialize the user settings proxy if the user
++ * settings service doesn't actually exist.
++ */
++ if (!nm_dbus_manager_name_has_owner (priv->dbus_mgr, NM_DBUS_SERVICE_USER_SETTINGS))
++ return;
++
+ bus = nm_dbus_manager_get_connection (priv->dbus_mgr);
+ priv->user_proxy = dbus_g_proxy_new_for_name_owner (bus,
+ NM_DBUS_SERVICE_USER_SETTINGS,
+@@ -3975,8 +3981,7 @@ nm_manager_start (NMManager *self)
+ * they will be queried when the user settings service shows up on the
+ * bus in nm_manager_name_owner_changed().
+ */
+- if (nm_dbus_manager_name_has_owner (priv->dbus_mgr, NM_DBUS_SERVICE_USER_SETTINGS))
+- user_proxy_init (self);
++ user_proxy_init (self);
+
+ nm_udev_manager_query_devices (priv->udev_mgr);
+ bluez_manager_resync_devices (self);
+--
+cgit v0.8.3-6-g21f6
+From 45ae52523158f4e7c0cc3fb5af56859c41512f66 Mon Sep 17 00:00:00 2001
+From: Jiří Klimeš <jklimes@redhat.com>
+Date: Wed, 24 Nov 2010 11:51:08 +0000
+Subject: dns: fix a crash due to uninitialized nis_domain (novell #655685)
+
+Reported and tested by Raymond Wooninck. Thanks!
+---
+diff --git a/src/dns-manager/nm-dns-manager.c b/src/dns-manager/nm-dns-manager.c
+index 7a6fbbc..b0cdcc2 100644
+--- a/src/dns-manager/nm-dns-manager.c
++++ b/src/dns-manager/nm-dns-manager.c
+@@ -583,6 +583,7 @@ update_dns (NMDnsManager *self,
+ rc.nameservers = g_ptr_array_new ();
+ rc.domain = NULL;
+ rc.searches = g_ptr_array_new ();
++ rc.nis_domain = NULL;
+ rc.nis_servers = g_ptr_array_new ();
+
+ if (priv->ip4_vpn_config)
+--
+cgit v0.8.3-6-g21f6
+From 71fcccbacd51e939f168d44301393301e9dcb5fe Mon Sep 17 00:00:00 2001
+From: Jiří Klimeš <jklimes@redhat.com>
+Date: Mon, 13 Dec 2010 19:55:02 +0000
+Subject: libnm-util: fix a memory leaks in nm_setting_to_string()
+
+---
+diff --git a/libnm-util/nm-setting.c b/libnm-util/nm-setting.c
+index 06994c7..190199c 100644
+--- a/libnm-util/nm-setting.c
++++ b/libnm-util/nm-setting.c
+@@ -620,6 +620,8 @@ nm_setting_to_string (NMSetting *setting)
+ is_serializable = prop_spec->flags & NM_SETTING_PARAM_SERIALIZE;
+ is_default = g_param_value_defaults (prop_spec, &value);
+
++ g_value_unset (&value);
++
+ if (is_serializable || is_default) {
+ g_string_append (string, " (");
+
+--
+cgit v0.8.3-6-g21f6
+From 7c2ba8a4a55899e4f4bd5bd243e10ce8a0c0f13a Mon Sep 17 00:00:00 2001
+From: Jiří Klimeš <jklimes@redhat.com>
+Date: Thu, 16 Dec 2010 12:49:28 +0000
+Subject: libnm-util: fix nm_utils_security_valid() checks for Ad-Hoc APs (rh #632123)
+
+Without the fix fake Ad-Hoc APs created by nm-applet's "Create New Wireless
+Network..." don't pass the check and nm-applet can crash.
+---
+diff --git a/libnm-util/nm-utils.c b/libnm-util/nm-utils.c
+index ce13da3..9c3662f 100644
+--- a/libnm-util/nm-utils.c
++++ b/libnm-util/nm-utils.c
+@@ -1269,14 +1269,24 @@ nm_utils_security_valid (NMUtilsSecurityType type,
+ if (!(wifi_caps & NM_WIFI_DEVICE_CAP_WPA))
+ return FALSE;
+ if (have_ap) {
+- /* Ad-Hoc WPA APs won't necessarily have the PSK flag set */
+- if ((ap_wpa & NM_802_11_AP_SEC_KEY_MGMT_PSK) || adhoc) {
+- if ( (ap_wpa & NM_802_11_AP_SEC_PAIR_TKIP)
++ /* Ad-Hoc WPA APs won't necessarily have the PSK flag set, and
++ * they don't have any pairwise ciphers. */
++ if (adhoc) {
++ if ( (ap_wpa & NM_802_11_AP_SEC_GROUP_TKIP)
+ && (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_TKIP))
+ return TRUE;
+- if ( (ap_wpa & NM_802_11_AP_SEC_PAIR_CCMP)
++ if ( (ap_wpa & NM_802_11_AP_SEC_GROUP_CCMP)
+ && (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_CCMP))
+ return TRUE;
++ } else {
++ if (ap_wpa & NM_802_11_AP_SEC_KEY_MGMT_PSK) {
++ if ( (ap_wpa & NM_802_11_AP_SEC_PAIR_TKIP)
++ && (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_TKIP))
++ return TRUE;
++ if ( (ap_wpa & NM_802_11_AP_SEC_PAIR_CCMP)
++ && (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_CCMP))
++ return TRUE;
++ }
+ }
+ return FALSE;
+ }
+@@ -1285,14 +1295,22 @@ nm_utils_security_valid (NMUtilsSecurityType type,
+ if (!(wifi_caps & NM_WIFI_DEVICE_CAP_RSN))
+ return FALSE;
+ if (have_ap) {
+- /* Ad-Hoc WPA APs won't necessarily have the PSK flag set */
+- if ((ap_rsn & NM_802_11_AP_SEC_KEY_MGMT_PSK) || adhoc) {
+- if ( (ap_rsn & NM_802_11_AP_SEC_PAIR_TKIP)
+- && (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_TKIP))
++ /* Ad-Hoc WPA APs won't necessarily have the PSK flag set, and
++ * they don't have any pairwise ciphers, nor any RSA flags yet. */
++ if (adhoc) {
++ if (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_TKIP)
+ return TRUE;
+- if ( (ap_rsn & NM_802_11_AP_SEC_PAIR_CCMP)
+- && (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_CCMP))
++ if (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_CCMP)
+ return TRUE;
++ } else {
++ if (ap_rsn & NM_802_11_AP_SEC_KEY_MGMT_PSK) {
++ if ( (ap_rsn & NM_802_11_AP_SEC_PAIR_TKIP)
++ && (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_TKIP))
++ return TRUE;
++ if ( (ap_rsn & NM_802_11_AP_SEC_PAIR_CCMP)
++ && (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_CCMP))
++ return TRUE;
++ }
+ }
+ return FALSE;
+ }
+--
+cgit v0.8.3-6-g21f6
+From 41167ce95603b56a39f808b9f14389bc8db3ea8c Mon Sep 17 00:00:00 2001
+From: Jiří Klimeš <jklimes@redhat.com>
+Date: Wed, 10 Nov 2010 15:21:25 +0000
+Subject: keyfile: ignore temporary files (bgo #602868)
+
+Ignore temporary files created by vim editor and temporary files created
+internally by g_file_set_contents() (mkstemp()) when writing connections.
+---
+diff --git a/system-settings/plugins/keyfile/Makefile.am b/system-settings/plugins/keyfile/Makefile.am
+index c519adc..128775e 100644
+--- a/system-settings/plugins/keyfile/Makefile.am
++++ b/system-settings/plugins/keyfile/Makefile.am
+@@ -16,6 +16,8 @@ libkeyfile_io_la_SOURCES = \
+ writer.c \
+ writer.h \
+ errors.c \
++ utils.c \
++ utils.h \
+ common.h
+
+ libkeyfile_io_la_CPPFLAGS = \
+diff --git a/system-settings/plugins/keyfile/common.h b/system-settings/plugins/keyfile/common.h
+index 7d94a70..6c8f9ce 100644
+--- a/system-settings/plugins/keyfile/common.h
++++ b/system-settings/plugins/keyfile/common.h
+@@ -23,6 +23,9 @@
+
+ #include <glib.h>
+
++#define SWP_TAG ".swp"
++#define SWPX_TAG ".swpx"
++
+ #define KEYFILE_PLUGIN_NAME "keyfile"
+ #define KEYFILE_PLUGIN_INFO "(c) 2007 - 2010 Red Hat, Inc. To report bugs please use the NetworkManager mailing list."
+
+diff --git a/system-settings/plugins/keyfile/plugin.c b/system-settings/plugins/keyfile/plugin.c
+index f57a4b6..5a927ce 100644
+--- a/system-settings/plugins/keyfile/plugin.c
++++ b/system-settings/plugins/keyfile/plugin.c
+@@ -39,6 +39,7 @@
+ #include "nm-keyfile-connection.h"
+ #include "writer.h"
+ #include "common.h"
++#include "utils.h"
+
+ #define CONF_FILE SYSCONFDIR "/NetworkManager/NetworkManager.conf"
+ #define OLD_CONF_FILE SYSCONFDIR "/NetworkManager/nm-system-settings.conf"
+@@ -89,6 +90,9 @@ read_connections (NMSystemConfigInterface *config)
+ NMKeyfileConnection *connection;
+ char *full_path;
+
++ if (utils_should_ignore_file (item))
++ continue;
++
+ full_path = g_build_filename (KEYFILE_DIR, item, NULL);
+ PLUGIN_PRINT (KEYFILE_PLUGIN_NAME, "parsing %s ... ", item);
+ connection = nm_keyfile_connection_new (full_path, &error);
+@@ -192,6 +196,11 @@ dir_changed (GFileMonitor *monitor,
+ GError *error = NULL;
+
+ name = g_file_get_path (file);
++ if (utils_should_ignore_file (name)) {
++ g_free (name);
++ return;
++ }
++
+ connection = g_hash_table_lookup (priv->hash, name);
+
+ switch (event_type) {
+diff --git a/system-settings/plugins/keyfile/utils.c b/system-settings/plugins/keyfile/utils.c
+new file mode 100644
+index 0000000..de64f79
+--- a/dev/null
++++ b/system-settings/plugins/keyfile/utils.c
+@@ -0,0 +1,97 @@
++/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
++/* NetworkManager system settings service
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License along
++ * with this program; if not, write to the Free Software Foundation, Inc.,
++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * (C) Copyright 2010 Red Hat, Inc.
++ */
++
++#include <glib.h>
++#include <stdlib.h>
++#include <string.h>
++#include "utils.h"
++
++
++static const char temp_letters[] =
++"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
++
++/*
++ * Check '.[a-zA-Z0-9]{6}' file suffix used for temporary files by g_file_set_contents() (mkstemp()).
++ */
++static gboolean
++check_mkstemp_suffix (const char *path)
++{
++ const char *ptr;
++
++ g_return_val_if_fail (path != NULL, FALSE);
++
++ /* Matches *.[a-zA-Z0-9]{6} suffix of mkstemp()'s temporary files */
++ ptr = strrchr (path, '.');
++ if (ptr && (strspn (ptr + 1, temp_letters) == 6) && (! ptr[7]))
++ return TRUE;
++ return FALSE;
++}
++
++static gboolean
++check_prefix (const char *base, const char *tag)
++{
++ int len, tag_len;
++
++ g_return_val_if_fail (base != NULL, TRUE);
++ g_return_val_if_fail (tag != NULL, TRUE);
++
++ len = strlen (base);
++ tag_len = strlen (tag);
++ if ((len > tag_len) && !strncasecmp (base, tag, tag_len))
++ return TRUE;
++ return FALSE;
++}
++
++static gboolean
++check_suffix (const char *base, const char *tag)
++{
++ int len, tag_len;
++
++ g_return_val_if_fail (base != NULL, TRUE);
++ g_return_val_if_fail (tag != NULL, TRUE);
++
++ len = strlen (base);
++ tag_len = strlen (tag);
++ if ((len > tag_len) && !strcasecmp (base + len - tag_len, tag))
++ return TRUE;
++ return FALSE;
++}
++
++gboolean
++utils_should_ignore_file (const char *filename)
++{
++ char *base;
++ gboolean ignore = FALSE;
++
++ g_return_val_if_fail (filename != NULL, TRUE);
++
++ base = g_path_get_basename (filename);
++ g_return_val_if_fail (base != NULL, TRUE);
++
++ /* Ignore files with certain patterns */
++ if ( (check_prefix (base, ".") && check_suffix (base, SWP_TAG)) /* vim temporary files: .filename.swp */
++ || (check_prefix (base, ".") && check_suffix (base, SWPX_TAG)) /* vim temporary files: .filename.swpx */
++ || check_mkstemp_suffix (base)) /* temporary files created by mkstemp() */
++ ignore = TRUE;
++
++ g_free (base);
++ return ignore;
++}
++
+diff --git a/system-settings/plugins/keyfile/utils.h b/system-settings/plugins/keyfile/utils.h
+new file mode 100644
+index 0000000..3c1a610
+--- a/dev/null
++++ b/system-settings/plugins/keyfile/utils.h
+@@ -0,0 +1,30 @@
++/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
++/* NetworkManager system settings service
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License along
++ * with this program; if not, write to the Free Software Foundation, Inc.,
++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * (C) Copyright 2010 Red Hat, Inc.
++ */
++
++#ifndef _UTILS_H_
++#define _UTILS_H_
++
++#include <glib.h>
++#include "common.h"
++
++gboolean utils_should_ignore_file (const char *filename);
++
++#endif /* _UTILS_H_ */
++
+--
+cgit v0.8.3-6-g21f6
diff --git a/net-misc/networkmanager/files/networkmanager-0.8.2-confchanges.patch b/net-misc/networkmanager/files/networkmanager-0.8.2-confchanges.patch
new file mode 100644
index 000000000000..a5acc38c0dfe
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-0.8.2-confchanges.patch
@@ -0,0 +1,25 @@
+--- src/NetworkManager.conf~ 2010-11-03 13:04:05.000000000 +0000
++++ src/NetworkManager.conf 2010-12-17 12:12:48.391177001 +0000
+@@ -57,6 +57,9 @@
+ <allow send_destination="org.freedesktop.NetworkManager"
+ send_interface="org.freedesktop.NetworkManager.VPN.Connection"/>
+
++ <allow send_destination="org.freedesktop.NetworkManager"
++ send_interface="org.freedesktop.NetworkManager.VPN.Plugin"/>
++
+ <deny send_destination="org.freedesktop.NetworkManager"
+ send_interface="org.freedesktop.NetworkManager"
+ send_member="SetLogging"/>
+@@ -73,6 +76,12 @@
+ send_interface="org.freedesktop.NetworkManager"
+ send_member="wake"/>
+ </policy>
++ <policy group="plugdev">
++ <allow send_destination="org.freedesktop.NetworkManager"/>
++
++ <deny send_destination="org.freedesktop.NetworkManager"
++ send_interface="org.freedesktop.NetworkManager.PPP"/>
++ </policy>
+ <policy context="default">
+ <deny own="org.freedesktop.NetworkManager"/>
+ <deny own="org.freedesktop.NetworkManagerSystemSettings"/>
diff --git a/net-misc/networkmanager/networkmanager-0.8.2-r2.ebuild b/net-misc/networkmanager/networkmanager-0.8.2-r2.ebuild
new file mode 100644
index 000000000000..e7ae44afad53
--- /dev/null
+++ b/net-misc/networkmanager/networkmanager-0.8.2-r2.ebuild
@@ -0,0 +1,150 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.8.2-r2.ebuild,v 1.1 2010/12/17 12:17:05 dagger Exp $
+
+EAPI="2"
+
+inherit gnome.org linux-info
+
+# NetworkManager likes itself with capital letters
+MY_PN=${PN/networkmanager/NetworkManager}
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Network configuration and management in an easy way. Desktop environment independent."
+HOMEPAGE="http://www.gnome.org/projects/NetworkManager/"
+SRC_URI="${SRC_URI//${PN}/${MY_PN}}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
+IUSE="avahi bluetooth doc nss gnutls dhclient dhcpcd kernel_linux resolvconf connection-sharing"
+
+RDEPEND=">=sys-apps/dbus-1.2
+ >=dev-libs/dbus-glib-0.75
+ >=net-wireless/wireless-tools-28_pre9
+ >=sys-fs/udev-145[extras]
+ >=dev-libs/glib-2.18
+ >=sys-auth/polkit-0.92
+ >=dev-libs/libnl-1.1
+ >=net-misc/modemmanager-0.4
+ >=net-wireless/wpa_supplicant-0.5.10[dbus]
+ bluetooth? ( net-wireless/bluez )
+ || ( sys-libs/e2fsprogs-libs <sys-fs/e2fsprogs-1.41.0 )
+ avahi? ( net-dns/avahi[autoipd] )
+ gnutls? (
+ nss? ( >=dev-libs/nss-3.11 )
+ !nss? ( dev-libs/libgcrypt
+ net-libs/gnutls ) )
+ !gnutls? ( >=dev-libs/nss-3.11 )
+ dhclient? (
+ dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 )
+ !dhcpcd? ( net-misc/dhcp ) )
+ !dhclient? ( >=net-misc/dhcpcd-4.0.0_rc3 )
+ resolvconf? ( net-dns/openresolv )
+ connection-sharing? (
+ net-dns/dnsmasq
+ net-firewall/iptables )"
+
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ dev-util/intltool
+ >=net-dialup/ppp-2.4.5
+ doc? ( >=dev-util/gtk-doc-1.8 )"
+
+S=${WORKDIR}/${MY_P}
+
+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_setup() {
+
+ 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
+}
+
+src_prepare() {
+ # dbus policy patch
+ epatch "${FILESDIR}/${P}-confchanges.patch"
+ # accept "gw" in /etc/conf.d/net (bug #339215)
+ epatch "${FILESDIR}/${P}-accept-gw.patch"
+ # Backports #1
+ epatch "${FILESDIR}/${P}-1.patch"
+}
+
+src_configure() {
+ ECONF="--disable-more-warnings
+ --localstatedir=/var
+ --with-distro=gentoo
+ --with-dbus-sys-dir=/etc/dbus-1/system.d
+ --with-udev-dir=/etc/udev
+ --with-iptables=/sbin/iptables
+ $(use_enable doc gtk-doc)
+ $(use_with doc docs)
+ $(use_with resolvconf)"
+
+ # default is dhcpcd (if none or both are specified), ISC dchclient otherwise
+ if use dhclient ; then
+ if use dhcpcd ; then
+ ECONF="${ECONF} --with-dhcpcd --without-dhclient"
+ else
+ ECONF="${ECONF} --with-dhclient --without-dhcpcd"
+ fi
+ else
+ ECONF="${ECONF} --with-dhcpcd --without-dhclient"
+ fi
+
+ # default is NSS (if none or both are specified), GnuTLS otherwise
+ if use gnutls ; then
+ if use nss ; then
+ ECONF="${ECONF} --with-crypto=nss"
+ else
+ ECONF="${ECONF} --with-crypto=gnutls"
+ fi
+ else
+ ECONF="${ECONF} --with-crypto=nss"
+ fi
+
+ econf ${ECONF}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ # Need to keep the /var/run/NetworkManager directory
+ keepdir /var/run/NetworkManager
+
+ # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
+ keepdir /etc/NetworkManager/dispatcher.d
+
+ dodoc AUTHORS ChangeLog NEWS README TODO || die "dodoc failed"
+
+ # Add keyfile plugin support
+ keepdir /etc/NetworkManager/system-connections
+ insinto /etc/NetworkManager
+ newins "${FILESDIR}/nm-system-settings.conf-ifnet" nm-system-settings.conf \
+ || die "newins failed"
+}
+
+pkg_postinst() {
+ elog "You will need to reload DBus if this is your first time installing"
+ elog "NetworkManager, or if you're upgrading from 0.7 or older."
+ elog ""
+}