diff options
author | Alexandre Rostovtsev <tetromino@gentoo.org> | 2011-11-07 18:27:29 +0000 |
---|---|---|
committer | Alexandre Rostovtsev <tetromino@gentoo.org> | 2011-11-07 18:27:29 +0000 |
commit | e82f1ed2ef5a4c8dc194d071ce19924e11e5e156 (patch) | |
tree | 9b7ff8e07c1c73e25ee9d9e8463989b484bac5ac /net-misc | |
parent | Punt ldap until fixed updstream, feature is nice but non-working with system ... (diff) | |
download | gentoo-2-e82f1ed2ef5a4c8dc194d071ce19924e11e5e156.tar.gz gentoo-2-e82f1ed2ef5a4c8dc194d071ce19924e11e5e156.tar.bz2 gentoo-2-e82f1ed2ef5a4c8dc194d071ce19924e11e5e156.zip |
Bump to 0.9.1.95; lots of bugfixes. Also, fix src_install so it doesn't try to chmod things in the live filesystem.
(Portage version: 2.2.0_alpha72/cvs/Linux x86_64)
Diffstat (limited to 'net-misc')
8 files changed, 481 insertions, 5 deletions
diff --git a/net-misc/networkmanager/ChangeLog b/net-misc/networkmanager/ChangeLog index 1c98e505ad58..21593fff3c60 100644 --- a/net-misc/networkmanager/ChangeLog +++ b/net-misc/networkmanager/ChangeLog @@ -1,6 +1,18 @@ # ChangeLog for net-misc/networkmanager # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/ChangeLog,v 1.118 2011/11/05 14:52:18 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/ChangeLog,v 1.119 2011/11/07 18:27:29 tetromino Exp $ + +*networkmanager-0.9.1.95 (07 Nov 2011) + + 07 Nov 2011; Alexandre Rostovtsev <tetromino@gentoo.org> + networkmanager-0.9.0.ebuild, networkmanager-0.9.1.90-r3.ebuild, + +networkmanager-0.9.1.95.ebuild, + +files/networkmanager-0.9.1.95-dns-routing-unmanaged-devices.patch, + +files/networkmanager-0.9.1.95-force-libnl1.1.patch, + +files/networkmanager-0.9.1.95-glib-2.31.patch, + +files/networkmanager-0.9.1.95-keyfile-scheme.patch: + Bump to 0.9.1.95; lots of bugfixes. Also, fix src_install so it doesn't try + to chmod things in the live filesystem. 05 Nov 2011; Tomáš Chvátal <scarabeus@gentoo.org> networkmanager-0.9.0.ebuild, networkmanager-0.9.1.90-r3.ebuild: diff --git a/net-misc/networkmanager/files/networkmanager-0.9.1.95-dns-routing-unmanaged-devices.patch b/net-misc/networkmanager/files/networkmanager-0.9.1.95-dns-routing-unmanaged-devices.patch new file mode 100644 index 000000000000..7b244dfdc45c --- /dev/null +++ b/net-misc/networkmanager/files/networkmanager-0.9.1.95-dns-routing-unmanaged-devices.patch @@ -0,0 +1,69 @@ +From fc0739a5d4e714234e1d544db838e932219c5d4d Mon Sep 17 00:00:00 2001 +From: Mathieu Trudel-Lapierre <mathieu.tl@gmail.com> +Date: Wed, 2 Nov 2011 15:28:43 -0500 +Subject: [PATCH] dns: don't update routing and DNS if no devices were ever + managed (lp:862134) + +Avoids blowing away existing routes and resolv.conf if NM never +managed any devices. +--- + src/dns-manager/nm-dns-manager.c | 21 +++++++++++++-------- + src/nm-policy.c | 9 +++++++++ + 2 files changed, 22 insertions(+), 8 deletions(-) + +diff --git a/src/dns-manager/nm-dns-manager.c b/src/dns-manager/nm-dns-manager.c +index 0203f2b..ddfd47c 100644 +--- a/src/dns-manager/nm-dns-manager.c ++++ b/src/dns-manager/nm-dns-manager.c +@@ -1097,15 +1097,20 @@ dispose (GObject *object) + g_slist_free (priv->plugins); + priv->plugins = NULL; + +- /* If we're quitting leave a valid resolv.conf in place, not one +- * pointing to 127.0.0.1 if any plugins were active. Thus update +- * DNS after disposing of all plugins. ++ /* If last_iface is NULL, this means we haven't done a DNS update before, ++ * so no reason to try and take down entries from resolv.conf. + */ +- if (!update_dns (self, priv->last_iface, TRUE, &error)) { +- nm_log_warn (LOGD_DNS, "could not commit DNS changes on shutdown: (%d) %s", +- error ? error->code : -1, +- error && error->message ? error->message : "(unknown)"); +- g_clear_error (&error); ++ if (priv->last_iface != NULL) { ++ /* If we're quitting leave a valid resolv.conf in place, not one ++ * pointing to 127.0.0.1 if any plugins were active. Thus update ++ * DNS after disposing of all plugins. ++ */ ++ if (!update_dns (self, priv->last_iface, TRUE, &error)) { ++ nm_log_warn (LOGD_DNS, "could not commit DNS changes on shutdown: (%d) %s", ++ error ? error->code : -1, ++ error && error->message ? error->message : "(unknown)"); ++ g_clear_error (&error); ++ } + } + + g_slist_foreach (priv->configs, (GFunc) g_object_unref, NULL); +diff --git a/src/nm-policy.c b/src/nm-policy.c +index cd8245e..669db28 100644 +--- a/src/nm-policy.c ++++ b/src/nm-policy.c +@@ -1042,6 +1042,15 @@ device_state_changed (NMDevice *device, + update_routing_and_dns (policy, FALSE); + break; + case NM_DEVICE_STATE_UNMANAGED: ++ if ( old_state == NM_DEVICE_STATE_UNAVAILABLE ++ || old_state == NM_DEVICE_STATE_DISCONNECTED) { ++ /* If the device was never activated, there's no point in ++ * updating routing or DNS. This allows us to keep the previous ++ * resolv.conf or routes from before NM started if no device was ++ * ever managed by NM. ++ */ ++ break; ++ } + case NM_DEVICE_STATE_UNAVAILABLE: + update_routing_and_dns (policy, FALSE); + break; +-- +1.7.7.2 + diff --git a/net-misc/networkmanager/files/networkmanager-0.9.1.95-force-libnl1.1.patch b/net-misc/networkmanager/files/networkmanager-0.9.1.95-force-libnl1.1.patch new file mode 100644 index 000000000000..8eb66efe9eaf --- /dev/null +++ b/net-misc/networkmanager/files/networkmanager-0.9.1.95-force-libnl1.1.patch @@ -0,0 +1,47 @@ +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 75b9978..6761832 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -314,32 +314,13 @@ fi + AC_DEFINE_UNQUOTED(NO_CONSOLEKIT, $no_ck, [Define to disable use of ConsoleKit]) + + have_libnl="no" +-PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [have_libnl3=yes], [have_libnl3=no]) +-PKG_CHECK_MODULES(LIBNL_ROUTE3, libnl-route-3.0, [have_libnl_route3=yes], [have_libnl_route3=no]) +-if (test "${have_libnl3}" = "yes" -a "${have_libnl_route3}" = "yes"); then +- AC_DEFINE(HAVE_LIBNL3, 1, [Define if you require specific libnl-3 support]) +- LIBNL_CFLAGS="$LIBNL3_CFLAGS $LIBNL_ROUTE3_CFLAGS" +- LIBNL_LIBS="$LIBNL3_LIBS $LIBNL_ROUTE3_LIBS" +- libnl_version="3" ++PKG_CHECK_MODULES(LIBNL1, libnl-1 >= 1.0-pre8, [have_libnl1=yes], [have_libnl1=no]) ++if (test "${have_libnl1}" = "yes"); then ++ AC_DEFINE(HAVE_LIBNL1, 1, [Define if you require libnl-1 legacy support]) ++ LIBNL_CFLAGS="$LIBNL1_CFLAGS" ++ LIBNL_LIBS="$LIBNL1_LIBS" ++ libnl_version="1" + have_libnl="yes" +-else +- PKG_CHECK_MODULES(LIBNL2, libnl-2.0, [have_libnl2=yes], [have_libnl2=no]) +- if (test "${have_libnl2}" = "yes"); then +- AC_DEFINE(HAVE_LIBNL2, 1, [Define if you require specific libnl-2 support]) +- LIBNL_CFLAGS="$LIBNL2_CFLAGS" +- LIBNL_LIBS="$LIBNL2_LIBS" +- libnl_version="2" +- have_libnl="yes" +- else +- PKG_CHECK_MODULES(LIBNL1, libnl-1 >= 1.0-pre8, [have_libnl1=yes], [have_libnl1=no]) +- if (test "${have_libnl1}" = "yes"); then +- AC_DEFINE(HAVE_LIBNL1, 1, [Define if you require libnl-1 legacy support]) +- LIBNL_CFLAGS="$LIBNL1_CFLAGS" +- LIBNL_LIBS="$LIBNL1_LIBS" +- libnl_version="1" +- have_libnl="yes" +- fi +- fi + fi + + if (test "${have_libnl}" = "no"); then diff --git a/net-misc/networkmanager/files/networkmanager-0.9.1.95-glib-2.31.patch b/net-misc/networkmanager/files/networkmanager-0.9.1.95-glib-2.31.patch new file mode 100644 index 000000000000..be90d5c8e155 --- /dev/null +++ b/net-misc/networkmanager/files/networkmanager-0.9.1.95-glib-2.31.patch @@ -0,0 +1,161 @@ +From 4d1d3b9935fca45ff98e1e705ce74540d234c41b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= <jklimes@redhat.com> +Date: Mon, 31 Oct 2011 11:50:28 +0100 +Subject: [PATCH] core: fix building for GLib thread API changes (GLib >= + 2.31.0) (bgo #662695) + +--- + src/main.c | 9 +++++++++ + src/nm-policy-hostname.c | 45 ++++++++++++++++++++++++++++++++++----------- + 2 files changed, 43 insertions(+), 11 deletions(-) + +diff --git a/src/main.c b/src/main.c +index b7c0fd5..12a0b89 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -563,9 +563,18 @@ main (int argc, char *argv[]) + umask (022); + + g_type_init (); ++ ++/* ++ * Threading is always enabled starting from GLib 2.31.0. ++ * See also http://developer.gnome.org/glib/2.31/glib-Deprecated-Thread-APIs.html. ++ */ ++#if !GLIB_CHECK_VERSION (2,31,0) + if (!g_thread_supported ()) + g_thread_init (NULL); + dbus_g_thread_init (); ++#else ++ dbus_threads_init_default (); ++#endif + + #ifndef HAVE_DBUS_GLIB_DISABLE_LEGACY_PROP_ACCESS + #error HAVE_DBUS_GLIB_DISABLE_LEGACY_PROP_ACCESS not defined +diff --git a/src/nm-policy-hostname.c b/src/nm-policy-hostname.c +index 4fe69c5..f98aa9c 100644 +--- a/src/nm-policy-hostname.c ++++ b/src/nm-policy-hostname.c +@@ -15,7 +15,7 @@ + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * +- * Copyright (C) 2004 - 2010 Red Hat, Inc. ++ * Copyright (C) 2004 - 2011 Red Hat, Inc. + * Copyright (C) 2007 - 2008 Novell, Inc. + */ + +@@ -36,7 +36,11 @@ + struct HostnameThread { + GThread *thread; + ++#if GLIB_CHECK_VERSION (2,31,0) ++ GMutex lock; ++#else + GMutex *lock; ++#endif + gboolean dead; + int ret; + +@@ -50,6 +54,25 @@ struct HostnameThread { + gpointer user_data; + }; + ++/* ++ * GMutex API has changed: ++ * http://developer.gnome.org/glib/2.31/glib-Threads.html#GMutex ++ * http://developer.gnome.org/glib/2.31/glib-Deprecated-Thread-APIs.html ++*/ ++#if GLIB_CHECK_VERSION (2,31,0) ++#define X_MUTEX_LOCK(mutex) g_mutex_lock (&(mutex)) ++#define X_MUTEX_UNLOCK(mutex) g_mutex_unlock (&(mutex)) ++#define X_MUTEX_INIT(mutex) g_mutex_init (&(mutex)) ++#define X_MUTEX_CLEAR(mutex) g_mutex_clear (&(mutex)) ++#define X_THREAD_CREATE(func,data) g_thread_try_new ("hostname-thread", func, data, NULL); ++#else ++#define X_MUTEX_LOCK(mutex) g_mutex_lock (mutex) ++#define X_MUTEX_UNLOCK(mutex) g_mutex_unlock (mutex) ++#define X_MUTEX_INIT(mutex) mutex = g_mutex_new () ++#define X_MUTEX_CLEAR(mutex) g_mutex_free (mutex) ++#define X_THREAD_CREATE(func,data) g_thread_create (func, data, FALSE, NULL); ++#endif ++ + static gboolean + hostname_thread_run_cb (gpointer user_data) + { +@@ -72,12 +95,12 @@ hostname_thread_worker (gpointer data) + + nm_log_dbg (LOGD_DNS, "(%p) starting address reverse-lookup", ht); + +- g_mutex_lock (ht->lock); ++ X_MUTEX_LOCK (ht->lock); + if (ht->dead) { +- g_mutex_unlock (ht->lock); ++ X_MUTEX_UNLOCK (ht->lock); + return (gpointer) NULL; + } +- g_mutex_unlock (ht->lock); ++ X_MUTEX_UNLOCK (ht->lock); + + ht->ret = getnameinfo (ht->addr, ht->addr_size, ht->hostname, NI_MAXHOST, NULL, 0, NI_NAMEREQD); + if (ht->ret == 0) { +@@ -106,7 +129,7 @@ hostname_thread_free (HostnameThread *ht) + + nm_log_dbg (LOGD_DNS, "(%p) freeing reverse-lookup thread", ht); + +- g_mutex_free (ht->lock); ++ X_MUTEX_CLEAR (ht->lock); + memset (ht, 0, sizeof (HostnameThread)); + g_free (ht); + } +@@ -123,7 +146,7 @@ hostname4_thread_new (guint32 ip4_addr, + ht = g_malloc0 (sizeof (HostnameThread)); + g_assert (ht); + +- ht->lock = g_mutex_new (); ++ X_MUTEX_INIT (ht->lock); + ht->callback = callback; + ht->user_data = user_data; + +@@ -132,7 +155,7 @@ hostname4_thread_new (guint32 ip4_addr, + ht->addr = (struct sockaddr *) &ht->addr4; + ht->addr_size = sizeof (ht->addr4); + +- ht->thread = g_thread_create (hostname_thread_worker, ht, FALSE, NULL); ++ ht->thread = X_THREAD_CREATE (hostname_thread_worker, ht); + if (!ht->thread) { + hostname_thread_free (ht); + return NULL; +@@ -158,7 +181,7 @@ hostname6_thread_new (const struct in6_addr *ip6_addr, + ht = g_malloc0 (sizeof (HostnameThread)); + g_assert (ht); + +- ht->lock = g_mutex_new (); ++ X_MUTEX_INIT (ht->lock); + ht->callback = callback; + ht->user_data = user_data; + +@@ -167,7 +190,7 @@ hostname6_thread_new (const struct in6_addr *ip6_addr, + ht->addr = (struct sockaddr *) &ht->addr6; + ht->addr_size = sizeof (ht->addr6); + +- ht->thread = g_thread_create (hostname_thread_worker, ht, FALSE, NULL); ++ ht->thread = X_THREAD_CREATE (hostname_thread_worker, ht); + if (!ht->thread) { + hostname_thread_free (ht); + return NULL; +@@ -189,9 +212,9 @@ hostname_thread_kill (HostnameThread *ht) + + nm_log_dbg (LOGD_DNS, "(%p) stopping reverse-lookup thread", ht); + +- g_mutex_lock (ht->lock); ++ X_MUTEX_LOCK (ht->lock); + ht->dead = TRUE; +- g_mutex_unlock (ht->lock); ++ X_MUTEX_UNLOCK (ht->lock); + } + + gboolean +-- +1.7.7.2 + diff --git a/net-misc/networkmanager/files/networkmanager-0.9.1.95-keyfile-scheme.patch b/net-misc/networkmanager/files/networkmanager-0.9.1.95-keyfile-scheme.patch new file mode 100644 index 000000000000..2248830a0895 --- /dev/null +++ b/net-misc/networkmanager/files/networkmanager-0.9.1.95-keyfile-scheme.patch @@ -0,0 +1,26 @@ +From 2938243e251dc10b22fecc4fd50c675f9c2ca1c4 Mon Sep 17 00:00:00 2001 +From: Florian Echtler <floe@butterbrot.org> +Date: Tue, 1 Nov 2011 16:32:51 +0100 +Subject: [PATCH] keyfile: call correct scheme function when writing + certificates (bgo #662836) + +--- + src/settings/plugins/keyfile/writer.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/settings/plugins/keyfile/writer.c b/src/settings/plugins/keyfile/writer.c +index db43b23..2babe26 100644 +--- a/src/settings/plugins/keyfile/writer.c ++++ b/src/settings/plugins/keyfile/writer.c +@@ -679,7 +679,7 @@ cert_writer (GKeyFile *file, + } + g_return_if_fail (objtype != NULL); + +- scheme = objtypes->scheme_func (NM_SETTING_802_1X (setting)); ++ scheme = objtype->scheme_func (NM_SETTING_802_1X (setting)); + if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) { + path = objtype->path_func (NM_SETTING_802_1X (setting)); + g_assert (path); +-- +1.7.7.2 + diff --git a/net-misc/networkmanager/networkmanager-0.9.0.ebuild b/net-misc/networkmanager/networkmanager-0.9.0.ebuild index b8fe458b7363..740c14007b42 100644 --- a/net-misc/networkmanager/networkmanager-0.9.0.ebuild +++ b/net-misc/networkmanager/networkmanager-0.9.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.9.0.ebuild,v 1.3 2011/11/05 14:52:18 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.9.0.ebuild,v 1.4 2011/11/07 18:27:29 tetromino Exp $ EAPI="4" GNOME_ORG_MODULE="NetworkManager" @@ -128,7 +128,7 @@ src_install() { # Add keyfile plugin support keepdir /etc/NetworkManager/system-connections - chmod 0600 /etc/NetworkManager/system-connections/.keep* # bug #383765 + chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765 insinto /etc/NetworkManager newins "${FILESDIR}/nm-system-settings.conf-ifnet" nm-system-settings.conf diff --git a/net-misc/networkmanager/networkmanager-0.9.1.90-r3.ebuild b/net-misc/networkmanager/networkmanager-0.9.1.90-r3.ebuild index d535a5d27d4b..acefeaebcd80 100644 --- a/net-misc/networkmanager/networkmanager-0.9.1.90-r3.ebuild +++ b/net-misc/networkmanager/networkmanager-0.9.1.90-r3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.9.1.90-r3.ebuild,v 1.2 2011/11/05 14:52:18 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.9.1.90-r3.ebuild,v 1.3 2011/11/07 18:27:29 tetromino Exp $ EAPI="4" GNOME_ORG_MODULE="NetworkManager" @@ -140,7 +140,7 @@ src_install() { # Add keyfile plugin support keepdir /etc/NetworkManager/system-connections - chmod 0600 /etc/NetworkManager/system-connections/.keep* # bug #383765 + chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765 insinto /etc/NetworkManager newins "${FILESDIR}/nm-system-settings.conf-ifnet" nm-system-settings.conf diff --git a/net-misc/networkmanager/networkmanager-0.9.1.95.ebuild b/net-misc/networkmanager/networkmanager-0.9.1.95.ebuild new file mode 100644 index 000000000000..ae7272772c41 --- /dev/null +++ b/net-misc/networkmanager/networkmanager-0.9.1.95.ebuild @@ -0,0 +1,161 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.9.1.95.ebuild,v 1.1 2011/11/07 18:27:29 tetromino Exp $ + +EAPI="4" +GNOME_ORG_MODULE="NetworkManager" + +inherit autotools eutils gnome.org linux-info systemd + +DESCRIPTION="Network configuration and management in an easy way. Desktop environment independent." +HOMEPAGE="http://www.gnome.org/projects/NetworkManager/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="avahi bluetooth doc +nss gnutls dhclient +dhcpcd +introspection + kernel_linux +ppp resolvconf connection-sharing wimax" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86" + +REQUIRED_USE=" + ^^ ( nss gnutls ) + ^^ ( dhclient dhcpcd )" + +# gobject-introspection-0.10.3 is needed due to gnome bug 642300 +# wpa_supplicant-0.7.3-r3 is needed due to bug 359271 +# libnl:1.1 is needed for linking to net-wireless/wimax libraries +# XXX: on bump, check that net-wireless/wimax is still using libnl:1.1 ! +# TODO: Qt support? +COMMON_DEPEND=">=sys-apps/dbus-1.2 + >=dev-libs/dbus-glib-0.75 + >=net-wireless/wireless-tools-28_pre9 + || ( >=sys-fs/udev-171[gudev] >=sys-fs/udev-147[extras] ) + >=dev-libs/glib-2.26 + >=sys-auth/polkit-0.97 + dev-libs/libnl:1.1 + >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] + bluetooth? ( >=net-wireless/bluez-4.82 ) + avahi? ( net-dns/avahi[autoipd] ) + gnutls? ( + dev-libs/libgcrypt + net-libs/gnutls ) + nss? ( >=dev-libs/nss-3.11 ) + dhclient? ( net-misc/dhcp ) + dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 ) + introspection? ( >=dev-libs/gobject-introspection-0.10.3 ) + ppp? ( + >=net-misc/modemmanager-0.4 + >=net-dialup/ppp-2.4.5 ) + resolvconf? ( net-dns/openresolv ) + connection-sharing? ( + net-dns/dnsmasq + net-firewall/iptables ) + wimax? ( >=net-wireless/wimax-1.5.1 )" + +RDEPEND="${COMMON_DEPEND} + sys-auth/consolekit" + +DEPEND="${COMMON_DEPEND} + dev-util/pkgconfig + >=dev-util/intltool-0.40 + >=sys-devel/gettext-0.17 + doc? ( >=dev-util/gtk-doc-1.8 )" + +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_pretend() { + 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 +} + +pkg_setup() { + enewgroup plugdev +} + +src_prepare() { + # Don't build tests + epatch "${FILESDIR}/${PN}-0.9_rc3-fix-tests.patch" + # Build against libnl:1.1 for net-wireless/wimax-1.5.2 compatibility + epatch "${FILESDIR}/${PN}-0.9.1.95-force-libnl1.1.patch" + # Fix building with glib-2.31, will be in next release + epatch "${FILESDIR}/${P}-glib-2.31.patch" + # Typo fix, will be in next release + epatch "${FILESDIR}/${P}-keyfile-scheme.patch" + # Do not blow away configs for devices not managed by nm; in next release + epatch "${FILESDIR}/${P}-dns-routing-unmanaged-devices.patch" + + eautoreconf + default +} + +src_configure() { + ECONF="--disable-more-warnings + --disable-static + --localstatedir=/var + --with-distro=gentoo + --with-dbus-sys-dir=/etc/dbus-1/system.d + --with-udev-dir=/lib/udev + --with-iptables=/sbin/iptables + $(use_enable doc gtk-doc) + $(use_enable introspection) + $(use_enable ppp) + $(use_enable wimax) + $(use_with dhclient) + $(use_with dhcpcd) + $(use_with doc docs) + $(use_with resolvconf) + $(systemd_with_unitdir)" + + if use nss ; then + ECONF="${ECONF} $(use_with nss crypto=nss)" + else + ECONF="${ECONF} $(use_with gnutls crypto=gnutls)" + fi + + econf ${ECONF} +} + +src_install() { + default + # 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 + + # Add keyfile plugin support + keepdir /etc/NetworkManager/system-connections + chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765 + insinto /etc/NetworkManager + newins "${FILESDIR}/nm-system-settings.conf-ifnet" nm-system-settings.conf + + # Allow users in plugdev group to modify system connections + insinto /etc/polkit-1/localauthority/10-vendor.d + doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.pkla" + + # Remove useless .la files + find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed" +} + +pkg_postinst() { + elog "To modify system network connections without needing to enter the" + elog "root password, add your user account to the 'plugdev' group." +} |