ports/73285: flow-tools port improvements
Yuri Y.Bushmelev
jay-dev at simcom.ru
Fri Oct 29 13:10:27 UTC 2004
>Number: 73285
>Category: ports
>Synopsis: flow-tools port improvements
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Fri Oct 29 13:10:26 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: Yuri Y. Bushmelev
>Release: FreeBSD 5.2-CURRENT i386
>Organization:
SimCom LLC, ISP "Simbirsk Communications"
>Environment:
System: FreeBSD xeon.simcom.ru 5.2-CURRENT FreeBSD 5.2-CURRENT #3: Tue Aug 10 20:26:21 MSD 2004 jay at xeon.simcom.ru:/local/obj/local/src/sys/XEON i386
postgresql-7.4.5 installed from ports
flow-tools-0.67 from ports
>Description:
1. Flow-tools can export flows data to postgresql and mysql databases. But port has no this functionality. I fix it with following patches.
NOTE: mysql functionality has not been tested - I have no mysql right now. Sorry.
2. Also fixed small bug in flow-tools, when making flow-export shows error about variable 'debug'. See following patches for details.
>How-To-Repeat:
cd /usr/ports/net-mgmt/flow-tools && make
>Fix:
Patches start here:
====== /usr/ports/net-mgmt/flow-tools/Makefile patch ======
--- Makefile.orig Fri Oct 29 16:08:11 2004
+++ Makefile Fri Oct 29 16:09:54 2004
@@ -25,6 +25,14 @@
flow-tag.1 flow-tools.1 flow-tools-examples.1 \
flow-xlate.1
+.if defined(WITH_PGSQL)
+CONFIGURE_ARGS+=--with-pgsql=${PREFIX}
+.endif
+
+.if defined(WITH_MYSQL)
+CONFIGURE_ARGS+=--with-mysql=${PREFIX}
+.endif
+
post-patch:
${TOUCH} -r ${WRKSRC}/configure.in.orig ${WRKSRC}/configure.in
${REINPLACE_CMD}\
====== end of patch ======
====== /usr/ports/net-mgmt/flow-tools/files/patch-configure-pgsql patch ======
--- configure.orig Fri Oct 29 15:07:41 2004
+++ configure Fri Oct 29 15:11:21 2004
@@ -3279,7 +3279,7 @@
fi
if test "x$WHERE_PGSQL" != "x"; then
- LIBS="-L$WHERE_PGSQL/lib/pgsql"
+ LIBS="-L$WHERE_PGSQL/lib"
echo "$as_me:$LINENO: checking for PQsetdbLogin in -lpq" >&5
echo $ECHO_N "checking for PQsetdbLogin in -lpq... $ECHO_C" >&6
if test "${ac_cv_lib_pq_PQsetdbLogin+set}" = set; then
@@ -3336,7 +3336,7 @@
echo "${ECHO_T}$ac_cv_lib_pq_PQsetdbLogin" >&6
if test $ac_cv_lib_pq_PQsetdbLogin = yes; then
- PGSQLCFLAGS="-L$WHERE_PGSQL/lib -I$WHERE_PGSQL/include/pgsql"
+ PGSQLCFLAGS="-L$WHERE_PGSQL/lib -I$WHERE_PGSQL/include"
PGSQLLIB="-lpq"
cat >>confdefs.h <<\_ACEOF
#define HAVE_PGSQL 1
====== end of patch ======
====== /usr/ports/net-mgmt/flow-tools/files/patch-flow-export.c patch ======
--- flow-export.c.orig Fri Oct 29 16:23:01 2004
+++ flow-export.c Fri Oct 29 16:23:15 2004
@@ -115,13 +115,14 @@
struct jump format[] = {{format0}, {format1}, {format2}, {format3},
{format4}, {format5}};
+int debug=0;
+
int main(int argc, char **argv)
{
int i, format_index, ret, ascii_mask;
struct ftio ftio;
struct ftprof ftp;
struct options opt;
- int debug;
/* init fterr */
fterr_setid(argv[0]);
====== end of patch ======
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list