summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Piasek <dagger@gentoo.org>2010-05-19 12:58:04 +0100
committerRobert Piasek <dagger@gentoo.org>2010-05-19 12:58:04 +0100
commit01195550db15a0cbda67c6c3153f4a66b6cd71dd (patch)
tree6a84ab4defba85b0f5ed5cb1f956d7666325d234 /net-misc
parentRemoved packages, which were pushed upstream (diff)
downloaddagger-01195550db15a0cbda67c6c3153f4a66b6cd71dd.tar.gz
dagger-01195550db15a0cbda67c6c3153f4a66b6cd71dd.tar.bz2
dagger-01195550db15a0cbda67c6c3153f4a66b6cd71dd.zip
Removed all ebuilds. Added new ebuild with experimental gentoo specific
system-settings plugin (GSoC by Qiao Mu).
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/networkmanager/ChangeLog17
-rw-r--r--net-misc/networkmanager/files/networkmanager-0.8-confchanges.patch19
-rw-r--r--net-misc/networkmanager/files/networkmanager-0.8-nscd-clear-cache.patch42
-rw-r--r--net-misc/networkmanager/files/networkmanager-0.8-read-hostname.patch76
-rw-r--r--net-misc/networkmanager/networkmanager-0.8-r100.ebuild134
5 files changed, 287 insertions, 1 deletions
diff --git a/net-misc/networkmanager/ChangeLog b/net-misc/networkmanager/ChangeLog
index d8b4cde..3033842 100644
--- a/net-misc/networkmanager/ChangeLog
+++ b/net-misc/networkmanager/ChangeLog
@@ -1,7 +1,22 @@
# ChangeLog for net-misc/networkmanager
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# 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-r100 (19 May 2010)
+
+ 19 May 2010; Robert Piasek <dagger@gentoo.org>
+ -files/networkmanager-0.7.0-gentoo-dhclient.patch,
+ -networkmanager-0.7.1-r5.ebuild,
+ -files/networkmanager-0.7.1-bad-link.patch,
+ -files/networkmanager-0.7.1-confchanges.patch,
+ +networkmanager-0.8-r100.ebuild,
+ +files/networkmanager-0.8-confchanges.patch,
+ +files/networkmanager-0.8-nscd-clear-cache.patch,
+ +files/networkmanager-0.8-read-hostname.patch,
+ -files/nm-system-settings.conf:
+ Removed all ebuilds. Added new ebuild for experimental system-settings
+ plugin
+
*networkmanager-0.7.1-r4 (10 Jun 2009)
10 Jun 2009; Robert Piasek <dagger@gentoo.org>
diff --git a/net-misc/networkmanager/files/networkmanager-0.8-confchanges.patch b/net-misc/networkmanager/files/networkmanager-0.8-confchanges.patch
new file mode 100644
index 0000000..039a074
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-0.8-confchanges.patch
@@ -0,0 +1,19 @@
+diff '--exclude-from=/home/dang/.scripts/diffrc' -up -ruN NetworkManager-0.8.orig/src/NetworkManager.conf NetworkManager-0.8/src/NetworkManager.conf
+--- NetworkManager-0.8.orig/src/NetworkManager.conf 2010-02-18 10:47:45.000000000 -0500
++++ NetworkManager-0.8/src/NetworkManager.conf 2010-03-30 11:27:27.751522916 -0400
+@@ -56,6 +56,15 @@
+
+ <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"/>
++ </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"/>
diff --git a/net-misc/networkmanager/files/networkmanager-0.8-nscd-clear-cache.patch b/net-misc/networkmanager/files/networkmanager-0.8-nscd-clear-cache.patch
new file mode 100644
index 0000000..e92c883
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-0.8-nscd-clear-cache.patch
@@ -0,0 +1,42 @@
+From 327e00f06358ef388f4fad5abcb016daa0ec3452 Mon Sep 17 00:00:00 2001
+From: Robert Piasek <dagger@gentoo.org>
+Date: Mon, 22 Feb 2010 10:34:23 +0000
+Subject: [PATCH] fix: use nscd -i to clear cache
+
+
+Signed-off-by: Robert Piasek <dagger@gentoo.org>
+---
+ src/backends/NetworkManagerGentoo.c | 11 +++++------
+ 1 files changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/src/backends/NetworkManagerGentoo.c b/src/backends/NetworkManagerGentoo.c
+index 7fa1207..aa4b40c 100644
+--- a/src/backends/NetworkManagerGentoo.c
++++ b/src/backends/NetworkManagerGentoo.c
+@@ -34,6 +34,7 @@
+ #include "NetworkManagerGeneric.h"
+ #include "NetworkManagerSystem.h"
+ #include "NetworkManagerUtils.h"
++#include "nm-utils.h"
+
+ /*
+ * nm_system_enable_loopback
+@@ -57,11 +58,9 @@ void nm_system_enable_loopback (void)
+ */
+ void nm_system_update_dns (void)
+ {
+- #ifdef NM_NO_NAMED
+- if (nm_spawn_process ("/etc/init.d/nscd status") == 0)
+- nm_spawn_process ("/etc/init.d/nscd restart");
+- #else
+- nm_spawn_process("/usr/bin/killall -q nscd");
+- #endif
++ if (g_file_test ("/usr/sbin/nscd", G_FILE_TEST_IS_EXECUTABLE)) {
++ nm_info ("Clearing nscd hosts cache.");
++ nm_spawn_process ("/usr/sbin/nscd -i hosts");
++ }
+ }
+
+--
+1.7.0
+
diff --git a/net-misc/networkmanager/files/networkmanager-0.8-read-hostname.patch b/net-misc/networkmanager/files/networkmanager-0.8-read-hostname.patch
new file mode 100644
index 0000000..ac59fe2
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-0.8-read-hostname.patch
@@ -0,0 +1,76 @@
+When reading hostname from NM keyfile, if no hostname is set, read from the
+system file at /etc/conf.d/hostname to set hostname. This patch is not meant to
+be ever upstreamed. Proper fix is to write a gentoo-specific ifcfg plugin.
+
+To change hostname, touch nm-system-settings.conf, which will reload the keyfile
+and cause /etc/conf.d/hostname to be reloaded.
+
+This horrible hack fixes http://bugs.gentoo.org/176873
+
+Author: Nirbheek Chauhan <nirbheek@gentoo.org>
+Reviewed-by: Arun Raghavan <ford_prefect@gentoo.org>
+
+---
+--- system-settings/plugins/keyfile/plugin.c
++++ system-settings/plugins/keyfile/plugin.c
+@@ -43,6 +43,9 @@
+ #define KEYFILE_PLUGIN_INFO "(c) 2007 - 2008 Red Hat, Inc. To report bugs please use the NetworkManager mailing list."
+
+ #define CONF_FILE SYSCONFDIR "/NetworkManager/nm-system-settings.conf"
++#ifdef TARGET_GENTOO
++#define HOSTNAME_FILE SYSCONFDIR "/conf.d/hostname"
++#endif
+
+ static char *plugin_get_hostname (SCPluginKeyfile *plugin);
+ static void system_config_interface_init (NMSystemConfigInterface *system_config_interface_class);
+@@ -381,6 +384,12 @@
+ GKeyFile *key_file;
+ char *hostname = NULL;
+ GError *error = NULL;
++#ifdef TARGET_GENTOO
++ char *contents = NULL;
++ char **lines = NULL, **line;
++ GError *contents_err = NULL;
++ gsize contents_len = 0;
++#endif
+
+ key_file = g_key_file_new ();
+ if (g_key_file_load_from_file (key_file, CONF_FILE, G_KEY_FILE_NONE, &error))
+@@ -392,7 +401,37 @@
+
+ g_key_file_free (key_file);
+
++ if (hostname)
++ goto out;
++#ifdef TARGET_GENTOO
++ /* If hostname is unset in keyfile, read system file to get hostname */
++ if (!g_file_get_contents (HOSTNAME_FILE, &contents,
++ &contents_len, &contents_err))
++ goto out;
++
++ lines = g_strsplit_set (contents, "\n\r", 0);
++ if (!lines)
++ goto out;
++
++ for (line = lines; *line; line++) {
++ if (!g_str_has_prefix (*line, "hostname="))
++ continue;
++ hostname = g_strsplit_set (g_strsplit_set (*line, "=", 0)[1], "#", 0)[0];
++ g_strstrip (hostname);
++ if (!hostname)
++ goto out;
++ /* Remove quotes surrounding hostname */
++ if (hostname[0] == '"' && hostname[strlen(hostname)-1] == '"')
++ contents = g_strndup(&hostname[1], strlen(hostname)-2);
++ /* Un-escape before using to imitate librc behaviour */
++ hostname = g_strcompress (contents);
++ }
++
++out:
++ g_error_free(contents_err);
++
+ return hostname;
++#endif
+ }
+
+ static gboolean
diff --git a/net-misc/networkmanager/networkmanager-0.8-r100.ebuild b/net-misc/networkmanager/networkmanager-0.8-r100.ebuild
new file mode 100644
index 0000000..15246d0
--- /dev/null
+++ b/net-misc/networkmanager/networkmanager-0.8-r100.ebuild
@@ -0,0 +1,134 @@
+# 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-r1.ebuild,v 1.2 2010/04/13 18:13:22 armin76 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://patches.piasek.co.uk/systemsettings.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-3.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
+ doc? ( >=dev-util/gtk-doc-1.8 )"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ # Fix up the dbus conf file to use plugdev group
+ epatch "${FILESDIR}/${PN}-0.8-confchanges.patch"
+
+ # Hack keyfile plugin to read hostname file, fixes bug 176873
+ epatch "${FILESDIR}/${P}-read-hostname.patch"
+
+ # Clear NSCD cache rather then kill daemon bug 301720
+ epatch "${FILESDIR}/${P}-nscd-clear-cache.patch"
+
+ # Gentoo system-plugin
+ epatch "${DISTDIR}/systemsettings.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-dhcp-client=dhcpcd"
+ else
+ ECONF="${ECONF} --with-dhcp-client=dhclient"
+ fi
+ else
+ ECONF="${ECONF} --with-dhcp-client=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 restart DBUS if this is your first time"
+ elog "installing NetworkManager."
+ elog ""
+ elog "To save system-wide settings as a user, that user needs to have the"
+ elog "right policykit privileges. You can add them by running:"
+ elog 'polkit-auth --grant org.freedesktop.network-manager-settings.system.modify --user "USERNAME"'
+}