From 5e1cffec15add920197b6e7a9d110c1d5870e148 Mon Sep 17 00:00:00 2001 From: Mu Qiao Date: Sat, 26 Feb 2011 08:13:31 +0000 Subject: Display printable conn_name in nm-applet (bug #356337) (Portage version: 2.1.9.41/cvs/Linux x86_64) --- net-misc/networkmanager/ChangeLog | 9 +- .../networkmanager-0.8.2-ifnet-smarter-write.patch | 38 +++-- .../networkmanager/networkmanager-0.8.2-r8.ebuild | 165 --------------------- .../networkmanager/networkmanager-0.8.2-r9.ebuild | 165 +++++++++++++++++++++ 4 files changed, 201 insertions(+), 176 deletions(-) delete mode 100644 net-misc/networkmanager/networkmanager-0.8.2-r8.ebuild create mode 100644 net-misc/networkmanager/networkmanager-0.8.2-r9.ebuild (limited to 'net-misc/networkmanager') diff --git a/net-misc/networkmanager/ChangeLog b/net-misc/networkmanager/ChangeLog index ec9687cb43b2..23e4fd3df93e 100644 --- a/net-misc/networkmanager/ChangeLog +++ b/net-misc/networkmanager/ChangeLog @@ -1,6 +1,13 @@ # 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.99 2011/02/26 05:59:00 qiaomuf Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/ChangeLog,v 1.100 2011/02/26 08:13:31 qiaomuf Exp $ + +*networkmanager-0.8.2-r9 (26 Feb 2011) + + 26 Feb 2011; Mu Qiao -networkmanager-0.8.2-r8.ebuild, + +networkmanager-0.8.2-r9.ebuild, + files/networkmanager-0.8.2-ifnet-smarter-write.patch: + Display printable conn_name in nm-applet. (bug #356337) *networkmanager-0.8.2-r8 (26 Feb 2011) diff --git a/net-misc/networkmanager/files/networkmanager-0.8.2-ifnet-smarter-write.patch b/net-misc/networkmanager/files/networkmanager-0.8.2-ifnet-smarter-write.patch index a1f589d0062b..ff4c1f253677 100644 --- a/net-misc/networkmanager/files/networkmanager-0.8.2-ifnet-smarter-write.patch +++ b/net-misc/networkmanager/files/networkmanager-0.8.2-ifnet-smarter-write.patch @@ -1,4 +1,4 @@ -From 5b018326db5c9ebad8a63e1e231f49d2ca65e28c Mon Sep 17 00:00:00 2001 +From 776fafc133e18df48dc92a717c662e1b2858567e Mon Sep 17 00:00:00 2001 From: Mu Qiao Date: Fri, 25 Feb 2011 16:25:07 +0000 Subject: [PATCH 3/3] Won't write when nothing changed @@ -7,17 +7,35 @@ Subject: [PATCH 3/3] Won't write when nothing changed Signed-off-by: Mu Qiao --- - system-settings/plugins/ifnet/connection_parser.c | 24 ++++++-------------- - system-settings/plugins/ifnet/net_parser.c | 8 +++++- - system-settings/plugins/ifnet/plugin.c | 4 --- - system-settings/plugins/ifnet/wpa_parser.c | 7 ++++- - 4 files changed, 18 insertions(+), 25 deletions(-) + system-settings/plugins/ifnet/connection_parser.c | 33 +++++++++----------- + system-settings/plugins/ifnet/net_parser.c | 8 ++++- + system-settings/plugins/ifnet/plugin.c | 4 -- + system-settings/plugins/ifnet/wpa_parser.c | 7 +++- + 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/system-settings/plugins/ifnet/connection_parser.c b/system-settings/plugins/ifnet/connection_parser.c -index 9b5ddc1..8600142 100644 +index 9b5ddc1..4ac2173 100644 --- a/system-settings/plugins/ifnet/connection_parser.c +++ b/system-settings/plugins/ifnet/connection_parser.c -@@ -627,23 +627,13 @@ make_ip4_setting (NMConnection * connection, gchar * conn_name, GError ** error) +@@ -55,9 +55,16 @@ update_connection_id (NMConnection * connection, gchar * conn_name) + gchar *idstr = NULL; + gchar *uuid_base = NULL; + gchar *uuid = NULL; ++ int name_len; + NMSettingConnection *setting; + +- idstr = g_strdup_printf ("%s (%s)", get_prefix (), conn_name); ++ name_len = strlen (conn_name); ++ if ((name_len > 2) && (g_str_has_prefix (conn_name, "0x"))) { ++ gchar * conn_name_printable = utils_hexstr2bin (conn_name + 2, name_len - 2); ++ idstr = g_strdup_printf ("%s (%s)", get_prefix (), conn_name_printable); ++ g_free (conn_name_printable); ++ } else ++ idstr = g_strdup_printf ("%s (%s)", get_prefix (), conn_name); + uuid_base = idstr; + uuid = nm_utils_uuid_generate_from_string (uuid_base); + setting = +@@ -627,23 +634,13 @@ make_ip4_setting (NMConnection * connection, gchar * conn_name, GError ** error) g_object_set (ip4_setting, NM_SETTING_IP4_CONFIG_IGNORE_AUTO_ROUTES, TRUE, NULL); @@ -44,7 +62,7 @@ index 9b5ddc1..8600142 100644 } g_object_set (ip4_setting, NM_SETTING_IP4_CONFIG_METHOD, -@@ -2276,11 +2266,12 @@ write_wireless_setting (NMConnection * connection, +@@ -2276,11 +2273,12 @@ write_wireless_setting (NMConnection * connection, return FALSE; } @@ -60,7 +78,7 @@ index 9b5ddc1..8600142 100644 hex_ssid = TRUE; break; } -@@ -2487,7 +2478,6 @@ write_ip4_setting (NMConnection * connection, gchar * conn_name, +@@ -2487,7 +2485,6 @@ write_ip4_setting (NMConnection * connection, gchar * conn_name, ifnet_set_data (conn_name, "config", "dhcp"); /* DNS Servers */ diff --git a/net-misc/networkmanager/networkmanager-0.8.2-r8.ebuild b/net-misc/networkmanager/networkmanager-0.8.2-r8.ebuild deleted file mode 100644 index 7c1c488f662d..000000000000 --- a/net-misc/networkmanager/networkmanager-0.8.2-r8.ebuild +++ /dev/null @@ -1,165 +0,0 @@ -# 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.8.2-r8.ebuild,v 1.1 2011/02/26 05:59:00 qiaomuf Exp $ - -EAPI="2" - -inherit autotools eutils 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 =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() { - # FIXME. Required by -confchanges.patch, but the patch is invalid as - # ConsoleKit and PolicyKit is enough to get authorization. - enewgroup plugdev - - 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" - # fix shared connection wrt bug #350476 - # fix parsing dhclient.conf wrt bug #352638 - epatch "${FILESDIR}/${P}-shared-connection.patch" - # Backports #1 - epatch "${FILESDIR}/${P}-1.patch" - # won't crash upon startup for 32bit machines wrt bug #353807 - epatch "${FILESDIR}/${P}-fix-timestamp.patch" - # fix tests wrt bug #353549 - epatch "${FILESDIR}/${P}-fix-tests.patch" - # fix temporary files creation bug #349003 - epatch "${FILESDIR}/${P}-fix-tempfiles.patch" - # won't write when nothing changed (bug #356339) - epatch "${FILESDIR}/${P}-ifnet-smarter-write.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 --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 "" -} diff --git a/net-misc/networkmanager/networkmanager-0.8.2-r9.ebuild b/net-misc/networkmanager/networkmanager-0.8.2-r9.ebuild new file mode 100644 index 000000000000..bc12243522bd --- /dev/null +++ b/net-misc/networkmanager/networkmanager-0.8.2-r9.ebuild @@ -0,0 +1,165 @@ +# 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.8.2-r9.ebuild,v 1.1 2011/02/26 08:13:31 qiaomuf Exp $ + +EAPI="2" + +inherit autotools eutils 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 =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() { + # FIXME. Required by -confchanges.patch, but the patch is invalid as + # ConsoleKit and PolicyKit is enough to get authorization. + enewgroup plugdev + + 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" + # fix shared connection wrt bug #350476 + # fix parsing dhclient.conf wrt bug #352638 + epatch "${FILESDIR}/${P}-shared-connection.patch" + # Backports #1 + epatch "${FILESDIR}/${P}-1.patch" + # won't crash upon startup for 32bit machines wrt bug #353807 + epatch "${FILESDIR}/${P}-fix-timestamp.patch" + # fix tests wrt bug #353549 + epatch "${FILESDIR}/${P}-fix-tests.patch" + # fix temporary files creation bug #349003 + epatch "${FILESDIR}/${P}-fix-tempfiles.patch" + # won't write when nothing changed (bug #356339) + epatch "${FILESDIR}/${P}-ifnet-smarter-write.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 --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 "" +} -- cgit v1.2.3-65-gdbad