Bugfix update to gnome-nettool-3.0.1.

This commit is contained in:
ajacoutot 2012-01-03 12:11:53 +00:00
parent 70c01a503f
commit 77a8551174
11 changed files with 35 additions and 260 deletions

View File

@ -1,10 +1,9 @@
# $OpenBSD: Makefile,v 1.20 2011/12/03 22:17:16 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.21 2012/01/03 12:11:53 ajacoutot Exp $
COMMENT= GNOME interface for various networking tools
GNOME_PROJECT= gnome-nettool
GNOME_VERSION= 3.0.0
REVISION= 8
GNOME_VERSION= 3.0.1
CATEGORIES= net
@ -14,8 +13,6 @@ PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
EXTRACT_SUFX= .tar.bz2
WANTLIB += GL X11 Xau Xcomposite Xcursor Xdamage Xdmcp Xext Xfixes
WANTLIB += Xi Xinerama Xrandr Xrender Xxf86vm atk-1.0 c cairo
WANTLIB += cairo-gobject drm expat fontconfig freetype gdk-3 gdk_pixbuf-2.0
@ -31,7 +28,8 @@ MODULES= devel/dconf \
LIB_DEPENDS= devel/libgtop2 \
x11/gtk+3
BUILD_DEPENDS= devel/gsettings-desktop-schemas
RUN_DEPENDS= devel/gsettings-desktop-schemas
RUN_DEPENDS= devel/gsettings-desktop-schemas \
net/nmap
MODGNOME_TOOLS= yelp
MODGNOME_DESKTOP_FILE= Yes

View File

@ -1,5 +1,5 @@
MD5 (gnome/gnome-nettool-3.0.0.tar.bz2) = mHtbdd2dcAIpNNkAEk171w==
RMD160 (gnome/gnome-nettool-3.0.0.tar.bz2) = KVxVSebmD4/4Lg3exPHH+EdhFWs=
SHA1 (gnome/gnome-nettool-3.0.0.tar.bz2) = N+xaSQCe83ifjGAfnyqmOFGRGf8=
SHA256 (gnome/gnome-nettool-3.0.0.tar.bz2) = a3XuXeVPrmfbC6cQ6LM0pbH80YcZ04rgm53QX14lVek=
SIZE (gnome/gnome-nettool-3.0.0.tar.bz2) = 650660
MD5 (gnome/gnome-nettool-3.0.1.tar.xz) = ki51VBAglvJKNRnJOoJX+g==
RMD160 (gnome/gnome-nettool-3.0.1.tar.xz) = zBV+NUlsG3qgp8lTScy1KAolDwQ=
SHA1 (gnome/gnome-nettool-3.0.1.tar.xz) = qnstWdIXWhSBGWwjdMisp+Ykdbw=
SHA256 (gnome/gnome-nettool-3.0.1.tar.xz) = LCG0SzUe5HAibh5VgLuazwMm2bbDBA3v91Mi+MoTIxc=
SIZE (gnome/gnome-nettool-3.0.1.tar.xz) = 579848

View File

@ -1,36 +0,0 @@
$OpenBSD: patch-data_gnome-nettool_ui,v 1.1 2011/09/12 07:28:53 jasper Exp $
From cbd30cf35c3f5bf0ce2e211b92848de85acef11a Mon Sep 17 00:00:00 2001
From: Jean Schurger <jean@schurger.org>
Date: Wed, 13 Jul 2011 03:31:10 +0000
Subject: Fix ugliness when window is bigger than expected
GtkCombo in traceroute, port scan and whois looks bad if the
gnome-nettool window is bigger than expected.
--- data/gnome-nettool.ui.orig Tue Jan 11 11:32:42 2011
+++ data/gnome-nettool.ui Wed May 18 15:09:03 2011
@@ -1623,6 +1623,7 @@
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="spacing">12</property>
+ <property name="expand">False</property>
<child>
<object class="GtkHBox" id="hbox36">
<property name="visible">True</property>
@@ -1775,6 +1776,7 @@
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="spacing">12</property>
+ <property name="expand">False</property>
<child>
<object class="GtkHBox" id="hbox37">
<property name="visible">True</property>
@@ -2337,6 +2339,7 @@
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="spacing">12</property>
+ <property name="expand">False</property>
<child>
<object class="GtkHBox" id="hbox38">
<property name="visible">True</property>

View File

@ -1,10 +1,10 @@
$OpenBSD: patch-src_info_c,v 1.2 2011/09/12 07:28:53 jasper Exp $
$OpenBSD: patch-src_info_c,v 1.3 2012/01/03 12:11:53 ajacoutot Exp $
https://bugzilla.gnome.org/show_bug.cgi?id=652713
https://bugzilla.gnome.org/show_bug.cgi?id=647896
--- src/info.c.orig Thu Dec 2 10:26:14 2010
+++ src/info.c Thu Jun 16 12:43:17 2011
--- src/info.c.orig Tue Jan 3 10:10:16 2012
+++ src/info.c Tue Jan 3 10:50:22 2012
@@ -20,6 +20,12 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
@ -69,19 +69,3 @@ https://bugzilla.gnome.org/show_bug.cgi?id=647896
(*iface) = g_strdup_printf ("%s (%s)", _(info_iface_desc[i].name), dev_name);
if (info_iface_desc[i].pixbuf == NULL) {
path = g_build_filename (PIXMAPS_DIR, info_iface_desc[i].icon, NULL);
@@ -200,13 +239,13 @@ info_load_iface (Netinfo *info)
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (info->combo), renderer, TRUE);
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (info->combo), renderer,
"pixbuf", 0, NULL);
- g_object_unref (renderer);
+ /* g_object_unref (renderer); */
renderer = gtk_cell_renderer_text_new ();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (info->combo), renderer, TRUE);
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (info->combo), renderer,
"markup", 1, NULL);
- g_object_unref (renderer);
+ /* g_object_unref (renderer); */
gtk_combo_box_set_active (GTK_COMBO_BOX (info->combo), 0);
}

View File

@ -1,17 +0,0 @@
$OpenBSD: patch-src_lookup_c,v 1.3 2011/09/12 07:28:53 jasper Exp $
From bf26bf3996d2947feedfaa8cd8eecaa2809c0aa1 Mon Sep 17 00:00:00 2001
From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
Date: Wed, 15 Jun 2011 08:33:26 +0000
Subject: Add missing header to make this compile on OpenBSD (and others too perhaps)
--- src/lookup.c.orig Tue Sep 22 15:30:34 2009
+++ src/lookup.c Tue Mar 30 15:38:12 2010
@@ -21,6 +21,7 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <glib/gprintf.h>
+#include <sys/types.h>
#include "lookup.h"
#include "utils.h"

View File

@ -1,75 +0,0 @@
$OpenBSD: patch-src_netstat_c,v 1.3 2011/09/12 07:28:53 jasper Exp $
From de912b09b281ea9c8645f9b3870c1635f1db4fea Mon Sep 17 00:00:00 2001
From: Antoine Jacoutot <ajacoutot@openbsd.org>
Date: Thu, 16 Jun 2011 09:35:43 +0000
Subject: Fix netstat routing table display on OpenBSD.
From 50b013254dfe239af364599f8ebfed14853e9390 Mon Sep 17 00:00:00 2001
From: Antoine Jacoutot <ajacoutot@openbsd.org>
Date: Wed, 15 Jun 2011 08:42:19 +0000
Subject: Add initial support (routing) for OpenBSD.
--- src/netstat.c.orig Thu Dec 2 10:26:14 2010
+++ src/netstat.c Thu Jun 16 11:25:57 2011
@@ -110,12 +110,20 @@ netstat_get_active_option (Netinfo * netinfo)
g_return_val_if_fail (netinfo != NULL, NULL);
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (netinfo->routing))) {
+#if defined (__OpenBSD__)
+ if (netinfo_is_ipv6_enable ()) {
+ option = g_strdup ("-rn");
+ } else {
+ option = g_strdup ("-rn -f inet");
+ }
+#else
/* Works for Solaris and Linux */
if (netinfo_is_ipv6_enable ()) {
option = g_strdup ("-rn -A inet -A inet6");
} else {
option = g_strdup ("-rn -A inet");
}
+#endif
if (netinfo->stbar_text)
g_free (netinfo->stbar_text);
@@ -485,8 +493,10 @@ netstat_route_tree_insert (GtkTreeView *widget, gchar
g_return_if_fail (line != NULL);
count = strip_route_line (line, &data);
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__DragonFly__)
if (count == 6) {
+#elif defined(__OpenBSD__)
+ if (count == 8) {
#else
if ((count == 8) || (count == 7)) {
#endif
@@ -557,16 +567,25 @@ strip_route_line (gchar * line, netstat_route_data *da
gint count = 0;
gchar flags[30];
gint ref, use;
-#ifndef __FreeBDD__
+#if !defined (__FreeBSD__) && !defined(__OpenBSD__)
gchar dest[50];
gchar **items;
#endif
+#if defined(__OpenBSD__)
+ gint mtu, prio;
+#endif
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
count = sscanf (line, NETSTAT_ROUTE_FORMAT,
data->destination,
data->gateway, flags,
&ref, &use, data->iface);
+#elif defined(__OpenBSD__)
+ count = sscanf (line, NETSTAT_ROUTE_FORMAT,
+ data->destination,
+ data->gateway, flags,
+ &ref, &use, &mtu, &prio,
+ data->iface);
#else
count = sscanf (line, NETSTAT_ROUTE_FORMAT,
data->destination,

View File

@ -1,27 +0,0 @@
$OpenBSD: patch-src_netstat_h,v 1.3 2011/09/12 07:28:53 jasper Exp $
From 50b013254dfe239af364599f8ebfed14853e9390 Mon Sep 17 00:00:00 2001
From: Antoine Jacoutot <ajacoutot@openbsd.org>
Date: Wed, 15 Jun 2011 08:42:19 +0000
Subject: Add initial support (routing) for OpenBSD.
--- src/netstat.h.orig Tue Mar 30 06:11:19 2010
+++ src/netstat.h Wed Apr 21 11:33:10 2010
@@ -30,10 +30,16 @@
# define NETSTAT_ROUTE6_FORMAT "%s %s %s %d %d %d %s"
# define NETSTAT_MULTICAST_FORMAT "%s %d %s"
-#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__DragonFly__)
# define NETSTAT_PROTOCOL_FORMAT "%s %d %d %d.%d.%d.%d.%s %s %s"
# define ALT_NETSTAT_PROTOCOL_FORMAT "%s %d %d *.%s %s %s"
# define NETSTAT_ROUTE_FORMAT "%s %s %s %d %d %s"
+# define NETSTAT_MULTICAST_FORMAT "%s %d %s"
+
+#elif defined(__OpenBSD__)
+# define NETSTAT_PROTOCOL_FORMAT "%s %d %d %d.%d.%d.%d.%s %s %s"
+# define ALT_NETSTAT_PROTOCOL_FORMAT "%s %d %d *.%s %s %s"
+# define NETSTAT_ROUTE_FORMAT "%s %s %s %d %d %s %d %s"
# define NETSTAT_MULTICAST_FORMAT "%s %d %s"
#endif

View File

@ -1,53 +1,7 @@
$OpenBSD: patch-src_nettool_c,v 1.3 2011/09/12 07:28:53 jasper Exp $
From da8ec778b8ea691e1043173a0e8ea5e226a429b0 Mon Sep 17 00:00:00 2001
From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
Date: Thu, 19 May 2011 18:45:05 +0200
Subject: [PATCH] portability fix for systems that configure an ipv6 address
by default, but use the ipv4 address for actual traffic.
tweak decision logic for deciding if we should use the ipv4 or ipv6 tools.
it would default to ipv6 as most interfaces have an unused ipv6 address, while
actually using the ipv4 address. this fixes ping/traceroute functionality when
using hostnames instead of ip addresses.
--- src/nettool.c.orig Thu Dec 2 10:26:14 2010
+++ src/nettool.c Wed May 18 15:43:49 2011
@@ -24,6 +24,7 @@
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
+#include <netinet/in.h>
#include <signal.h>
#include <errno.h>
#include <sys/wait.h>
@@ -137,21 +138,21 @@ netinfo_get_ip_version (Netinfo * netinfo)
(GTK_BIN (netinfo->host)))));
if (strlen (ip) > 0) {
- host = gethostbyname2 (ip, AF_INET6);
+ host = gethostbyname2 (ip, AF_INET);
if (host == NULL) {
- host = gethostbyname2 (ip, AF_INET);
+ host = gethostbyname2 (ip, AF_INET6);
if (host == NULL)
return -1;
else {
g_free (ip);
- return IPV4;
+ return IPV6;
}
return -1;
}
else {
g_free (ip);
- return IPV6;
+ return IPV4;
}
}
@@ -374,6 +375,10 @@ netinfo_io_text_buffer_dialog (GIOChannel * channel,
$OpenBSD: patch-src_nettool_c,v 1.4 2012/01/03 12:11:53 ajacoutot Exp $
--- src/nettool.c.orig Tue Jan 3 10:10:16 2012
+++ src/nettool.c Tue Jan 3 13:10:35 2012
@@ -379,6 +379,10 @@ netinfo_io_text_buffer_dialog (GIOChannel * channel,
len, NULL);
}
@ -58,7 +12,7 @@ using hostnames instead of ip addresses.
} else if (status == G_IO_STATUS_AGAIN) {
char buf[1];
@@ -385,6 +390,8 @@ netinfo_io_text_buffer_dialog (GIOChannel * channel,
@@ -390,6 +394,8 @@ netinfo_io_text_buffer_dialog (GIOChannel * channel,
}
g_string_append_c (netinfo->command_output, buf[0]);
}
@ -67,7 +21,7 @@ using hostnames instead of ip addresses.
} else if (status == G_IO_STATUS_EOF) {
} else if (status == G_IO_STATUS_ERROR) {
@@ -402,15 +409,15 @@ netinfo_io_text_buffer_dialog (GIOChannel * channel,
@@ -407,15 +413,15 @@ netinfo_io_text_buffer_dialog (GIOChannel * channel,
} else {
g_warning ("Error: %s\n", err->message);

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-src_scan_c,v 1.2 2011/09/12 07:28:53 jasper Exp $
--- src/scan.c.orig Sat Apr 17 10:26:17 2010
+++ src/scan.c Sat Apr 17 10:26:39 2010
@@ -67,7 +67,6 @@ scan_do (Netinfo * netinfo)
$OpenBSD: patch-src_scan_c,v 1.3 2012/01/03 12:11:53 ajacoutot Exp $
--- src/scan.c.orig Tue Jan 3 10:10:16 2012
+++ src/scan.c Tue Jan 3 10:50:22 2012
@@ -71,7 +71,6 @@ scan_do (Netinfo * netinfo)
GIOChannel *channel;
GIOChannel *channel2;
gint pfd[2];
@ -9,7 +9,7 @@ $OpenBSD: patch-src_scan_c,v 1.2 2011/09/12 07:28:53 jasper Exp $
gchar buf[SIZE];
gchar *service_name = NULL;
gint ip_version, pf;
@@ -126,12 +125,12 @@ scan_do (Netinfo * netinfo)
@@ -130,12 +129,12 @@ scan_do (Netinfo * netinfo)
netinfo_toggle_state (netinfo, INACTIVE, NULL);
@ -24,7 +24,7 @@ $OpenBSD: patch-src_scan_c,v 1.2 2011/09/12 07:28:53 jasper Exp $
/* child */
close (pfd[0]);
for (i = start_port; i <= end_port; i++) {
@@ -183,7 +182,7 @@ scan_do (Netinfo * netinfo)
@@ -187,7 +186,7 @@ scan_do (Netinfo * netinfo)
/* parent */
close (pfd[1]);

View File

@ -1,9 +1,9 @@
$OpenBSD: patch-src_utils_h,v 1.2 2011/09/12 07:28:53 jasper Exp $
--- src/utils.h.orig Sat Apr 17 10:25:25 2010
+++ src/utils.h Sat Apr 17 10:26:07 2010
@@ -29,6 +29,8 @@
# include <config.h>
#endif
$OpenBSD: patch-src_utils_h,v 1.3 2012/01/03 12:11:53 ajacoutot Exp $
--- src/utils.h.orig Sun Jan 1 00:54:24 2012
+++ src/utils.h Tue Jan 3 10:50:22 2012
@@ -26,6 +26,8 @@
#include <glib.h>
#include <gtk/gtk.h>
+gint childpid;
+

View File

@ -1,7 +1,8 @@
@comment $OpenBSD: PLIST,v 1.5 2011/12/03 22:17:16 ajacoutot Exp $
@comment $OpenBSD: PLIST,v 1.6 2012/01/03 12:11:54 ajacoutot Exp $
@bin bin/gnome-nettool
share/applications/gnome-nettool.desktop
share/glib-2.0/schemas/org.gnome.gnome-nettool.gschema.xml
share/gnome/
share/gnome-nettool/
share/gnome-nettool/pixmaps/
share/gnome-nettool/pixmaps/16_ethernet.xpm
@ -14,6 +15,7 @@ share/gnome-nettool/pixmaps/network.png
share/gnome-nettool/pixmaps/wavelan-16.png
share/gnome-nettool/ui/
share/gnome-nettool/ui/gnome-nettool.ui
share/gnome/help/
share/gnome/help/gnome-nettool/
share/gnome/help/gnome-nettool/C/
share/gnome/help/gnome-nettool/C/gnome-nettool.xml
@ -50,26 +52,17 @@ share/gnome/help/gnome-nettool/vi/
share/gnome/help/gnome-nettool/vi/gnome-nettool.xml
share/gnome/help/gnome-nettool/zh_CN/
share/gnome/help/gnome-nettool/zh_CN/gnome-nettool.xml
share/icons/hicolor/16x16/
share/icons/hicolor/16x16/apps/
share/icons/hicolor/16x16/apps/gnome-nettool.png
share/icons/hicolor/22x22/
share/icons/hicolor/22x22/apps/
share/icons/hicolor/22x22/apps/gnome-nettool.png
share/icons/hicolor/24x24/
share/icons/hicolor/24x24/apps/
share/icons/hicolor/24x24/apps/gnome-nettool.png
share/icons/hicolor/32x32/
share/icons/hicolor/32x32/apps/
share/icons/hicolor/32x32/apps/gnome-nettool.png
share/icons/hicolor/scalable/
share/icons/hicolor/scalable/apps/
share/icons/hicolor/scalable/apps/gnome-nettool.svg
share/locale/af/LC_MESSAGES/gnome-nettool.mo
share/locale/ar/LC_MESSAGES/gnome-nettool.mo
share/locale/as/LC_MESSAGES/gnome-nettool.mo
share/locale/ast/LC_MESSAGES/gnome-nettool.mo
share/locale/az/LC_MESSAGES/gnome-nettool.mo
share/locale/be/LC_MESSAGES/gnome-nettool.mo
share/locale/bg/LC_MESSAGES/gnome-nettool.mo
share/locale/bn/LC_MESSAGES/gnome-nettool.mo
share/locale/bn_IN/LC_MESSAGES/gnome-nettool.mo
@ -86,6 +79,7 @@ share/locale/el/LC_MESSAGES/gnome-nettool.mo
share/locale/en@shaw/LC_MESSAGES/gnome-nettool.mo
share/locale/en_CA/LC_MESSAGES/gnome-nettool.mo
share/locale/en_GB/LC_MESSAGES/gnome-nettool.mo
share/locale/eo/LC_MESSAGES/gnome-nettool.mo
share/locale/es/LC_MESSAGES/gnome-nettool.mo
share/locale/et/LC_MESSAGES/gnome-nettool.mo
share/locale/eu/LC_MESSAGES/gnome-nettool.mo