summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Piasek <dagger@gentoo.org>2010-08-18 12:19:18 +0100
committerRobert Piasek <dagger@gentoo.org>2010-08-18 12:19:18 +0100
commitbc59c48651143d025f0e4162b07517489ecffda5 (patch)
treeff7eec5f8b21d12379839e67e16354e6a0585f4f /net-misc
parentNew patch for ifnet plugin. Should fix bug #333257 (diff)
downloaddagger-bc59c48651143d025f0e4162b07517489ecffda5.tar.gz
dagger-bc59c48651143d025f0e4162b07517489ecffda5.tar.bz2
dagger-bc59c48651143d025f0e4162b07517489ecffda5.zip
Added patch for ifnet plugin. That should fix bug #333257
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/networkmanager/ChangeLog7
-rw-r--r--net-misc/networkmanager/Manifest2
-rw-r--r--net-misc/networkmanager/files/networkmanager-0.8.1-fix-ifnet1.patch414
-rw-r--r--net-misc/networkmanager/networkmanager-0.8.1-r4.ebuild135
4 files changed, 557 insertions, 1 deletions
diff --git a/net-misc/networkmanager/ChangeLog b/net-misc/networkmanager/ChangeLog
index 97a89e3..490fe9d 100644
--- a/net-misc/networkmanager/ChangeLog
+++ b/net-misc/networkmanager/ChangeLog
@@ -2,6 +2,13 @@
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/ChangeLog,v 1.47 2009/06/10 22:03:19 dagger Exp $
+*networkmanager-0.8.1-r4 (18 Aug 2010)
+
+ 18 Aug 2010; Robert Piasek <dagger@gentoo.org>
+ +networkmanager-0.8.1-r4.ebuild,
+ +files/networkmanager-0.8.1-fix-ifnet1.patch:
+ Added patch for ifnet plugin. That should fix bug #333257
+
17 Aug 2010; Robert Piasek <dagger@gentoo.org>
networkmanager-0.8.1-r2.ebuild,
+files/networkmanager-0.8.1-dhclient3.patch:
diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest
index bc7ba1c..3e33b0d 100644
--- a/net-misc/networkmanager/Manifest
+++ b/net-misc/networkmanager/Manifest
@@ -8,5 +8,5 @@ AUX nm-system-settings.conf 70 RMD160 c0d2be147383999b62cead86ab4333169e4ef277 S
DIST NetworkManager-0.8.1.tar.bz2 1505134 RMD160 82f5ad1a641fa49acf34604f89154c865f3d5fbc SHA1 778989ed73cfd7ec05714f77121fa8bfc1bf0981 SHA256 dc126fbe3199d47899c4781e4fff32cee404dc7c728c6ade9eaa899bd80f19fa
DIST networkmanager-ifnet-308267b4.patch 263345 RMD160 ceefeacea0c2e6cedb4ded62b9628173c0a7c7db SHA1 1249e86d9ba1769160a8dcf8a2482c5f93f0fe63 SHA256 60b5d9a3604fd093d4cff2be806500bcaa59e1d69848aeea9d4f9f8aed26a11c
EBUILD networkmanager-0.8.1-r4.ebuild 3757 RMD160 9230ed90f403de4656231f5b3deb379544555d3f SHA1 2697e571030a4ead313248c066bb9b23d7aa927f SHA256 722964e2d7a906ad1853469eecb34a7bdc7b10cb4d65065ed09d91091b8f7dfd
-MISC ChangeLog 12724 RMD160 840f4535a92095a83d716581e3f389478db7a351 SHA1 b15189bc66cd7994807b9714bfe0ad1fdb57e546 SHA256 88d20732ad113c5083977a251fb4f9a34ef8cedfa827d653d8d756bc5267bf22
+MISC ChangeLog 12957 RMD160 2cfbcb3bff148dbf830d47a0c98bdf0114240f95 SHA1 28dedd12700325ad722db3d9cff06f800c486de0 SHA256 9cfe21d2b955903466150bffdb292293b3fe6f1320f170590e38873d31891dab
MISC metadata.xml 969 RMD160 c16683ef7fed4b5603029ae39f5872032ec37554 SHA1 813e0b48a78ce50d5257030507d22fd0e9452161 SHA256 e4375eae4ff0d47386780e4d29575e6581f7c9b89168372bb1bb7713a452c02f
diff --git a/net-misc/networkmanager/files/networkmanager-0.8.1-fix-ifnet1.patch b/net-misc/networkmanager/files/networkmanager-0.8.1-fix-ifnet1.patch
new file mode 100644
index 0000000..b6eda01
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-0.8.1-fix-ifnet1.patch
@@ -0,0 +1,414 @@
+From 283dba290ad1dd98526080c2d1ce565c2ff64c41 Mon Sep 17 00:00:00 2001
+From: Mu Qiao <qiaomuf@gmail.com>
+Date: Wed, 18 Aug 2010 17:38:38 +0800
+Subject: [PATCH] reading & writing: reserve functions defined in /etc/conf.d/net
+ Signed-off-by: Mu Qiao <qiaomuf@gmail.com>
+
+---
+ system-settings/plugins/ifnet/net_parser.c | 173 +++++++++++++++++++-----
+ system-settings/plugins/ifnet/tests/net | 80 +++++++++++
+ system-settings/plugins/ifnet/tests/test_all.c | 1 +
+ 3 files changed, 222 insertions(+), 32 deletions(-)
+
+diff --git a/system-settings/plugins/ifnet/net_parser.c b/system-settings/plugins/ifnet/net_parser.c
+index d4bc461..b4a381d 100644
+--- a/system-settings/plugins/ifnet/net_parser.c
++++ b/system-settings/plugins/ifnet/net_parser.c
+@@ -31,6 +31,9 @@ static GHashTable *conn_table;
+ /* Save global settings which are used for writing*/
+ static GHashTable *global_settings_table;
+
++/* Save functions */
++static GList *functions_list;
++
+ /* Used to decide whether to write changes to file*/
+ static gboolean net_parser_data_changed = FALSE;
+
+@@ -213,6 +216,71 @@ ifnet_get_global_setting (gchar * group, gchar * key)
+ return result;
+ }
+
++static void
++strip_function (GIOChannel * channel, gchar * line)
++{
++
++ int counter = 0;
++ gchar *p, *tmp;
++ gboolean begin = FALSE;
++ GString *function_str = g_string_new (line);
++
++ g_string_append (function_str, "\n");
++ while (1) {
++ p = line;
++ while (*p != '\0') {
++ if (*p == '{') {
++ counter++;
++ begin = TRUE;
++ } else if (*p == '}')
++ counter--;
++ p++;
++ }
++ if (begin && counter == 0) {
++ g_free (line);
++ goto done;
++ }
++ while (1) {
++ g_free (line);
++ if (g_io_channel_read_line
++ (channel, &line, NULL, NULL,
++ NULL) == G_IO_STATUS_EOF)
++ goto done;
++ g_string_append (function_str, line);
++ tmp = g_strdup (line);
++ g_strstrip (tmp);
++ if (tmp[0] != '#' && tmp[0] != '\0') {
++ g_free (tmp);
++ break;
++ } else
++ g_free (tmp);
++ }
++ }
++ done:
++ functions_list =
++ g_list_append (functions_list, g_strdup (function_str->str));
++ g_string_free (function_str, TRUE);
++}
++
++static gboolean
++is_function (gchar * line)
++{
++ static gchar *func_names[] =
++ { "preup", "predown", "postup", "postdown", "failup", "faildown",
++ NULL,
++ };
++ int i;
++
++ for (i = 0; func_names[i]; i++) {
++ if (g_str_has_prefix (line, func_names[i])) {
++ PLUGIN_PRINT (IFNET_PLUGIN_NAME,
++ "Ignoring function: %s", func_names[i]);
++ return TRUE;
++ }
++ }
++ return FALSE;
++}
++
+ gboolean
+ ifnet_init (gchar * config_file)
+ {
+@@ -229,12 +297,13 @@ ifnet_init (gchar * config_file)
+
+ conn_table = g_hash_table_new (g_str_hash, g_str_equal);
+ global_settings_table = g_hash_table_new (g_str_hash, g_str_equal);
++ functions_list = NULL;
+
+ if (g_file_test (config_file, G_FILE_TEST_IS_REGULAR))
+ channel = g_io_channel_new_file (config_file, "r", NULL);
+ if (channel == NULL) {
+- PLUGIN_WARN (IFNET_PLUGIN_NAME, "Error: Can't open %s\n",
+- config_file);
++ PLUGIN_WARN (IFNET_PLUGIN_NAME,
++ "Error: Can't open %s\n", config_file);
+ return FALSE;
+ }
+
+@@ -244,6 +313,10 @@ ifnet_init (gchar * config_file)
+ g_strstrip (line);
+ /* convert multiple lines to a complete line and
+ * pass it to init_block_by_line() */
++ if (is_function (line)) {
++ strip_function (channel, line);
++ continue;
++ }
+ if (line[0] != '#' && line[0] != '\0') {
+ gchar *pos = NULL;
+
+@@ -255,15 +328,16 @@ ifnet_init (gchar * config_file)
+ *pos = '\0';
+ g_strstrip (line);
+ if (line[0] != '\0') {
+- g_string_append_printf (buf, " %s",
+- line);
++ g_string_append_printf (buf,
++ " %s", line);
+ }
+ g_free (line);
+ if (!complete)
+ continue;
+ } else {
+- complete = (g_strrstr (line, "(") != NULL
+- && g_strrstr (line, ")") != NULL)
++ complete =
++ (g_strrstr (line, "(") != NULL
++ && g_strrstr (line, ")") != NULL)
+ || g_strrstr (line, "(") == NULL;
+ if ((pos = strchr (line, '#')) != NULL)
+ *pos = '\0';
+@@ -305,8 +379,8 @@ ifnet_set_data (gchar * conn_name, gchar * key, gchar * value)
+ GHashTable *conn = g_hash_table_lookup (conn_table, conn_name);
+
+ if (!conn) {
+- PLUGIN_WARN (IFNET_PLUGIN_NAME, "%s does not exsit!",
+- conn_name);
++ PLUGIN_WARN (IFNET_PLUGIN_NAME,
++ "%s does not exsit!", conn_name);
+ return;
+ }
+ /* Remove existing key value pair */
+@@ -371,8 +445,8 @@ format_ips (gchar * value, gchar ** out_line, gchar * key, gchar * name)
+ // Multiple lines
+ g_string_append_printf (formated_string, "%s_%s=(\n", key, name);
+ for (i = 0; i < length; i++)
+- g_string_append_printf (formated_string, "\t\"%s\"\n",
+- ipset[i]);
++ g_string_append_printf (formated_string,
++ "\t\"%s\"\n", ipset[i]);
+ g_string_append (formated_string, ")\n");
+ *out_line = g_strdup (formated_string->str);
+ done:
+@@ -387,6 +461,7 @@ ifnet_flush_to_file (gchar * config_file)
+ GError **error = NULL;
+ gpointer key, value, name, network;
+ GHashTableIter iter, iter_network;
++ GList *list_iter;
+ gchar *out_line;
+ gsize bytes_written;
+ gboolean result = FALSE;
+@@ -412,22 +487,22 @@ ifnet_flush_to_file (gchar * config_file)
+ while (g_hash_table_iter_next (&iter, &key, &value)) {
+ out_line =
+ g_strdup_printf ("%s=%s\n", (gchar *) key, (gchar *) value);
+- g_io_channel_write_chars (channel, out_line, -1, &bytes_written,
+- error);
++ g_io_channel_write_chars (channel, out_line, -1,
++ &bytes_written, error);
+ if (bytes_written == 0 || (error && *error))
+ break;
+ g_free (out_line);
+ }
+ if (error && *error) {
+- PLUGIN_WARN (IFNET_PLUGIN_NAME, "Found error: %s",
+- (*error)->message);
++ PLUGIN_WARN (IFNET_PLUGIN_NAME,
++ "Found error: %s", (*error)->message);
+ goto done;
+ }
++
++ /* Writing connection data */
+ g_io_channel_write_chars (channel,
+ "\n###### Connection Configuration ######\n",
+ -1, &bytes_written, error);
+-
+- /* Writing connection data */
+ g_hash_table_iter_init (&iter, conn_table);
+ while (g_hash_table_iter_next (&iter, &name, &network)) {
+ g_hash_table_iter_init (&iter_network, (GHashTable *) network);
+@@ -439,22 +514,26 @@ ifnet_flush_to_file (gchar * config_file)
+ if (!g_str_has_prefix ((gchar *) key, "name")
+ && !g_str_has_prefix ((gchar *) key, "type")) {
+ /* These keys contain brackets */
+- if (strcmp ((gchar *) key, "config") == 0
+- || strcmp ((gchar *) key, "routes") == 0
+- || strcmp ((gchar *) key, "pppd") == 0
++ if (strcmp
++ ((gchar *) key,
++ "config") == 0
++ || strcmp ((gchar *) key,
++ "routes") == 0
++ || strcmp ((gchar *) key,
++ "pppd") == 0
+ || strcmp ((gchar *) key, "chat") == 0)
+- format_ips (value, &out_line,
+- (gchar *) key,
+- (gchar *) name);
++ format_ips (value, &out_line, (gchar *)
++ key, (gchar *)
++ name);
+ else
+ out_line =
+ g_strdup_printf
+ ("%s_%s=\"%s\"\n",
+- (gchar *) key, (gchar *) name,
+- (gchar *) value);
+- g_io_channel_write_chars (channel, out_line, -1,
+- &bytes_written,
+- error);
++ (gchar *) key,
++ (gchar *) name, (gchar *) value);
++ g_io_channel_write_chars
++ (channel, out_line, -1,
++ &bytes_written, error);
+ if (bytes_written == 0 || (error && *error))
+ break;
+ g_free (out_line);
+@@ -462,14 +541,38 @@ ifnet_flush_to_file (gchar * config_file)
+ }
+ }
+ if (error && *error) {
+- PLUGIN_WARN (IFNET_PLUGIN_NAME, "Found error: %s",
+- (*error)->message);
++ PLUGIN_WARN (IFNET_PLUGIN_NAME,
++ "Found error: %s", (*error)->message);
+ goto done;
+ }
++
++ /* Writing reserved functions */
++ if (functions_list) {
++ g_io_channel_write_chars (channel,
++ "\n###### Reserved Functions ######\n",
++ -1, &bytes_written, error);
++ /* Writing functions */
++ for (list_iter = functions_list; list_iter;
++ list_iter = g_list_next (list_iter)) {
++ out_line =
++ g_strdup_printf ("%s\n", (gchar *) list_iter->data);
++ g_io_channel_write_chars (channel, out_line, -1,
++ &bytes_written, error);
++ if (bytes_written == 0 || (error && *error))
++ break;
++ g_free (out_line);
++ }
++ if (error && *error) {
++ PLUGIN_WARN (IFNET_PLUGIN_NAME,
++ "Found error: %s", (*error)->message);
++ goto done;
++ }
++ }
++
+ g_io_channel_flush (channel, error);
+ if (error && *error) {
+- PLUGIN_WARN (IFNET_PLUGIN_NAME, "Found error: %s",
+- (*error)->message);
++ PLUGIN_WARN (IFNET_PLUGIN_NAME,
++ "Found error: %s", (*error)->message);
+ goto done;
+ }
+ result = TRUE;
+@@ -502,12 +605,14 @@ ifnet_destroy (void)
+ GHashTableIter iter;
+ gpointer key;
+ gpointer value;
++ GList *list_iter;
+
+ /* Destroy connection setting */
+ if (conn_table) {
+ g_hash_table_iter_init (&iter, conn_table);
+ while (g_hash_table_iter_next (&iter, &key, &value)) {
+- destroy_connection_config ((GHashTable *) value);
++ destroy_connection_config ((GHashTable *)
++ value);
+ }
+ g_hash_table_destroy (conn_table);
+ conn_table = NULL;
+@@ -523,4 +628,8 @@ ifnet_destroy (void)
+ g_hash_table_destroy (global_settings_table);
+ global_settings_table = NULL;
+ }
++ for (list_iter = functions_list; list_iter;
++ list_iter = g_list_next (list_iter))
++ g_free (list_iter->data);
++ g_list_free (functions_list);
+ }
+diff --git a/system-settings/plugins/ifnet/tests/net b/system-settings/plugins/ifnet/tests/net
+index 1d8042c..e755000 100644
+--- a/system-settings/plugins/ifnet/tests/net
++++ b/system-settings/plugins/ifnet/tests/net
+@@ -65,3 +65,83 @@ bridge_br0="eth0 kvm0 kvm1"
+ config_br0=( "192.168.1.10/24" )
+ brctl_br0=( "setfd 0")
+ dhcp_eth1="nosendhost nontp -I"
++
++predown() {
++ # The default in the script is to test for NFS root and disallow
++ # downing interfaces in that case. Note that if you specify a
++ # predown() function you will override that logic. Here it is, in
++ # case you still want it...
++ if is_net_fs /; then
++ eerror "root filesystem is network mounted -- can't stop ${IFACE}"
++ return 1
++ fi
++
++ # Remember to return 0 on success
++ return 0
++}
++
++postup() {
++ # This function could be used, for example, to register with a
++ # dynamic DNS service. Another possibility would be to
++ # send/receive mail once the interface is brought up.
++
++ # Here is an example that allows the use of iproute rules
++ # which have been configured using the rules_eth0 variable.
++ #rules_eth0=" \
++ # 'from 24.80.102.112/32 to 192.168.1.0/24 table localnet priority 100' \
++ # 'from 216.113.223.51/32 to 192.168.1.0/24 table localnet priority 100' \
++ #"
++ eval set -- \$rules_${IFVAR}
++ if [ $# != 0 ]; then
++ einfo "Adding IP policy routing rules"
++ eindent
++ # Ensure that the kernel supports policy routing
++ if ! ip rule list | grep -q "^"; then
++ eerror "You need to enable IP Policy Routing (CONFIG_IP_MULTIPLE_TABLES)"
++ eerror "in your kernel to use ip rules"
++ else
++ for x; do
++ ebegin "${x}"
++ ip rule add ${x}
++ eend $?
++ done
++ fi
++ eoutdent
++ # Flush the cache
++ ip route flush cache dev "${IFACE}"
++ fi
++
++}
++
++postdown() {
++ # Enable Wake-On-LAN for every interface except for lo
++ # Probably a good idea to set ifdown="no" in /etc/conf.d/net
++ # as well ;)
++ [ "${IFACE}" != "lo" ] && ethtool -s "${IFACE}" wol g
++
++ Automatically erase any ip rules created in the example postup above
++ if interface_exists "${IFACE}"; then
++ # Remove any rules for this interface
++ local rule
++ ip rule list | grep " iif ${IFACE}[ ]*" | {
++ while read rule; do
++ rule="${rule#*:}"
++ ip rule del ${rule}
++ done
++ }
++ # Flush the route cache
++ ip route flush cache dev "${IFACE}"
++ fi
++
++ # Return 0 always
++ return 0
++}
++
++failup() {
++ # This function is mostly here for completeness... I haven't
++ # thought of anything nifty to do with it yet ;-)
++}
++
++faildown()
++{}
++
+diff --git a/system-settings/plugins/ifnet/tests/test_all.c b/system-settings/plugins/ifnet/tests/test_all.c
+index a0218bd..ba98397 100644
+--- a/system-settings/plugins/ifnet/tests/test_all.c
++++ b/system-settings/plugins/ifnet/tests/test_all.c
+@@ -369,6 +369,7 @@ main (void)
+ wpa_parser_destroy ();
+ ifnet_init ("net");
+ wpa_parser_init ("wpa_supplicant.conf");
++ printf("Initialization complete\n");
+
+ run_all (TRUE);
+
+--
+1.6.1
+
diff --git a/net-misc/networkmanager/networkmanager-0.8.1-r4.ebuild b/net-misc/networkmanager/networkmanager-0.8.1-r4.ebuild
new file mode 100644
index 0000000..d631253
--- /dev/null
+++ b/net-misc/networkmanager/networkmanager-0.8.1-r4.ebuild
@@ -0,0 +1,135 @@
+# 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.1-r1.ebuild,v 1.1 2010/08/04 12:05:53 dagger Exp $
+
+EAPI="2"
+
+inherit gnome.org eutils autotools
+
+# 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}}
+ http://dev.gentoo.org/~dagger/files/${PN}-ifnet-308267b4.patch"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
+IUSE="avahi bluetooth doc nss gnutls dhclient dhcpcd 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.2
+ >=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-4.0.0 ) )
+ !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}
+
+src_prepare() {
+
+ # Gentoo system-plugin
+ epatch "${DISTDIR}/${PN}-ifnet-308267b4.patch"
+ epatch "${FILESDIR}/${P}-fix-ifnet1.patch"
+
+ # Fix up the dbus conf file to use plugdev group
+ epatch "${FILESDIR}/${P}-confchanges.patch"
+
+ # Fix problems with dhcpcd/dhclient (bug #330319)
+ epatch "${FILESDIR}/${P}-dhcp-configure.patch"
+
+ # Backport some important patches
+ epatch "${FILESDIR}/${P}-CVE-2010-1172.patch"
+ epatch "${FILESDIR}/${P}-glib-2.25.12-workaround.patch"
+ epatch "${FILESDIR}/${P}-dhclient3.patch"
+
+ eautoreconf
+}
+
+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"
+ else
+ ECONF="${ECONF} --with-dhclient"
+ fi
+ else
+ ECONF="${ECONF} --with-dhcpcd"
+ 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" 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 ""
+}