Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Jun 2007 14:52:00 +1100 (VLAST)
From:      Dima Panov <fluffy@ael.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/113209: update net-mgmt/netams 
Message-ID:  <200706010352.l513q0sF020646@ns.ael.RU>
Resent-Message-ID: <200706010400.l5140CMx056427@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         113209
>Category:       ports
>Synopsis:       update net-mgmt/netams
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 01 04:00:10 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Dima Panov
>Release:        FreeBSD 6.2-STABLE i386
>Organization:
>Environment:
System: FreeBSD ns.ael.RU 6.2-STABLE FreeBSD 6.2-STABLE #0: Sat Apr 14 11:12:17 VLAST 2007 root@ns.ael.RU:/usr/obj/usr/src/sys/AEL i386


	
>Description:
	Update NetAMS to new stable snapshot
    
>How-To-Repeat:
	
>Fix:

	
    


Index: net-mgmt/netams/Makefile
===================================================================
RCS file: /home/ncvs/ports/net-mgmt/netams/Makefile,v
retrieving revision 1.18
diff -u -r1.18 Makefile
--- net-mgmt/netams/Makefile	3 Sep 2006 00:30:33 -0000	1.18
+++ net-mgmt/netams/Makefile	1 Jun 2007 03:33:08 -0000
@@ -6,8 +6,8 @@
 #
 
 PORTNAME=	netams
-PORTVERSION=	3.3.5
-PORTREVISION=	1
+PORTVERSION=	3.4.0rc2
+PORTREVISION=	0
 CATEGORIES=	net-mgmt
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE} \
 		http://www.netams.com/files/
@@ -17,10 +17,10 @@
 MAINTAINER=	jura@netams.com
 COMMENT=	Network Traffic Accounting and Monitoring Software
 
-NO_PACKAGE=	Depends on kernel
+NO_PACKAGE=	"Depends on installed SQL database"
 
 USE_SUBMAKE=	yes
-USE_RC_SUBR=	netams
+USE_RC_SUBR=    netams.sh
 MANCOMPRESSED=	no
 
 SCRIPTS_ENV=	WRKDIRPREFIX="${WRKDIRPREFIX}" \
@@ -41,58 +41,29 @@
 
 SYSDIR?=	/sys
 
-OPTIONS=	DEBUG	"Build with debug symbols"			off \
-		BW	"Build with bandwidth limitation functionality"	off \
-		HASH	"Build with HASH support"			off
-
 .include <bsd.port.pre.mk>
 
-.if ${OSVERSION} >= 601104
-BROKEN=		Does not compile on FreeBSD >= 6.x
-.endif
-
-#.if !exists(${SYSDIR})
-#IGNORE=		Could not find the kernel sources in ${SYSDIR}. Please define SYSDIR
-#.endif
-
-post-patch:
-	@${REINPLACE_CMD} -E 's/^(CC).*/\1=$$(CXX)/; s|^(INCLUDE=).*|\1 ${LOCALBASE}/include|; s|^(CFLAGS).*=|\1+=|; /^FLAGS/d' \
-		${WRKSRC}/addon/Makefile.common
-.if defined(WITHOUT_DEBUG)
-	@${REINPLACE_CMD} -e 's|configure.sh|configure.sh -nodebug|' \
-		${WRKSRC}/Makefile
-.endif
-
-.if defined(WITH_BW)
-	@${REINPLACE_CMD} -e 's|#DEFINE += -DHAVE_BW|DEFINE += -DHAVE_BW|' \
-		${WRKSRC}/addon/Makefile.common
-.endif
-
-.if defined(WITH_HASH)
-	@${REINPLACE_CMD} -e 's|#DEFINE += -DUSE_HASH|DEFINE += -DUSE_HASH|' \
-		${WRKSRC}/addon/Makefile.common
-.endif
-
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/src/netams ${PREFIX}/libexec/netams
 	${INSTALL_PROGRAM} ${WRKSRC}/src/flowprobe ${PREFIX}/sbin/flowprobe
 	${INSTALL_PROGRAM} ${WRKSRC}/src/ipfw2netflow ${PREFIX}/sbin/ipfw2netflow
+	${INSTALL_PROGRAM} ${WRKSRC}/src/ascii2netflow ${PREFIX}/sbin/ascii2netflow
 	${INSTALL_PROGRAM} ${WRKSRC}/src/netamsctl ${PREFIX}/bin/netamsctl
 	${INSTALL_DATA} ${WRKSRC}/addon/netams.cfg ${PREFIX}/etc/netams.cfg.sample
-	${MKDIR} ${DATADIR}/cgi-bin/admin ${DATADIR}/cgi-bin/images
+	${MKDIR} ${DATADIR}/cgi-bin/admin ${DATADIR}/cgi-bin/images/
 	${INSTALL_DATA} ${WRKSRC}/addon/ru-networks.txt ${DATADIR}/ru-networks.txt.sample
-	${INSTALL_DATA} ${WRKSRC}/addon/.netamsctl.rc ${DATADIR}
+	${INSTALL_DATA} ${WRKSRC}/addon/.netamsctl.rc ${DATADIR}/
 .for f in ${IMAGES}
-	${INSTALL_DATA} ${WRKSRC}/cgi-bin/images/${f} ${DATADIR}/cgi-bin/images
+	${INSTALL_DATA} ${WRKSRC}/cgi-bin/images/${f} ${DATADIR}/cgi-bin/images/
 .endfor
 .for f in ${CGI}
-	${INSTALL_DATA} ${WRKSRC}/cgi-bin/${f} ${DATADIR}/cgi-bin
+	${INSTALL_DATA} ${WRKSRC}/cgi-bin/${f} ${DATADIR}/cgi-bin/
 .endfor
 .for f in ${ADMINCGI}
-	${INSTALL_DATA} ${WRKSRC}/cgi-bin/admin/${f} ${DATADIR}/cgi-bin/admin
+	${INSTALL_DATA} ${WRKSRC}/cgi-bin/admin/${f} ${DATADIR}/cgi-bin/admin/
 .endfor
 .for f in ${MAN8}
-	${INSTALL_MAN} ${WRKSRC}/doc/${f} ${PREFIX}/man/man8
+	${INSTALL_MAN} ${WRKSRC}/doc/${f} ${PREFIX}/man/man8/
 .endfor
 
 post-install:
Index: net-mgmt/netams/distinfo
===================================================================
RCS file: /home/ncvs/ports/net-mgmt/netams/distinfo,v
retrieving revision 1.14
diff -u -r1.14 distinfo
--- net-mgmt/netams/distinfo	14 Jun 2006 12:08:24 -0000	1.14
+++ net-mgmt/netams/distinfo	1 Jun 2007 03:33:32 -0000
@@ -1,3 +1,3 @@
-MD5 (netams-3.3.5.tar.gz) = 5b76510d2df6cf1e370efbdc1f0a71fd
-SHA256 (netams-3.3.5.tar.gz) = fedb4fd3463a87c5a70e2126b9c7d3fc5fe02bccb16977b241f0a38c4055b702
-SIZE (netams-3.3.5.tar.gz) = 338686
+MD5 (netams-3.4.0rc2.tar.gz) = 3093e50f8ee7a297cb8c2bc6bacd0666
+SHA256 (netams-3.4.0rc2.tar.gz) = 7cbfdefa94f075a5dab40613d25738c0e2e40652638338b52632a0efdbc4f68e
+SIZE (netams-3.4.0rc2.tar.gz) = 375729
Index: net-mgmt/netams/pkg-descr
===================================================================
RCS file: /home/ncvs/ports/net-mgmt/netams/pkg-descr,v
retrieving revision 1.3
diff -u -r1.3 pkg-descr
--- net-mgmt/netams/pkg-descr	12 Oct 2005 12:05:55 -0000	1.3
+++ net-mgmt/netams/pkg-descr	1 Jun 2007 03:36:08 -0000
@@ -1,11 +1,10 @@
 NeTAMS stands for Network Traffic Accounting and Monitoring Software. 
 It is built for UNIX and works for networks with Cisco routers or PC Unix 
 routers (Linux/FreeBSD/Solaris). Several methods of traffic gathering are 
-supported (tee/divert/ip_queue/libpcap/ulog/netflow v5 and v9/netgraph), 
-database storage (BerkleyDB/MySQL/PostgresSQL/Oracle/Radius), aggregation, 
-visualization, notification etc. It is possible to block traffic based on 
-quotas, web authorization, account balance (billing); manage bandwidth, 
-MAC assignmant violations, RADIUS services, create a flexible accounting 
-and filtering policies.
+supported (tee/divert/ip_queue/libpcap/netflow v5), database storage 
+(BerkleyDB/MySQL/PostgresSQL), aggregation, visualization, notification etc. 
+It is possible to block traffic based on quotas, authorization ID, empty 
+balance (billing); manage bandwidth, create a flexible accounting and 
+filtration policies.
 
 WWW: http://www.netams.com/
Index: net-mgmt/netams/pkg-plist
===================================================================
RCS file: /home/ncvs/ports/net-mgmt/netams/pkg-plist,v
retrieving revision 1.6
diff -u -r1.6 pkg-plist
--- net-mgmt/netams/pkg-plist	14 Jun 2006 12:08:24 -0000	1.6
+++ net-mgmt/netams/pkg-plist	1 Jun 2007 03:42:58 -0000
@@ -2,6 +2,7 @@
 libexec/netams
 sbin/flowprobe
 sbin/ipfw2netflow
+sbin/ascii2netflow
 bin/netamsctl
 %%DATADIR%%/ru-networks.txt.sample
 %%DATADIR%%/.netamsctl.rc
@@ -39,7 +40,7 @@
 %%DATADIR%%/cgi-bin/images/logo.gif
 %%DATADIR%%/cgi-bin/images/logo_sm.jpg
 %%DATADIR%%/cgi-bin/images/showtable-logo.gif
-@dirrm %%DATADIR%%/cgi-bin/images
-@dirrm %%DATADIR%%/cgi-bin/admin
-@dirrm %%DATADIR%%/cgi-bin
-@dirrm %%DATADIR%%
+@dirrm %%DATADIR%%/cgi-bin/images/
+@dirrm %%DATADIR%%/cgi-bin/admin/
+@dirrm %%DATADIR%%/cgi-bin/
+@dirrm %%DATADIR%%/
Index: net-mgmt/netams/files/netams.in
===================================================================
RCS file: /home/ncvs/ports/net-mgmt/netams/files/netams.in,v
retrieving revision 1.2
diff -u -r1.2 netams.in
--- net-mgmt/netams/files/netams.in	28 Jun 2006 21:10:10 -0000	1.2
+++ net-mgmt/netams/files/netams.in	1 Jun 2007 03:39:29 -0000
@@ -1,32 +0,0 @@
-#!/bin/sh
-# $FreeBSD: ports/net-mgmt/netams/files/netams.in,v 1.2 2006/06/28 21:10:10 itetcu Exp $
-#
-# PROVIDE: netams
-# REQUIRE: NETWORKING
-# KEYWORD: shutdown
-
-# Add the following line to /etc/rc.conf to enable netams
-#
-# netams_enable (bool):         Set to "NO" by default.
-#                               Set it to "YES" to enable netams.
-# netams_config (str):          Custom configuration file to be passed
-#                               to netams.
-#
-# DO NOT CHANGE THESE DEFAULT VALUES HERE
-#
-
-. %%RC_SUBR%%
-
-name="netams"
-rcvar=`set_rcvar`
-
-load_rc_config $name
-
-: ${netams_enable="NO"}
-: ${netams_config="/usr/local/etc/netams.cfg"}
-
-pidfile="/var/run/netams.pid"
-command="/usr/local/libexec/netams"
-command_args="-lf ${netams_config} > /dev/null &"
-
-run_rc_command "$1"
Index: net-mgmt/netams/files/patch-src__common.c
===================================================================
RCS file: /home/ncvs/ports/net-mgmt/netams/files/patch-src__common.c,v
retrieving revision 1.1
diff -u -r1.1 patch-src__common.c
--- net-mgmt/netams/files/patch-src__common.c	14 Jun 2006 12:08:24 -0000	1.1
+++ net-mgmt/netams/files/patch-src__common.c	1 Jun 2007 03:31:40 -0000
@@ -1,29 +0,0 @@
---- ./src/common.c	Fri Apr 21 10:25:11 2006
-+++ ./src/common.c	Wed Jun 14 13:15:26 2006
-@@ -179,11 +179,21 @@
-   
- 	if (flag_syslog) { bzero(str2log2, 256); bzero(str2log1, 256+64); }
- 
--	va_start(ap, fmt);
--	if (flag_nodaemon && !flag_quiet) vfprintf(stdout, fmt, ap);
--	if (flag_log) vfprintf(LOGFILE, fmt, ap);
--	if (flag_syslog) vsnprintf(str2log2,256, fmt, ap);
--	va_end(ap);
-+	if (flag_nodaemon && !flag_quiet) {
-+		va_start(ap, fmt);
-+		vfprintf(stdout, fmt, ap);
-+		va_end(ap);
-+	}	
-+	if (flag_log) {
-+		va_start(ap, fmt);
-+		vfprintf(LOGFILE, fmt, ap);
-+		va_end(ap);
-+	}
-+	if (flag_syslog) {
-+		va_start(ap, fmt);
-+		vsnprintf(str2log2,256, fmt, ap);
-+		va_end(ap);
-+	}
- 
- 	if (flag_syslog) {
- 	    snprintf(str2log1,256+64,"%s:%u %s", where, id, str2log2);
Index: net-mgmt/netams/files/patch-src__ng_netams.c
===================================================================
RCS file: /home/ncvs/ports/net-mgmt/netams/files/patch-src__ng_netams.c,v
retrieving revision 1.1
diff -u -r1.1 patch-src__ng_netams.c
--- net-mgmt/netams/files/patch-src__ng_netams.c	14 Jun 2006 12:08:24 -0000	1.1
+++ net-mgmt/netams/files/patch-src__ng_netams.c	1 Jun 2007 03:31:46 -0000
@@ -1,25 +0,0 @@
---- ./src/ng_netams.c	Fri Mar  4 04:38:52 2005
-+++ ./src/ng_netams.c	Wed Jun 14 11:54:21 2006
-@@ -438,7 +438,10 @@
- 		} else 
- 			prev=e;
- 	}
--	if (data->debug) printf("callout/%u%c active %u, checked %u, queued=%u, flushed %u\n", time_second, data->daemon_node?'+':'-', data->active_flows, t_active, f_queued, f_active);
-+	if (data->debug)
-+		printf("callout/%lu%c active %u, checked %u, queued=%u, flushed %u\n",
-+			(u_long)time_second, data->daemon_node?'+':'-',
-+			data->active_flows, t_active, f_queued, f_active);
- 	mtx_unlock(&data->mtx_active);
- 
- 	if (data->daemon_node!=0 && time_second%10==0) { // time to send info to daemon
-@@ -446,7 +449,9 @@
- 		msg->header.token=data->daemon_cookie;
- 		ng_netams_set_info(msg, data);
- 		NG_SEND_MSG_ID(error, data->node, msg, data->daemon_node, NG_NODE_ID(data->node));
--		if (data->debug) printf("info/%u: sent to daemon [%u] with error=%u\n", time_second, data->daemon_node, error);
-+		if (data->debug)
-+			printf("info/%lu: sent to daemon [%u] with error=%u\n",
-+				(u_long)time_second, data->daemon_node, error);
- 		if (error) { data->daemon_cookie=data->daemon_node=0; } // something went wrong, reset userspace destination to prevent further loss
- 	}
- 
diff -urN files.orig/netams.sh.in files/netams.sh.in
--- net-mgmt/netams/files/netams.sh.in	Thu Jan  1 10:00:00 1970
+++ net-mgmt/netams/files/netams.sh.in	Sat Jun 17 01:23:00 2006
@@ -0,0 +1,37 @@
+#!/bin/sh
+# $FreeBSD$
+
+# PROVIDE: netams
+# REQUIRE: NETWORKING
+# KEYWORD: shutdown
+
+# Define these netams_* variables in one of these files:
+#       /etc/rc.conf
+#       /etc/rc.conf.local
+#       /etc/rc.conf.d/netams
+#
+# netams_enable (bool):         Set to "NO" by default.
+#                               Set it to "YES" to enable netams.
+# netams_config (str):          Custom configuration file to be passed
+#                               to netams.
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+#
+netams_enable=${netams_enable-"NO"}
+netams_config=${netams_config-"%%PREFIX%%/etc/netams.cfg"}
+
+netams_pidfile="/var/run/netams.pid"
+
+. %%RC_SUBR%%
+
+name="netams"
+rcvar=`set_rcvar`
+command="%%PREFIX%%/libexec/netams"
+
+load_rc_config $name
+
+pidfile="${netams_pidfile}"
+
+start_cmd="echo \"Starting ${name}.\"; ${command} -lf ${netams_config} > /dev/null"
+
+run_rc_command "$1"
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706010352.l513q0sF020646>