diff options
author | salo <salo@pkgsrc.org> | 2003-05-30 11:53:16 +0000 |
---|---|---|
committer | salo <salo@pkgsrc.org> | 2003-05-30 11:53:16 +0000 |
commit | 7d2002d261f99b8b9924bb600e22d16a2f8a7d4d (patch) | |
tree | 1592349ed21d75758eae07ed05ddbdbd625c8a37 /net | |
parent | 8eb8f2e399fb0f027133949adea9a752bf2013d8 (diff) | |
download | pkgsrc-7d2002d261f99b8b9924bb600e22d16a2f8a7d4d.tar.gz |
Updated to version 1.3.4.
Addresses PR pkg/21719 by Andrey Simonenko (MAINTAINER).
Changes:
- don't include bsd.pkg.install.mk if USE_PKGINSTALL is already set
- restrict to *BSD
- install /var/ipa directory
- fix paths in manual pages
- better rc scripts, NetBSD native and generic one
- DESCR has 80 columns
1.3.4:
======
- Added support for PF from OpenBSD 3.3
- Minor changes
Diffstat (limited to 'net')
-rw-r--r-- | net/ipa/DESCR | 11 | ||||
-rw-r--r-- | net/ipa/Makefile | 29 | ||||
-rw-r--r-- | net/ipa/distinfo | 12 | ||||
-rw-r--r-- | net/ipa/files/ipa.generic | 78 | ||||
-rw-r--r-- | net/ipa/files/ipa.sh | 43 | ||||
-rw-r--r-- | net/ipa/patches/patch-aa | 9 | ||||
-rw-r--r-- | net/ipa/patches/patch-ac | 13 | ||||
-rw-r--r-- | net/ipa/patches/patch-ad | 38 | ||||
-rw-r--r-- | net/ipa/patches/patch-ae | 68 | ||||
-rw-r--r-- | net/ipa/patches/patch-af | 13 |
10 files changed, 293 insertions, 21 deletions
diff --git a/net/ipa/DESCR b/net/ipa/DESCR index 3e89b00ab05..304571523c8 100644 --- a/net/ipa/DESCR +++ b/net/ipa/DESCR @@ -1,12 +1,9 @@ -ipa(8) allows to make IP accounting (network accounting) based on -FreeBSD IPv4/v6 Firewall (including IPFW2), OpenBSD Packet Filter and -IP Filter accounting rules on FreeBSD, NetBSD and OpenBSD. +ipa(8) allows to make IP accounting (network accounting) based on FreeBSD +IPv4/v6 Firewall (including IPFW2), OpenBSD Packet Filter and IP Filter +accounting rules on FreeBSD, NetBSD and OpenBSD. It supports limits for accounting rules and limits events as "limit is -reached", "reached limit is expired", etc. It understands time intervals +reached", "reached limit is expired", etc. It understands time intervals like "end of day", "end of week", "end of month", etc. ipastat(8) is a viewer for IP accounting database made by ipa(8). - -- Andrey Simonenko -simon@comsys.ntu-kpi.kiev.ua diff --git a/net/ipa/Makefile b/net/ipa/Makefile index 4599ee44113..8af8e8d53c5 100644 --- a/net/ipa/Makefile +++ b/net/ipa/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.11 2003/04/20 20:58:12 cjep Exp $ +# $NetBSD: Makefile,v 1.12 2003/05/30 11:53:16 salo Exp $ +# -DISTNAME= ipa-1.3.3 +DISTNAME= ipa-1.3.4 CATEGORIES= net sysutils MASTER_SITES= http://ipa-system.sourceforge.net/ \ http://www.mirrors.wiretapped.net/security/network-monitoring/ipa/ \ @@ -11,13 +12,15 @@ MAINTAINER= simon@comsys.ntu-kpi.kiev.ua HOMEPAGE= http://ipa-system.sourceforge.net/ COMMENT= IP accounting software +ONLY_FOR_PLATFORM= *BSD-*-* + RESTRICTED= "Needs to be built uniquely for each host" NO_BIN_ON_FTP= ${RESTRICTED} NO_BIN_ON_CDROM= ${RESTRICTED} NO_PACKAGE= ${RESTRICTED} -USE_BUILDLINK2= yes -USE_PKGINSTALL= yes +USE_BUILDLINK2= YES +USE_PKGINSTALL= YES ALL_TARGET= # empty CFLAGS+= -DCFGFILE=\\\"${PKG_SYSCONFDIR}/ipa.conf\\\" @@ -25,10 +28,26 @@ CFLAGS+= -DCFGFILE=\\\"${PKG_SYSCONFDIR}/ipa.conf\\\" CONF_FILES_PERMS= ${PREFIX}/share/examples/ipa/ipa.conf.default \ ${PKG_SYSCONFDIR}/ipa.conf \ ${ROOT_USER} ${ROOT_GROUP} 0400 +OWN_DIRS_PERMS= /var/ipa ${ROOT_USER} ${ROOT_GROUP} 0555 + +.include "../../mk/bsd.prefs.mk" + RCD_SCRIPTS= ipa +.if ${OPSYS} == "NetBSD" +RCD_SCRIPT_SRC.ipa= ${FILESDIR}/ipa.sh +.else +RCD_SCRIPT_SRC.ipa= ${FILESDIR}/ipa.generic +.endif + +post-patch: + @cd ${WRKSRC}/man && \ + for f in ipa.5 ipa.8 ipa.conf.5 ipastat.8; do \ + ${MV} $${f} $${f}.orig; \ + ${SED} ${FILES_SUBST_SED} $${f}.orig > $${f}; \ + done + pre-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/ipa -.include "../../mk/bsd.pkg.install.mk" .include "../../mk/bsd.pkg.mk" diff --git a/net/ipa/distinfo b/net/ipa/distinfo index 224df3a3b7b..d67c1ec7c84 100644 --- a/net/ipa/distinfo +++ b/net/ipa/distinfo @@ -1,6 +1,10 @@ -$NetBSD: distinfo,v 1.12 2003/04/20 20:58:12 cjep Exp $ +$NetBSD: distinfo,v 1.13 2003/05/30 11:53:17 salo Exp $ -SHA1 (ipa-1.3.3.tar.gz) = 47e9a1537a47dbb5fea499d8d181151619ff66b9 -Size (ipa-1.3.3.tar.gz) = 135328 bytes -SHA1 (patch-aa) = bed495cd58e2c9d2414fe4e94f8f3613b988be64 +SHA1 (ipa-1.3.4.tar.gz) = 2471fe193aae533884e0526e1646bf4696d3aaf4 +Size (ipa-1.3.4.tar.gz) = 135457 bytes +SHA1 (patch-aa) = 5599f55b657edc3ecb7f66378601d92e956a0983 SHA1 (patch-ab) = edce3d9d03ee7456c440ce4179e1e8c39bb516f2 +SHA1 (patch-ac) = 0baab6507d335479379e78582c727fad72259b61 +SHA1 (patch-ad) = fe03afb555f2a6817dfddd7ab4edb7e41f49c03a +SHA1 (patch-ae) = 8ed23f771ba11ae357b141ac62c2d4db9c3957e9 +SHA1 (patch-af) = d604d1bab7d51feb7e5ebd75b816c691db229957 diff --git a/net/ipa/files/ipa.generic b/net/ipa/files/ipa.generic new file mode 100644 index 00000000000..7ac8b1af072 --- /dev/null +++ b/net/ipa/files/ipa.generic @@ -0,0 +1,78 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: ipa.generic,v 1.1 2003/05/30 11:53:17 salo Exp $ +# + +name="ipa" +required_files="@PKG_SYSCONFDIR@/${name}.conf" +required_dirs="/var/ipa" +pidfile="/var/run/${name}.pid" +command="@PREFIX@/bin/ipa" + +ipa_start() +{ + if [ ! -r $required_files ]; then + echo "$0: WARNING: $required_files is not readable." + exit 1 + fi + if [ ! -d $required_dirs ]; then + echo "$0: WARNING: $required_dirs is not a directory." + exit 1 + fi + + echo "Starting ${name}." + eval $command + return_code=$? + if [ $return_code != "0" ]; then + exit 1 + fi +} + +ipa_stop() +{ + echo "Stopping ${name}." + + ${command} -k shutdown +} + +ipa_reconfigure() +{ + echo "Reloading ${name} configuration." + + ${command} -k reconfigure +} + +ipa_dump() +{ + echo "Dumping ${name} stats." + + ${command} -k dump +} + +case $1 in + +'start') + ipa_start + ;; + +'stop') + ipa_stop + ;; + +'restart') + ipa_stop + ipa_start + ;; + +'reconfigure') + ipa_reconfigure + ;; + +'dump') + ipa_dump + ;; + +*) + echo "Usage: $0 (start|stop|restart|reconfigure|dump)" + ;; +esac diff --git a/net/ipa/files/ipa.sh b/net/ipa/files/ipa.sh new file mode 100644 index 00000000000..d4a85076694 --- /dev/null +++ b/net/ipa/files/ipa.sh @@ -0,0 +1,43 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: ipa.sh,v 1.1 2003/05/30 11:53:17 salo Exp $ +# + +# PROVIDE: ipa +# REQUIRE: ipfilter + +. /etc/rc.subr + +name="ipa" +rcvar=$name +command="@PREFIX@/bin/${name}" +required_files="@PKG_SYSCONFDIR@/$name.conf" +required_dir="/var/${name}" +stop_cmd="ipa_stop" +reconfigure_cmd="ipa_reconfigure" +dump_cmd="ipa_dump" +extra_commands="reconfigure dump" + +ipa_stop() +{ + echo "Stopping ${name}." + + ${command} -k shutdown +} + +ipa_reconfigure() +{ + echo "Reloading ${name} configuration." + + ${command} -k reconfigure +} + +ipa_dump() +{ + echo "Dumping ${name} stats." + + ${command} -k dump +} + +load_rc_config $name +run_rc_command "$1" diff --git a/net/ipa/patches/patch-aa b/net/ipa/patches/patch-aa index e40789ead2d..85800ed05df 100644 --- a/net/ipa/patches/patch-aa +++ b/net/ipa/patches/patch-aa @@ -1,7 +1,7 @@ -$NetBSD: patch-aa,v 1.8 2003/03/05 07:11:41 wiz Exp $ +$NetBSD: patch-aa,v 1.9 2003/05/30 11:53:17 salo Exp $ ---- Makefile.orig Thu Feb 20 07:06:58 2003 -+++ Makefile Thu Feb 27 11:11:33 2003 +--- Makefile.orig 2003-04-08 21:18:15.000000000 +0200 ++++ Makefile 2003-05-30 13:15:24.000000000 +0200 @@ -38,7 +38,7 @@ # -Ox - optimize; # -g - produce debugging information. @@ -35,7 +35,7 @@ $NetBSD: patch-aa,v 1.8 2003/03/05 07:11:41 wiz Exp $ INSTALL_MAN_DIR= ${INSTALL} -d -m 0555 -g wheel -o root INSTALL_DATA_DIR= ${INSTALL} -d -m 0555 -g wheel -o root -@@ -207,21 +207,9 @@ +@@ -207,21 +207,8 @@ ${INSTALL_PROGRAM} ipa ipastat ${DST_BIN_DIR} ${INSTALL_MAN} man/ipa.5 man/ipa.conf.5 ${DST_MAN_DIR}/man5 ${INSTALL_MAN} man/ipa.8 man/ipastat.8 ${DST_MAN_DIR}/man8 @@ -54,7 +54,6 @@ $NetBSD: patch-aa,v 1.8 2003/03/05 07:11:41 wiz Exp $ ${INSTALL_DATA} examples/* ${DST_EXAMPLE_DIR} .if exists(${DST_RC_DIR}) - ${INSTALL_SCRIPT} etc/ipa.sh.sample ${DST_RC_DIR} -+ ${INSTALL_SCRIPT} etc/ipa.sh.sample ${DST_RC_DIR}/ipa .else @${ECHO} @${ECHO} ">> Can't find directory ${DST_RC_DIR}, the ipa.sh.sample file was not installed (not a problem)." diff --git a/net/ipa/patches/patch-ac b/net/ipa/patches/patch-ac new file mode 100644 index 00000000000..222eeb8c25b --- /dev/null +++ b/net/ipa/patches/patch-ac @@ -0,0 +1,13 @@ +$NetBSD: patch-ac,v 1.3 2003/05/30 11:53:17 salo Exp $ + +--- man/ipa.5.orig 2003-04-17 22:47:42.000000000 +0200 ++++ man/ipa.5 2003-05-30 12:49:59.000000000 +0200 +@@ -152,7 +152,7 @@ + .SH FILES + /var/ipa/ + .br +-/usr/local/etc/ipa.conf ++@PKG_SYSCONFDIR@/ipa.conf + .SH SEE ALSO + ipa(8), ipa.conf(5), ipastat(8) + .SH AUTHOR diff --git a/net/ipa/patches/patch-ad b/net/ipa/patches/patch-ad new file mode 100644 index 00000000000..5ab76e7fc90 --- /dev/null +++ b/net/ipa/patches/patch-ad @@ -0,0 +1,38 @@ +$NetBSD: patch-ad,v 1.1 2003/05/30 11:53:18 salo Exp $ + +--- man/ipa.8.orig 2003-02-20 07:26:57.000000000 +0100 ++++ man/ipa.8 2003-05-30 12:49:10.000000000 +0200 +@@ -47,7 +47,7 @@ + on FreeBSD, NetBSD and OpenBSD, stores all accounting information in the database, + supports database locking, allows to set up limits for each accounting rule, + understands time intervals like "end of day", "end of week", etc. \fBipa\fP(8) +-reads its configuration from the file \fB/usr/local/etc/ipa.conf\fP or from ++reads its configuration from the file \fB@PKG_SYSCONFDIR@/ipa.conf\fP or from + other one given in the command line. Read manual page \fBipa.conf\fP(5) for + detail description of \fBipa\fP(8) features. + .PP +@@ -81,7 +81,7 @@ + IPFW/IPF/PF accounting rules. + .IP \fB-f\fP\ <config-file> + Use given <config-file> instead of using default configuration file +-\fB/usr/local/etc/ipa.conf\fP. \fINOTE\fP: a configuration file should be given ++\fB@PKG_SYSCONFDIR@/ipa.conf\fP. \fINOTE\fP: a configuration file should be given + with absolute pathname (i.e. starts with the `/' character). + .IP \fB-h\fP + Print help message about available options and exit. +@@ -214,13 +214,10 @@ + .br + /var/ipa/ + .br +-/usr/local/etc/ipa.conf ++@PKG_SYSCONFDIR@/ipa.conf + .br +-${PREFIX}/etc/ipa.conf.default ++@PREFIX@/share/examples/ipa/ + .br +-${PREFIX}/share/examples/ipa/ +-.PP +-(by default ${PREFIX} is /usr/local) + .SH SEE ALSO + ipa(5), ipa.conf(5), ipastat(8), ipf(1), ipfw(8), ip6fw(8), pf(4), pf.conf(5), + pfctl(8), syslogd(8) diff --git a/net/ipa/patches/patch-ae b/net/ipa/patches/patch-ae new file mode 100644 index 00000000000..37948807fd5 --- /dev/null +++ b/net/ipa/patches/patch-ae @@ -0,0 +1,68 @@ +$NetBSD: patch-ae,v 1.1 2003/05/30 11:53:18 salo Exp $ + +--- man/ipa.conf.5.orig 2003-05-27 20:57:17.000000000 +0200 ++++ man/ipa.conf.5 2003-05-30 12:53:00.000000000 +0200 +@@ -29,7 +29,7 @@ + ipa.conf \- ipa(8) configuration file + .SH DESCRIPTION + The \fBipa.conf\fP file is a configuration file for \fBipa\fP(8). +-The \fB/usr/local/etc/ipa.conf\fP file or any other one specified in ++The \fB@PKG_SYSCONFDIR@/ipa.conf\fP file or any other one specified in + the \fBipa\fP(8) command line (the \fB-f\fP option for \fBipa\fP(8)) is read + when \fBipa\fP(8) starts working or receives signal HUP. + The complete description of the file format and possible parameters +@@ -996,28 +996,28 @@ + .PP + include { + .br +- file = /usr/local/etc/ipa/myaccout ++ file = @PKG_SYSCONFDIR@/ipa/myaccout + .br +- file(?) = /usr/local/etc/ipa/mytestaccount ++ file(?) = @PKG_SYSCONFDIR@/ipa//mytestaccount + .br +- files(/usr/local/etc/ipa/192.168.0) = . ++ files(@PKG_SYSCONFDIR@/ipa/192.168.0) = . + .br +- files(/usr/local/etc/ipa/10.1) = ^(2|11)\\.* ++ files(@PKG_SYSCONFDIR@/ipa/10.1) = ^(2|11)\\.* + .br +- files(?)(/usr/local/etc/ipa/testconfig) = \\.conf$ ++ files(?)(@PKG_SYSCONFDIR@/ipa/testconfig) = \\.conf$ + .br + } + .PP + The first \fBfile\fP parameter tells \fBipa\fP(8) to include one file named +-/usr/local/etc/ipa/myaccout. The second \fBfile\fP parameter also tells to +-include one file, but if the /usr/local/etc/ipa/mytestaccount file is not ++@PKG_SYSCONFDIR@/ipa/myaccout. The second \fBfile\fP parameter also tells to ++include one file, but if the @PKG_SYSCONFDIR@/ipa/mytestaccount file is not + present in the file system, then \fBipa\fP(8) will ignore it. + .PP + The first \fBfiles\fP parameter "includes" all files from the +-/usr/local/etc/ipa/192.168.0 directory. The second \fBfiles\fP parameter ++@PKG_SYSCONFDIR@/ipa/192.168.0 directory. The second \fBfiles\fP parameter + "includes" all files matched given POSIX regular expression from the +-/usr/local/etc/ipa/10.1 directory. And the last \fBfiles\fP parameter "includes" +-all files with ".conf" suffix from the /usr/local/etc/ipa/testconfig directory, ++@PKG_SYSCONFDIR@/ipa/10.1 directory. And the last \fBfiles\fP parameter "includes" ++all files with ".conf" suffix from the @PKG_SYSCONFDIR@/ipa/testconfig directory, + but if this directory is not present in the file system, then \fBipa\fP(8) + will ignore it and continue to work. + .PP +@@ -1286,13 +1286,10 @@ + .br + # ... other "rule" sections. + .SH FILES +-/usr/local/etc/ipa.conf ++@PKG_SYSCONFDIR@/ipa.conf + .br +-${PREFIX}/etc/ipa.conf.default +-.br +-${PREFIX}/share/examples/ipa/ ++@PREFIX@/share/examples/ipa/ + .PP +-(by default ${PREFIX} is /usr/local) + .SH SEE ALSO + ipa(8), ipa(5), ipastat(8), ipf(1), ipf(5), ipfstat(8), ipfw(8), ip6fw(8), + pf.conf(5), pfctl(8) diff --git a/net/ipa/patches/patch-af b/net/ipa/patches/patch-af new file mode 100644 index 00000000000..0f3a5dd1432 --- /dev/null +++ b/net/ipa/patches/patch-af @@ -0,0 +1,13 @@ +$NetBSD: patch-af,v 1.1 2003/05/30 11:53:18 salo Exp $ + +--- man/ipastat.8.orig 2003-02-19 23:04:34.000000000 +0100 ++++ man/ipastat.8 2003-05-30 12:53:56.000000000 +0200 +@@ -307,7 +307,7 @@ + .SH FILES + /var/ipa/ + .br +-/usr/local/etc/ipa.conf ++@PKG_SYSCONFDIR@/ipa.conf + .SH SEE ALSO + ipa.conf(5), ipa(8) + .SH AUTHOR |