From amir@active.ath.cx  Sat Jun  2 07:23:32 2001
Return-Path: <amir@active.ath.cx>
Received: from active.ath.cx (ras3-p6.hfa.netvision.net.il [62.0.98.6])
	by hub.freebsd.org (Postfix) with ESMTP id 401AB37B423
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  2 Jun 2001 07:23:22 -0700 (PDT)
	(envelope-from amir@active.ath.cx)
Received: by active.ath.cx (Postfix, from userid 1000)
	id 9E8806E7B1; Sat,  2 Jun 2001 17:23:42 +0300 (IDT)
Message-Id: <20010602142342.9E8806E7B1@active.ath.cx>
Date: Sat,  2 Jun 2001 17:23:42 +0300 (IDT)
From: amir@active.ath.cx
Reply-To: amir@boom.org.il
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: New port: Trafcount is loadable module for freebsd lets admin see how much amount of data was transfered by each user
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         27836
>Category:       ports
>Synopsis:       New port: Trafcount is loadable module for freebsd lets admin see how much amount of data was transfered by each user
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    dwcjr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 02 07:30:05 PDT 2001
>Closed-Date:    Sun Jun 17 22:13:37 PDT 2001
>Last-Modified:  Sun Jun 17 22:14:14 PDT 2001
>Originator:     Amir S.
>Release:        FreeBSD 4.3-STABLE i386
>Organization:
APF
>Environment:
System: FreeBSD active.ath.cx 4.3-STABLE FreeBSD 4.3-STABLE #1: Sat May 26 21:50:25 IDT 2001 amir@active.ath.cx:/usr/src/sys/compile/active i386


Here is my port file: 

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	/usr/ports/net/trafcount
#	/usr/ports/net/trafcount/files
#	/usr/ports/net/trafcount/files/patch-aa
#	/usr/ports/net/trafcount/files/patch-ab
#	/usr/ports/net/trafcount/files/patch-ac
#	/usr/ports/net/trafcount/Makefile
#	/usr/ports/net/trafcount/distinfo
#	/usr/ports/net/trafcount/pkg-comment
#	/usr/ports/net/trafcount/pkg-descr
#	/usr/ports/net/trafcount/pkg-plist
#
echo c - /usr/ports/net/trafcount
mkdir -p /usr/ports/net/trafcount > /dev/null 2>&1
echo c - /usr/ports/net/trafcount/files
mkdir -p /usr/ports/net/trafcount/files > /dev/null 2>&1
echo x - /usr/ports/net/trafcount/files/patch-aa
sed 's/^X//' >/usr/ports/net/trafcount/files/patch-aa << 'END-of-/usr/ports/net/trafcount/files/patch-aa'
X*** trafcount.sh.orig	Fri Jun  1 20:37:17 2001
X--- trafcount.sh	Sat Jun  2 16:07:18 2001
X***************
X*** 1,6 ****
X  #!/bin/sh
X  
X! kmoddir=/modules
X  kmod=trafcount.ko
X  
X  case "$1" in
X--- 1,6 ----
X  #!/bin/sh
X  
X! kmoddir=/usr/local/modules
X  kmod=trafcount.ko
X  
X  case "$1" in
END-of-/usr/ports/net/trafcount/files/patch-aa
echo x - /usr/ports/net/trafcount/files/patch-ab
sed 's/^X//' >/usr/ports/net/trafcount/files/patch-ab << 'END-of-/usr/ports/net/trafcount/files/patch-ab'
X*** module/Makefile.orig	Fri Jun  1 19:20:26 2001
X--- module/Makefile	Sat Jun  2 16:08:12 2001
X***************
X*** 1,4 ****
X--- 1,5 ----
X  KMOD	=	trafcount
X  SRCS	=	trafcount.c ../include/trafcount.h
X+ KMODDIR = /usr/local/modules
X  
X  .include <bsd.kmod.mk>
END-of-/usr/ports/net/trafcount/files/patch-ab
echo x - /usr/ports/net/trafcount/files/patch-ac
sed 's/^X//' >/usr/ports/net/trafcount/files/patch-ac << 'END-of-/usr/ports/net/trafcount/files/patch-ac'
X*** client/Makefile.orig	Fri Jun  1 19:58:57 2001
X--- client/Makefile	Sat Jun  2 16:10:52 2001
X***************
X*** 1,6 ****
X--- 1,8 ----
X  PROG	=	trafcount
X  SRCS	=	trafcount.c ../include/trafcount.h
X  BINDIR ?=	/usr/local/bin
X+ MANDIR = 	/usr/local/man/man
X  CFLAGS += 	-Wall
X+ NOMANCOMPRESS = yes
X  
X  .include <bsd.prog.mk>
END-of-/usr/ports/net/trafcount/files/patch-ac
echo x - /usr/ports/net/trafcount/Makefile
sed 's/^X//' >/usr/ports/net/trafcount/Makefile << 'END-of-/usr/ports/net/trafcount/Makefile'
X# New ports collection makefile for:    trafcount
X# Date created:         Sat Jun  2 16:29:22 IDT 2001
X# Whom:                 amir@boom.org.il
X#
X
XPORTNAME=	trafcount
XPORTVERSION=	0.2.1
XCATEGORIES=	net
XMASTER_SITES=           ${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR=     trafcount
XDISTNAME=	${PORTNAME}-${PORTVERSION}
XDISTFILES=              ${DISTNAME}.tar.gz
X
XMAINTAINER=	amir@boom.org.il
X
XSTARTUP=	trafcount.sh
XMAN1= trafcount.1
X
X.if !exists(/sys/Makefile)
XBROKEN=         "Kernel source files required"
X.endif
X
X.include <bsd.port.mk>
END-of-/usr/ports/net/trafcount/Makefile
echo x - /usr/ports/net/trafcount/distinfo
sed 's/^X//' >/usr/ports/net/trafcount/distinfo << 'END-of-/usr/ports/net/trafcount/distinfo'
XMD5 (trafcount-0.2.1.tar.gz) = 18ab6b5f82ac70567121c6e92a14050d
X
END-of-/usr/ports/net/trafcount/distinfo
echo x - /usr/ports/net/trafcount/pkg-comment
sed 's/^X//' >/usr/ports/net/trafcount/pkg-comment << 'END-of-/usr/ports/net/trafcount/pkg-comment'
XEthernet Traffic CounterEND-of-/usr/ports/net/trafcount/pkg-comment
Xecho x - /usr/ports/net/trafcount/pkg-descr
Xsed 's/^X//' >/usr/ports/net/trafcount/pkg-descr << 'END-of-/usr/ports/net/trafcount/pkg-descr'
XTrafcount is a loadable kernel module that provides you the option to
Xmeasure the total amount of bandwidth that is consumed by each of
Xyour users.
X		     END-of-/usr/ports/net/trafcount/pkg-descr
Xecho x - /usr/ports/net/trafcount/pkg-plist
Xsed 's/^X//' >/usr/ports/net/trafcount/pkg-plist << 'END-of-/usr/ports/net/trafcount/pkg-plist'
Xbin/trafcount
Xetc/rc.d/trafcount.sh
Xmodules/trafcount.ko
XEND-of-/usr/ports/net/trafcount/pkg-plist
Xexit
X
END-of-/usr/ports/net/trafcount/pkg-comment
echo x - /usr/ports/net/trafcount/pkg-descr
sed 's/^X//' >/usr/ports/net/trafcount/pkg-descr << 'END-of-/usr/ports/net/trafcount/pkg-descr'
XTrafcount is a loadable kernel module that provides you the option to
Xmeasure the total amount of bandwidth that is consumed by each of
Xyour users.
X		     END-of-/usr/ports/net/trafcount/pkg-descr
Xecho x - /usr/ports/net/trafcount/pkg-plist
Xsed 's/^X//' >/usr/ports/net/trafcount/pkg-plist << 'END-of-/usr/ports/net/trafcount/pkg-plist'
Xbin/trafcount
Xetc/rc.d/trafcount.sh
Xmodules/trafcount.ko
XEND-of-/usr/ports/net/trafcount/pkg-plist
Xexit
X
END-of-/usr/ports/net/trafcount/pkg-descr
echo x - /usr/ports/net/trafcount/pkg-plist
sed 's/^X//' >/usr/ports/net/trafcount/pkg-plist << 'END-of-/usr/ports/net/trafcount/pkg-plist'
Xbin/trafcount
Xetc/rc.d/trafcount.sh
Xmodules/trafcount.ko
END-of-/usr/ports/net/trafcount/pkg-plist
exit

>Description:
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:

From: Tony Maher <tonym@angis.org.au>
To: freebsd-gnats-submit@FreeBSD.org, amir@boom.org.il
Cc:  
Subject: Re: ports/27836: New port: Trafcount is loadable module for freebsd lets 
 admin see how much amount of data was transfered by each user
Date: Sun, 03 Jun 2001 16:43:50 +1000

 Hello,
 
 very nice!!!
 
 One nit though, it does not install properly if /usr/local/modules does
 not pre-exist.  It installs the module as a file "/usr/local/modules"
 
 changing trafcount-0.2.1/module
 KMODDIR = /usr/local/modules
 to
 KMODDIR = /usr/local/modules/
 doesn't help (except it gives an immediate and obvious error message).
 
 Since the install target comes from  /usr/src/sys/conf/kmod.mk
 a pre-install target in main port Makefile to check and make the
 directory would be a simple solution e.g.
 
 pre-install:
 	install -d ${PREFIX}/modules
 Though I am sure there is some better way ;-)
 
 tonym

From: Will Andrews <will@physics.purdue.edu>
To: Tony Maher <tonym@angis.org.au>
Cc: FreeBSD GNATS DB <FreeBSD-gnats-submit@FreeBSD.org>
Subject: Re: ports/27836: New port: Trafcount is loadable module for freebsd lets admin see how much amount of data was transfered by each user
Date: Sun, 3 Jun 2001 15:19:15 -0500

 On Sat, Jun 02, 2001 at 11:50:04PM -0700, Tony Maher (tonym@angis.org.au) wrote:
 >  One nit though, it does not install properly if /usr/local/modules does
 >  not pre-exist.  It installs the module as a file "/usr/local/modules"
 
 Right.  The reason is because modules/ doesn't exist in the mtree files,
 so you have to install the module under ${PREFIX}/share/trafcount (for
 example).  You can't use ${PREFIX}/modules under any circumstances.
 
 -- 
 wca

From: Will Andrews <will@physics.purdue.edu>
To: .@babolo.ru
Cc: FreeBSD GNATS DB <FreeBSD-gnats-submit@FreeBSD.org>
Subject: Re: ports/27836: New port: Trafcount is loadable module for freebsd lets admin see how much amount of data was transfered by eac
Date: Sun, 3 Jun 2001 16:35:37 -0500

 On Mon, Jun 04, 2001 at 01:27:34AM +0400, .@babolo.ru (.@babolo.ru) wrote:
 > Why ${PREFIX}/share ? Does kernel module can be shared
 > beetween different architectures?
 
 Good point.  Perhaps someone else can suggest a better way for us to be
 installing kernel modules, but putting them under ${PREFIX}/modules is
 more wrong than the current ${PREFIX}/share/whatever/ convention.
 
 > Is it better to include modules/ to mtree files?
 
 Yes, because it's directly under /usr/local.  Ports cannot make new
 directories by themselves directly under /usr/local, or $PREFIX for that
 matter.  It's against the rules.
 
 -- 
 wca

From: Tony Maher <tonym@angis.org.au>
To: freebsd-gnats-submit@FreeBSD.org, amir@boom.org.il
Cc:  
Subject: Re: ports/27836: New port: Trafcount is loadable module for freebsd lets 
 admin see how much amount of data was transfered by each user
Date: Tue, 05 Jun 2001 19:21:14 +1000

 I see some followups in ports mailing list that suggested
 various ideas - the latest from Peter Pentchev was to install
 into ${PREFIX}/libexec rather than share.  Reading hier(7) 
 this would seem to be the best place that is documented and
 pre-exists (or even ${PREFIX}/libdata).
 
 However ${PREFIX}/modules is IMHO a more logical place even if it does
 require some modifications to mtree files and an update to hier(7). 
 Presumably there will be more kernel modules as ports so it would be
 worth the effort.
 
 just my (final) 2c worth ;-)
 
 tonym

From: Peter Pentchev <roam@orbitel.bg>
To: Tony Maher <tonym@angis.org.au>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: ports/27836: New port: Trafcount is loadable module for freebsd lets admin see how much amount of data was transfered by each user
Date: Tue, 5 Jun 2001 13:18:04 +0300

 On Tue, Jun 05, 2001 at 02:30:03AM -0700, Tony Maher wrote:
 > The following reply was made to PR ports/27836; it has been noted by GNATS.
 > 
 > From: Tony Maher <tonym@angis.org.au>
 > To: freebsd-gnats-submit@FreeBSD.org, amir@boom.org.il
 > Cc:  
 > Subject: Re: ports/27836: New port: Trafcount is loadable module for freebsd lets 
 >  admin see how much amount of data was transfered by each user
 > Date: Tue, 05 Jun 2001 19:21:14 +1000
 > 
 >  I see some followups in ports mailing list that suggested
 >  various ideas - the latest from Peter Pentchev was to install
 >  into ${PREFIX}/libexec rather than share.  Reading hier(7) 
 >  this would seem to be the best place that is documented and
 >  pre-exists (or even ${PREFIX}/libdata).
 
 No, ${PREFIX}/libdata is for data only, not executable files.
 Kernel modules are, in a sense, executables.
 (Well, OK, so /usr/libdata/perl/ does contain modules, but then..
  it's Perl, what would you expect ;)
 
 >  However ${PREFIX}/modules is IMHO a more logical place even if it does
 >  require some modifications to mtree files and an update to hier(7). 
 >  Presumably there will be more kernel modules as ports so it would be
 >  worth the effort.
 
 There is some merit to this.  Still, I think that new ports of kernel
 modules should, for the present, live in ${PREFIX}/libexec, until
 a new directory is created in the mtree hierarchy.  Then, a sweep
 of the ports tree will have to happen (not a big one, since there
 are not yet so many modules in ports), and all such be moved into
 the newly-created modules/ directory.
 
 On second thoughts.. why not combine the two, and create the new
 modules/ directory as ${PREFIX}/libexec/modules/ ?
 
 G'luck,
 Peter
 
 -- 
 Thit sentence is not self-referential because "thit" is not a word.

From: Tony Maher <tonym@angis.org.au>
To: amir@boom.org.il
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: ports/27836: New port: Trafcount is loadable module for freebsd lets  admin see how much amount of data was transfered by each user
Date: Wed, 6 Jun 2001 11:44:29 +1000 (EST)

 Hello Amir.
 
 > I'm not registered to freebsd-ports mailing lists,
 > I thank you for checking my port for trafcount (my first one :)
 > next version of trafcount, I will fix it to makedir the install like you
 > said in the first email.
 
 Please check http://www.freebsd.org/cgi/query-pr.cgi?pr=27836 for further
 discussions.  Since I do not have commit priviliges my check and comments
 on your port carry little weight.  But both Will Andrews and Peter Pentchev
 who have offerred comments do have commit priviliges.  And the last email
 from Peter Pentchenv suggesting ${PREFIX}/libexec/modules/ seems like a good  
 compromise.
 
 > I hope the port will be added.
 
 Me too!
 
 thanks
 tonym
Responsible-Changed-From-To: freebsd-ports->dwcjr 
Responsible-Changed-By: dwcjr 
Responsible-Changed-When: Sun Jun 17 16:06:55 PDT 2001 
Responsible-Changed-Why:  
I'll see what I can figure out with this one. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27836 
State-Changed-From-To: open->feedback 
State-Changed-By: dwcjr 
State-Changed-When: Sun Jun 17 16:48:01 PDT 2001 
State-Changed-Why:  
Waiting on response from submitter for proposed changes 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27836 
State-Changed-From-To: feedback->closed 
State-Changed-By: dwcjr 
State-Changed-When: Sun Jun 17 22:13:37 PDT 2001 
State-Changed-Why:  
Committed, and submitter added to contributors section of handbook, thanks! 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27836 
>Unformatted:
