diff options
author | jylefort <jylefort@FreeBSD.org> | 2005-11-05 22:26:45 +0800 |
---|---|---|
committer | jylefort <jylefort@FreeBSD.org> | 2005-11-05 22:26:45 +0800 |
commit | 08f1fb9c67f312e90dd0f6f11d6828e8ddd55992 (patch) | |
tree | ad9aa387a02b3e06e131428bf434118ac3ae5aad /net/trafshow3 | |
parent | 6eb6d1f5930e29f37506e9973dc7d02ad6e9088d (diff) | |
download | freebsd-ports-gnome-08f1fb9c67f312e90dd0f6f11d6828e8ddd55992.tar.gz freebsd-ports-gnome-08f1fb9c67f312e90dd0f6f11d6828e8ddd55992.tar.zst freebsd-ports-gnome-08f1fb9c67f312e90dd0f6f11d6828e8ddd55992.zip |
- Update to 5.2.1 [1]
- Fix configuration file handling across updates
[1]:
PR: ports/88123
Submitted by: Serge Maslov <serge@maslov.biz>
Approved by: maintainer
Diffstat (limited to 'net/trafshow3')
-rw-r--r-- | net/trafshow3/Makefile | 38 | ||||
-rw-r--r-- | net/trafshow3/distinfo | 4 | ||||
-rw-r--r-- | net/trafshow3/files/patch-ac | 11 | ||||
-rw-r--r-- | net/trafshow3/files/patch-af | 13 | ||||
-rw-r--r-- | net/trafshow3/files/patch-ag | 20 | ||||
-rw-r--r-- | net/trafshow3/files/patch-ah | 116 | ||||
-rw-r--r-- | net/trafshow3/files/patch-configure | 11 | ||||
-rw-r--r-- | net/trafshow3/pkg-descr | 2 | ||||
-rw-r--r-- | net/trafshow3/pkg-message.nodevfs | 11 | ||||
-rw-r--r-- | net/trafshow3/pkg-plist | 2 |
10 files changed, 32 insertions, 196 deletions
diff --git a/net/trafshow3/Makefile b/net/trafshow3/Makefile index e9c45adf8f90..81f133465795 100644 --- a/net/trafshow3/Makefile +++ b/net/trafshow3/Makefile @@ -6,45 +6,43 @@ # PORTNAME= trafshow -PORTVERSION= 3.1 -PORTREVISION= 5 +PORTVERSION= 5.2.1 PORTEPOCH= 1 CATEGORIES= net -MASTER_SITES= ftp://ftp.sasknow.com/pub/trafshow/ \ +MASTER_SITES= ${MASTER_SITE_NETBSD} \ ftp://ftp.nsk.su/pub/RinetSoftware/ EXTRACT_SUFX= .tgz MAINTAINER= ryan@sasknow.com COMMENT= Full screen visualization of network traffic -CONFLICTS= trafshow-4.* - -.include <bsd.port.pre.mk> - -.if defined(WITH_TRAFSHOW_SLANG) || \ - (exists(${LOCALBASE}/lib/libslang.a) && !defined(WITHOUT_TRAFSHOW_SLANG)) -LIB_DEPENDS= slang.1:${PORTSDIR}/devel/libslang -.else -.if ${OSVERSION} < 400010 -LIB_DEPENDS= ncurses.5:${PORTSDIR}/devel/ncurses -.endif -.endif - USE_REINPLACE= yes GNU_CONFIGURE= yes -CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include/ncurses -I${LOCALBASE}/include" \ - LIBS="-L${LOCALBASE}/lib" +CONFIGURE_ENV= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" PTHREAD_LIBS="${PTHREAD_LIBS}" ALL_TARGET= trafshow MAN1= trafshow.1 +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 500000 +PKGMESSAGE= ${PKGDIR}/pkg-message.nodevfs +.endif + post-patch: - @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/*.c + @${REINPLACE_CMD} -e 's|-D_THREAD_SAFE||' ${WRKSRC}/configure + @${REINPLACE_CMD} -e 's|/etc|${PREFIX}/etc|' \ + ${WRKSRC}/colormask.c ${WRKSRC}/trafshow.1 ${WRKSRC}/trafshow.c do-install: ${INSTALL_PROGRAM} ${WRKSRC}/trafshow ${PREFIX}/bin ${INSTALL_MAN} ${WRKSRC}/trafshow.1 ${PREFIX}/man/man1 ${INSTALL_DATA} ${WRKSRC}/.trafshow ${PREFIX}/etc/trafshow.dist - ${CP} ${PREFIX}/etc/trafshow.dist ${PREFIX}/etc/trafshow + if [ ! -e ${PREFIX}/etc/trafshow ]; then \ + ${CP} -p ${PREFIX}/etc/trafshow.dist ${PREFIX}/etc/trafshow; \ + fi +.if ${OSVERSION} < 500000 + @${CAT} ${PKGMESSAGE} +.endif .include <bsd.port.post.mk> diff --git a/net/trafshow3/distinfo b/net/trafshow3/distinfo index c7c38bea360e..59e1bec01fff 100644 --- a/net/trafshow3/distinfo +++ b/net/trafshow3/distinfo @@ -1,2 +1,2 @@ -MD5 (trafshow-3.1.tgz) = 085b99f160002a269b358aab1c5004f0 -SIZE (trafshow-3.1.tgz) = 72342 +MD5 (trafshow-5.2.1.tgz) = e3ad2e3f1aac2e1bac9b467df44cf8f0 +SIZE (trafshow-5.2.1.tgz) = 123770 diff --git a/net/trafshow3/files/patch-ac b/net/trafshow3/files/patch-ac deleted file mode 100644 index c15ab541f4d8..000000000000 --- a/net/trafshow3/files/patch-ac +++ /dev/null @@ -1,11 +0,0 @@ ---- color.c.orig Mon Jan 24 10:59:01 2000 -+++ color.c Mon Jan 24 10:57:36 2000 -@@ -336,7 +336,7 @@ - error(1, "init_color_mask: getpwuid"); - (void) sprintf(buf, "%s/.%s", pw->pw_dir, program_name); - if ((fp = fopen(buf, "r")) == NULL) { -- (void) strcpy(buf, "/etc/"); -+ (void) strcpy(buf, "%%PREFIX%%/etc/"); - (void) strcat(buf, program_name); - if ((fp = fopen(buf, "r")) == NULL) return 0; - } diff --git a/net/trafshow3/files/patch-af b/net/trafshow3/files/patch-af deleted file mode 100644 index dba73df91ae9..000000000000 --- a/net/trafshow3/files/patch-af +++ /dev/null @@ -1,13 +0,0 @@ ---- Makefile.in.orig Mon Aug 24 13:54:16 1998 -+++ Makefile.in Tue May 2 00:51:47 2000 -@@ -28,8 +28,8 @@ - - PROG = trafshow - CC = @CC@ --CCOPT = @V_CCOPT@ --INCLS = -I. @V_INCLS@ -+CCOPT = @CFLAGS@ -+INCLS = -I. @CPPFLAGS@ - DEFS = @DEFS@ - - CFLAGS = $(CCOPT) $(DEFS) $(INCLS) diff --git a/net/trafshow3/files/patch-ag b/net/trafshow3/files/patch-ag deleted file mode 100644 index 959cd5221318..000000000000 --- a/net/trafshow3/files/patch-ag +++ /dev/null @@ -1,20 +0,0 @@ ---- util.c.orig Thu Sep 25 06:37:57 1997 -+++ util.c Fri Jul 30 18:20:20 2004 -@@ -123,11 +123,17 @@ - { "egp", IPPROTO_EGP }, - { "ospf", IPPROTO_OSPF }, - { "igmp", IPPROTO_IGMP }, -+ { "gre", IPPROTO_GRE }, -+ { "gif", IPPROTO_IPIP }, -+ { "esp", IPPROTO_ESP }, - #ifdef IPPROTO_GGP - { "ggp", IPPROTO_GGP }, - #endif - #ifdef IPPROTO_ENCAP - { "encap",IPPROTO_ENCAP}, -+#endif -+#ifdef IPPROTO_IPV6 -+ { "ipv6", IPPROTO_IPV6}, - #endif - { "ip", IPPROTO_IP }, - { "raw", IPPROTO_RAW }, diff --git a/net/trafshow3/files/patch-ah b/net/trafshow3/files/patch-ah deleted file mode 100644 index 77b6c110abdb..000000000000 --- a/net/trafshow3/files/patch-ah +++ /dev/null @@ -1,116 +0,0 @@ ---- display.c.orig Sun Aug 23 21:51:48 1998 -+++ display.c Fri Dec 6 12:17:55 2002 -@@ -54,6 +54,7 @@ - static int l_nflag, l_eflag; - static int n_entries; - static int err_pos; -+extern struct t_entry t_mask; /* traffic mask */ - - void - init_display(reinit) -@@ -282,6 +284,13 @@ - packets_total++; - bytes_total += e->bytes; - j = page * page_size; -+ -+ e->src.s_addr &= t_mask.src.s_addr; -+ e->dst.s_addr &= t_mask.dst.s_addr; -+ e->sport &= t_mask.sport; -+ e->dport &= t_mask.dport; -+ e->proto &= t_mask.proto; -+ - for (i = 0; i < n_entry; i++) { - if (memcmp(&e->eh, &entries[i].eh, sizeof(e->eh)) == 0 && - e->src.s_addr == entries[i].src.s_addr && ---- trafshow.c.orig Fri Aug 28 00:15:57 1998 -+++ trafshow.c Fri Dec 6 12:34:09 2002 -@@ -48,6 +48,7 @@ - int pflag = 0; /* don't put the interface into promiscuous mode */ - int kflag = 1; /* disable keyboard input checking */ - int eflag = 0; /* show ethernet traffic rather than ip */ -+struct t_entry t_mask; /* traffic mask */ - - /* global variables */ - char *program_name; /* myself */ -@@ -78,6 +79,12 @@ - extern int abort_on_misalignment(); - extern pcap_handler lookup_if(); - -+ t_mask.src.s_addr = 0xffffffff; /* all bits valid */ -+ t_mask.dst.s_addr = 0xffffffff; /* all bits valid */ -+ t_mask.sport = 0xffff; /* all bits valid */ -+ t_mask.dport = 0xffff; /* all bits valid */ -+ t_mask.proto = 0xffff; /* all bits valid */ -+ - cnt = -1; - device_name = NULL; - infile = NULL; -@@ -94,7 +87,7 @@ - - if (abort_on_misalignment(ebuf) < 0) error(0, ebuf); - -- while ((op = getopt(argc, argv, "c:CefF:i:knNOpr:t:vh?")) != EOF) -+ while ((op = getopt(argc, argv, "c:CefF:i:kmnNOpr:t:vh?")) != EOF) - switch (op) { - case 'C': - #ifdef HAVE_SLCURSES -@@ -114,6 +121,40 @@ - break; - case 'k': - kflag = 0; -+ break; -+ case 'm': -+ t_mask.src.s_addr = 0; -+ t_mask.dst.s_addr = 0; -+ t_mask.sport = 0; -+ t_mask.dport = 0; -+ t_mask.proto = 0; -+ for (;optind + 1 <= argc;) { -+ char *s = argv[optind]; -+ u_int32_t arg = 0xffffffff; -+ int save=optind; -+ -+ optind++; -+ if (optind + 1 <= argc && -+ isdigit(*(argv[optind])) ) { -+ arg = strtoul(argv[optind], NULL, 0); -+ optind++; -+ } -+ -+ if (!strcmp(s, "src-ip")) -+ t_mask.src.s_addr = htonl(arg); -+ else if (!strcmp(s, "dst-ip")) -+ t_mask.dst.s_addr = htonl(arg); -+ else if (!strcmp(s, "src-port")) -+ t_mask.sport = htons((u_short)(arg)); -+ else if (!strcmp(s, "dst-port")) -+ t_mask.dport = htons((u_short)(arg)); -+ else if (!strcmp(s, "proto")) -+ t_mask.proto = arg; -+ else { -+ optind = save; -+ break; -+ } -+ } - break; - case 'n': - ++nflag; ---- trafshow.1.orig Fri Aug 28 09:37:38 1998 -+++ trafshow.1 Tue Apr 15 22:32:21 2003 -@@ -42,6 +42,16 @@ - .B \-k - Disable input keyboard checking. It is intended to avoid loss of packets. - .TP -+.B \-m -+[src-ip M] [dst-ip M] [src-port M] [dst-port M] [proto M] -+.br -+Mask the specified field with mask M (which should be specified -+as an hex number e.g. 0xffff0000) before further processing -+of the packet. This allows to aggregate traffic in the display -+to ease analysis. -+.br -+.The masks for all field not specified will be set to 0. -+.TP - .B \-n - Don't convert host addresses and port numbers to names. - .TP diff --git a/net/trafshow3/files/patch-configure b/net/trafshow3/files/patch-configure deleted file mode 100644 index 8510310f4a13..000000000000 --- a/net/trafshow3/files/patch-configure +++ /dev/null @@ -1,11 +0,0 @@ ---- configure.orig Sat Jan 5 17:07:53 2002 -+++ configure Sat Jan 5 17:07:53 2002 -@@ -874,7 +874,7 @@ - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_cv_lbl_gcc_vers=`$CC -v 2>&1 | \ -- sed -n -e '$s/.* //' -e '$s/\..*//p'` -+ sed -n -e '$s/^.*version //' -e '$s/\..*//p'` - fi - - echo "$ac_t""$ac_cv_lbl_gcc_vers" 1>&6 diff --git a/net/trafshow3/pkg-descr b/net/trafshow3/pkg-descr index c3121121390e..bb8fa8522a7e 100644 --- a/net/trafshow3/pkg-descr +++ b/net/trafshow3/pkg-descr @@ -4,5 +4,3 @@ expression. It periodically sorts and updates this information. It may be useful for locating suspicious network traffic on the net. WWW: http://soft.risp.ru/trafshow/index_en.shtml - -- Ryan Thompson <ryan@sasknow.com> diff --git a/net/trafshow3/pkg-message.nodevfs b/net/trafshow3/pkg-message.nodevfs new file mode 100644 index 000000000000..7bb9f3d45d76 --- /dev/null +++ b/net/trafshow3/pkg-message.nodevfs @@ -0,0 +1,11 @@ +=============================================================================== + +If trafshow displays errors similar to the following: + + ed1: (no devices found) /dev/bpf4: No such file or directory + +create more bpf devices, for instance: + + cd /dev && ./MAKEDEV bpf7 # create 8 devices + +=============================================================================== diff --git a/net/trafshow3/pkg-plist b/net/trafshow3/pkg-plist index 00f2059110f7..8879ecadaa66 100644 --- a/net/trafshow3/pkg-plist +++ b/net/trafshow3/pkg-plist @@ -1,4 +1,4 @@ bin/trafshow @unexec if cmp -s %D/etc/trafshow %D/etc/trafshow.dist; then rm -f %D/etc/trafshow; fi etc/trafshow.dist -@exec if [ ! -f %D/etc/trafshow.dist ]; then cp -p %D/%F %B/trafshow.dist; fi +@exec if [ ! -e %D/etc/trafshow ]; then cp -p %D/%F %B/trafshow; fi |