diff options
12 files changed, 0 insertions, 1111 deletions
diff --git a/gnome-extra/nm-applet/files/nm-applet-9999-confchanges.patch b/gnome-extra/nm-applet/files/nm-applet-9999-confchanges.patch deleted file mode 100644 index 7ba015d..0000000 --- a/gnome-extra/nm-applet/files/nm-applet-9999-confchanges.patch +++ /dev/null @@ -1,22 +0,0 @@ -Index: trunk/nm-applet.conf -=================================================================== ---- trunk.orig/nm-applet.conf -+++ trunk/nm-applet.conf -@@ -11,7 +11,7 @@ - <!-- Only root can get secrets --> - <allow send_interface="org.freedesktop.NetworkManagerSettings.Secrets"/> - </policy> -- <policy at_console="true"> -+ <policy group="plugdev"> - <allow own="org.freedesktop.NetworkManagerUserSettings"/> - - <allow send_destination="org.freedesktop.NetworkManagerUserSettings"/> -@@ -21,7 +21,7 @@ - <deny send_interface="org.freedesktop.NetworkManagerSettings.Secrets"/> - </policy> - <policy context="default"> -- <deny own="org.freedesktop.NetworkManagerUserSettings"/> -+ <allow own="org.freedesktop.NetworkManagerUserSettings"/> - - <allow send_destination="org.freedesktop.NetworkManagerUserSettings"/> - <allow send_interface="org.freedesktop.NetworkManagerSettings"/> diff --git a/gnome-extra/nm-applet/nm-applet-0.7.0.ebuild b/gnome-extra/nm-applet/nm-applet-0.7.0.ebuild deleted file mode 100644 index fc6c1a7..0000000 --- a/gnome-extra/nm-applet/nm-applet-0.7.0.ebuild +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/nm-applet/nm-applet-0.6.6.ebuild,v 1.3 2008/07/28 18:47:49 ken69267 Exp $ - -inherit gnome2 eutils - -MY_P="${P/nm-applet/network-manager-applet}" - -DESCRIPTION="Gnome applet for NetworkManager." -HOMEPAGE="http://people.redhat.com/dcbw/NetworkManager/" -SRC_URI="http://ftp.gnome.org/pub/gnome/sources/network-manager-applet/0.7/${MY_P}.tar.bz2" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~arm ~amd64 ~ppc ~x86" -IUSE="" - -RDEPEND=">=sys-apps/dbus-1.2 - >=sys-apps/hal-0.5.9 - >=dev-libs/libnl-1.1 - >=net-misc/networkmanager-0.7.0 - >=net-wireless/wireless-tools-28_pre9 - >=net-wireless/wpa_supplicant-0.5.7 - >=dev-libs/glib-2.16 - >=x11-libs/libnotify-0.4.3 - >=x11-libs/gtk+-2.10 - >=gnome-base/libglade-2 - >=gnome-base/gnome-keyring-2.20 - >=gnome-base/gnome-panel-2.20 - >=gnome-base/gconf-2.20 - >=gnome-base/libgnomeui-2.20 - >=gnome-extra/policykit-gnome-0.8" -DEPEND="${RDEPEND} - dev-util/pkgconfig - >=dev-util/intltool-0.35" - -DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README" -# USE_DESTDIR="1" - -S=${WORKDIR}/${P/_rc2/} - -pkg_setup () { - G2CONF="${G2CONF} \ - --disable-more-warnings \ - --localstatedir=/var \ - --with-dbus-sys=/etc/dbus-1/system.d" -} - -src_unpack() { - unpack ${A} - cd "${S}" - epatch "${FILESDIR}/${PN}-0.7.0-confchanges.patch" -} - -pkg_postinst() { - gnome2_pkg_postinst - elog "Your user needs to be in the plugdev group in order to use this" - elog "package. If it doesn't start in Gnome for you automatically after" - elog 'you log back in, simply run "nm-applet --sm-disable"' - elog "You also need the notification area applet on your panel for" - elog "this to show up." -} diff --git a/gnome-extra/policykit-gnome/Manifest b/gnome-extra/policykit-gnome/Manifest deleted file mode 100644 index ce776ce..0000000 --- a/gnome-extra/policykit-gnome/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST PolicyKit-gnome-0.9.2.tar.bz2 1223691 RMD160 7d5a33a747d84ed49a13f260015a254ba569039f SHA1 2af77fad1ca2e9a4e5fce204960b9ba74cf59a8d SHA256 ecf4ce303a90a4580c54ee7b932ffaf01b7f115f40b17d75634c5bbfba085c8a -EBUILD policykit-gnome-0.9.2.ebuild 760 RMD160 2039781b13bfddb0bb033d03cf7b1b8831fbdd23 SHA1 86f5ac1fafda479978e116ab72abdc0f7c5bdf37 SHA256 91971e468d46658b70510de00c74c69db1eb3065edf55c9e8716ac6ebfbca85e diff --git a/gnome-extra/policykit-gnome/policykit-gnome-0.9.2.ebuild b/gnome-extra/policykit-gnome/policykit-gnome-0.9.2.ebuild deleted file mode 100755 index 4767176..0000000 --- a/gnome-extra/policykit-gnome/policykit-gnome-0.9.2.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $ - -inherit gnome2 - -MY_PN="PolicyKit-gnome" - -DESCRIPTION="PolicyKit policies and configurations for the GNOME desktop" -HOMEPAGE="http://hal.freedesktop.org/docs/PolicyKit" -SRC_URI="http://hal.freedesktop.org/releases/${MY_PN}-${PV}.tar.bz2" - -LICENSE="|| ( LGPL-2 GPL-2 )" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -S="${WORKDIR}/${MY_PN}-${PV}" - -RDEPEND=">=dev-libs/dbus-glib-0.71 - >=x11-libs/gtk+-2.10 - >=gnome-base/libgnome-2.20 - >=gnome-base/libgnomeui-2.20 - >=sys-auth/policykit-0.9" -DEPEND="${RDEPEND} - dev-util/pkgconfig - >=app-text/scrollkeeper-0.3.14 - >=dev-util/intltool-0.35.0 - sys-devel/gettext" - -pkg_setup() -{ - G2CONF="--disable-examples" -} diff --git a/net-misc/networkmanager-openvpn/networkmanager-openvpn-0.7.0.ebuild b/net-misc/networkmanager-openvpn/networkmanager-openvpn-0.7.0.ebuild deleted file mode 100644 index 1c25f06..0000000 --- a/net-misc/networkmanager-openvpn/networkmanager-openvpn-0.7.0.ebuild +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -inherit eutils - -# NetworkManager likes itself with capital letters -MY_P=${P/networkmanager/NetworkManager} - -DESCRIPTION="NetworkManager OpenVPN plugin." -HOMEPAGE="http://www.gnome.org/projects/NetworkManager/" -SRC_URI="ftp://ftp.gnome.org/pub/gnome/sources/NetworkManager-openvpn/0.7/${MY_P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~arm ~amd64 ~ppc ~x86" -IUSE="gnome" - -RDEPEND=" - >=net-misc/networkmanager-0.7.0 - gnome? ( >=x11-libs/gtk+-2.10 - >=gnome-base/libglade-2 - >=gnome-base/libgnomeui-2.20 - >=gnome-base/gconf-2.20 - >=gnome-base/gnome-keyring-2.20 - ) - >=net-misc/openvpn-2.1_rc9" - -DEPEND="${RDEPEND} - dev-util/pkgconfig - dev-util/intltool" - -S=${WORKDIR}/${MY_P} - -src_compile() { - ECONF="--disable-more-warnings \ - $(use_with gnome)" - - econf ${ECONF} || die "econf failed" - emake || die "emake failed" -} - -src_install() { - emake DESTDIR="${D}" install || die "emake install failed" - - dodoc AUTHORS ChangeLog NEWS README -} diff --git a/net-misc/networkmanager-pptp/networkmanager-pptp-0.7.0.ebuild b/net-misc/networkmanager-pptp/networkmanager-pptp-0.7.0.ebuild deleted file mode 100644 index f48fd54..0000000 --- a/net-misc/networkmanager-pptp/networkmanager-pptp-0.7.0.ebuild +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -inherit eutils - -# NetworkManager likes itself with capital letters -MY_P=${P/networkmanager/NetworkManager} - -DESCRIPTION="NetworkManager PPTP plugin." -HOMEPAGE="http://www.gnome.org/projects/NetworkManager/" -SRC_URI="ftp://ftp.gnome.org/pub/gnome/sources/NetworkManager-pptp/0.7/${MY_P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~arm ~amd64 ~ppc ~x86" -IUSE="gnome" - -RDEPEND=" - >=net-misc/networkmanager-0.7.0 - gnome? ( >=x11-libs/gtk+-2.10 - >=gnome-base/libglade-2 - >=gnome-base/libgnomeui-2.20 - >=gnome-base/gconf-2.20 - >=gnome-base/gnome-keyring-2.20 - )" - -DEPEND="${RDEPEND} - dev-util/pkgconfig - dev-util/intltool" - -S=${WORKDIR}/${MY_P} - -src_compile() { - ECONF="--disable-more-warnings \ - $(use_with gnome)" - - econf ${ECONF} || die "econf failed" - emake || die "emake failed" -} - -src_install() { - emake DESTDIR="${D}" install || die "emake install failed" - - dodoc AUTHORS ChangeLog NEWS README -} diff --git a/net-misc/networkmanager-vpnc/networkmanager-vpnc-0.7.0.ebuild b/net-misc/networkmanager-vpnc/networkmanager-vpnc-0.7.0.ebuild deleted file mode 100644 index b4bfaf8..0000000 --- a/net-misc/networkmanager-vpnc/networkmanager-vpnc-0.7.0.ebuild +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -inherit eutils - -# NetworkManager likes itself with capital letters -MY_P=${P/networkmanager/NetworkManager} - -DESCRIPTION="NetworkManager VPNC plugin." -HOMEPAGE="http://www.gnome.org/projects/NetworkManager/" -SRC_URI="ftp://ftp.gnome.org/pub/gnome/sources/NetworkManager-vpnc/0.7/${MY_P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~arm ~amd64 ~ppc ~x86" -IUSE="gnome" - -RDEPEND=" - >=net-misc/networkmanager-0.7.0 - gnome? ( >=x11-libs/gtk+-2.10 - >=gnome-base/libglade-2 - >=gnome-base/libgnomeui-2.20 - >=gnome-base/gconf-2.20 - >=gnome-base/gnome-keyring-2.20 - ) - >=net-misc/vpnc-0.5" - -DEPEND="${RDEPEND} - dev-util/pkgconfig - dev-util/intltool" - -S=${WORKDIR}/${MY_P} - -src_compile() { - ECONF="--disable-more-warnings \ - $(use_with gnome)" - - econf ${ECONF} || die "econf failed" - emake || die "emake failed" -} - -src_install() { - emake DESTDIR="${D}" install || die "emake install failed" - - dodoc AUTHORS ChangeLog NEWS README -} diff --git a/net-misc/networkmanager/files/networkmanager-0.7.0-resolvconf-perms.patch b/net-misc/networkmanager/files/networkmanager-0.7.0-resolvconf-perms.patch deleted file mode 100644 index 187d646..0000000 --- a/net-misc/networkmanager/files/networkmanager-0.7.0-resolvconf-perms.patch +++ /dev/null @@ -1,20 +0,0 @@ -Index: src/named-manager/nm-named-manager.c -=================================================================== ---- src/named-manager/nm-named-manager.c.orig -+++ src/named-manager/nm-named-manager.c -@@ -26,6 +26,7 @@ - #include <stdlib.h> - #include <errno.h> - #include <arpa/inet.h> -+#include <sys/stat.h> - #include <glib.h> - - #include <glib/gi18n.h> -@@ -304,6 +305,7 @@ rewrite_resolv_conf (NMNamedManager *mgr - g_strerror (errno)); - } else { - nm_system_update_dns (); -+ chmod(RESOLV_CONF, S_IREAD | S_IWRITE | S_IRGRP | S_IROTH); - } - } - diff --git a/net-misc/networkmanager/files/networkmanager-0.7.0_pre20070627-updatedbackend.patch b/net-misc/networkmanager/files/networkmanager-0.7.0_pre20070627-updatedbackend.patch deleted file mode 100644 index 7a067bf..0000000 --- a/net-misc/networkmanager/files/networkmanager-0.7.0_pre20070627-updatedbackend.patch +++ /dev/null @@ -1,646 +0,0 @@ -Index: src/backends/NetworkManagerGentoo.c -=================================================================== ---- src/backends/NetworkManagerGentoo.c (revision 2627) -+++ src/backends/NetworkManagerGentoo.c (working copy) -@@ -224,11 +224,22 @@ - { - /* TODO Not only mDNSResponder is a possible mdns responder! - * As Avahi can become Gentoo's default, we could spawn a dbus signal here and let avahi listen for it? */ -- if (nm_spawn_process ("/etc/init.d/mDNSResponder status") == 0) { -+ -+ /* Check if the daemon was already running - do not start a new instance */ -+ /* Howl */ -+ if (g_file_test("/var/run/mDNSResponder.pid", G_FILE_TEST_EXISTS)) -+ { -+ nm_info("Restarting mDNSResponder"); - nm_spawn_process("/etc/init.d/mDNSResponder stop"); - nm_spawn_process("/etc/init.d/mDNSResponder zap"); - nm_spawn_process("/etc/init.d/mDNSResponder start"); - } -+ /* Apple's mDNSResponder */ -+ if (g_file_test("/var/run/mDNSResponderPosix.pid", G_FILE_TEST_EXISTS)) -+ { -+ nm_info("Restarting mDNSResponderPosix"); -+ nm_spawn_process("/etc/init.d/mDNSResponderPosix restart"); -+ } - } - - -@@ -243,10 +254,268 @@ - nm_generic_device_add_ip6_link_address (dev); - } - -+/* Get the array associated with the key, and leave the current pointer -+ * pointing at the line containing the key. The char** returned MUST -+ * be freed by the caller. -+ */ -+gchar ** -+svGetArray(shvarFile *s, const char *key) -+{ -+ gchar **values = NULL, **lines, *line, *value; -+ GList *restore; -+ int len, strvlen, i, j; -+ -+ g_assert(s); -+ g_assert(key); -+ -+ /* Attempt to do things the easy way first */ -+ line = svGetValue(s, key); -+ if (!line) -+ return NULL; -+ -+ restore = s->current; -+ -+ g_strstrip(strtok(line, "#")); /* Remove comments and whitespace */ -+ -+ if (line[0] != '(') -+ { -+ /* This isn't an array, so pretend it's a one item array. */ -+ values = g_renew(char*, values, 2); -+ values[0] = line; -+ values[1] = NULL; -+ return values; -+ } -+ -+ while(!strrchr(line, ')')) -+ { -+ s->current = s->current->next; -+ value = g_strjoin(" ", line, g_strstrip(strtok(s->current->data, "#")), NULL); -+ g_free(line); -+ line = value; -+ value = NULL; -+ } -+ -+ lines = g_strsplit(line, "\"", 0); -+ -+ strvlen = g_strv_length(lines); -+ if (strvlen == 0) -+ { -+ /* didn't split, something's wrong */ -+ g_free(line); -+ return NULL; -+ } -+ -+ j = 0; -+ for (i = 0; i <= strvlen - 1; i++) -+ { -+ value = lines[i]; -+ len = strlen(g_strstrip(value)); -+ if ((value[0] == '(') || (value[0] == ')') || (len == 0)) -+ continue; -+ -+ values = g_renew(char*, values, j + 2); -+ values[j+1] = NULL; -+ values[j++] = g_strdup(value); -+ } -+ -+ g_free(line); -+ g_strfreev(lines); -+ s->current = restore; -+ -+ return values; -+} -+ -+/* -+* GentooReadConfig -+* -+* Most of this comes from the arch backend, no need to re-invent. -+* Read platform dependant config file and fill hash with relevant info -+*/ -+static GHashTable * GentooReadConfig(const char* dev) -+{ -+ GHashTable *ifs; -+ shvarFile *file; -+ int len, hits, i = 0; -+ guint32 maskval; -+ gchar buf[16], *value, *cidrprefix, *gateway; -+ gchar *config_str, *iface_str, *route_str, *mtu_str, *dnsserver_str, *dnssearch_str; /* Lookup keys */ -+ gchar **conf, **config = NULL, **routes = NULL; -+ struct in_addr mask; -+ -+ file = svNewFile(SYSCONFDIR"/conf.d/net"); -+ if (!file) -+ return NULL; -+ -+ ifs = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); -+ if (ifs == NULL) -+ { -+ nm_debug("Unable to create g_hash_table."); -+ svCloseFile(file); -+ return NULL; -+ } -+ -+ /* Keys we will use for lookups later */ -+ config_str = g_strdup_printf("config_%s", dev); -+ iface_str = g_strdup_printf("iface_%s", dev); -+ route_str = g_strdup_printf("routes_%s", dev); -+ mtu_str = g_strdup_printf("mtu_%s", dev); -+ dnsserver_str = g_strdup_printf("dns_servers_%s", dev); -+ dnssearch_str = g_strdup_printf("dns_search_%s", dev); -+ -+ -+ if ((config = svGetArray(file, iface_str))) -+ { -+ /* This isn't tested, (or supported, really) so hopefully it works */ -+ nm_info("You are using a deprecated configuration syntax for %s.", dev); -+ nm_info("You are advised to read /etc/conf.d/net.example and upgrade it accordingly."); -+ value = svGetValue(file, "gateway"); -+ if ((value) && (gateway = strstr(value, dev)) && strtok(gateway, "/")) -+ { -+ /* Is it possible to specify multiple gateways using this variable? */ -+ gateway = strtok(NULL, "/"); -+ routes = g_renew(char*, routes, 2); -+ routes[0] = g_strdup_printf("default via %s", gateway); -+ routes[1] = NULL; -+ g_free(value); -+ } -+ } -+ else -+ { -+ config = svGetArray(file, config_str); -+ routes = svGetArray(file, route_str); -+ } -+ -+ -+ if ((config) && g_ascii_strcasecmp(config[0], "dhcp")) -+ { -+ nm_debug("Found %s in %s.", config_str, SYSCONFDIR"/conf.d/net"); -+ -+ if (!g_ascii_strcasecmp(config[0], "null")) -+ { -+ nm_debug("Config disables device %s.", dev); -+ g_hash_table_insert(ifs, g_strdup("disabled"), g_strdup("true")); -+ } -+ else -+ { -+ /* TODO: Handle "noop". */ -+ conf = g_strsplit(config[0], " ", 0); -+ hits = g_strv_length(conf); -+ -+ strtok(conf[0], "/"); -+ if ((cidrprefix = strtok(NULL, "/"))) -+ { -+ maskval = 0xffffffff; -+ maskval <<= (32 - atoi(cidrprefix)); -+ mask.s_addr = htonl(maskval); -+ g_hash_table_insert(ifs, g_strdup("netmask"), g_strdup(inet_ntoa(mask))); -+ } -+ -+ -+ if ((hits > 0) && inet_aton(conf[0], &mask)) -+ { -+ g_hash_table_insert(ifs, g_strdup(dev), g_strdup(conf[i++])); -+ while ((hits -= 2) > 0) -+ { -+ g_hash_table_insert(ifs, g_strdup(conf[i]), g_strdup(conf[i+1])); -+ i += 2; -+ } -+ } -+ else -+ { -+ nm_debug("Unhandled configuration. Switching to DHCP."); -+ nm_debug("\t%s = %s", config_str, config[0]); -+ g_hash_table_insert(ifs, g_strdup("dhcp"), g_strdup("true")); -+ } -+ g_strfreev(conf); -+ } -+ } -+ else -+ { -+ nm_debug("Enabling DHCP for device %s.", dev); -+ g_hash_table_insert(ifs, g_strdup("dhcp"), g_strdup("true")); -+ } -+ -+ g_strfreev(config); -+ -+ if (routes) -+ { -+ nm_debug("Found %s in config.", route_str); -+ -+ len = g_strv_length(routes); -+ for (i = 0; i < len; i++) -+ { -+ if (!sscanf(routes[i], "default via %[0-9.:]", buf)) -+ continue; -+ -+ g_hash_table_insert(ifs,g_strdup("gateway"),g_strdup( (char*) buf)); -+ } -+ } -+ -+ g_strfreev(routes); -+ -+ if ((value = svGetValue(file, mtu_str))) -+ { -+ nm_debug("Found %s in config.", mtu_str); -+ g_hash_table_insert(ifs, g_strdup("mtu"), g_strdup(value)); -+ } -+ -+ g_free(value); -+ -+ if (!(value = svGetValue(file, dnsserver_str))) -+ { -+ value = svGetValue(file, "dns_servers"); -+ } -+ if (value) -+ { -+ nm_debug("Found DNS nameservers in config."); -+ g_hash_table_insert(ifs, g_strdup("nameservers"), g_strdup(value)); -+ } -+ -+ g_free(value); -+ -+ if (!(value = svGetValue(file, dnssearch_str))) -+ { -+ value = svGetValue(file, "dns_search"); -+ } -+ if (value) -+ { -+ nm_debug("Found DNS search in config."); -+ g_hash_table_insert(ifs, g_strdup("dnssearch"), g_strdup(value)); -+ } -+ -+ g_free(value); -+ svCloseFile(file); -+ -+ if ((file = svNewFile(SYSCONFDIR"/conf.d/hostname"))) -+ { -+ if ((value = svGetValue(file, "HOSTNAME")) && (strlen(value) > 0)) -+ { -+ nm_debug("Found hostname."); -+ g_hash_table_insert(ifs, g_strdup("hostname"), g_strdup(value)); -+ } -+ -+ g_free(value); -+ svCloseFile(file); -+ } -+ -+ -+ g_free(config_str); -+ g_free(iface_str); -+ g_free(route_str); -+ g_free(mtu_str); -+ g_free(dnsserver_str); -+ g_free(dnssearch_str); -+ -+ return ifs; -+} -+ -+ - typedef struct GentooSystemConfigData - { - NMIP4Config * config; - gboolean use_dhcp; -+ gboolean system_disabled; -+ guint32 mtu; - } GentooSystemConfigData; - - -@@ -258,139 +527,174 @@ - * info before setting stuff too. - * - */ --void *nm_system_device_get_system_config (NMDevice *dev, NMData *app_data) -+void* nm_system_device_get_system_config (NMDevice * dev, NMData *app_data) - { -- char *cfg_file_path = NULL; -- FILE *file = NULL; -- char buffer[100]; -- char confline[100], dhcpline[100], ipline[100]; -- int ipa, ipb, ipc, ipd; -- int nNext = 0, bNext = 0, count = 0; -- char *confToken; -- gboolean data_good = FALSE; -- gboolean use_dhcp = TRUE; -- GentooSystemConfigData *sys_data = NULL; -- guint32 ip4_address = 0; -- guint32 ip4_netmask = 0; -- guint32 ip4_gateway = 0; -- guint32 ip4_broadcast = 0; -+ GHashTable* ifh; -+ gpointer val; -+ gchar **strarr; -+ GentooSystemConfigData* sys_data = NULL; -+ int len, i; - -- g_return_val_if_fail (dev != NULL, NULL); -- -- sys_data = g_malloc0 (sizeof (GentooSystemConfigData)); -- sys_data->config = nm_device_get_ip4_config(dev); -- /* We use DHCP on an interface unless told not to */ -+ g_return_val_if_fail(dev != NULL, NULL); -+ -+ sys_data = g_malloc0(sizeof (GentooSystemConfigData)); - sys_data->use_dhcp = TRUE; -- nm_device_set_use_dhcp (dev, TRUE); --// nm_ip4_config_set_address (sys_data->config, 0); --// nm_ip4_config_set_gateway (sys_data->config, 0); --// nm_ip4_config_set_netmask (sys_data->config, 0); - -- /* Gentoo systems store this information in -- * /etc/conf.d/net, this is for all interfaces. -- */ -+ sys_data->system_disabled = FALSE; -+ sys_data->mtu = 0; -+ sys_data->config=NULL; - -- cfg_file_path = g_strdup ("/etc/conf.d/net"); -- if (!cfg_file_path) { -- g_free (sys_data); -+ ifh = GentooReadConfig(nm_device_get_iface(dev)); -+ if (ifh == NULL) -+ { -+ g_free(sys_data); - return NULL; - } -- -- if (!(file = fopen (cfg_file_path, "r"))) -+ -+ val = g_hash_table_lookup(ifh, "disabled"); -+ if (val) - { -- g_free (cfg_file_path); -- g_free (sys_data); -- return NULL; -+ if (!strcasecmp (val, "true")) -+ { -+ nm_info ("System configuration disables device %s", nm_device_get_iface (dev)); -+ sys_data->system_disabled = TRUE; -+ } - } -- snprintf(confline, 100, "iface_%s", nm_device_get_iface (dev)); -- snprintf(dhcpline, 100, "iface_%s=\"dhcp\"", nm_device_get_iface (dev)); -- /* buffer is char[100], guess this fgets call was fairly wrong then? */ -- while (fgets (buffer, 100, file) && !feof (file)) -+ -+ val = g_hash_table_lookup(ifh, "mtu"); -+ if (val) - { -- /* Kock off newline if any */ -- g_strstrip (buffer); -+ guint32 mtu; -+ -+ mtu = strtoul(val, NULL, 10); -+ if (mtu > 500 && mtu < INT_MAX) -+ { -+ nm_debug("System configuration specifies a MTU of %i for device %s", mtu, nm_device_get_iface(dev)); -+ sys_data->mtu = mtu; -+ } -+ } -+ val = g_hash_table_lookup(ifh, "hostname"); -+ if (val) -+ { -+ nm_ip4_config_set_hostname(sys_data->config, val); -+ } -+ -+ val = g_hash_table_lookup(ifh, nm_device_get_iface(dev)); -+ if (val && !g_hash_table_lookup(ifh, "dhcp")) -+ { -+ /* This device does not use DHCP */ - -- if (strncmp (buffer, confline, strlen(confline)) == 0) -+ sys_data->use_dhcp=FALSE; -+ sys_data->config = nm_ip4_config_new(); -+ -+ nm_ip4_config_set_address (sys_data->config, inet_addr (val)); -+ -+ val = g_hash_table_lookup(ifh, "gateway"); -+ if (val) -+ nm_ip4_config_set_gateway (sys_data->config, inet_addr (val)); -+ else -+ { -+ nm_info ("Network configuration for device '%s' does not specify a gateway but is " -+ "statically configured (non-DHCP).", nm_device_get_iface (dev)); -+ } -+ -+ val = g_hash_table_lookup(ifh, "netmask"); -+ if (val) -+ nm_ip4_config_set_netmask (sys_data->config, inet_addr (val)); -+ else -+ { -+ guint32 addr = nm_ip4_config_get_address (sys_data->config); -+ -+ /* Make a default netmask if we have an IP address */ -+ if (((ntohl (addr) & 0xFF000000) >> 24) <= 127) -+ nm_ip4_config_set_netmask (sys_data->config, htonl (0xFF000000)); -+ else if (((ntohl (addr) & 0xFF000000) >> 24) <= 191) -+ nm_ip4_config_set_netmask (sys_data->config, htonl (0xFFFF0000)); -+ else -+ nm_ip4_config_set_netmask (sys_data->config, htonl (0xFFFFFF00)); -+ } -+ -+ val = g_hash_table_lookup(ifh, "broadcast"); -+ if (val) -+ nm_ip4_config_set_broadcast (sys_data->config, inet_addr (val)); -+ else if ((val = g_hash_table_lookup(ifh, "brd"))) -+ nm_ip4_config_set_broadcast (sys_data->config, inet_addr (val)); -+ else -+ { -+ guint32 broadcast = ((nm_ip4_config_get_address (sys_data->config) & nm_ip4_config_get_netmask (sys_data->config)) -+ | ~nm_ip4_config_get_netmask (sys_data->config)); -+ nm_ip4_config_set_broadcast (sys_data->config, broadcast); -+ } -+ -+ val = g_hash_table_lookup(ifh, "nameservers"); -+ if (val) -+ { -+ nm_debug("Using DNS nameservers \"%s\" from config for device %s.", val, nm_device_get_iface(dev)); -+ if ((strarr = g_strsplit(val, " ", 0))) - { -- /* Make sure this config file is for this device */ -- if (strncmp (&buffer[strlen(confline) - strlen(nm_device_get_iface (dev))], -- nm_device_get_iface (dev), strlen(nm_device_get_iface (dev))) != 0) -+ len = g_strv_length(strarr); -+ for(i = 0; i < len; i++) - { -- nm_warning ("System config file '%s' does not define device '%s'\n", -- cfg_file_path, nm_device_get_iface (dev)); -- break; -+ guint32 addr = (guint32) (inet_addr (strarr[i])); -+ -+ if (addr != (guint32) -1) -+ nm_ip4_config_add_nameserver(sys_data->config, addr); -+ } -+ -+ g_strfreev(strarr); - } - else -- data_good = TRUE; -+ { -+ guint32 addr = (guint32) (inet_addr (val)); - -- if (strncmp (buffer, dhcpline, strlen(dhcpline)) == 0) -+ if (addr != (guint32) -1) -+ nm_ip4_config_add_nameserver(sys_data->config, addr); -+ } -+ } -+ -+ val = g_hash_table_lookup(ifh, "dnssearch"); -+ if (val) -+ { -+ nm_debug("Using DNS search \"%s\" from config for device %s.", val, nm_device_get_iface(dev)); -+ if ((strarr = g_strsplit(val, " ", 0))) - { -- use_dhcp = TRUE; -+ len = g_strv_length(strarr); -+ for(i = 0; i < len; i++) -+ { -+ if (strarr[i]) -+ nm_ip4_config_add_domain(sys_data->config, strarr[i]); -+ } -+ -+ g_strfreev(strarr); - } - else - { -- use_dhcp = FALSE; -- confToken = strtok(&buffer[strlen(confline) + 2], " "); -- while (count < 3) -- { -- if (nNext == 1 && bNext == 1) -- { -- ip4_address = inet_addr (confToken); -- count++; -- continue; -- } -- if (strcmp(confToken, "netmask") == 0) -- { -- confToken = strtok(NULL, " "); -- ip4_netmask = inet_addr (confToken); -- count++; -- nNext = 1; -- } -- else if (strcmp(confToken, "broadcast") == 0) -- { -- confToken = strtok(NULL, " "); -- count++; -- bNext = 1; -- } -- else -- { -- ip4_address = inet_addr (confToken); -- count++; -- } -- confToken = strtok(NULL, " "); -- } -- } -+ nm_ip4_config_add_domain(sys_data->config, val); - } -- /* If we aren't using dhcp, then try to get the gateway */ -- if (!use_dhcp) -+ } -+ -+ nm_ip4_config_set_mtu (sys_data->config, sys_data->mtu); -+ -+#if 0 -+ { -+ int j; -+ nm_debug ("------ Config (%s)", nm_device_get_iface (dev)); -+ nm_debug (" ADDR=%d", nm_ip4_config_get_address (sys_data->config)); -+ nm_debug (" GW =%d", nm_ip4_config_get_gateway (sys_data->config)); -+ nm_debug (" NM =%d", nm_ip4_config_get_netmask (sys_data->config)); -+ nm_debug (" NSs =%d",nm_ip4_config_get_num_nameservers(sys_data->config)); -+ for (j=0;j<nm_ip4_config_get_num_nameservers(sys_data->config);j++) - { -- snprintf(ipline, 100, "gateway=\"%s/", nm_device_get_iface (dev)); -- if (strncmp(buffer, ipline, strlen(ipline) - 1) == 0) -- { -- snprintf(ipline, 100, "gateway=\"%s/%%d.%%d.%%d.%%d\"", nm_device_get_iface (dev) ); -- sscanf(buffer, ipline, &ipa, &ipb, &ipc, &ipd); -- snprintf(ipline, 100, "%d.%d.%d.%d", ipa, ipb, ipc, ipd); -- ip4_gateway = inet_addr (ipline); -+ nm_debug (" NS =%d",nm_ip4_config_get_nameserver(sys_data->config,j)); - } -- } -+ nm_debug ("---------------------\n"); -+ } -+#endif -+ - } -- fclose (file); -- g_free (cfg_file_path); -- -- /* If successful, set values on the device */ -- if (data_good) -- { -- nm_warning("data good :-)"); -- nm_device_set_use_dhcp (dev, use_dhcp); -- if (ip4_address) -- nm_ip4_config_set_address (sys_data->config, ip4_address); -- if (ip4_gateway) -- nm_ip4_config_set_gateway (sys_data->config, ip4_gateway); -- if (ip4_netmask) -- nm_ip4_config_set_netmask (sys_data->config, ip4_netmask); -- if (ip4_broadcast) -- nm_ip4_config_set_broadcast (sys_data->config, ip4_broadcast); -- } -+ -+ g_hash_table_destroy(ifh); -+ - return (void *)sys_data; - } - -@@ -464,7 +768,13 @@ - */ - gboolean nm_system_device_get_disabled (NMDevice *dev) - { -- return FALSE; -+ GentooSystemConfigData *sys_data; -+ -+ g_return_val_if_fail (dev != NULL, FALSE); -+ -+ if ((sys_data = nm_device_get_system_config_data (dev))) -+ return sys_data->system_disabled; -+ - } - - void nm_system_deactivate_all_dialup (GSList *list) -@@ -521,6 +831,37 @@ - */ - void nm_system_set_hostname (NMIP4Config *config) - { -+ char *h_name = NULL; -+ const char *hostname; -+ -+ g_return_if_fail (config != NULL); -+ -+ hostname = nm_ip4_config_get_hostname (config); -+ if (!hostname) -+ { -+ struct in_addr temp_addr; -+ struct hostent *host; -+ -+ /* try to get hostname via dns */ -+ temp_addr.s_addr = nm_ip4_config_get_address (config); -+ host = gethostbyaddr ((char *) &temp_addr, sizeof (temp_addr), AF_INET); -+ if (host) -+ { -+ h_name = g_strdup (host->h_name); -+ hostname = strtok (h_name, "."); -+ } -+ else -+ nm_warning ("nm_system_set_hostname(): gethostbyaddr failed, h_errno = %d", h_errno); -+ } -+ -+ if (hostname) -+ { -+ nm_info ("Setting hostname to '%s'", hostname); -+ if (sethostname (hostname, strlen (hostname)) < 0) -+ nm_warning ("Could not set hostname."); -+ } -+ -+ g_free (h_name); - } - - /* -@@ -541,5 +882,11 @@ - */ - guint32 nm_system_get_mtu (NMDevice *dev) - { -+ GentooSystemConfigData *sys_data; -+ -+ g_return_val_if_fail (dev != NULL, 0); -+ -+ if ((sys_data = nm_device_get_system_config_data (dev))) -+ return sys_data->mtu; - return 0; - } diff --git a/net-misc/networkmanager/networkmanager-0.7.0.ebuild b/net-misc/networkmanager/networkmanager-0.7.0.ebuild deleted file mode 100644 index 0e8f5dc..0000000 --- a/net-misc/networkmanager/networkmanager-0.7.0.ebuild +++ /dev/null @@ -1,130 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -inherit eutils - -# NetworkManager likes itself with capital letters -MY_P=${P/networkmanager/NetworkManager} - -DESCRIPTION="Network configuration and management in an easy way. Desktop environment independent." -HOMEPAGE="http://www.gnome.org/projects/NetworkManager/" -SRC_URI="http://ftp.gnome.org/pub/gnome/sources/NetworkManager/0.7/${MY_P}.tar.bz2" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~arm ~amd64 ~ppc ~x86" -IUSE="doc nss gnutls dhclient dhcpcd resolvconf" - -RDEPEND=">=sys-apps/dbus-1.2 - >=dev-libs/dbus-glib-0.75 - >=sys-apps/hal-0.5.10 - >=net-wireless/wireless-tools-28_pre9 - >=dev-libs/glib-2.16 - >=sys-auth/policykit-0.8 - >=dev-libs/libnl-1.1 - >=net-wireless/wpa_supplicant-0.5.10 - || ( sys-libs/e2fsprogs-libs <sys-fs/e2fsprogs-1.41.0 ) - - 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 )" - -DEPEND="${RDEPEND} - dev-util/pkgconfig - dev-util/intltool - net-dialup/ppp - doc? ( >=dev-util/gtk-doc-1.8 )" - -S=${WORKDIR}/${MY_P} - -pkg_setup() { - if ! built_with_use net-wireless/wpa_supplicant dbus ; then - eerror "Please rebuild net-wireless/wpa_supplicant with the dbus useflag." - die "Fix wpa_supplicant first." - fi -} - -src_unpack () { - unpack ${A} - cd "${S}" - - # Fix up the dbus conf file to use plugdev group - epatch "${FILESDIR}/${PN}-0.7.0-confchanges.patch" -} - -src_compile() { - ECONF="--disable-more-warnings \ - --localstatedir=/var \ - --with-distro=gentoo \ - --with-dbus-sys=/etc/dbus-1/system.d - $(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} || die "econf failed" - emake || die "emake failed" -} - -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 - - # Add keyfile plugin support - keepdir /etc/NetworkManager/system-connections - insinto /etc/NetworkManager - newins "${FILESDIR}/nm-system-settings.conf" nm-system-settings.conf -} - -pkg_postinst() { - elog "You need to be in the plugdev group in order to use NetworkManager" - elog "Problems with your hostname getting changed?" - elog "" - elog "Add the following to /etc/dhcp/dhclient.conf" - elog 'send host-name "YOURHOSTNAME";' - elog 'supersede host-name "YOURHOSTNAME";' - elog "" - 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 "USERNAME"' -} diff --git a/sys-auth/policykit/Manifest b/sys-auth/policykit/Manifest deleted file mode 100644 index bcca46b..0000000 --- a/sys-auth/policykit/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST PolicyKit-0.9.tar.gz 1254318 RMD160 197262d1c48e55558dd4bd57d7bbd8734666129c SHA1 ac99c580eff72f6d5df261c155fb047306439f85 SHA256 f40c7c6bec19d7dba2335bddcffd0457494409a0dfce11d888c748dc892e80b7 -EBUILD policykit-0.9.ebuild 1394 RMD160 9a2d57ca783562772954708b433352805939f233 SHA1 f13621ac7d3a7f1564a3f13415313dfff1d6f11f SHA256 3002ae45df0adfc47bded87dc9eabf1992faafb07d9a11e371e30743caf7cabe diff --git a/sys-auth/policykit/policykit-0.9.ebuild b/sys-auth/policykit/policykit-0.9.ebuild deleted file mode 100644 index 3b3e358..0000000 --- a/sys-auth/policykit/policykit-0.9.ebuild +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $ - -inherit eutils autotools multilib - -MY_PN="PolicyKit" - -DESCRIPTION="Policy framework for setting user allowed actions with priviledge" -HOMEPAGE="http://hal.freedesktop.org/docs/PolicyKit" -SRC_URI="http://hal.freedesktop.org/releases/${MY_PN}-${PV}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc64 ~sparc ~x86" -IUSE="doc selinux" - -RDEPEND=">=dev-libs/glib-2.7 - >=dev-libs/dbus-glib-0.71 - virtual/pam - dev-libs/expat - selinux? ( sys-libs/libselinux )" -DEPEND="${RDEPEND} - dev-libs/libxslt - dev-util/pkgconfig - app-text/docbook-xsl-stylesheets - doc? ( dev-util/gtk-doc )" - -S="${WORKDIR}/${MY_PN}-${PV}" - -pkg_setup() { - enewgroup polkituser || die "failed to create group" - enewuser polkituser -1 "-1" /dev/null polkituser || die "failed to create user" -} - -src_compile() { - econf --with-expat \ - --with-pam-module-dir=/$(get_libdir)/security \ - --with-os-type=gentoo \ - $(use_enable doc gtk-doc) \ - $(use_enable selinux) \ - --with-polkit-user=polkituser \ - --with-polkit-group=polkituser \ - --localstatedir=/var \ - || die "econf failed" - emake || die "emake failed" -} - -src_install() { - emake DESTDIR="${D}" install || die "emake install failed" - # Need to keep a few directories around... - keepdir /var/run/PolicyKit - keepdir /var/lib/PolicyKit -} |