summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2012-04-15 06:58:30 +0000
committerAlexandre Rostovtsev <tetromino@gentoo.org>2012-04-15 06:58:30 +0000
commit2330875ef28ea0377298948f9f5990623d1976d8 (patch)
tree2cfbdc793e919197c79b66bea1bf35adfc01a866 /net-analyzer/gnome-nettool
parentAdd new plugins to 9999, thanks to 0xd34df00d (diff)
downloadgentoo-2-2330875ef28ea0377298948f9f5990623d1976d8.tar.gz
gentoo-2-2330875ef28ea0377298948f9f5990623d1976d8.tar.bz2
gentoo-2-2330875ef28ea0377298948f9f5990623d1976d8.zip
Bump, adds support for nmap and iputils. Fix launching utilities in /sbin and /usr/sbin. Drop old.
(Portage version: 2.2.0_alpha100/cvs/Linux x86_64)
Diffstat (limited to 'net-analyzer/gnome-nettool')
-rw-r--r--net-analyzer/gnome-nettool/ChangeLog10
-rw-r--r--net-analyzer/gnome-nettool/files/gnome-nettool-3.2.0-extra-path.patch82
-rw-r--r--net-analyzer/gnome-nettool/gnome-nettool-3.2.0.ebuild (renamed from net-analyzer/gnome-nettool/gnome-nettool-3.0.0-r1.ebuild)16
3 files changed, 100 insertions, 8 deletions
diff --git a/net-analyzer/gnome-nettool/ChangeLog b/net-analyzer/gnome-nettool/ChangeLog
index bb6a76666c52..93bb24be062d 100644
--- a/net-analyzer/gnome-nettool/ChangeLog
+++ b/net-analyzer/gnome-nettool/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-analyzer/gnome-nettool
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/gnome-nettool/ChangeLog,v 1.116 2012/01/05 05:10:19 tetromino Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/gnome-nettool/ChangeLog,v 1.117 2012/04/15 06:58:30 tetromino Exp $
+
+*gnome-nettool-3.2.0 (15 Apr 2012)
+
+ 15 Apr 2012; Alexandre Rostovtsev <tetromino@gentoo.org>
+ -gnome-nettool-3.0.0-r1.ebuild, +gnome-nettool-3.2.0.ebuild,
+ +files/gnome-nettool-3.2.0-extra-path.patch:
+ Bump, adds support for nmap and iputils. Fix launching utilities in /sbin and
+ /usr/sbin. Drop old.
*gnome-nettool-3.0.1 (05 Jan 2012)
diff --git a/net-analyzer/gnome-nettool/files/gnome-nettool-3.2.0-extra-path.patch b/net-analyzer/gnome-nettool/files/gnome-nettool-3.2.0-extra-path.patch
new file mode 100644
index 000000000000..657543e7eee3
--- /dev/null
+++ b/net-analyzer/gnome-nettool/files/gnome-nettool-3.2.0-extra-path.patch
@@ -0,0 +1,82 @@
+From 0bdac5ac8142cbb86297cfb25e611d21d97e6a42 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Sun, 15 Apr 2012 02:15:14 -0400
+Subject: [PATCH] utils: append EXTRA_PATH to user's path for
+ util_find_program_in_path()
+
+Normal users generally do not have /sbin or /usr/sbin in their paths,
+and as a result, without EXTRA_PATH, util_find_program_in_path() fails
+to find certain tools on some distros.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=674126
+---
+ src/utils.c | 14 +++++++++++---
+ 1 files changed, 11 insertions(+), 3 deletions(-)
+
+diff --git a/src/utils.c b/src/utils.c
+index a97217f..eef3cbe 100644
+--- a/src/utils.c
++++ b/src/utils.c
+@@ -31,6 +31,8 @@
+ #include <string.h>
+ #include <glib/gi18n.h>
+
++#define EXTRA_PATH "/sbin:/usr/sbin:/usr/etc:/usr/local/bin:/usr/local/sbin:/usr/ucb"
++
+ #if (GLIB_MINOR_VERSION < 2)
+
+ gint
+@@ -63,13 +65,14 @@ my_strchrnul (const gchar *str, gchar c)
+ }
+
+ /* Based on g_find_program_in_path, stolen from glib/gutils.c
+- * It allow to ask in a specific PATH, if fail then as in the user PATH.
++ * It allow to ask in a specific PATH, if fail then as in the user PATH with
++ * EXTRA_PATH appended.
+ */
+ gchar *
+ util_find_program_in_path (const gchar * program, const gchar * path)
+ {
+ const gchar *p;
+- gchar *name, *freeme;
++ gchar *name, *freeme, *user_path = NULL;
+ size_t len;
+ size_t pathlen;
+
+@@ -92,6 +95,10 @@ util_find_program_in_path (const gchar * program, const gchar * path)
+ if (path == NULL) {
+ path = "/bin:/usr/bin:.";
+ }
++
++ /* /sbin and /usr/sbin might not be in the user's path */
++ user_path = g_strconcat (path, ":", EXTRA_PATH, NULL);
++ path = user_path;
+ }
+
+ len = strlen (program) + 1;
+@@ -124,12 +131,14 @@ util_find_program_in_path (const gchar * program, const gchar * path)
+ gchar *ret;
+ ret = g_strdup (startp);
+ g_free (freeme);
++ g_free (user_path);
+ return ret;
+ }
+ }
+ while (*p++ != '\0');
+
+ g_free (freeme);
++ g_free (user_path);
+
+ return NULL;
+ }
+@@ -202,7 +211,6 @@ util_tree_model_to_string (GtkTreeView *treeview)
+ return result;
+ }
+
+-#define EXTRA_PATH "/sbin:/usr/sbin:/usr/etc:/usr/local/bin:/usr/local/sbin:/usr/ucb"
+ /*
+ * Find a program in PATH and EXTRA_PATH. If fail, show a dialog box.
+ * Returns the abosulet path and program.
+--
+1.7.8.5
+
diff --git a/net-analyzer/gnome-nettool/gnome-nettool-3.0.0-r1.ebuild b/net-analyzer/gnome-nettool/gnome-nettool-3.2.0.ebuild
index 3aaaa1bac31c..85db1508f785 100644
--- a/net-analyzer/gnome-nettool/gnome-nettool-3.0.0-r1.ebuild
+++ b/net-analyzer/gnome-nettool/gnome-nettool-3.2.0.ebuild
@@ -1,17 +1,14 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/gnome-nettool/gnome-nettool-3.0.0-r1.ebuild,v 1.2 2012/01/05 05:10:19 tetromino Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/gnome-nettool/gnome-nettool-3.2.0.ebuild,v 1.1 2012/04/15 06:58:30 tetromino Exp $
EAPI="4"
-GNOME_TARBALL_SUFFIX="bz2"
GCONF_DEBUG="yes"
inherit eutils gnome2
DESCRIPTION="Collection of network tools"
HOMEPAGE="http://www.gnome.org/projects/gnome-network/"
-SRC_URI="${SRC_URI}
- http://dev.gentoo.org/~tetromino/distfiles/${PN}/${P}-patches-1.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
@@ -26,7 +23,12 @@ COMMON_DEPEND="
>=x11-libs/gtk+-2.90.4:3
x11-libs/pango"
RDEPEND="${COMMON_DEPEND}
- || ( net-analyzer/traceroute sys-freebsd/freebsd-usbin )
+ || (
+ net-misc/iputils
+ net-anaylyzer/tcptraceroute
+ net-analyzer/traceroute
+ sys-freebsd/freebsd-usbin )
+ net-analyzer/nmap
net-dns/bind-tools
userland_GNU? ( net-misc/netkit-fingerd net-misc/whois )
userland_BSD? ( net-misc/bsdwhois )"
@@ -52,7 +54,7 @@ pkg_setup() {
}
src_prepare() {
- # Useful upstream patches
- EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" epatch
+ # https://bugzilla.gnome.org/show_bug.cgi?id=674126
+ epatch "${FILESDIR}/${PN}-3.2.0-extra-path.patch"
gnome2_src_prepare
}