NetBSD Problem Report #32398

From simon@comsys.ntu-kpi.kiev.ua  Wed Dec 28 09:41:29 2005
Return-Path: <simon@comsys.ntu-kpi.kiev.ua>
Received: from comsys.ntu-kpi.kiev.ua (comsys.ntu-kpi.kiev.ua [195.245.194.142])
	by narn.netbsd.org (Postfix) with ESMTP id 0786563B8B9
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 28 Dec 2005 09:41:28 +0000 (UTC)
Message-Id: <20051228094129.GA689@pm513-1.comsys.ntu-kpi.kiev.ua>
Date: Wed, 28 Dec 2005 11:41:29 +0200
From: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
To: gnats-bugs@netbsd.org
Subject: Maintainer update: net/ipa 1.3.6 -> sysutils/ipa 2.0

>Number:         32398
>Category:       pkg
>Synopsis:       Maintainer update: net/ipa 1.3.6 -> sysutils/ipa 2.0
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 28 09:45:00 +0000 2005
>Closed-Date:    Wed Oct 18 11:54:35 +0000 2006
>Last-Modified:  Wed Oct 18 13:35:00 +0000 2006
>Originator:     Andrey Simonenko
>Release:        NetBSD 2.0
>Organization:
>Environment:
System: NetBSD 2.0
Pkgsrc from NetBSD 2.0 RELEASE
>Description:

Please update net/ipa port to version 2.0.

From ipa-2.0 HISTORY file:

    *	First release of Pluggable Accounting System, which
	supports static and dynamic rules; limits, sublimits and
	thresholds; external accounting, database and statistics
	modules and many more.

New in port:

    *	Please remove ipa from net category and move it to
	sysutils, ipa-2.0 does not have anything common with
	network.

    *	Short and long descriptions were changed.

    *	Using bzip2 and configure.

    *	ipa.sh was updated and simplified, ipa.generic was removed,
	since ipa-2.0 gives own similar ipa.sh.sample.

    *	ONLY_FOR_PLATFORM was removed, now ipa can work on
	any Unix-like system (tested on FreeBSD, OpenBSD, NetBSD,
	Linux, Solaris 10).

    *	RESTRICTED was removed, now ipa does not have any system
	dependent code.

    *	All patches/patch-* were removed: now configure script is
	used and manual pages were updated (absolute pathnames
	now are not given in manual pages any more).

Problems in port (I cannot find out what's wrong):

    *	When I run "make install" for port, "make install" runs
	${CC} to compile some of source files.  This does not happen
	if I run "./configure; make; make install" not from pkgsrc
	(Also I do not have this problem in FreeBSD with sysutils/ipa
	port).

    *	New WITH_DEBUG_INFO variable does not work, "make install"
	runs "install ... -s ..." and all debugging information is
	removed.

>How-To-Repeat:
>Fix:
diff -ruN ipa.orig/DESCR ipa/DESCR
--- ipa.orig/DESCR	Mon Dec 26 19:39:44 2005
+++ ipa/DESCR	Wed May 11 14:19:31 2005
@@ -1,9 +1,11 @@
-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 -- Pluggable Accounting System

-It supports limits for accounting rules and limits events as "limit is
-reached", "reached limit is expired", etc.  It understands time intervals
-like "end of day", "end of week", "end of month", etc.
+Main features:

-ipastat(8) is a viewer for IP accounting database made by ipa(8).
+- Flexible general purpose accounting system;
+- Supports static and dynamic rules;
+- Support limits, sublimits and thresholds;
+- Works with external accounting modules;
+- Works with external database modules;
+- Works with external statistics modules;
+- Accounting per specified period of a week.
diff -ruN ipa.orig/Makefile ipa/Makefile
--- ipa.orig/Makefile	Mon Dec 26 19:39:44 2005
+++ ipa/Makefile	Tue Dec 27 00:42:43 2005
@@ -1,53 +1,72 @@
 # $NetBSD: Makefile,v 1.21 2005/12/09 16:55:43 joerg Exp $
 #

-DISTNAME=	ipa-1.3.6
-PKGREVISION=	1
-CATEGORIES=	net sysutils
+DISTNAME=	ipa-2.0
+CATEGORIES=	sysutils
 MASTER_SITES=	http://ipa-system.sourceforge.net/ \
 		http://www.mirrors.wiretapped.net/security/network-monitoring/ipa/ \
 		ftp://ftp.mirrors.wiretapped.net/pub/security/network-monitoring/ipa/ \
 		http://ipa.it-ss.be/
+EXTRACT_SUFX=	.tar.bz2

-MAINTAINER=	simon@comsys.ntu-kpi.kiev.ua
 HOMEPAGE=	http://ipa-system.sourceforge.net/
-COMMENT=	IP accounting software
-
-ONLY_FOR_PLATFORM=	FreeBSD-*-* NetBSD-1*-* OpenBSD-*-* DragonFly-*-*
-
-RESTRICTED=		"Needs to be built uniquely for each host"
-NO_BIN_ON_FTP=		${RESTRICTED}
-NO_BIN_ON_CDROM=	${RESTRICTED}
-NO_PACKAGE=		${RESTRICTED}
-
-USE_PKGINSTALL=		YES
-BUILD_TARGET=		# empty
-
-CFLAGS+=		-DCFGFILE="\"${PKG_SYSCONFDIR}/ipa.conf\""
+MAINTAINER=	simon@comsys.ntu-kpi.kiev.ua
+COMMENT=	Pluggable accounting system

-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
+GNU_CONFIGURE=	yes
+USE_PKGINSTALL=	yes

 .include "../../mk/bsd.prefs.mk"

-RCD_SCRIPTS=		ipa
+RCD_SCRIPTS=	ipa

 .if ${OPSYS} == "NetBSD"
 RCD_SCRIPT_SRC.ipa=	${FILESDIR}/ipa.sh
 .else
-RCD_SCRIPT_SRC.ipa=	${FILESDIR}/ipa.generic
+RCD_SCRIPT_SRC.ipa=	${WRKSRC}/etc/ipa.sh.sample
+.endif
+
+pre-configure:
+	@${ECHO_MSG} "Available build options:"
+	@${ECHO_MSG} "  WITHOUT_AUTORULES      Remove dynamic rules support"
+	@${ECHO_MSG} "  WITHOUT_RULES          Remove static rules support"
+	@${ECHO_MSG} "  WITHOUT_LIMITS         Remove limits support"
+	@${ECHO_MSG} "  WITHOUT_SUBLIMITS      Remove sublimits support"
+	@${ECHO_MSG} "  WITHOUT_THRESHOLDS     Remove thresholds support"
+	@${ECHO_MSG} "  WITH_MEMFUNC_DEBUG     Enable ipa_memfunc debugging"
+	@${ECHO_MSG} "  WITH_DEBUG_INFO        Produce debugging information"
+
+.ifdef WITHOUT_AUTORULES
+CONFIGURE_ARGS+= --disable-autorules
+.endif
+
+.ifdef WITHOUT_RULES
+CONFIGURE_ARGS+= --disable-rules
+.endif
+
+.ifdef WITHOUT_LIMITS
+CONFIGURE_ARGS+= --disable-limits
+.endif
+
+.ifdef WITHOUT_SUBLIMITS
+CONFIGURE_ARGS+= --disable-sublimits
 .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
+.ifdef WITHOUT_THRESHOLDS
+CONFIGURE_ARGS+= --disable-thresholds
+.endif
+
+.ifdef WITH_MEMFUNC_DEBUG
+CONFIGURE_ARGS+= --enable-memfunc-debug
+.endif
+
+.ifdef WITH_DEBUG_INFO
+CFLAGS+=	-g
+DEBUG_FLAGS=	# empty
+.endif

-pre-install:
-	${INSTALL_DATA_DIR} ${PREFIX}/share/examples/ipa
+do-install:
+	cd ${WRKSRC}/src && make install
+	cd ${WRKSRC}/man && make install-am

 .include "../../mk/bsd.pkg.mk"
diff -ruN ipa.orig/PLIST ipa/PLIST
--- ipa.orig/PLIST	Mon Dec 26 19:39:44 2005
+++ ipa/PLIST	Tue Dec 27 00:43:16 2005
@@ -1,13 +1,11 @@
 @comment $NetBSD: PLIST,v 1.5 2005/05/02 20:34:02 reed Exp $
 bin/ipa
+bin/ipactl
 bin/ipastat
-man/man5/ipa.5
+include/ipa_mod.h
+man/man3/ipa_mod.3
 man/man5/ipa.conf.5
+man/man5/ipastat.conf.5
 man/man8/ipa.8
+man/man8/ipactl.8
 man/man8/ipastat.8
-share/examples/ipa/README
-share/examples/ipa/example-1
-share/examples/ipa/example-2
-share/examples/ipa/ipa.conf.default
-share/examples/rc.d/ipa
-@dirrm share/examples/ipa
diff -ruN ipa.orig/distinfo ipa/distinfo
--- ipa.orig/distinfo	Mon Dec 26 19:39:44 2005
+++ ipa/distinfo	Tue Dec 27 00:43:28 2005
@@ -1,11 +1,4 @@
 $NetBSD: distinfo,v 1.16 2005/02/24 12:13:50 agc Exp $

-SHA1 (ipa-1.3.6.tar.gz) = dcf5ebbf14600da0afba6a735f16a8b8ac84185e
-RMD160 (ipa-1.3.6.tar.gz) = d122d2f8c1b8bbdabb89f1fd1ccf9aa7f2867133
-Size (ipa-1.3.6.tar.gz) = 137156 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
+SHA1 (ipa-2.0.tar.bz2) = d3a41d8321cc2ebff45ddbd07124e5c1097bd11e
+Size (ipa-2.0.tar.bz2) = 281507 bytes
diff -ruN ipa.orig/files/ipa.generic ipa/files/ipa.generic
--- ipa.orig/files/ipa.generic	Mon Dec 26 19:39:44 2005
+++ ipa/files/ipa.generic	Thu Jan  1 03:00:00 1970
@@ -1,78 +0,0 @@
-#!@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 -ruN ipa.orig/files/ipa.sh ipa/files/ipa.sh
--- ipa.orig/files/ipa.sh	Mon Dec 26 19:39:44 2005
+++ ipa/files/ipa.sh	Tue Dec 27 02:53:02 2005
@@ -3,41 +3,20 @@
 # $NetBSD: ipa.sh,v 1.1 2003/05/30 11:53:17 salo Exp $
 #

+# If some IPA module requires some services, then they should
+# be specified after the REQUIRE, by default REQUIRE is empty,
+# since ipa itself does not require anything for running.
+
 # PROVIDE: ipa
-# REQUIRE: ipfilter
+# REQUIRE:
+# BEFORE: LOGIN

 . /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
-}
+extra_commands="reload"

 load_rc_config $name
 run_rc_command "$1"
diff -ruN ipa.orig/patches/patch-aa ipa/patches/patch-aa
--- ipa.orig/patches/patch-aa	Mon Dec 26 19:39:44 2005
+++ ipa/patches/patch-aa	Thu Jan  1 03:00:00 1970
@@ -1,59 +0,0 @@
-$NetBSD: patch-aa,v 1.9 2003/05/30 11:53:17 salo Exp $
-
---- 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.
- #
--CFLAGS=		-Wall -O1 -g
-+#CFLAGS=		-Wall -O1 -g
- 
- #
- # PREFIX - prefix for all below listed paths
-@@ -58,7 +58,7 @@
- #
- # DST_ETC_DIR - where to install template configuration
- #
--DST_ETC_DIR=	${PREFIX}/etc
-+DST_ETC_DIR=	${DST_EXAMPLE_DIR}
- 
- #
- # DST_RC_DIR - where to install sample rc-script
-@@ -81,10 +81,10 @@
- #
- # INSTALL_* variables
- #
--INSTALL_MAN=		${INSTALL} -c -g wheel -o root -m 0444
--INSTALL_DATA=		${INSTALL} -c -g wheel -o root -m 0444
--INSTALL_PROGRAM=	${INSTALL} -c -g wheel -o root -m 0555
--INSTALL_SCRIPT=		${INSTALL} -c -g wheel -o root -m 0500 
-+INSTALL_MAN=		${BSD_INSTALL_MAN}
-+INSTALL_DATA=		${BSD_INSTALL_DATA}
-+INSTALL_PROGRAM=	${BSD_INSTALL_PROGRAM}
-+INSTALL_SCRIPT=		${BSD_INSTALL_SCRIPT}
- 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,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
--.if !exists(${DST_MAN_DIR}/ru_RU.KOI8-R/man5)
--	${INSTALL_MAN_DIR} ${DST_MAN_DIR}/ru_RU.KOI8-R/man5
--.endif
--.if !exists(${DST_MAN_DIR}/ru_RU.KOI8-R/man8)
--	${INSTALL_MAN_DIR} ${DST_MAN_DIR}/ru_RU.KOI8-R/man8
--.endif
--.if !exists(${DST_MAN_DIR}/ru_SU.KOI8-R)
--	${LN} -s ${DST_MAN_DIR}/ru_RU.KOI8-R ${DST_MAN_DIR}/ru_SU.KOI8-R
--.endif
--	${INSTALL_MAN} man/ru_RU.KOI8-R/ipa.5 man/ru_RU.KOI8-R/ipa.conf.5 ${DST_MAN_DIR}/ru_RU.KOI8-R/man5
--	${INSTALL_MAN} man/ru_RU.KOI8-R/ipa.8 man/ru_RU.KOI8-R/ipastat.8 ${DST_MAN_DIR}/ru_RU.KOI8-R/man8
--	${INSTALL_DATA_DIR} ${DST_EXAMPLE_DIR}
- 	${INSTALL_DATA} examples/* ${DST_EXAMPLE_DIR}
- .if exists(${DST_RC_DIR})
--	${INSTALL_SCRIPT} etc/ipa.sh.sample ${DST_RC_DIR}
- .else
- 	@${ECHO}
- 	@${ECHO} ">> Can't find directory ${DST_RC_DIR}, the ipa.sh.sample file was not installed (not a problem)."
diff -ruN ipa.orig/patches/patch-ab ipa/patches/patch-ab
--- ipa.orig/patches/patch-ab	Mon Dec 26 19:39:44 2005
+++ ipa/patches/patch-ab	Thu Jan  1 03:00:00 1970
@@ -1,14 +0,0 @@
-$NetBSD: patch-ab,v 1.3 2002/06/30 03:47:55 jlam Exp $
-
---- path.h.orig	Tue Oct 16 18:44:37 2001
-+++ path.h
-@@ -29,7 +29,9 @@
- #ifndef IPA_PATH_H
- #define IPA_PATH_H
- 
-+#ifndef CFGFILE
- #define CFGFILE		"/usr/local/etc/ipa.conf"
-+#endif
- #define DBDIR		"/var/ipa"
- #define PIDFILE		"/var/run/ipa.pid"
- 
diff -ruN ipa.orig/patches/patch-ac ipa/patches/patch-ac
--- ipa.orig/patches/patch-ac	Mon Dec 26 19:39:44 2005
+++ ipa/patches/patch-ac	Thu Jan  1 03:00:00 1970
@@ -1,13 +0,0 @@
-$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 -ruN ipa.orig/patches/patch-ad ipa/patches/patch-ad
--- ipa.orig/patches/patch-ad	Mon Dec 26 19:39:44 2005
+++ ipa/patches/patch-ad	Thu Jan  1 03:00:00 1970
@@ -1,38 +0,0 @@
-$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 -ruN ipa.orig/patches/patch-ae ipa/patches/patch-ae
--- ipa.orig/patches/patch-ae	Mon Dec 26 19:39:44 2005
+++ ipa/patches/patch-ae	Thu Jan  1 03:00:00 1970
@@ -1,68 +0,0 @@
-$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 -ruN ipa.orig/patches/patch-af ipa/patches/patch-af
--- ipa.orig/patches/patch-af	Mon Dec 26 19:39:44 2005
+++ ipa/patches/patch-af	Thu Jan  1 03:00:00 1970
@@ -1,13 +0,0 @@
-$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

>Release-Note:

>Audit-Trail:
From: OBATA Akio <obache@NetBSD.org>
To: simon@comsys.ntu-kpi.kiev.ua
Cc: gnats-bugs@netbsd.org
Subject: Re: pkg/32398: Maintainer update: net/ipa 1.3.6 -> sysutils/ipa 2.0
Date: Sun, 8 Oct 2006 18:36:57 +0900

 You are using WITH_XXX variables, please use options framework instead in pkgsrc.
 And already 2.0.1 out.
 Would you please regenerate diff?

 > *	Please remove ipa from net category and move it to
 > 	sysutils, ipa-2.0 does not have anything common with
 > 	network.

 Is ipa-2.0 compatible with 1.x ?

 > Problems in port (I cannot find out what's wrong):
 > 
 > 
 >     *	When I run "make install" for port, "make install" runs
 > 	${CC} to compile some of source files.  This does not happen
 > 	if I run "./configure; make; make install" not from pkgsrc
 > 	(Also I do not have this problem in FreeBSD with sysutils/ipa
 > 	port).
 > 
 > 
 >     *	New WITH_DEBUG_INFO variable does not work, "make install"
 > 	runs "install ... -s ..." and all debugging information is
 > 	removed.

 Do you find to fix these problems?

 --
 "Of course I love NetBSD":-)
 OBATA Akio / obache@NetBSD.org

From: Mark Davies <mark@mcs.vuw.ac.nz>
To: gnats-bugs@netbsd.org
Cc: obache@netbsd.org
Subject: Re: pkg/32398: Maintainer update: net/ipa 1.3.6 -> sysutils/ipa 2.0
Date: Sun, 8 Oct 2006 23:35:53 +1300

 On Sunday 08 October 2006 22:40, OBATA Akio wrote:
 >  You are using WITH_XXX variables, please use options framework instead in
 > pkgsrc. And already 2.0.1 out.
 >  Would you please regenerate diff?

 I was just looking at this PR and have a version updated to 2.0.1 and using 
 the options framework.

 >  > *	Please remove ipa from net category and move it to
 >  > 	sysutils, ipa-2.0 does not have anything common with
 >  > 	network.
 >
 >  Is ipa-2.0 compatible with 1.x ?

 I would also like to understand the relationship between 2.x and 1.x.

 >  > Problems in port (I cannot find out what's wrong):
 	[...]
 >  Do you find to fix these problems?

 I don't see either problem in the version I have.

 cheers
 mark

From: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@NetBSD.org, gnats-admin@NetBSD.org,
	pkgsrc-bugs@NetBSD.org, Mark Davies <mark@mcs.vuw.ac.nz>
Subject: Re: pkg/32398: Maintainer update: net/ipa 1.3.6 -> sysutils/ipa 2.0
Date: Thu, 12 Oct 2006 13:08:09 +0300

 On Sun, Oct 08, 2006 at 09:40:02AM +0000, OBATA Akio wrote:
 > The following reply was made to PR pkg/32398; it has been noted by GNATS.
 > 
 > From: OBATA Akio <obache@NetBSD.org>
 > To: simon@comsys.ntu-kpi.kiev.ua
 > Cc: gnats-bugs@netbsd.org
 > Subject: Re: pkg/32398: Maintainer update: net/ipa 1.3.6 -> sysutils/ipa 2.0
 > Date: Sun, 8 Oct 2006 18:36:57 +0900
 > 
 >  You are using WITH_XXX variables, please use options framework instead in pkgsrc.
 >  And already 2.0.1 out.
 >  Would you please regenerate diff?

 I have NetBSD 2.0 and pkgsrc from the same release, I tried to update
 pkgsrc, but it cannot be used on NetBSD 2.0.  I will try to rewrite
 everything with options framework and will add some additions for
 the current pkgsrc, but I will not be able to test them.

 >  
 >  > *	Please remove ipa from net category and move it to
 >  > 	sysutils, ipa-2.0 does not have anything common with
 >  > 	network.
 >  
 >  Is ipa-2.0 compatible with 1.x ?

 ipa-2.x is a completely rewritten program.  It got some ideas from
 the previous 1.x version.

 In ipa-1.x support for firewalls and database was implemented directly
 in source files.  ipa-2.x uses modules (accounting, database and
 statistic modules, like plugins) and inside its source files there
 is not any support for firewalls and databases, it simply work with
 statistics (it can be anything) and solve some of accounting related
 tasks.

 Right now there is not any accounting module, which can be used on
 NetBSD.  Nevertheless, there is database module ipa_sdb, which can be
 used on any Unix-like system and there is ipactl utility, which can
 provide statistics.

 Since ipa-2.x is a system independent program it can be used on any
 Unix-like system.

 >  
 >  > Problems in port (I cannot find out what's wrong):
 >  > 
 >  > 
 >  >     *	When I run "make install" for port, "make install" runs
 >  > 	${CC} to compile some of source files.  This does not happen
 >  > 	if I run "./configure; make; make install" not from pkgsrc
 >  > 	(Also I do not have this problem in FreeBSD with sysutils/ipa
 >  > 	port).
 >  > 
 >  > 
 >  >     *	New WITH_DEBUG_INFO variable does not work, "make install"
 >  > 	runs "install ... -s ..." and all debugging information is
 >  > 	removed.
 >  
 >  Do you find to fix these problems?

 Right now I cannot upgrade my system, so I use old pkgsrc, but
 the first problem looks strange, because "make install" recompiles
 some of source files (not all of them).

From: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/32398: Maintainer update: net/ipa 1.3.6 -> sysutils/ipa 2.0
Date: Wed, 18 Oct 2006 14:32:35 +0300

 On Sun, Oct 08, 2006 at 06:36:57PM +0900, OBATA Akio wrote:

 >  You are using WITH_XXX variables, please use options framework instead in pkgsrc.
 >  And already 2.0.1 out.
 >  Would you please regenerate diff?

 Done.

 >  
 >  > *	Please remove ipa from net category and move it to
 >  > 	sysutils, ipa-2.0 does not have anything common with
 >  > 	network.
 >  
 >  Is ipa-2.0 compatible with 1.x ?

 I still ask to move net/ipa --> sysutils/ipa.

 >  >     *	When I run "make install" for port, "make install" runs
 >  > 	${CC} to compile some of source files.  This does not happen
 >  > 	if I run "./configure; make; make install" not from pkgsrc
 >  > 	(Also I do not have this problem in FreeBSD with sysutils/ipa
 >  > 	port).

 This problem disappeared with the most recent pkgsrc, which can be run
 on NetBSD 2.0.

 >  > 
 >  >     *	New WITH_DEBUG_INFO variable does not work, "make install"
 >  > 	runs "install ... -s ..." and all debugging information is
 >  > 	removed.

 I decided to not add this feature.

 Please do not add patches for manual pages, there are still few places
 with "/usr/local/..." in manual pages, but this directory is used only
 in examples.

 Everything described in my original PR corresponds to the following patch.

 diff -ruN ipa.orig/DESCR ipa/DESCR
 --- ipa.orig/DESCR	Fri May 30 14:53:16 2003
 +++ ipa/DESCR	Wed Oct 18 01:10:32 2006
 @@ -1,9 +1,11 @@
 -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 -- Pluggable Accounting System

 -It supports limits for accounting rules and limits events as "limit is
 -reached", "reached limit is expired", etc.  It understands time intervals
 -like "end of day", "end of week", "end of month", etc.
 +Main features:

 -ipastat(8) is a viewer for IP accounting database made by ipa(8).
 +- Flexible general purpose accounting system;
 +- Supports static and dynamic rules;
 +- Support limits, sublimits and thresholds;
 +- Works with external accounting modules;
 +- Works with external database modules;
 +- Works with external statistics modules;
 +- Accounting per specified period of a week.
 diff -ruN ipa.orig/Makefile ipa/Makefile
 --- ipa.orig/Makefile	Tue Oct 17 23:50:20 2006
 +++ ipa/Makefile	Wed Oct 18 08:45:26 2006
 @@ -1,55 +1,35 @@
  # $NetBSD: Makefile,v 1.25 2006/06/04 22:21:27 joerg Exp $
  #

 -DISTNAME=	ipa-1.3.6
 -PKGREVISION=	1
 -CATEGORIES=	net sysutils
 +DISTNAME=	ipa-2.0.1
 +CATEGORIES=	sysutils
  MASTER_SITES=	http://ipa-system.sourceforge.net/ \
  		http://www.mirrors.wiretapped.net/security/network-monitoring/ipa/ \
 -		ftp://ftp.mirrors.wiretapped.net/pub/security/network-monitoring/ipa/ \
 -		http://ipa.it-ss.be/
 +		ftp://ftp.mirrors.wiretapped.net/pub/security/network-monitoring/ipa/
 +EXTRACT_SUFX=	.tar.bz2

  MAINTAINER=	simon@comsys.ntu-kpi.kiev.ua
  HOMEPAGE=	http://ipa-system.sourceforge.net/
 -COMMENT=	IP accounting software
 +COMMENT=	Pluggable accounting system

 -ONLY_FOR_PLATFORM=	FreeBSD-*-* NetBSD-1*-* OpenBSD-*-* DragonFly-*-*
 -
 -RESTRICTED=		Needs to be built uniquely for each host
 -NO_BIN_ON_FTP=		${RESTRICTED}
 -NO_BIN_ON_CDROM=	${RESTRICTED}
 -NO_PACKAGE=		${RESTRICTED}
 -
 -BUILD_TARGET=		# empty
 -
 -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
 +GNU_CONFIGURE=	yes

  .include "../../mk/bsd.prefs.mk"

 -RCD_SCRIPTS=		ipa
 +RCD_SCRIPTS=	ipa

  .if ${OPSYS} == "NetBSD" || ${OPSYS} == "DragonFly"
  RCD_SCRIPT_SRC.ipa=	${FILESDIR}/ipa.sh
  .else
 -RCD_SCRIPT_SRC.ipa=	${FILESDIR}/ipa.generic
 +RCD_SCRIPT_SRC.ipa=	${WRKSRC}/etc/ipa.sh.sample
  .endif

 -.if ${OPSYS} == "DragonFly"
 -MAKE_ENV+=	WITH_PF=1 WITHOUT_IP6FW=1 WITHOUT_IPFW=1
 -.endif
 +CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}

 -SUBST_CLASSES+=		paths
 -SUBST_FILES.paths=	man/ipa.5 man/ipa.8 man/ipa.conf.5 man/ipastat.8
 -SUBST_SED.paths+=	-e 's,@PREFIX@,${PREFIX},g'
 -SUBST_SED.paths+=	-e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
 -SUBST_STAGE.paths=	post-patch
 +.include "options.mk"

 -pre-install:
 -	${INSTALL_DATA_DIR} ${PREFIX}/share/examples/ipa
 +do-install:
 +	cd ${WRKSRC}/src && ${MAKE} install
 +	cd ${WRKSRC}/man && ${MAKE} install-am

  .include "../../mk/bsd.pkg.mk"
 diff -ruN ipa.orig/PLIST ipa/PLIST
 --- ipa.orig/PLIST	Tue Oct 17 23:51:26 2006
 +++ ipa/PLIST	Wed Oct 18 08:09:19 2006
 @@ -1,13 +1,11 @@
  @comment $NetBSD: PLIST,v 1.5 2005/05/02 20:34:02 reed Exp $
  bin/ipa
 +bin/ipactl
  bin/ipastat
 -man/man5/ipa.5
 +include/ipa_mod.h
 +man/man3/ipa_mod.3
  man/man5/ipa.conf.5
 +man/man5/ipastat.conf.5
  man/man8/ipa.8
 +man/man8/ipactl.8
  man/man8/ipastat.8
 -share/examples/ipa/README
 -share/examples/ipa/example-1
 -share/examples/ipa/example-2
 -share/examples/ipa/ipa.conf.default
 -share/examples/rc.d/ipa
 -@dirrm share/examples/ipa
 diff -ruN ipa.orig/distinfo ipa/distinfo
 --- ipa.orig/distinfo	Tue Oct 17 23:51:40 2006
 +++ ipa/distinfo	Wed Oct 18 08:09:33 2006
 @@ -1,12 +1,5 @@
  $NetBSD: distinfo,v 1.17 2006/06/04 22:21:27 joerg Exp $

 -SHA1 (ipa-1.3.6.tar.gz) = dcf5ebbf14600da0afba6a735f16a8b8ac84185e
 -RMD160 (ipa-1.3.6.tar.gz) = d122d2f8c1b8bbdabb89f1fd1ccf9aa7f2867133
 -Size (ipa-1.3.6.tar.gz) = 137156 bytes
 -SHA1 (patch-aa) = db61ec179fdeb8ce5ef9ca4f7d287acb24a7faf4
 -SHA1 (patch-ab) = edce3d9d03ee7456c440ce4179e1e8c39bb516f2
 -SHA1 (patch-ac) = 0baab6507d335479379e78582c727fad72259b61
 -SHA1 (patch-ad) = fe03afb555f2a6817dfddd7ab4edb7e41f49c03a
 -SHA1 (patch-ae) = 8ed23f771ba11ae357b141ac62c2d4db9c3957e9
 -SHA1 (patch-af) = d604d1bab7d51feb7e5ebd75b816c691db229957
 -SHA1 (patch-ag) = 886e3e3fe00f4b4b6cd6ad4ae5d9ac356fe3704c
 +SHA1 (ipa-2.0.1.tar.bz2) = 94c05df1600e309caf033895b61f797218dcd564
 +RMD160 (ipa-2.0.1.tar.bz2) = b8e972e65d6b55c50f2b0566cf63f5edf181446f
 +Size (ipa-2.0.1.tar.bz2) = 282407 bytes
 diff -ruN ipa.orig/files/ipa.generic ipa/files/ipa.generic
 --- ipa.orig/files/ipa.generic	Tue Oct 17 23:52:28 2006
 +++ ipa/files/ipa.generic	Thu Jan  1 03:00:00 1970
 @@ -1,78 +0,0 @@
 -#!@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 -ruN ipa.orig/files/ipa.sh ipa/files/ipa.sh
 --- ipa.orig/files/ipa.sh	Tue Oct 17 23:52:38 2006
 +++ ipa/files/ipa.sh	Wed Oct 18 01:30:34 2006
 @@ -3,41 +3,21 @@
  # $NetBSD: ipa.sh,v 1.1 2003/05/30 11:53:17 salo Exp $
  #

 +# If some IPA module requires some services, then they should
 +# be specified after REQUIRE, by default REQUIRE contains
 +# only syslogd, since ipa uses syslog for logging by default
 +# and does not require anything more for running.
 +
  # PROVIDE: ipa
 -# REQUIRE: ipfilter
 +# REQUIRE: syslogd
 +# BEFORE: LOGIN

  . /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
 -}
 +extra_commands="reload"

  load_rc_config $name
  run_rc_command "$1"
 diff -ruN ipa.orig/options.mk ipa/options.mk
 --- ipa.orig/options.mk	Thu Jan  1 03:00:00 1970
 +++ ipa/options.mk	Tue Oct 17 23:17:25 2006
 @@ -0,0 +1,49 @@
 +# $NetBSD$
 +
 +PKG_OPTIONS_VAR=	PKG_OPTIONS.ipa
 +PKG_SUPPORTED_OPTIONS=	memfunc_debug without_autorules without_limits \
 +			without_rules without_sublimits without_thresholds
 +
 +.include "../../mk/bsd.options.mk"
 +
 +###
 +### Enable ipa_memfunc debugging
 +###
 +.if !empty(PKG_OPTIONS:Mmemfunc_debug)
 +CONFIGURE_ARGS+= --enable-memfunc-debug
 +.endif
 +
 +###
 +### Disable dynamic rules support
 +###
 +.if !empty(PKG_OPTIONS:Mwithout_autorules)
 +CONFIGURE_ARGS+= --disable-autorules
 +.endif
 +
 +###
 +### Disable limits support
 +###
 +.if !empty(PKG_OPTIONS:Mwithout_limits)
 +CONFIGURE_ARGS+= --disable-limits
 +.endif
 +
 +###
 +### Disable static rules support
 +###
 +.if !empty(PKG_OPTIONS:Mwithout_rules)
 +CONFIGURE_ARGS+= --disable-rules
 +.endif
 +
 +###
 +### Disable sublimits support
 +###
 +.if !empty(PKG_OPTIONS:Mwithout_sublimits)
 +CONFIGURE_ARGS+= --disable-sublimits
 +.endif
 +
 +###
 +### Disable thresholds support
 +###
 +.if !empty(PKG_OPTIONS:Mwithout_thresholds)
 +CONFIGURE_ARGS+= --disable-thresholds
 +.endif
 diff -ruN ipa.orig/patches/patch-aa ipa/patches/patch-aa
 --- ipa.orig/patches/patch-aa	Tue Oct 17 23:53:24 2006
 +++ ipa/patches/patch-aa	Thu Jan  1 03:00:00 1970
 @@ -1,86 +0,0 @@
 -$NetBSD: patch-aa,v 1.10 2006/06/04 22:21:27 joerg Exp $
 -
 ---- Makefile.orig	2003-11-11 10:24:34.000000000 +0000
 -+++ Makefile
 -@@ -38,7 +38,7 @@ CC?=		/usr/bin/cc
 - #	-Ox   - optimize;
 - #	-g    - produce debugging information.
 - #
 --CFLAGS=		-Wall -O1 -g
 -+#CFLAGS=		-Wall -O1 -g
 - 
 - #
 - # PREFIX - prefix for all below listed paths
 -@@ -58,7 +58,7 @@ DST_MAN_DIR=	${PREFIX}/man
 - #
 - # DST_ETC_DIR - where to install template configuration
 - #
 --DST_ETC_DIR=	${PREFIX}/etc
 -+DST_ETC_DIR=	${DST_EXAMPLE_DIR}
 - 
 - #
 - # DST_RC_DIR - where to install sample rc-script
 -@@ -81,10 +81,10 @@ MKDIR?=		/bin/mkdir
 - #
 - # INSTALL_* variables
 - #
 --INSTALL_MAN=		${INSTALL} -c -g wheel -o root -m 0444
 --INSTALL_DATA=		${INSTALL} -c -g wheel -o root -m 0444
 --INSTALL_PROGRAM=	${INSTALL} -c -g wheel -o root -m 0555
 --INSTALL_SCRIPT=		${INSTALL} -c -g wheel -o root -m 0500 
 -+INSTALL_MAN=		${BSD_INSTALL_MAN}
 -+INSTALL_DATA=		${BSD_INSTALL_DATA}
 -+INSTALL_PROGRAM=	${BSD_INSTALL_PROGRAM}
 -+INSTALL_SCRIPT=		${BSD_INSTALL_SCRIPT}
 - INSTALL_MAN_DIR=	${INSTALL} -d -m 0555 -g wheel -o root
 - INSTALL_DATA_DIR=	${INSTALL} -d -m 0555 -g wheel -o root
 - 
 -@@ -98,7 +98,7 @@ IPASTAT=	ipastat.o common.o
 - .MAIN: checkos ${OS}
 - 
 - checkos:
 --.if ${OS} != "FreeBSD" && ${OS} != "NetBSD" && ${OS} != "OpenBSD"
 -+.if ${OS} != "FreeBSD" && ${OS} != "NetBSD" && ${OS} != "OpenBSD" && ${OS} != "DragonFly"
 - 	@${ECHO}
 - 	@${ECHO} ">> IPA-`${CAT} Version` is designed for FreeBSD, NetBSD and OpenBSD."
 - 	@${ECHO} ">> Your operating system is ${OS}."
 -@@ -139,7 +139,7 @@ CFLAGS+=	-I${PF_INCLUDE_DIR}
 - .endif
 - .endif
 - 
 --.ifmake FreeBSD
 -+.if make(FreeBSD) || make(DragonFly)
 - IPA+=		kipfw.o kip6fw.o
 - .endif
 - 
 -@@ -147,7 +147,7 @@ IPA+=		kipfw.o kip6fw.o
 - IPA+=		kpf.o
 - .endif
 - 
 --FreeBSD NetBSD OpenBSD: ipa ipastat
 -+DragonFly FreeBSD NetBSD OpenBSD: ipa ipastat
 - 
 - ipa: ${IPA}
 - 	${CC} -o ${.TARGET} ${IPA}
 -@@ -214,21 +214,8 @@ install:
 - 	${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
 --.if !exists(${DST_MAN_DIR}/ru_RU.KOI8-R/man5)
 --	${INSTALL_MAN_DIR} ${DST_MAN_DIR}/ru_RU.KOI8-R/man5
 --.endif
 --.if !exists(${DST_MAN_DIR}/ru_RU.KOI8-R/man8)
 --	${INSTALL_MAN_DIR} ${DST_MAN_DIR}/ru_RU.KOI8-R/man8
 --.endif
 --.if !exists(${DST_MAN_DIR}/ru_SU.KOI8-R)
 --	${LN} -s ${DST_MAN_DIR}/ru_RU.KOI8-R ${DST_MAN_DIR}/ru_SU.KOI8-R
 --.endif
 --	${INSTALL_MAN} man/ru_RU.KOI8-R/ipa.5 man/ru_RU.KOI8-R/ipa.conf.5 ${DST_MAN_DIR}/ru_RU.KOI8-R/man5
 --	${INSTALL_MAN} man/ru_RU.KOI8-R/ipa.8 man/ru_RU.KOI8-R/ipastat.8 ${DST_MAN_DIR}/ru_RU.KOI8-R/man8
 --	${INSTALL_DATA_DIR} ${DST_EXAMPLE_DIR}
 - 	${INSTALL_DATA} examples/* ${DST_EXAMPLE_DIR}
 - .if exists(${DST_RC_DIR})
 --	${INSTALL_SCRIPT} etc/ipa.sh.sample ${DST_RC_DIR}
 - .else
 - 	@${ECHO}
 - 	@${ECHO} ">> Can't find directory ${DST_RC_DIR}, the ipa.sh.sample file was not installed (not a problem)."
 diff -ruN ipa.orig/patches/patch-ab ipa/patches/patch-ab
 --- ipa.orig/patches/patch-ab	Tue Oct 17 23:53:34 2006
 +++ ipa/patches/patch-ab	Thu Jan  1 03:00:00 1970
 @@ -1,14 +0,0 @@
 -$NetBSD: patch-ab,v 1.3 2002/06/30 03:47:55 jlam Exp $
 -
 ---- path.h.orig	Tue Oct 16 18:44:37 2001
 -+++ path.h
 -@@ -29,7 +29,9 @@
 - #ifndef IPA_PATH_H
 - #define IPA_PATH_H
 - 
 -+#ifndef CFGFILE
 - #define CFGFILE		"/usr/local/etc/ipa.conf"
 -+#endif
 - #define DBDIR		"/var/ipa"
 - #define PIDFILE		"/var/run/ipa.pid"
 - 
 diff -ruN ipa.orig/patches/patch-ac ipa/patches/patch-ac
 --- ipa.orig/patches/patch-ac	Tue Oct 17 23:53:48 2006
 +++ ipa/patches/patch-ac	Thu Jan  1 03:00:00 1970
 @@ -1,13 +0,0 @@
 -$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 -ruN ipa.orig/patches/patch-ad ipa/patches/patch-ad
 --- ipa.orig/patches/patch-ad	Tue Oct 17 23:53:58 2006
 +++ ipa/patches/patch-ad	Thu Jan  1 03:00:00 1970
 @@ -1,38 +0,0 @@
 -$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 -ruN ipa.orig/patches/patch-ae ipa/patches/patch-ae
 --- ipa.orig/patches/patch-ae	Tue Oct 17 23:54:06 2006
 +++ ipa/patches/patch-ae	Thu Jan  1 03:00:00 1970
 @@ -1,68 +0,0 @@
 -$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 -ruN ipa.orig/patches/patch-af ipa/patches/patch-af
 --- ipa.orig/patches/patch-af	Tue Oct 17 23:54:18 2006
 +++ ipa/patches/patch-af	Thu Jan  1 03:00:00 1970
 @@ -1,13 +0,0 @@
 -$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
 diff -ruN ipa.orig/patches/patch-ag ipa/patches/patch-ag
 --- ipa.orig/patches/patch-ag	Tue Oct 17 23:54:26 2006
 +++ ipa/patches/patch-ag	Thu Jan  1 03:00:00 1970
 @@ -1,16 +0,0 @@
 -$NetBSD: patch-ag,v 1.1 2006/06/04 22:21:27 joerg Exp $
 -
 ---- kpf.c.orig	2006-06-04 22:08:28.000000000 +0000
 -+++ kpf.c
 -@@ -46,7 +46,11 @@ static const char rcsid[] =
 - #include <sys/socket.h>
 - #include <net/if.h>
 - #include <netinet/in.h>
 -+#if defined(__DragonFly__)
 -+#include <net/pf/pfvar.h>
 -+#else
 - #include <net/pfvar.h>
 -+#endif
 - 
 - #include "debug.h"
 - 

From: Mark Davies <markd@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: PR/32398 CVS commit: pkgsrc
Date: Wed, 18 Oct 2006 11:45:23 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	markd
 Date:		Wed Oct 18 11:45:23 UTC 2006

 Modified Files:
 	pkgsrc/net: Makefile
 	pkgsrc/sysutils: Makefile
 Added Files:
 	pkgsrc/sysutils/ipa: DESCR Makefile PLIST distinfo options.mk
 	pkgsrc/sysutils/ipa/files: ipa.sh
 Removed Files:
 	pkgsrc/net/ipa: DESCR Makefile PLIST distinfo
 	pkgsrc/net/ipa/files: ipa.generic ipa.sh
 	pkgsrc/net/ipa/patches: patch-aa patch-ab patch-ac patch-ad patch-ae
 	    patch-af patch-ag

 Log Message:
 Maintainer update of ipa to 2.0.1 and move to sysutils.
 In PR pkg/32398 with some tweaks from me.

 IPA is now a flexible general purpose accounting system;
 - Supports static and dynamic rules;
 - Support limits, sublimits and thresholds;
 - Works with external accounting modules;
 - Works with external database modules;
 - Works with external statistics modules;
 -Accounting per specified period of a week.


 To generate a diff of this commit:
 cvs rdiff -r1.641 -r1.642 pkgsrc/net/Makefile
 cvs rdiff -r1.6 -r0 pkgsrc/net/ipa/DESCR
 cvs rdiff -r1.25 -r0 pkgsrc/net/ipa/Makefile
 cvs rdiff -r1.5 -r0 pkgsrc/net/ipa/PLIST
 cvs rdiff -r1.17 -r0 pkgsrc/net/ipa/distinfo
 cvs rdiff -r1.1 -r0 pkgsrc/net/ipa/files/ipa.generic \
     pkgsrc/net/ipa/files/ipa.sh
 cvs rdiff -r1.10 -r0 pkgsrc/net/ipa/patches/patch-aa
 cvs rdiff -r1.3 -r0 pkgsrc/net/ipa/patches/patch-ab \
     pkgsrc/net/ipa/patches/patch-ac
 cvs rdiff -r1.1 -r0 pkgsrc/net/ipa/patches/patch-ad \
     pkgsrc/net/ipa/patches/patch-ae pkgsrc/net/ipa/patches/patch-af \
     pkgsrc/net/ipa/patches/patch-ag
 cvs rdiff -r1.374 -r1.375 pkgsrc/sysutils/Makefile
 cvs rdiff -r0 -r1.1 pkgsrc/sysutils/ipa/DESCR pkgsrc/sysutils/ipa/Makefile \
     pkgsrc/sysutils/ipa/PLIST pkgsrc/sysutils/ipa/distinfo \
     pkgsrc/sysutils/ipa/options.mk
 cvs rdiff -r0 -r1.1 pkgsrc/sysutils/ipa/files/ipa.sh

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: markd@netbsd.org
State-Changed-When: Wed, 18 Oct 2006 11:54:35 +0000
State-Changed-Why:
update done.


From: OBATA Akio <obache@NetBSD.org>
To: simon@comsys.ntu-kpi.kiev.ua
Cc: gnats-bugs@netbsd.org, mark@mcs.vuw.ac.nz
Subject: Re: pkg/32398: Maintainer update: net/ipa 1.3.6 -> sysutils/ipa 2.0
Date: Wed, 18 Oct 2006 21:06:40 +0900

 On Wed, 18 Oct 2006 11:59:15 +0300, Andrey Simonenko wrote:
 > On Sun, Oct 08, 2006 at 09:40:02AM +0000, OBATA Akio wrote:
 > 
 > >  You are using WITH_XXX variables, please use options framework instead in pkgsrc.
 > >  And already 2.0.1 out.
 > >  Would you please regenerate diff?
 > 
 > Done.

 Thanks.

 > >  > *	Please remove ipa from net category and move it to
 > >  > 	sysutils, ipa-2.0 does not have anything common with
 > >  > 	network.
 > >  
 > >  Is ipa-2.0 compatible with 1.x ?
 > 
 > I still ask to move net/ipa --> sysutils/ipa.

 But 

 >  ipa-2.x is a completely rewritten program.  It got some ideas from
 >  the previous 1.x version.
 > 
 >  
 >  In ipa-1.x support for firewalls and database was implemented directly
 >  in source files.  ipa-2.x uses modules (accounting, database and
 >  statistic modules, like plugins) and inside its source files there
 >  is not any support for firewalls and databases, it simply work with
 >  statistics (it can be anything) and solve some of accounting related
 >  tasks.
 > 
 >  
 >  Right now there is not any accounting module, which can be used on
 >  NetBSD.  Nevertheless, there is database module ipa_sdb, which can be
 >  used on any Unix-like system and there is ipactl utility, which can
 >  provide statistics.

 then, until ipa-2.x's modules is ready, we should keep ipa-1.x, aren't we?

 -- 
 OBATA Akio

From: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
To: OBATA Akio <obache@NetBSD.org>
Cc: gnats-bugs@NetBSD.org, mark@mcs.vuw.ac.nz
Subject: Re: pkg/32398: Maintainer update: net/ipa 1.3.6 -> sysutils/ipa 2.0
Date: Wed, 18 Oct 2006 16:34:45 +0300

 On Wed, Oct 18, 2006 at 09:06:40PM +0900, OBATA Akio wrote:

 > >  Right now there is not any accounting module, which can be used on
 > >  NetBSD.  Nevertheless, there is database module ipa_sdb, which can be
 > >  used on any Unix-like system and there is ipactl utility, which can
 > >  provide statistics.
 > 
 > then, until ipa-2.x's modules is ready, we should keep ipa-1.x, aren't we?

 I'm going to send PR to add ipa_sdb module (simple database module,
 record based database) to pkgsrc, so database module is ready.

 I do not support ipa-1.x any more and since pf and ipfil are quickly
 developed, 1.x version cannot be used on newer systems.  There are some
 difficulties in accounting modules implementation for pf and ipfil.

 Even without accounting module it is possible to use ipa, for example
 if there is following simple ipa.conf:

 db_mod "/usr/local/lib/ipa_db_sdb.so";

 ctl_enable = yes;

 global {
     db_list = sdb;
 }

 rule lan {
     limit 1 {
         limit = 100M;
         restart {
             restart = +M;
         }
         reach {
             exec "/somewhere/reach.sh";
         }
         expire {
             expire = +M;
             exec "/somewhere/expire.sh";
         }
     }
 }

 then it is possible to give statistics to this rule from ipactl:

 % ipactl -r lan set counter +12M

 When statistics reaches 100M (the value of limit), then reach.sh
 will be run and at the end of month (expire=+M value) expire.sh will be
 run and limit will restarted.  If limit is not reached, then it will be
 restarted anyway at the end of month (restart=+M value).

 For example, ipactl can be run from some script, which uses pfctl
 to retrieve statistics from PF.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.