As pointed out by Michael Lucas on misc@, there's a fork of flow-tools
which is still being developed (the existing one seems long-dead),
amongst other things it fixes some LP64 problems. I wondered what
anyone thinks of updating to this version?
Here's a diff (patch -E -p0 -d /usr/ports/net) which updates flow-tools,
updates py-flowtools to a newer version (also seems dead with the current
upstream, and has also been forked), and adjusts py-flowtools and nfdump
since libft is now a shared library. nfdump can also lose its nasty
BUILD_DEPENDS=::net/flow-tools:build.
Also for flow-tools I've added a pgsql flavour to add PostgreSQL support
to flow-export, added the rrd conversion tools (which used to be
@commented in PLIST) with a note in DESCR to install py-rrd to use
them; I think they might be useful for some people but adding either
MULTI_PACKAGES or adding a RUN_DEPENDS for this seems like unnecessary
bloat. radix.h no longer needs to be installed so I've skipped the
gymnastics to rename it to ftradix.h.
CC'ing ports@ in the hope that someone using these ports might like to
test and comment...
Index: flow-tools/Makefile
===================================================================
RCS file: /cvs/ports/net/flow-tools/Makefile,v
retrieving revision 1.16
diff -u -p -r1.16 Makefile
--- flow-tools/Makefile 24 Mar 2009 18:14:09 -0000 1.16
+++ flow-tools/Makefile 3 May 2010 11:52:37 -0000
@@ -1,63 +1,57 @@
# $OpenBSD: Makefile,v 1.16 2009/03/24 18:14:09 jasper Exp $
+SHARED_LIBS += ft 0.0 # .0.0
+
COMMENT= cisco NetFlow utilities
-DISTNAME= flow-tools-0.68
-PKGNAME= ${DISTNAME}p1
+DISTNAME= flow-tools-0.68.5
+EXTRACT_SUFX= .tar.bz2
CATEGORIES= net
MAINTAINER= Jakob Schlyter <[email protected]>
-HOME_PAGE= http://www.splintered.net/sw/flow-tools/
+# forked from: http://www.splintered.net/sw/flow-tools/
+HOME_PAGE= http://code.google.com/p/flow-tools/
-MASTER_SITES= ftp://ftp.eng.oar.net/pub/flow-tools/
+MASTER_SITES= http://flow-tools.googlecode.com/files/
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
+
+FLAVORS= pgsql
+FLAVOR?=
+
WANTLIB= c z
MODULES= lang/python
CONFIGURE_STYLE= gnu
+SEPARATE_BUILD= simple
CONFIGURE_ARGS+= --localstatedir=/var/flow-tools
-BUILD_DEPENDS+= ::textproc/docbook-to-man
+.if !${FLAVOR:L:Mpgsql}
+CONFIGURE_ARGS+= --without-postgresql
+.else
+LIB_DEPENDS+= pq::databases/postgresql,-main
+.endif
+
+MAKE_FLAGS+= "SUBDIRS=lib src bin configs docs"
+FAKE_FLAGS+= sysconfdir=${PREFIX}/share/examples/flow-tools
+
+USE_GMAKE= Yes
+USE_LIBTOOL= Yes
PYTHON_SCRIPTS= bin/flow-log2rrd \
bin/flow-rpt2rrd \
bin/flow-rptfmt
post-patch:
- cp ${WRKSRC}/lib/radix.h ${WRKSRC}/lib/ftradix.h
.for file in ${PYTHON_SCRIPTS}
mv ${WRKSRC}/${file} ${WRKSRC}/${file}.dist
- sed "s!/usr/local/bin/python!${LOCALBASE}/bin/python${MODPY_VERSION}!" \
+ sed "s!/bin/env python!${MODPY_BIN}!" \
< ${WRKSRC}/${file}.dist > ${WRKSRC}/${file}
.endfor
-
-post-configure:
- rm -f ${WRKSRC}/docs/*.[0-9]
- rm -f ${WRKSRC}/docs/*.[0-9].in
- (cd ${WRKSRC}/docs; ${MAKE_PROGRAM})
-
-do-install:
- (cd ${WRKSRC}/src; env ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} install)
- (cd ${WRKSRC}/bin; env ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} install)
- ${INSTALL_MAN} ${WRKSRC}/docs/*.1 ${PREFIX}/man/man1
- ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/flow-tools/cfg
- ${INSTALL_DATA} ${WRKSRC}/configs/*.cfg \
- ${PREFIX}/share/examples/flow-tools/cfg
- ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/flow-tools/sym
- ${INSTALL_DATA} ${WRKSRC}/configs/*.sym \
- ${PREFIX}/share/examples/flow-tools/sym
- ${INSTALL_DATA} ${WRKBUILD}/lib/libft.a ${PREFIX}/lib
- ${INSTALL_DATA} ${WRKBUILD}/lib/ftconfig.h ${PREFIX}/include
- ${INSTALL_DATA} ${WRKBUILD}/lib/ftlib.h ${PREFIX}/include
- ${INSTALL_DATA} ${WRKBUILD}/lib/ftpaths.h ${PREFIX}/include
- ${INSTALL_DATA} ${WRKBUILD}/lib/ftqueue.h ${PREFIX}/include
- ${INSTALL_DATA} ${WRKBUILD}/lib/ftradix.h ${PREFIX}/include
-
.include <bsd.port.mk>
Index: flow-tools/distinfo
===================================================================
RCS file: /cvs/ports/net/flow-tools/distinfo,v
retrieving revision 1.8
diff -u -p -r1.8 distinfo
--- flow-tools/distinfo 5 Apr 2007 16:20:09 -0000 1.8
+++ flow-tools/distinfo 3 May 2010 11:52:37 -0000
@@ -1,5 +1,5 @@
-MD5 (flow-tools-0.68.tar.gz) = yeCotTx5YRtr/8udUQpaOA==
-RMD160 (flow-tools-0.68.tar.gz) = cb/RpAyzT65VsnadkyCNE7OwqSc=
-SHA1 (flow-tools-0.68.tar.gz) = YlkmOsT7+Kk5QiTkBTOT+nVkc8c=
-SHA256 (flow-tools-0.68.tar.gz) = adU1OzOfkX/BQZGdsEKwB9XI0xya0bwvmJpBqkHWKd8=
-SIZE (flow-tools-0.68.tar.gz) = 987151
+MD5 (flow-tools-0.68.5.tar.bz2) = PF512igiq2tJR8kowJ6jZQ==
+RMD160 (flow-tools-0.68.5.tar.bz2) = jyKK2tVuigXi885xwKHPPbYTxNc=
+SHA1 (flow-tools-0.68.5.tar.bz2) = 1xXvwaIpDBYGxLtpTW0ZCDCAOBM=
+SHA256 (flow-tools-0.68.5.tar.bz2) =
ObnWJFYdq+Cgqy2zLoq5zKeGkGD5p7FZ7G/SJT4ePX0=
+SIZE (flow-tools-0.68.5.tar.bz2) = 914600
Index: flow-tools/patches/patch-lib_Makefile_in
===================================================================
RCS file: flow-tools/patches/patch-lib_Makefile_in
diff -N flow-tools/patches/patch-lib_Makefile_in
--- flow-tools/patches/patch-lib_Makefile_in 8 Dec 2006 08:23:42 -0000
1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-lib_Makefile_in,v 1.2 2006/12/08 08:23:42 jakob Exp $
---- lib/Makefile.in.orig Wed May 11 16:16:15 2005
-+++ lib/Makefile.in Wed Nov 22 10:57:01 2006
-@@ -91,7 +91,7 @@ install_sh = @install_sh@
-
- #AM_CFLAGS=-g -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wredundant-decls -Wnested-externs
- #AM_CFLAGS=-O2
--AM_CFLAGS = -g -Wall
-+AM_CFLAGS = -g -Wall -fPIC
-
- DEFS = -I. -I$(srcdir)/lib
-
Index: flow-tools/patches/patch-lib_ftlib_h
===================================================================
RCS file: flow-tools/patches/patch-lib_ftlib_h
diff -N flow-tools/patches/patch-lib_ftlib_h
--- flow-tools/patches/patch-lib_ftlib_h 12 Apr 2005 19:29:22 -0000
1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-lib_ftlib_h,v 1.1 2005/04/12 19:29:22 msf Exp $
---- lib/ftlib.h.orig Tue Apr 12 08:20:07 2005
-+++ lib/ftlib.h Tue Apr 12 08:20:22 2005
-@@ -82,7 +82,7 @@
-
- #include "ftqueue.h"
- #include "ftpaths.h"
--#include "radix.h"
-+#include "ftradix.h"
-
- /*
- * compatability
Index: flow-tools/pkg/DESCR
===================================================================
RCS file: /cvs/ports/net/flow-tools/pkg/DESCR,v
retrieving revision 1.2
diff -u -p -r1.2 DESCR
--- flow-tools/pkg/DESCR 4 Sep 2001 15:22:14 -0000 1.2
+++ flow-tools/pkg/DESCR 3 May 2010 11:52:37 -0000
@@ -1,2 +1,9 @@
flow-tools is a set of programs for processing and managing NetFlow
-exports from Cisco routers.
+exports from Cisco and Juniper routers and various other systems,
+including OpenBSD's pflow(4).
+
+If you wish to use the rrd conversion tools (flow-log2rrd and
+flow-rpt2rrd), install the py-rrd package.
+
+Flavors:
+ pgsql - compile flow-export with PostgreSQL support.
Index: flow-tools/pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/flow-tools/pkg/PLIST,v
retrieving revision 1.9
diff -u -p -r1.9 PLIST
--- flow-tools/pkg/PLIST 8 Dec 2006 08:23:42 -0000 1.9
+++ flow-tools/pkg/PLIST 3 May 2010 11:52:37 -0000
@@ -1,36 +1,35 @@
@comment $OpenBSD: PLIST,v 1.9 2006/12/08 08:23:42 jakob Exp $
@newgroup _netflow:575
@newuser _netflow:575:575:daemon:flow-tools user:/var/empty:/sbin/nologin
-bin/flow-capture
-bin/flow-cat
-bin/flow-dscan
-bin/flow-expire
-bin/flow-export
-bin/flow-fanout
-bin/flow-filter
-bin/flow-gen
-bin/flow-header
-bin/flow-import
+...@bin bin/flow-capture
+...@bin bin/flow-cat
+...@bin bin/flow-dscan
+...@bin bin/flow-expire
+...@bin bin/flow-export
+...@bin bin/flow-fanout
+...@bin bin/flow-filter
+...@bin bin/flow-gen
+...@bin bin/flow-header
+...@bin bin/flow-import
@comment bin/flow-log2rrd
-bin/flow-mask
-bin/flow-merge
-bin/flow-nfilter
-bin/flow-print
-bin/flow-receive
-bin/flow-report
+...@bin bin/flow-mask
+...@bin bin/flow-merge
+...@bin bin/flow-nfilter
+...@bin bin/flow-print
+...@bin bin/flow-receive
+...@bin bin/flow-report
@comment bin/flow-rpt2rrd
bin/flow-rptfmt
-bin/flow-send
-bin/flow-split
-bin/flow-stat
-bin/flow-tag
-bin/flow-xlate
-include/ftconfig.h
+...@bin bin/flow-send
+...@bin bin/flow-split
+...@bin bin/flow-stat
+...@bin bin/flow-tag
+...@bin bin/flow-xlate
include/ftlib.h
-include/ftpaths.h
include/ftqueue.h
-include/ftradix.h
lib/libft.a
+lib/libft.la
+...@lib lib/libft.so.${LIBft_VERSION}
@man man/man1/flow-capture.1
@man man/man1/flow-cat.1
@man man/man1/flow-dscan.1
Index: nfdump/Makefile
===================================================================
RCS file: /cvs/ports/net/nfdump/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- nfdump/Makefile 30 Apr 2010 11:50:20 -0000 1.3
+++ nfdump/Makefile 3 May 2010 11:52:37 -0000
@@ -4,7 +4,7 @@ COMMENT-main = tools to collect and pro
COMMENT-nfprofile = filters data from nfdump according to profiles
DISTNAME = nfdump-1.5.8
-FULLPKGNAME-main = ${DISTNAME}p0
+FULLPKGNAME-main = ${DISTNAME}p1
FULLPKGNAME-nfprofile = ${DISTNAME:S/nfdump/nfprofile/}
CATEGORIES = net
@@ -22,24 +22,21 @@ WANTLIB = c z
MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=nfdump/}
-CONFIGURE_STYLE = gnu
+CONFIGURE_STYLE = autoconf
+AUTOCONF_VERSION = 2.61
CONFIGURE_ARGS += ${CONFIGURE_SHARED} \
--enable-nfprofile \
- --with-rrdpath=${PREFIX} \
+ --with-rrdpath=${LOCALBASE} \
--enable-ftconv \
- --with-ftpath=${WRKDIR}/flow-tools \
+ --with-ftpath=${LOCALBASE} \
--enable-sflow
MULTI_PACKAGES = -main -nfprofile
+LIB_DEPENDS-main = ft::net/flow-tools
LIB_DEPENDS-nfprofile = rrd:rrdtool-*:net/rrdtool
RUN_DEPENDS-nfprofile = :nfdump-*:net/nfdump,-main
-
-BUILD_DEPENDS += ::net/flow-tools:build
-
-post-extract:
- @ln -sf ${WRKDIR}/net/flow-tools/flow-tools-* ${WRKDIR}/flow-tools
post-install:
@${INSTALL_DATA_DIR} ${PREFIX}/share/doc/nfdump
Index: nfdump/patches/patch-configure_in
===================================================================
RCS file: nfdump/patches/patch-configure_in
diff -N nfdump/patches/patch-configure_in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ nfdump/patches/patch-configure_in 3 May 2010 11:52:37 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- configure.in.orig Sat May 1 15:02:27 2010
++++ configure.in Sat May 1 15:03:26 2010
+@@ -84,7 +84,7 @@ AC_CHECK_LIB(z, zlibVersion,,
+ AC_MSG_ERROR(Link with "-lz" failed! (Need zlib >= 1.0.2))
+ )
+ if test -d "$WHERE_FTPATH"; then
+- if test ! -f "$WHERE_FTPATH/lib/ftlib.h"; then
++ if test ! -f "$WHERE_FTPATH/include/ftlib.h"; then
+ AC_MSG_ERROR(ftlib.h file not found in flow-tools directory
'$WHERE_FTPATH'. Use --with-ftpath=PATH)
+ fi
+ if test ! -f "$WHERE_FTPATH/lib/libft.a"; then
Index: nfdump/patches/patch-ft2nfdump_c
===================================================================
RCS file: nfdump/patches/patch-ft2nfdump_c
diff -N nfdump/patches/patch-ft2nfdump_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ nfdump/patches/patch-ft2nfdump_c 3 May 2010 11:52:37 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+--- ft2nfdump.c.orig Sat May 1 15:07:28 2010
++++ ft2nfdump.c Sat May 1 15:08:03 2010
+@@ -66,7 +66,9 @@
+ #include "nffile.h"
+ #include "launch.h"
+
+-#include "ftbuild.h"
++#define u_int8 u_int8_t
++#define u_int16 u_int16_t
++#define u_int32 u_int32_t
+
+ /* Global defines */
+ #define MAXRECORDS 30
Index: py-flowtools/Makefile
===================================================================
RCS file: /cvs/ports/net/py-flowtools/Makefile,v
retrieving revision 1.6
diff -u -p -r1.6 Makefile
--- py-flowtools/Makefile 28 Mar 2009 16:49:49 -0000 1.6
+++ py-flowtools/Makefile 3 May 2010 11:52:37 -0000
@@ -4,8 +4,9 @@ SHARED_ONLY= Yes
COMMENT= python interface to flow-tools file format
-DISTNAME= pyflowtools-0.3
-PKGNAME= ${DISTNAME:S/pyflow/py-flow/g}p3
+MODPY_EGG_VERSION=0.3.4
+DISTNAME= pyflowtools-${MODPY_EGG_VERSION}
+PKGNAME= ${DISTNAME:S/pyflow/py-flow/g}
CATEGORIES= net
MAINTAINER= Mathieu Sauve-Frankel <[email protected]>
@@ -16,16 +17,18 @@ PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
-MASTER_SITES= http://mail.net.informatik.tu-muenchen.de/~robin/flowtools/
+WANTLIB+= z
+
+HOMEPAGE= http://code.google.com/p/pyflowtools/
+MASTER_SITES= http://pyflowtools.googlecode.com/files/
-BUILD_DEPENDS= ::net/flow-tools
+LIB_DEPENDS= ft::net/flow-tools
MODULES= lang/python
NO_REGRESS= Yes
MODPY_DISTUTILS_BUILD= build_ext
MODPY_DISTUTILS_BUILDARGS=-I${LOCALBASE}/include -L${LOCALBASE}/lib
-WANTLIB+= z
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/py-flowtools
Index: py-flowtools/distinfo
===================================================================
RCS file: /cvs/ports/net/py-flowtools/distinfo,v
retrieving revision 1.2
diff -u -p -r1.2 distinfo
--- py-flowtools/distinfo 5 Apr 2007 16:20:15 -0000 1.2
+++ py-flowtools/distinfo 3 May 2010 11:52:37 -0000
@@ -1,5 +1,5 @@
-MD5 (pyflowtools-0.3.tar.gz) = qSaNWYEq6180wdQaZTXvlQ==
-RMD160 (pyflowtools-0.3.tar.gz) = wuW9p1aU837P9RBib74zmloNuAs=
-SHA1 (pyflowtools-0.3.tar.gz) = Q7TpcuRrUQvT5Kklzf6BYdFueF4=
-SHA256 (pyflowtools-0.3.tar.gz) = +3QDCSg5aAvd42FoIdSem8AT/YNqCao4/NCZJsRMv48=
-SIZE (pyflowtools-0.3.tar.gz) = 12510
+MD5 (pyflowtools-0.3.4.tar.gz) = I1iKsacH1+fRZcgZHxrkwQ==
+RMD160 (pyflowtools-0.3.4.tar.gz) = Hs78PjEI6Hh8q5i906I1NFY/hgQ=
+SHA1 (pyflowtools-0.3.4.tar.gz) = HabC9QChMzKOfa+JA9lRcTjulXc=
+SHA256 (pyflowtools-0.3.4.tar.gz) =
9lNJs8KuEegUS2ugFSE88JTLOAnkj4UFgY7Oc5C53yI=
+SIZE (pyflowtools-0.3.4.tar.gz) = 15388
Index: py-flowtools/pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/py-flowtools/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 PLIST
--- py-flowtools/pkg/PLIST 13 Apr 2005 15:06:37 -0000 1.1.1.1
+++ py-flowtools/pkg/PLIST 3 May 2010 11:52:37 -0000
@@ -1,5 +1,6 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2005/04/13 15:06:37 msf Exp $
bin/flowprint-full
lib/python${MODPY_VERSION}/site-packages/flowtools.so
+lib/python${MODPY_VERSION}/site-packages/pyflowtools-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info
share/examples/py-flowtools/
share/examples/py-flowtools/example.py