ports/90017: Update port: sysutils/ipa 1.3.6 -> 2.0
Andrey Simonenko
simon at comsys.ntu-kpi.kiev.ua
Tue Dec 6 09:30:16 UTC 2005
>Number: 90017
>Category: ports
>Synopsis: Update port: sysutils/ipa 1.3.6 -> 2.0
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Tue Dec 06 09:30:02 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Andrey Simonenko
>Release: FreeBSD 6.0-STABLE i386
>Organization:
>Environment:
>Description:
Please update sysutils/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:
* Short and long descriptions were changed.
* Using bzip2 and configure.
* Using OPTIONS for configuring.
* rcNG ipa.sh file is provided, also traditional ipa.sh.sample
script is provided, which honors PREFIX (which file to install
can be configured).
* files/path-aa was removed, not needed any more, since
configure script is used.
* pkg-plist was removed, now PLIST_FILES is used.
* Now it is allowed to make package of ipa.
If committer has questions about some decisions in rcNG ipa.sh
script, then please speak with me before committing changes.
>How-To-Repeat:
>Fix:
diff -ruN ipa.orig/Makefile ipa/Makefile
--- ipa.orig/Makefile Wed Nov 9 19:56:32 2005
+++ ipa/Makefile Mon Dec 5 19:32:44 2005
@@ -6,7 +6,7 @@
#
PORTNAME= ipa
-PORTVERSION= 1.3.6
+PORTVERSION= 2.0
CATEGORIES= sysutils
MASTER_SITES= http://ipa-system.sourceforge.net/ \
http://www.mirrors.wiretapped.net/security/network-monitoring/ipa/ \
@@ -14,57 +14,93 @@
http://ipa.it-ss.be/
MAINTAINER= simon at comsys.ntu-kpi.kiev.ua
-COMMENT= IP accounting software
+COMMENT= Pluggable accounting system
-NO_PACKAGE= "Needs to be built uniquely for each host"
-ALL_TARGET=
-.ifdef(NOPORTDOCS)
-MAKE_ENV= NOPORTDOCS="${NOPORTDOCS}"
+USE_BZIP2= yes
+GNU_CONFIGURE= yes
+
+OPTIONS= AUTORULES "Enable dynamic rules support" on \
+ RULES "Enable static rules support" on \
+ LIMITS "Enable limits support" on \
+ SUBLIMITS "Enable sublimits support" on \
+ THRESHOLDS "Enable thresholds support" on \
+ CTL_CREDS "Enable ipactl's messages credentials" on \
+ MEMFUNC_DEBUG "Enable ipa_memfunc debugging" off \
+ DEBUG_INFO "Produce debugging information" off \
+ RCNG "Install rcNG script" on \
+ MAN_KOI8_R "Install Russian manual pages" off
+
+.include <bsd.port.pre.mk>
+
+.ifdef WITHOUT_AUTORULES
+CONFIGURE_ARGS+= --disable-autorules
.endif
-.ifdef WITH_PF
-PF_INCLUDE_DIR?= /usr/include/net
-MAKE_ARGS+= PF_INCLUDE_DIR=${PF_INCLUDE_DIR}
+.ifdef WITHOUT_RULES
+CONFIGURE_ARGS+= --disable-rules
.endif
-MAN5= ipa.5 ipa.conf.5
-MAN8= ipa.8 ipastat.8
-MANLANG= "" ru_RU.KOI8-R
+.ifdef WITHOUT_LIMITS
+CONFIGURE_ARGS+= --disable-limits
+.endif
-.include <bsd.port.pre.mk>
+.ifdef WITHOUT_SUBLIMITS
+CONFIGURE_ARGS+= --disable-sublimits
+.endif
-.if ${OSVERSION} >= 600000
-MAKE_ARGS+= -DWITHOUT_IPFIL
-WITHOUT_IPFIL= yes
+.ifdef WITHOUT_THRESHOLDS
+CONFIGURE_ARGS+= --disable-thresholds
.endif
-.if ${OSVERSION} >= 600000
-MAKE_ARGS+= -DIPFW2
-IPFW2= yes
+.ifdef WITHOUT_CTL_CREDS
+CONFIGURE_ARGS+= --disable-ctl-creds
.endif
-pre-everything::
- @${ECHO_MSG} "-------------------------------------------------------------------"
-.if !defined(WITHOUT_IPFW)
- @${ECHO_MSG} "o You can remove IPv4 Firewall support by defining WITHOUT_IPFW"
+.ifdef WITH_MEMFUNC_DEBUG
+CONFIGURE_ARGS+= --enable-memfunc-debug
.endif
-.if !defined(WITHOUT_IP6FW) && ${OSVERSION} >= 420001
- @${ECHO_MSG} "o You can remove IPv6 Firewall support by defining WITHOUT_IP6FW"
+
+.ifdef WITH_DEBUG_INFO
+STRIP= # empty
+CFLAGS+= -g
.endif
-.if !defined(WITHOUT_IPFIL)
- @${ECHO_MSG} "o You can remove IP Filter support by defining WITHOUT_IPFIL"
+
+PLIST_FILES= bin/ipa bin/ipactl bin/ipastat include/ipa_mod.h
+
+MAN3= ipa_mod.3
+MAN5= ipa.conf.5 ipastat.conf.5
+MAN8= ipa.8 ipactl.8 ipastat.8
+MANLANG= ""
+.ifdef WITH_MAN_KOI8_R
+MANLANG+= ru.KOI8-R
.endif
-.if !defined(WITHOUT_IP6FW) && !defined(WITH_IP6FW) && ${OSVERSION} >= 400000 && ${OSVERSION} < 420001
- @${ECHO_MSG} "o You can add IPv6 Firewall support by defining WITH_IP6FW,"
- @${ECHO_MSG} " this support will be probably broken on your system (see the"
- @${ECHO_MSG} " ${WRKSRC}/INSTALL file for more information)"
+
+.ifdef WITH_RCNG
+USE_RC_SUBR= yes
+PLIST_FILES+= etc/rc.d/ipa.sh
+.else
+PLIST_FILES+= '@unexec if [ -f %D/etc/rc.d/ipa.sh ]; then cmp -s %D/etc/rc.d/ipa.sh.sample %D/etc/rc.d/ipa.sh && rm -f %D/etc/rc.d/ipa.sh || echo "If you are permanently removing this port, you should do a \"rm ${PREFIX}/etc/rc.d/ipa.sh\" to remove startup files left." | fmt; fi'
+PLIST_FILES+= etc/rc.d/ipa.sh.sample
.endif
-.if !defined(IPFW2) && !defined(WITHOUT_IPFW) && ${OSVERSION} >= 460100 && ${OSVERSION} < 500038
- @${ECHO_MSG} "o You can add IPFW2 support by defining IPFW2"
+
+RC_SCRIPT_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
+
+post-build:
+.ifdef WITH_RCNG
+ @${SED} ${RC_SCRIPT_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+ ${FILESDIR}/ipa.sh > ${WRKSRC}/ipa.sh
+.endif
+
+do-install:
+ cd ${WRKSRC}/src && make install
+ cd ${WRKSRC}/man && make install-am
+.ifdef WITH_MAN_KOI8_R
+ cd ${WRKSRC}/man/ru.KOI8-R && make install
.endif
-.if ${OSVERSION} >= 500000 && !defined(WITH_PF)
- @${ECHO_MSG} "o You can add OpenBSD Packet Filter support by defining WITH_PF"
+.ifdef WITH_RCNG
+ ${INSTALL_SCRIPT} ${WRKSRC}/ipa.sh ${PREFIX}/etc/rc.d
+.else
+ ${INSTALL_SCRIPT} ${WRKSRC}/etc/ipa.sh.sample ${PREFIX}/etc/rc.d
.endif
- @${ECHO_MSG} "-------------------------------------------------------------------"
.include <bsd.port.post.mk>
diff -ruN ipa.orig/distinfo ipa/distinfo
--- ipa.orig/distinfo Wed Mar 31 06:11:24 2004
+++ ipa/distinfo Mon Dec 5 19:17:26 2005
@@ -1,2 +1,3 @@
-MD5 (ipa-1.3.6.tar.gz) = 292479df20497a12b48e8b458004d763
-SIZE (ipa-1.3.6.tar.gz) = 137156
+MD5 (ipa-2.0.tar.bz2) = 3031b5c837ad059c7401e5d18726c9d9
+SHA256 (ipa-2.0.tar.bz2) = 48b97af965b995f33fb9b331e4690ad02691ec458607c59bb7bfee689f2a0046
+SIZE (ipa-2.0.tar.bz2) = 281507
diff -ruN ipa.orig/files/ipa.sh ipa/files/ipa.sh
--- ipa.orig/files/ipa.sh Thu Jan 1 03:00:00 1970
+++ ipa/files/ipa.sh Mon Dec 5 19:42:20 2005
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# $FreeBSD:$
+#
+
+# 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:
+# BEFORE: LOGIN
+
+# Following line can enable ipa (see rc.subr(8) for information
+# where to write it):
+#
+# ipa_enable (boolean) Set to "YES" to enable ipa
+# (default is "NO")
+
+. %%RC_SUBR%%
+
+name=ipa
+rcvar=`set_rcvar`
+
+command="%%PREFIX%%/bin/ipa"
+
+load_rc_config $name
+
+ipa_enable=${ipa_enable:-"NO"}
+
+extra_commands="reload"
+run_rc_command "$1"
diff -ruN ipa.orig/files/patch-aa ipa/files/patch-aa
--- ipa.orig/files/patch-aa Thu Jul 10 11:53:06 2003
+++ ipa/files/patch-aa Thu Jan 1 03:00:00 1970
@@ -1,37 +0,0 @@
---- Makefile.orig Fri Jun 27 11:20:49 2003
-+++ Makefile Fri Jun 27 11:23:09 2003
-@@ -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
-@@ -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
-
-@@ -225,8 +225,10 @@
- .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
-+.if !defined(NOPORTDOCS)
- ${INSTALL_DATA_DIR} ${DST_EXAMPLE_DIR}
- ${INSTALL_DATA} examples/* ${DST_EXAMPLE_DIR}
-+.endif
- .if exists(${DST_RC_DIR})
- ${INSTALL_SCRIPT} etc/ipa.sh.sample ${DST_RC_DIR}
- .else
diff -ruN ipa.orig/pkg-descr ipa/pkg-descr
--- ipa.orig/pkg-descr Fri Feb 28 15:38:50 2003
+++ ipa/pkg-descr Tue Jul 26 22:10:32 2005
@@ -1,12 +1,14 @@
-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;
+- supports 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.
WWW: http://ipa-system.sourceforge.net/
diff -ruN ipa.orig/pkg-plist ipa/pkg-plist
--- ipa.orig/pkg-plist Tue Oct 15 02:42:54 2002
+++ ipa/pkg-plist Thu Jan 1 03:00:00 1970
@@ -1,13 +0,0 @@
-bin/ipa
-bin/ipastat
-etc/ipa.conf.default
- at unexec if [ -f %D/etc/rc.d/ipa.sh ]; then cmp -s %D/etc/rc.d/ipa.sh.sample %D/etc/rc.d/ipa.sh && rm -f %D/etc/rc.d/ipa.sh || echo "If you are permanently removing this port, you should do a ``rm ${PKG_PREFIX}/etc/rc.d/ipa.sh`` to remove startup files left." | fmt ; fi
-etc/rc.d/ipa.sh.sample
-%%PORTDOCS%%share/examples/ipa/README
-%%PORTDOCS%%share/examples/ipa/example-1
-%%PORTDOCS%%share/examples/ipa/example-2
-%%PORTDOCS%%@dirrm share/examples/ipa
- at unexec if [ ! -L %D/man/ru_RU.KOI8-R ]; then rmdir %D/man/ru_RU.KOI8-R/man8 %D/man/ru_RU.KOI8-R/man5 %D/man/ru_RU.KOI8-R 2>/dev/null || true ; fi
- at unexec if [ ! -L %D/man/ru_SU.KOI8-R ]; then rmdir %D/man/ru_SU.KOI8-R/man8 %D/man/ru_SU.KOI8-R/man5 %D/man/ru_SU.KOI8-R 2>/dev/null || true ; fi
- at unexec if [ -L %D/man/ru_RU.KOI8-R -a ! -d %D/man/ru_SU.KOI8-R ]; then rm %D/man/ru_RU.KOI8-R 2>/dev/null || true ; fi
- at unexec if [ -L %D/man/ru_SU.KOI8-R -a ! -d %D/man/ru_RU.KOI8-R ]; then rm %D/man/ru_SU.KOI8-R 2>/dev/null || true ; fi
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list