From 23f00c57e0597a10cc2e14606d2b1b90478597a0 Mon Sep 17 00:00:00 2001 From: Paul P Komkoff Jr Date: Thu, 20 Oct 2005 13:22:14 +0000 Subject: [PATCH 01/12] Update FC3 and FC4 versions --- flow-tools.spec | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/flow-tools.spec b/flow-tools.spec index 2ef2b84..b86848c 100644 --- a/flow-tools.spec +++ b/flow-tools.spec @@ -1,14 +1,14 @@ Version: 0.68 Name: flow-tools Summary: Tool set for working with NetFlow data -Release: 2%{?dist} +Release: 4%{?dist} Group: Applications/System License: BSD URL: http://www.splintered.net/sw/flow-tools/ Source0: ftp://ftp.eng.oar.net/pub/flow-tools/flow-tools-%{version}.tar.gz Patch0: flow-tools-0.68a.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: openssl-devel mysql-devel postgresql-devel autoconf +BuildRequires: openssl-devel mysql-devel postgresql-devel autoconf zlib-devel %description Flow-tools is library and a collection of programs used to collect, @@ -22,7 +22,7 @@ contributed and are included in the distribution. %package devel Summary: Development files for flow-tools Group: Development/Libraries -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} zlib-devel %description devel Flow-tools is library and a collection of programs used to collect, @@ -77,6 +77,13 @@ rm -rf $RPM_BUILD_ROOT %{_includedir}/*.h %changelog +* Thu Oct 20 2005 Paul P Komkoff Jr 0.68-4 +- Fix accidential damage + +* Wed Oct 19 2005 Paul P Komkoff Jr 0.68-3 +- add zlib-devel to build-requires of main package and to + requires of -devel package + * Tue Sep 6 2005 Tom "spot" Callaway 0.68-2 - simplify %%files - use more macros From b55277026533b0d01ddd396ab3f07888ddc30993 Mon Sep 17 00:00:00 2001 From: Paul P Komkoff Jr Date: Mon, 31 Oct 2005 21:11:37 +0000 Subject: [PATCH 02/12] Fix flow-capture segfaults on platforms with 64bit time_t --- flow-tools-0.68b.patch | 40 ++++++++++++++++++++++++++++++++++++++++ flow-tools.spec | 7 ++++++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 flow-tools-0.68b.patch diff --git a/flow-tools-0.68b.patch b/flow-tools-0.68b.patch new file mode 100644 index 0000000..5b6ab3e --- /dev/null +++ b/flow-tools-0.68b.patch @@ -0,0 +1,40 @@ +diff -urN flow-tools-0.68/lib/ftfile.c flow-tools-0.68.a/lib/ftfile.c +--- flow-tools-0.68/lib/ftfile.c 2003-02-13 05:38:42.000000000 +0300 ++++ flow-tools-0.68.a/lib/ftfile.c 2005-10-30 00:27:33.000000000 +0400 +@@ -413,16 +413,17 @@ + int done, u_int32 ftime) + { + struct tm *tm; ++ time_t _t = (time_t) ftime; + char *prefix, dbuf[64]; + long gmt_val; + char gmt_sign; + int tm_gmtoff; + +- if (!(tm = localtime ((time_t*)&ftime))) { ++ if (!(tm = localtime (&_t))) { + snprintf(buf, bsize, "."); + } + +- tm_gmtoff = get_gmtoff(ftime); ++ tm_gmtoff = get_gmtoff(_t); + + /* compute GMT offset */ + if (tm_gmtoff >= 0) { +@@ -502,6 +503,7 @@ + int ftfile_mkpath(u_int32 ftime, int nest) + { + struct tm *tm; ++ time_t _t = (time_t) ftime; + char buf[32]; + + /* no directories */ +@@ -512,7 +514,7 @@ + if ((nest > 3) || (nest < -3)) + return -1; + +- if (!(tm = localtime ((time_t*)&ftime))) ++ if (!(tm = localtime (&_t))) + return -1; + + if (nest == -1) diff --git a/flow-tools.spec b/flow-tools.spec index b86848c..3e0f344 100644 --- a/flow-tools.spec +++ b/flow-tools.spec @@ -1,12 +1,13 @@ Version: 0.68 Name: flow-tools Summary: Tool set for working with NetFlow data -Release: 4%{?dist} +Release: 5%{?dist} Group: Applications/System License: BSD URL: http://www.splintered.net/sw/flow-tools/ Source0: ftp://ftp.eng.oar.net/pub/flow-tools/flow-tools-%{version}.tar.gz Patch0: flow-tools-0.68a.patch +Patch1: flow-tools-0.68b.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: openssl-devel mysql-devel postgresql-devel autoconf zlib-devel @@ -39,6 +40,7 @@ libft. %prep %setup -q %patch -p1 +%patch1 -p1 %build autoreconf -f -i -s @@ -77,6 +79,9 @@ rm -rf $RPM_BUILD_ROOT %{_includedir}/*.h %changelog +* Sun Oct 30 2005 Paul P Komkoff Jr 0.68-5 +- Fix flow-capture segfaults on platforms with 64bit time_t + * Thu Oct 20 2005 Paul P Komkoff Jr 0.68-4 - Fix accidential damage From e662f13d4c99eceec8465fd1c3b0c616f2b2a9ae Mon Sep 17 00:00:00 2001 From: Paul P Komkoff Jr Date: Sun, 18 Jun 2006 16:12:22 +0000 Subject: [PATCH 03/12] Split patches in more convenient way (and bug upstream) Fix 2 unitialized variable bugs --- ...irst-line-of-included-python-scripts.patch | 48 ++ ...d-lvalue-in-assignment-compile-error.patch | 189 ++++++++ ...8-0003-Avoid-external-debug-variable.patch | 31 ++ ...ant-and-buildable-by-newer-toolchain.patch | 236 ++++++++++ ...0005-Fix-breakage-on-64bit-platforms.patch | 58 +++ ...ix-unitialized-variable-in-flow-send.patch | 30 ++ ...-Add-extra-debugging-to-ftpdu_verify.patch | 63 +++ ...nitialized-variable-in-flow-export.c.patch | 31 ++ flow-tools-0.68a.patch | 414 ------------------ flow-tools-0.68b.patch | 40 -- flow-tools.spec | 33 +- 11 files changed, 714 insertions(+), 459 deletions(-) create mode 100644 flow-tools-0.68-0001-Fix-first-line-of-included-python-scripts.patch create mode 100644 flow-tools-0.68-0002-Fix-an-invalid-lvalue-in-assignment-compile-error.patch create mode 100644 flow-tools-0.68-0003-Avoid-external-debug-variable.patch create mode 100644 flow-tools-0.68-0004-Make-flow-tools-more-FHS-compliant-and-buildable-by-newer-toolchain.patch create mode 100644 flow-tools-0.68-0005-Fix-breakage-on-64bit-platforms.patch create mode 100644 flow-tools-0.68-0006-Fix-unitialized-variable-in-flow-send.patch create mode 100644 flow-tools-0.68-0007-Add-extra-debugging-to-ftpdu_verify.patch create mode 100644 flow-tools-0.68-0008-Fix-unitialized-variable-in-flow-export.c.patch delete mode 100644 flow-tools-0.68a.patch delete mode 100644 flow-tools-0.68b.patch diff --git a/flow-tools-0.68-0001-Fix-first-line-of-included-python-scripts.patch b/flow-tools-0.68-0001-Fix-first-line-of-included-python-scripts.patch new file mode 100644 index 0000000..19e5c3b --- /dev/null +++ b/flow-tools-0.68-0001-Fix-first-line-of-included-python-scripts.patch @@ -0,0 +1,48 @@ +From nobody Mon Sep 17 00:00:00 2001 +From: Paul P Komkoff Jr +Date: Sat, 10 Jun 2006 20:45:55 +0400 +Subject: [PATCH 1/8] Fix first line of included python scripts. + +We need to do this to allow execution on FHS-compliant systems. + +--- + + bin/flow-log2rrd | 2 +- + bin/flow-rpt2rrd | 2 +- + bin/flow-rptfmt | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +250b73e99e719fdeb26140e7f8ebab68963e243b +diff --git a/bin/flow-log2rrd b/bin/flow-log2rrd +index 0567ba5..db4fdda 100755 +--- a/bin/flow-log2rrd ++++ b/bin/flow-log2rrd +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/python ++#!/bin/env python + + import getopt + import os +diff --git a/bin/flow-rpt2rrd b/bin/flow-rpt2rrd +index 72a74c7..7698f2b 100755 +--- a/bin/flow-rpt2rrd ++++ b/bin/flow-rpt2rrd +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/python ++#!/bin/env python + + import getopt + import os +diff --git a/bin/flow-rptfmt b/bin/flow-rptfmt +index 047d1ba..f663fae 100755 +--- a/bin/flow-rptfmt ++++ b/bin/flow-rptfmt +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/python ++#!/bin/env python + + import sys + import string +-- +1.3.3 + diff --git a/flow-tools-0.68-0002-Fix-an-invalid-lvalue-in-assignment-compile-error.patch b/flow-tools-0.68-0002-Fix-an-invalid-lvalue-in-assignment-compile-error.patch new file mode 100644 index 0000000..6ec8037 --- /dev/null +++ b/flow-tools-0.68-0002-Fix-an-invalid-lvalue-in-assignment-compile-error.patch @@ -0,0 +1,189 @@ +From nobody Mon Sep 17 00:00:00 2001 +From: Paul P Komkoff Jr +Date: Sat, 10 Jun 2006 20:49:45 +0400 +Subject: [PATCH 2/8] Fix an "invalid lvalue in assignment" compile error. + +--- + + lib/ftchash.c | 2 +- + lib/ftio.c | 4 ++-- + lib/ftlib.h | 3 ++- + lib/fttlv.c | 34 +++++++++++++++++----------------- + lib/support.c | 5 +++++ + 5 files changed, 27 insertions(+), 21 deletions(-) + +075301dae1b92110e6cc339b0df88b7fc82c31a6 +diff --git a/lib/ftchash.c b/lib/ftchash.c +index 9cc7efa..28bafbf 100644 +--- a/lib/ftchash.c ++++ b/lib/ftchash.c +@@ -326,7 +326,7 @@ void *ftchash_foreach(struct ftchash *ft + (char*)ftch->traverse_chunk->base+ftch->traverse_chunk->next) { + + ret = ftch->traverse_rec; +- (char*)ftch->traverse_rec += ftch->d_size; ++ ftch->traverse_rec = vpadd(ftch->traverse_rec, ftch->d_size); + return ret; + + } else { +diff --git a/lib/ftio.c b/lib/ftio.c +index f6c739c..1082416 100644 +--- a/lib/ftio.c ++++ b/lib/ftio.c +@@ -2267,7 +2267,7 @@ int readn(register int fd, register void + break; + + nleft -= nread; +- (char*)ptr += nread; ++ ptr = vpadd(ptr, nread); + } + return (nbytes - nleft); + } /* readn */ +@@ -2292,7 +2292,7 @@ int writen(register int fd, register voi + return(nwritten); /* error */ + + nleft -= nwritten; +- (char*)ptr += nwritten; ++ ptr = vpadd(ptr,nwritten); + } + return(nbytes - nleft); + } /* writen */ +diff --git a/lib/ftlib.h b/lib/ftlib.h +index f91ad0a..66bf2f3 100644 +--- a/lib/ftlib.h ++++ b/lib/ftlib.h +@@ -152,7 +152,6 @@ #define FT_PDU_V8_11_MAXFLOWS 44 /* max + #define FT_PDU_V8_12_MAXFLOWS 44 /* max records in V8 DST_PREFIX_TOS packet */ + #define FT_PDU_V8_13_MAXFLOWS 35 /* max records in V8 PREFIX_TOS packet */ + #define FT_PDU_V8_14_MAXFLOWS 35 /* max records in V8 PREFIX_PORT_TOS packet */ +- + #define FT_PDU_V8_1_VERSION 2 /* version of AS packet */ + #define FT_PDU_V8_2_VERSION 2 /* version of PROTO PORT packet */ + #define FT_PDU_V8_3_VERSION 2 /* version of SRC PREFIX packet */ +@@ -3029,6 +3028,8 @@ #ifndef IN_CLASSD_SSM + #define IN_CLASSD_SSM(i) (((u_int32_t)(i) & 0xff000000) == 0xe8000000) + #endif /* IN_CLASSD_SSM */ + ++void *vpadd(const void* v, const int change); ++ + /* MACHINE DEPENDANT */ + #define fmt_uint fmt_uint32 + +diff --git a/lib/fttlv.c b/lib/fttlv.c +index 7035813..330a783 100644 +--- a/lib/fttlv.c ++++ b/lib/fttlv.c +@@ -68,10 +68,10 @@ int fttlv_enc_uint32(void *buf, int buf_ + } + + bcopy(&t, buf, 2); +- (char*)buf+= 2; ++ buf = vpadd(buf, 2); + + bcopy(&len, buf, 2); +- (char*)buf+= 2; ++ buf = vpadd(buf, 2); + + bcopy(&v, buf, 4); + +@@ -107,10 +107,10 @@ int fttlv_enc_uint16(void *buf, int buf_ + } + + bcopy(&t, buf, 2); +- (char*)buf+= 2; ++ buf = vpadd(buf, 2); + + bcopy(&len, buf, 2); +- (char*)buf+= 2; ++ buf = vpadd(buf, 2); + + bcopy(&v, buf, 2); + +@@ -145,10 +145,10 @@ int fttlv_enc_uint8(void *buf, int buf_s + } + + bcopy(&t, buf, 2); +- (char*)buf+= 2; ++ buf = vpadd(buf, 2); + + bcopy(&len, buf, 2); +- (char*)buf+= 2; ++ buf = vpadd(buf, 2); + + bcopy(&v, buf, 1); + +@@ -183,10 +183,10 @@ int fttlv_enc_str(void *buf, int buf_siz + } + + bcopy(&t, buf, 2); +- (char*)buf+= 2; ++ buf = vpadd(buf, 2); + + bcopy(&len, buf, 2); +- (char*)buf+= 2; ++ buf = vpadd(buf, 2); + + bcopy(v, buf, len); + +@@ -230,16 +230,16 @@ int fttlv_enc_ifname(void *buf, int buf_ + return -1; + + bcopy(&t, buf, 2); +- (char*)buf+= 2; ++ buf = vpadd(buf, 2); + + bcopy(&len, buf, 2); +- (char*)buf+= 2; ++ buf = vpadd(buf, 2); + + bcopy(&ip, buf, 4); +- (char*)buf += 4; ++ buf = vpadd(buf, 4); + + bcopy(&ifIndex, buf, 2); +- (char*)buf += 2; ++ buf = vpadd(buf, 2); + + bcopy(name, buf, n); + +@@ -287,19 +287,19 @@ int fttlv_enc_ifalias(void *buf, int buf + } + + bcopy(&t, buf, 2); +- (char*)buf+= 2; ++ buf = vpadd(buf, 2); + + bcopy(&len, buf, 2); +- (char*)buf+= 2; ++ buf = vpadd(buf, 2); + + bcopy(&ip, buf, 4); +- (char*)buf += 4; ++ buf = vpadd(buf, 4); + + bcopy(&entries, buf, 2); +- (char*)buf += 2; ++ buf = vpadd(buf, 2); + + bcopy(ifIndex_list, buf, esize); +- (char*)buf += esize; ++ buf = vpadd(buf, esize); + + bcopy(name, buf, n); + +diff --git a/lib/support.c b/lib/support.c +index a32ffe7..2e1db9f 100644 +--- a/lib/support.c ++++ b/lib/support.c +@@ -736,3 +736,8 @@ int udp_cksum(struct ip *ip, struct udph + return sum; + } /* udp_cksum */ + ++// void pointer add ++ ++void * vpadd(const void *v, const int change) { ++ return (void *) (((char*) v) + change); ++} +-- +1.3.3 + diff --git a/flow-tools-0.68-0003-Avoid-external-debug-variable.patch b/flow-tools-0.68-0003-Avoid-external-debug-variable.patch new file mode 100644 index 0000000..906b9db --- /dev/null +++ b/flow-tools-0.68-0003-Avoid-external-debug-variable.patch @@ -0,0 +1,31 @@ +From nobody Mon Sep 17 00:00:00 2001 +From: Paul P Komkoff Jr +Date: Sat, 10 Jun 2006 20:51:50 +0400 +Subject: [PATCH 3/8] Avoid external "debug" variable. + +When buildinf flow-tools as bunch of binaries depending on shared library, +extern int debug shows in too much places. Disable it for now until better +solution will be developed. + +--- + + lib/ftfile.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +1707e321511feb9b7cb117fb6be4d8bcfa8996de +diff --git a/lib/ftfile.c b/lib/ftfile.c +index 2f3ae76..f25e849 100644 +--- a/lib/ftfile.c ++++ b/lib/ftfile.c +@@ -53,7 +53,7 @@ #endif + + int load_dir(char *prefix, struct ftfile_entries *fte, int flags, int *depth); + +-extern int debug; ++#define debug 0 + + /* + * function: ftfile_entry_new +-- +1.3.3 + diff --git a/flow-tools-0.68-0004-Make-flow-tools-more-FHS-compliant-and-buildable-by-newer-toolchain.patch b/flow-tools-0.68-0004-Make-flow-tools-more-FHS-compliant-and-buildable-by-newer-toolchain.patch new file mode 100644 index 0000000..d574f1b --- /dev/null +++ b/flow-tools-0.68-0004-Make-flow-tools-more-FHS-compliant-and-buildable-by-newer-toolchain.patch @@ -0,0 +1,236 @@ +From nobody Mon Sep 17 00:00:00 2001 +From: Paul P Komkoff Jr +Date: Sat, 10 Jun 2006 20:53:33 +0400 +Subject: [PATCH 4/8] Make flow-tools more FHS-compliant and buildable by newer toolchain. + +Here we are switching to new toolchain (autoconf, automake & libtool), +changing some paths (obviously config files should be put in sysconfdir - +usually etc - and not in localstatedir which is var) + +--- + + configs/Makefile.am | 4 ++-- + configure.in | 45 ++++++++++++++++++++++++++++++--------------- + lib/Makefile.am | 10 +++++----- + lib/ftpaths.h.in | 22 +++++++++++----------- + src/Makefile.am | 12 ++++++------ + 5 files changed, 54 insertions(+), 39 deletions(-) + +b03c8b4e55c5f6082ff427559ae5a8bc3e95b8f0 +diff --git a/configs/Makefile.am b/configs/Makefile.am +index 9b06b52..6ca85cc 100644 +--- a/configs/Makefile.am ++++ b/configs/Makefile.am +@@ -1,6 +1,6 @@ +-ftsymdir=$(localstatedir)/sym ++ftsymdir=$(sysconfdir)/sym + ftsym_DATA = ip-prot.sym ip-type.sym tcp-port.sym asn.sym tag.sym + +-ftcfgdir=$(localstatedir)/cfg ++ftcfgdir=$(sysconfdir)/cfg + ftcfg_DATA = map.cfg tag.cfg filter.cfg stat.cfg mask.cfg xlate.cfg + +diff --git a/configure.in b/configure.in +index 01987e8..597bbbd 100644 +--- a/configure.in ++++ b/configure.in +@@ -1,31 +1,32 @@ + dnl Process this file with autoconf to produce a configure script. +-AC_INIT(lib/bit1024.c) ++AC_INIT(flow-tools, 0.68) + +-AC_PREFIX_DEFAULT(/usr/local/netflow) ++AC_PREFIX_DEFAULT(/usr/local/flow-tools) + +-AM_INIT_AUTOMAKE(flow-tools, 0.68) +-AM_CONFIG_HEADER(lib/ftconfig.h:lib/ftconfig.h.in) ++AM_INIT_AUTOMAKE ++AM_CONFIG_HEADER(lib/ftconfig.h) + +-CFLAGS="-g -Wall" ++dnl CFLAGS="-g -Wall" + + dnl Checks for programs. ++AC_PROG_LIBTOOL + AC_PROG_CC + AC_PROG_INSTALL + AC_PROG_MAKE_SET + AC_PROG_YACC + YACC="$YACC -d" +-AC_PROG_RANLIB + AM_PROG_LEX + + AC_SUBST(YLIB) + AC_SUBST(MYSQLLIB) + AC_SUBST(MYSQLCFLAGS) +-AC_SUBST(MYSQLINCLUDE) ++AC_SUBST(MYSQLLDFLAGS) + AC_SUBST(PGSQLLIB) + AC_SUBST(PGSQLCFLAGS) +-AC_SUBST(PGSQLINCLUDE) ++AC_SUBST(PGSQLLDFLAGS) + AC_SUBST(CRYPTOLIB) + AC_SUBST(OPENSSLINCLUDE) ++AC_SUBST(OPENSSLLDFLAGS) + + dnl extra argument: --with-mysql + WITH_MYSQL= +@@ -66,37 +67,51 @@ AC_ARG_WITH(openssl, + dnl Checks for libraries. + + if test "x$WHERE_MYSQL" != "x"; then +- LIBS="-L$WHERE_MYSQL/lib/mysql" ++ old_LIBS="$LIBS" ++ old_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -L$WHERE_MYSQL/lib/mysql" + AC_CHECK_LIB(mysqlclient, my_init, + [ +- MYSQLCFLAGS="-L$WHERE_MYSQL/lib/mysql -I$WHERE_MYSQL/include/mysql" ++ MYSQLCFLAGS="-I$WHERE_MYSQL/include/mysql" ++ MYSQLLDFLAGS="-L$WHERE_MYSQL/lib/mysql" + MYSQLLIB="-lmysqlclient" + AC_DEFINE(HAVE_MYSQL) + ] + ) ++ LIBS="$old_LIBS" ++ LDFLAGS="$old_LDFLAGS" + fi + + if test "x$WHERE_OPENSSL" != "x"; then +- LIBS="-L$WHERE_OPENSSL/lib" ++ old_LIBS="$LIBS" ++ old_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -L$WHERE_OPENSSL/lib" + AC_CHECK_LIB(crypto, EVP_EncryptUpdate, + [ +- OPENSSLCFLAGS="-L$WHERE_OPENSSL/lib -I$WHERE_OPENSSL/include" ++ OPENSSLCFLAGS="-I$WHERE_OPENSSL/include" ++ OPENSSLLDFLAGS="-L$WHERE_OPENSSL/lib" + CRYPTOLIB="-lcrypto" + AC_DEFINE(HAVE_OPENSSL) + ] + ) ++ LIBS="$old_LIBS" ++ LDFLAGS="$old_LDFLAGS" + fi + +- + if test "x$WHERE_PGSQL" != "x"; then +- LIBS="-L$WHERE_PGSQL/lib/pgsql" ++ old_LIBS="$LIBS" ++ old_LDFLAGS="$LDFLAGS" ++ LDFLAGS="-L$WHERE_PGSQL/lib/pgsql" + AC_CHECK_LIB(pq, PQsetdbLogin, + [ +- PGSQLCFLAGS="-L$WHERE_PGSQL/lib -I$WHERE_PGSQL/include/pgsql" ++ PGSQLCFLAGS="-I$WHERE_PGSQL/include/pgsql" ++ PGSQLLDFLAGS="-L$WHERE_PGSQL/lib" + PGSQLLIB="-lpq" + AC_DEFINE(HAVE_PGSQL) + ] + ) ++ LIBS="$old_LIBS" ++ LDFLAGS="$old_LDFLAGS" + fi + + AC_CHECK_LIB(y, main,YLIB="$YLIB -ly",) +diff --git a/lib/Makefile.am b/lib/Makefile.am +index 08e684a..5a4727b 100644 +--- a/lib/Makefile.am ++++ b/lib/Makefile.am +@@ -2,17 +2,17 @@ ## Process this file with automake to pr + + #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 + +-DEFS=-I. -I$(srcdir)/lib ++#DEFS=-I. -I$(srcdir)/lib + + include_HEADERS = ftlib.h ftqueue.h radix.h ftpaths.h ftconfig.h +-lib_LIBRARIES = libft.a ++lib_LTLIBRARIES = libft.la + +-libft_a_SOURCES = ftio.c ftswap.c ftencode.c ftdecode.c ftprof.c bit1024.c \ ++libft_la_SOURCES = ftio.c ftswap.c ftencode.c ftdecode.c ftprof.c bit1024.c \ + fmt.c support.c ftfile.c fttlv.c ftmap.c ftrec.c fterr.c \ + ftchash.c ftsym.c radix.c fttag.c ftfil.c ftstat.c getdate.c ftxfield.c\ + ftmask.c ftvar.c ftxlate.c + +-libft_a_LIBADD = @LIBOBJS@ ++libft_la_LIBADD = $(LTLIBOBJS) $(CRYPTOLIB) + +diff --git a/lib/ftpaths.h.in b/lib/ftpaths.h.in +index ae8e30a..b0c91b1 100644 +--- a/lib/ftpaths.h.in ++++ b/lib/ftpaths.h.in +@@ -29,17 +29,17 @@ + #ifndef FTPATHS_H + #define FTPATHS_H + +-#define FT_PATH_CFG_MAP "@localstatedir@/cfg/map.cfg" +-#define FT_PATH_CFG_TAG "@localstatedir@/cfg/tag.cfg" +-#define FT_PATH_CFG_FILTER "@localstatedir@/cfg/filter.cfg" +-#define FT_PATH_CFG_STAT "@localstatedir@/cfg/stat.cfg" +-#define FT_PATH_CFG_MASK "@localstatedir@/cfg/mask.cfg" +-#define FT_PATH_CFG_XLATE "@localstatedir@/cfg/xlate.cfg" ++#define FT_PATH_CFG_MAP "@sysconfdir@/cfg/map.cfg" ++#define FT_PATH_CFG_TAG "@sysconfdir@/cfg/tag.cfg" ++#define FT_PATH_CFG_FILTER "@sysconfdir@/cfg/filter.cfg" ++#define FT_PATH_CFG_STAT "@sysconfdir@/cfg/stat.cfg" ++#define FT_PATH_CFG_MASK "@sysconfdir@/cfg/mask.cfg" ++#define FT_PATH_CFG_XLATE "@sysconfdir@/cfg/xlate.cfg" + +-#define FT_PATH_SYM_IP_PROT "@localstatedir@/sym/ip-prot.sym" +-#define FT_PATH_SYM_IP_TYPE "@localstatedir@/sym/ip-type.sym" +-#define FT_PATH_SYM_TCP_PORT "@localstatedir@/sym/tcp-port.sym" +-#define FT_PATH_SYM_ASN "@localstatedir@/sym/asn.sym" +-#define FT_PATH_SYM_TAG "@localstatedir@/sym/tag.sym" ++#define FT_PATH_SYM_IP_PROT "@sysconfdir@/sym/ip-prot.sym" ++#define FT_PATH_SYM_IP_TYPE "@sysconfdir@/sym/ip-type.sym" ++#define FT_PATH_SYM_TCP_PORT "@sysconfdir@/sym/tcp-port.sym" ++#define FT_PATH_SYM_ASN "@sysconfdir@/sym/asn.sym" ++#define FT_PATH_SYM_TAG "@sysconfdir@/sym/tag.sym" + + #endif /* FTPATHS_H */ +diff --git a/src/Makefile.am b/src/Makefile.am +index c5ac63b..f85f427 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -7,7 +7,7 @@ DEFS=-I$(srcdir)/../lib -L$(srcdir)/../l + + #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 + + bin_PROGRAMS = flow-capture flow-cat flow-stat flow-print flow-dscan \ + flow-send flow-receive flow-gen flow-expire \ +@@ -101,9 +101,9 @@ flow_filter_LDADD = -lft @LEXLIB@ @YLIB + flow_filter_DEPENDENCIES = ftbuild.h + + flow_export_SOURCES = flow-export.c +-flow_export_LDFLAGS = -L../lib +-flow_export_CFLAGS = @MYSQLCFLAGS@ @PGSQLCFLAGS@ +-flow_export_LDADD = -lft @MYSQLLIB@ @PGSQLLIB@ ++flow_export_LDFLAGS = -L../lib $(MYSQLLDFLAGS) $(PGSQLLDFLAGS) ++flow_export_CFLAGS = $(MYSQLCFLAGS) $(PGSQLCFLAGS) ++flow_export_LDADD = -lft $(MYSQLLIB) $(PGSQLLIB) + flow_export_DEPENDENCIES = ftbuild.h + + flow_header_SOURCES = flow-header.c +@@ -117,8 +117,8 @@ flow_split_LDADD = -lft + flow_split_DEPENDENCIES = ftbuild.h + + flow_xlate_SOURCES = flow-xlate.c +-flow_xlate_LDFLAGS = -L../lib +-flow_xlate_LDADD = -lft @CRYPTOLIB@ ++flow_xlate_LDFLAGS = -L../lib $(CRYPTOLDFLAGS) ++flow_xlate_LDADD = -lft $(CRYPTOLIB) + flow_xlate_DEPENDENCIES = ftbuild.h + + flow_tag_SOURCES = flow-tag.c +-- +1.3.3 + diff --git a/flow-tools-0.68-0005-Fix-breakage-on-64bit-platforms.patch b/flow-tools-0.68-0005-Fix-breakage-on-64bit-platforms.patch new file mode 100644 index 0000000..e48579c --- /dev/null +++ b/flow-tools-0.68-0005-Fix-breakage-on-64bit-platforms.patch @@ -0,0 +1,58 @@ +From nobody Mon Sep 17 00:00:00 2001 +From: Paul P Komkoff Jr +Date: Sat, 10 Jun 2006 20:55:20 +0400 +Subject: [PATCH 5/8] Fix breakage on 64bit platforms. + +Due to variable size differences it is nesessary to create temporary +variable of type time_t to hold the time. + +--- + + lib/ftfile.c | 8 +++++--- + 1 files changed, 5 insertions(+), 3 deletions(-) + +bc0750fd6719d64377e578373ad4325e1440eb6a +diff --git a/lib/ftfile.c b/lib/ftfile.c +index f25e849..ec17771 100644 +--- a/lib/ftfile.c ++++ b/lib/ftfile.c +@@ -413,16 +413,17 @@ void ftfile_pathname(char *buf, int bsiz + int done, u_int32 ftime) + { + struct tm *tm; ++ time_t _t = (time_t) ftime; + char *prefix, dbuf[64]; + long gmt_val; + char gmt_sign; + int tm_gmtoff; + +- if (!(tm = localtime ((time_t*)&ftime))) { ++ if (!(tm = localtime (&_t))) { + snprintf(buf, bsize, "."); + } + +- tm_gmtoff = get_gmtoff(ftime); ++ tm_gmtoff = get_gmtoff(_t); + + /* compute GMT offset */ + if (tm_gmtoff >= 0) { +@@ -502,6 +503,7 @@ void ftfile_pathname(char *buf, int bsiz + int ftfile_mkpath(u_int32 ftime, int nest) + { + struct tm *tm; ++ time_t _t = (time_t) ftime; + char buf[32]; + + /* no directories */ +@@ -512,7 +514,7 @@ int ftfile_mkpath(u_int32 ftime, int nes + if ((nest > 3) || (nest < -3)) + return -1; + +- if (!(tm = localtime ((time_t*)&ftime))) ++ if (!(tm = localtime (&_t))) + return -1; + + if (nest == -1) +-- +1.3.3 + diff --git a/flow-tools-0.68-0006-Fix-unitialized-variable-in-flow-send.patch b/flow-tools-0.68-0006-Fix-unitialized-variable-in-flow-send.patch new file mode 100644 index 0000000..7cdfb09 --- /dev/null +++ b/flow-tools-0.68-0006-Fix-unitialized-variable-in-flow-send.patch @@ -0,0 +1,30 @@ +From nobody Mon Sep 17 00:00:00 2001 +From: Paul P Komkoff Jr +Date: Sat, 10 Jun 2006 20:57:01 +0400 +Subject: [PATCH 6/8] Fix unitialized variable in flow-send + +Variable hdr_len in flow-send.c was not initialized prior to usage in case +we aren't using spoofing. Fixed. + +--- + + src/flow-send.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +e9825a203d8b36576c8b8e92b4ab0ceb74cd0b05 +diff --git a/src/flow-send.c b/src/flow-send.c +index 83ca926..ad87024 100644 +--- a/src/flow-send.c ++++ b/src/flow-send.c +@@ -76,7 +76,7 @@ int main(int argc, char **argv) + u_int32 privacy_mask; + unsigned int v1, v2, one; + int i, n, ret, tx_delay, udp_sock; +- int src_ip_spoof, hdr_len; ++ int src_ip_spoof, hdr_len = 0; + void *rec; + + /* init fterr */ +-- +1.3.3 + diff --git a/flow-tools-0.68-0007-Add-extra-debugging-to-ftpdu_verify.patch b/flow-tools-0.68-0007-Add-extra-debugging-to-ftpdu_verify.patch new file mode 100644 index 0000000..3941844 --- /dev/null +++ b/flow-tools-0.68-0007-Add-extra-debugging-to-ftpdu_verify.patch @@ -0,0 +1,63 @@ +From nobody Mon Sep 17 00:00:00 2001 +From: Ben Feinstein +Date: Sat, 10 Jun 2006 20:59:13 +0400 +Subject: [PATCH 7/8] Add extra debugging to ftpdu_verify() + +--- + + lib/ftdecode.c | 16 +++++++++++++--- + 1 files changed, 13 insertions(+), 3 deletions(-) + +6c73ed47b26944f97fa8d5cfed1719b8146c124a +diff --git a/lib/ftdecode.c b/lib/ftdecode.c +index ff6b0cf..8884db9 100644 +--- a/lib/ftdecode.c ++++ b/lib/ftdecode.c +@@ -122,8 +122,10 @@ int ftpdu_verify(struct ftpdu *ftpdu) + ret = -1; + + /* enough bytes to decode the count and version? */ +- if (ftpdu->bused < 4) ++ if (ftpdu->bused < 4) { ++ fterr_warnx("not enough bytes to decode the count and version."); + goto ftpdu_verify_out_quick; ++ } + + ph = (struct ftpdu_header*)&ftpdu->buf; + +@@ -158,15 +160,22 @@ #endif /* LITTLE_ENDIAN */ + case 5: + + /* max PDU's in record */ +- if (ph->count > FT_PDU_V5_MAXFLOWS) ++ if (ph->count > FT_PDU_V5_MAXFLOWS) { ++ fterr_warnx("too many pdus (%d) in record, max %d", ph->count, ++ FT_PDU_V5_MAXFLOWS); + goto ftpdu_verify_out; ++ } ++ + + size = offsetof(struct ftpdu_v5, records) + + ph->count * sizeof (struct ftrec_v5); + + /* PDU received size == PDU expected size? */ +- if (size != ftpdu->bused) ++ if (size != ftpdu->bused) { ++ fterr_warnx("pdu received size was wrong. expected %d got %d", ++ ftpdu->bused, size); + goto ftpdu_verify_out; ++ } + + ftpdu->ftv.d_version = 5; + ftpdu->decodef = fts3rec_pdu_v5_decode; +@@ -516,6 +525,7 @@ #endif /* LITTLE_ENDIAN */ + break; /* 8 */ + + default: ++ fterr_warnx("ftpdu version not set."); + goto ftpdu_verify_out; + + } /* switch ph->version */ +-- +1.3.3 + diff --git a/flow-tools-0.68-0008-Fix-unitialized-variable-in-flow-export.c.patch b/flow-tools-0.68-0008-Fix-unitialized-variable-in-flow-export.c.patch new file mode 100644 index 0000000..3486689 --- /dev/null +++ b/flow-tools-0.68-0008-Fix-unitialized-variable-in-flow-export.c.patch @@ -0,0 +1,31 @@ +From nobody Mon Sep 17 00:00:00 2001 +From: Ben Feinstein +Date: Sat, 10 Jun 2006 21:01:04 +0400 +Subject: [PATCH 8/8] Fix unitialized variable in flow-export.c + +Without this patch, flow-export utility will misformat its SQL output when +using the MySQL output format causing the export to fail. Specifcally, the +commas between the fields are getting mangled. + +--- + + src/flow-export.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +bcb0b33cc9bb9427726db853a093d081dc77a1c6 +diff --git a/src/flow-export.c b/src/flow-export.c +index 52ae4d2..22b0330 100644 +--- a/src/flow-export.c ++++ b/src/flow-export.c +@@ -961,7 +961,7 @@ #endif /* PGSQL */ + + int fmt_xfields_type(char *buf, u_int64 xfield) + { +- int comma; ++ int comma = 0; + + buf[0] = 0; + +-- +1.3.3 + diff --git a/flow-tools-0.68a.patch b/flow-tools-0.68a.patch deleted file mode 100644 index 6b13c88..0000000 --- a/flow-tools-0.68a.patch +++ /dev/null @@ -1,414 +0,0 @@ -diff -urN flow-tools-0.68/bin/flow-log2rrd flow-tools-0.68.new/bin/flow-log2rrd ---- flow-tools-0.68/bin/flow-log2rrd 2005-05-10 20:53:16.000000000 +0400 -+++ flow-tools-0.68.new/bin/flow-log2rrd 2005-08-31 12:24:51.000000000 +0400 -@@ -1,4 +1,4 @@ --#!/usr/local/bin/python -+#!/bin/env python - - import getopt - import os -diff -urN flow-tools-0.68/bin/flow-rpt2rrd flow-tools-0.68.new/bin/flow-rpt2rrd ---- flow-tools-0.68/bin/flow-rpt2rrd 2005-05-11 04:11:29.000000000 +0400 -+++ flow-tools-0.68.new/bin/flow-rpt2rrd 2005-08-31 12:24:28.000000000 +0400 -@@ -1,4 +1,4 @@ --#!/usr/local/bin/python -+#!/bin/env python - - import getopt - import os -diff -urN flow-tools-0.68/bin/flow-rptfmt flow-tools-0.68.new/bin/flow-rptfmt ---- flow-tools-0.68/bin/flow-rptfmt 2005-05-11 16:38:37.000000000 +0400 -+++ flow-tools-0.68.new/bin/flow-rptfmt 2005-08-31 12:24:28.000000000 +0400 -@@ -1,4 +1,4 @@ --#!/usr/local/bin/python -+#!/bin/env python - - import sys - import string -diff -urN flow-tools-0.68/configs/Makefile.am flow-tools-0.68.new/configs/Makefile.am ---- flow-tools-0.68/configs/Makefile.am 2003-11-25 10:01:37.000000000 +0300 -+++ flow-tools-0.68.new/configs/Makefile.am 2005-08-31 12:24:28.000000000 +0400 -@@ -1,6 +1,6 @@ --ftsymdir=$(localstatedir)/sym -+ftsymdir=$(sysconfdir)/sym - ftsym_DATA = ip-prot.sym ip-type.sym tcp-port.sym asn.sym tag.sym - --ftcfgdir=$(localstatedir)/cfg -+ftcfgdir=$(sysconfdir)/cfg - ftcfg_DATA = map.cfg tag.cfg filter.cfg stat.cfg mask.cfg xlate.cfg - -diff -urN flow-tools-0.68/configure.in flow-tools-0.68.new/configure.in ---- flow-tools-0.68/configure.in 2005-05-11 18:15:48.000000000 +0400 -+++ flow-tools-0.68.new/configure.in 2005-08-31 12:24:28.000000000 +0400 -@@ -1,31 +1,32 @@ - dnl Process this file with autoconf to produce a configure script. --AC_INIT(lib/bit1024.c) -+AC_INIT(flow-tools, 0.68) - --AC_PREFIX_DEFAULT(/usr/local/netflow) -+AC_PREFIX_DEFAULT(/usr/local/flow-tools) - --AM_INIT_AUTOMAKE(flow-tools, 0.68) --AM_CONFIG_HEADER(lib/ftconfig.h:lib/ftconfig.h.in) -+AM_INIT_AUTOMAKE -+AM_CONFIG_HEADER(lib/ftconfig.h) - --CFLAGS="-g -Wall" -+dnl CFLAGS="-g -Wall" - - dnl Checks for programs. -+AC_PROG_LIBTOOL - AC_PROG_CC - AC_PROG_INSTALL - AC_PROG_MAKE_SET - AC_PROG_YACC - YACC="$YACC -d" --AC_PROG_RANLIB - AM_PROG_LEX - - AC_SUBST(YLIB) - AC_SUBST(MYSQLLIB) - AC_SUBST(MYSQLCFLAGS) --AC_SUBST(MYSQLINCLUDE) -+AC_SUBST(MYSQLLDFLAGS) - AC_SUBST(PGSQLLIB) - AC_SUBST(PGSQLCFLAGS) --AC_SUBST(PGSQLINCLUDE) -+AC_SUBST(PGSQLLDFLAGS) - AC_SUBST(CRYPTOLIB) - AC_SUBST(OPENSSLINCLUDE) -+AC_SUBST(OPENSSLLDFLAGS) - - dnl extra argument: --with-mysql - WITH_MYSQL= -@@ -66,37 +67,51 @@ - dnl Checks for libraries. - - if test "x$WHERE_MYSQL" != "x"; then -- LIBS="-L$WHERE_MYSQL/lib/mysql" -+ old_LIBS="$LIBS" -+ old_LDFLAGS="$LDFLAGS" -+ LDFLAGS="$LDFLAGS -L$WHERE_MYSQL/lib/mysql" - AC_CHECK_LIB(mysqlclient, my_init, - [ -- MYSQLCFLAGS="-L$WHERE_MYSQL/lib/mysql -I$WHERE_MYSQL/include/mysql" -+ MYSQLCFLAGS="-I$WHERE_MYSQL/include/mysql" -+ MYSQLLDFLAGS="-L$WHERE_MYSQL/lib/mysql" - MYSQLLIB="-lmysqlclient" - AC_DEFINE(HAVE_MYSQL) - ] - ) -+ LIBS="$old_LIBS" -+ LDFLAGS="$old_LDFLAGS" - fi - - if test "x$WHERE_OPENSSL" != "x"; then -- LIBS="-L$WHERE_OPENSSL/lib" -+ old_LIBS="$LIBS" -+ old_LDFLAGS="$LDFLAGS" -+ LDFLAGS="$LDFLAGS -L$WHERE_OPENSSL/lib" - AC_CHECK_LIB(crypto, EVP_EncryptUpdate, - [ -- OPENSSLCFLAGS="-L$WHERE_OPENSSL/lib -I$WHERE_OPENSSL/include" -+ OPENSSLCFLAGS="-I$WHERE_OPENSSL/include" -+ OPENSSLLDFLAGS="-L$WHERE_OPENSSL/lib" - CRYPTOLIB="-lcrypto" - AC_DEFINE(HAVE_OPENSSL) - ] - ) -+ LIBS="$old_LIBS" -+ LDFLAGS="$old_LDFLAGS" - fi - -- - if test "x$WHERE_PGSQL" != "x"; then -- LIBS="-L$WHERE_PGSQL/lib/pgsql" -+ old_LIBS="$LIBS" -+ old_LDFLAGS="$LDFLAGS" -+ LDFLAGS="-L$WHERE_PGSQL/lib/pgsql" - AC_CHECK_LIB(pq, PQsetdbLogin, - [ -- PGSQLCFLAGS="-L$WHERE_PGSQL/lib -I$WHERE_PGSQL/include/pgsql" -+ PGSQLCFLAGS="-I$WHERE_PGSQL/include/pgsql" -+ PGSQLLDFLAGS="-L$WHERE_PGSQL/lib" - PGSQLLIB="-lpq" - AC_DEFINE(HAVE_PGSQL) - ] - ) -+ LIBS="$old_LIBS" -+ LDFLAGS="$old_LDFLAGS" - fi - - AC_CHECK_LIB(y, main,YLIB="$YLIB -ly",) -diff -urN flow-tools-0.68/lib/ftchash.c flow-tools-0.68.new/lib/ftchash.c ---- flow-tools-0.68/lib/ftchash.c 2003-08-12 22:04:25.000000000 +0400 -+++ flow-tools-0.68.new/lib/ftchash.c 2005-08-31 12:24:35.000000000 +0400 -@@ -326,7 +326,7 @@ - (char*)ftch->traverse_chunk->base+ftch->traverse_chunk->next) { - - ret = ftch->traverse_rec; -- (char*)ftch->traverse_rec += ftch->d_size; -+ ftch->traverse_rec = vpadd(ftch->traverse_rec, ftch->d_size); - return ret; - - } else { -diff -urN flow-tools-0.68/lib/ftfile.c flow-tools-0.68.new/lib/ftfile.c ---- flow-tools-0.68/lib/ftfile.c 2003-02-13 05:38:42.000000000 +0300 -+++ flow-tools-0.68.new/lib/ftfile.c 2005-08-31 12:24:35.000000000 +0400 -@@ -53,7 +53,7 @@ - - int load_dir(char *prefix, struct ftfile_entries *fte, int flags, int *depth); - --extern int debug; -+#define debug 0 - - /* - * function: ftfile_entry_new -diff -urN flow-tools-0.68/lib/ftio.c flow-tools-0.68.new/lib/ftio.c ---- flow-tools-0.68/lib/ftio.c 2003-02-24 03:51:47.000000000 +0300 -+++ flow-tools-0.68.new/lib/ftio.c 2005-08-31 12:24:35.000000000 +0400 -@@ -2267,7 +2267,7 @@ - break; - - nleft -= nread; -- (char*)ptr += nread; -+ ptr = vpadd(ptr, nread); - } - return (nbytes - nleft); - } /* readn */ -@@ -2292,7 +2292,7 @@ - return(nwritten); /* error */ - - nleft -= nwritten; -- (char*)ptr += nwritten; -+ ptr = vpadd(ptr,nwritten); - } - return(nbytes - nleft); - } /* writen */ -diff -urN flow-tools-0.68/lib/ftlib.h flow-tools-0.68.new/lib/ftlib.h ---- flow-tools-0.68/lib/ftlib.h 2005-05-10 19:51:33.000000000 +0400 -+++ flow-tools-0.68.new/lib/ftlib.h 2005-08-31 12:24:35.000000000 +0400 -@@ -152,7 +152,6 @@ - #define FT_PDU_V8_12_MAXFLOWS 44 /* max records in V8 DST_PREFIX_TOS packet */ - #define FT_PDU_V8_13_MAXFLOWS 35 /* max records in V8 PREFIX_TOS packet */ - #define FT_PDU_V8_14_MAXFLOWS 35 /* max records in V8 PREFIX_PORT_TOS packet */ -- - #define FT_PDU_V8_1_VERSION 2 /* version of AS packet */ - #define FT_PDU_V8_2_VERSION 2 /* version of PROTO PORT packet */ - #define FT_PDU_V8_3_VERSION 2 /* version of SRC PREFIX packet */ -@@ -3029,6 +3028,8 @@ - #define IN_CLASSD_SSM(i) (((u_int32_t)(i) & 0xff000000) == 0xe8000000) - #endif /* IN_CLASSD_SSM */ - -+void *vpadd(const void* v, const int change); -+ - /* MACHINE DEPENDANT */ - #define fmt_uint fmt_uint32 - -diff -urN flow-tools-0.68/lib/ftpaths.h.in flow-tools-0.68.new/lib/ftpaths.h.in ---- flow-tools-0.68/lib/ftpaths.h.in 2003-11-11 19:49:14.000000000 +0300 -+++ flow-tools-0.68.new/lib/ftpaths.h.in 2005-08-31 12:24:28.000000000 +0400 -@@ -29,17 +29,17 @@ - #ifndef FTPATHS_H - #define FTPATHS_H - --#define FT_PATH_CFG_MAP "@localstatedir@/cfg/map.cfg" --#define FT_PATH_CFG_TAG "@localstatedir@/cfg/tag.cfg" --#define FT_PATH_CFG_FILTER "@localstatedir@/cfg/filter.cfg" --#define FT_PATH_CFG_STAT "@localstatedir@/cfg/stat.cfg" --#define FT_PATH_CFG_MASK "@localstatedir@/cfg/mask.cfg" --#define FT_PATH_CFG_XLATE "@localstatedir@/cfg/xlate.cfg" -+#define FT_PATH_CFG_MAP "@sysconfdir@/cfg/map.cfg" -+#define FT_PATH_CFG_TAG "@sysconfdir@/cfg/tag.cfg" -+#define FT_PATH_CFG_FILTER "@sysconfdir@/cfg/filter.cfg" -+#define FT_PATH_CFG_STAT "@sysconfdir@/cfg/stat.cfg" -+#define FT_PATH_CFG_MASK "@sysconfdir@/cfg/mask.cfg" -+#define FT_PATH_CFG_XLATE "@sysconfdir@/cfg/xlate.cfg" - --#define FT_PATH_SYM_IP_PROT "@localstatedir@/sym/ip-prot.sym" --#define FT_PATH_SYM_IP_TYPE "@localstatedir@/sym/ip-type.sym" --#define FT_PATH_SYM_TCP_PORT "@localstatedir@/sym/tcp-port.sym" --#define FT_PATH_SYM_ASN "@localstatedir@/sym/asn.sym" --#define FT_PATH_SYM_TAG "@localstatedir@/sym/tag.sym" -+#define FT_PATH_SYM_IP_PROT "@sysconfdir@/sym/ip-prot.sym" -+#define FT_PATH_SYM_IP_TYPE "@sysconfdir@/sym/ip-type.sym" -+#define FT_PATH_SYM_TCP_PORT "@sysconfdir@/sym/tcp-port.sym" -+#define FT_PATH_SYM_ASN "@sysconfdir@/sym/asn.sym" -+#define FT_PATH_SYM_TAG "@sysconfdir@/sym/tag.sym" - - #endif /* FTPATHS_H */ -diff -urN flow-tools-0.68/lib/fttlv.c flow-tools-0.68.new/lib/fttlv.c ---- flow-tools-0.68/lib/fttlv.c 2003-02-13 05:38:43.000000000 +0300 -+++ flow-tools-0.68.new/lib/fttlv.c 2005-08-31 12:24:35.000000000 +0400 -@@ -68,10 +68,10 @@ - } - - bcopy(&t, buf, 2); -- (char*)buf+= 2; -+ buf = vpadd(buf, 2); - - bcopy(&len, buf, 2); -- (char*)buf+= 2; -+ buf = vpadd(buf, 2); - - bcopy(&v, buf, 4); - -@@ -107,10 +107,10 @@ - } - - bcopy(&t, buf, 2); -- (char*)buf+= 2; -+ buf = vpadd(buf, 2); - - bcopy(&len, buf, 2); -- (char*)buf+= 2; -+ buf = vpadd(buf, 2); - - bcopy(&v, buf, 2); - -@@ -145,10 +145,10 @@ - } - - bcopy(&t, buf, 2); -- (char*)buf+= 2; -+ buf = vpadd(buf, 2); - - bcopy(&len, buf, 2); -- (char*)buf+= 2; -+ buf = vpadd(buf, 2); - - bcopy(&v, buf, 1); - -@@ -183,10 +183,10 @@ - } - - bcopy(&t, buf, 2); -- (char*)buf+= 2; -+ buf = vpadd(buf, 2); - - bcopy(&len, buf, 2); -- (char*)buf+= 2; -+ buf = vpadd(buf, 2); - - bcopy(v, buf, len); - -@@ -230,16 +230,16 @@ - return -1; - - bcopy(&t, buf, 2); -- (char*)buf+= 2; -+ buf = vpadd(buf, 2); - - bcopy(&len, buf, 2); -- (char*)buf+= 2; -+ buf = vpadd(buf, 2); - - bcopy(&ip, buf, 4); -- (char*)buf += 4; -+ buf = vpadd(buf, 4); - - bcopy(&ifIndex, buf, 2); -- (char*)buf += 2; -+ buf = vpadd(buf, 2); - - bcopy(name, buf, n); - -@@ -287,19 +287,19 @@ - } - - bcopy(&t, buf, 2); -- (char*)buf+= 2; -+ buf = vpadd(buf, 2); - - bcopy(&len, buf, 2); -- (char*)buf+= 2; -+ buf = vpadd(buf, 2); - - bcopy(&ip, buf, 4); -- (char*)buf += 4; -+ buf = vpadd(buf, 4); - - bcopy(&entries, buf, 2); -- (char*)buf += 2; -+ buf = vpadd(buf, 2); - - bcopy(ifIndex_list, buf, esize); -- (char*)buf += esize; -+ buf = vpadd(buf, esize); - - bcopy(name, buf, n); - -diff -urN flow-tools-0.68/lib/Makefile.am flow-tools-0.68.new/lib/Makefile.am ---- flow-tools-0.68/lib/Makefile.am 2005-05-05 20:00:57.000000000 +0400 -+++ flow-tools-0.68.new/lib/Makefile.am 2005-08-31 12:24:35.000000000 +0400 -@@ -2,17 +2,17 @@ - - #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 - --DEFS=-I. -I$(srcdir)/lib -+#DEFS=-I. -I$(srcdir)/lib - - include_HEADERS = ftlib.h ftqueue.h radix.h ftpaths.h ftconfig.h --lib_LIBRARIES = libft.a -+lib_LTLIBRARIES = libft.la - --libft_a_SOURCES = ftio.c ftswap.c ftencode.c ftdecode.c ftprof.c bit1024.c \ -+libft_la_SOURCES = ftio.c ftswap.c ftencode.c ftdecode.c ftprof.c bit1024.c \ - fmt.c support.c ftfile.c fttlv.c ftmap.c ftrec.c fterr.c \ - ftchash.c ftsym.c radix.c fttag.c ftfil.c ftstat.c getdate.c ftxfield.c\ - ftmask.c ftvar.c ftxlate.c - --libft_a_LIBADD = @LIBOBJS@ -+libft_la_LIBADD = $(LTLIBOBJS) $(CRYPTOLIB) - -diff -urN flow-tools-0.68/lib/support.c flow-tools-0.68.new/lib/support.c ---- flow-tools-0.68/lib/support.c 2003-02-13 05:38:43.000000000 +0300 -+++ flow-tools-0.68.new/lib/support.c 2005-08-31 12:24:35.000000000 +0400 -@@ -736,3 +736,8 @@ - return sum; - } /* udp_cksum */ - -+// void pointer add -+ -+void * vpadd(const void *v, const int change) { -+ return (void *) (((char*) v) + change); -+} -diff -urN flow-tools-0.68/src/Makefile.am flow-tools-0.68.new/src/Makefile.am ---- flow-tools-0.68/src/Makefile.am 2005-05-06 07:43:41.000000000 +0400 -+++ flow-tools-0.68.new/src/Makefile.am 2005-08-31 12:24:28.000000000 +0400 -@@ -7,7 +7,7 @@ - - #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 - - bin_PROGRAMS = flow-capture flow-cat flow-stat flow-print flow-dscan \ - flow-send flow-receive flow-gen flow-expire \ -@@ -101,9 +101,9 @@ - flow_filter_DEPENDENCIES = ftbuild.h - - flow_export_SOURCES = flow-export.c --flow_export_LDFLAGS = -L../lib --flow_export_CFLAGS = @MYSQLCFLAGS@ @PGSQLCFLAGS@ --flow_export_LDADD = -lft @MYSQLLIB@ @PGSQLLIB@ -+flow_export_LDFLAGS = -L../lib $(MYSQLLDFLAGS) $(PGSQLLDFLAGS) -+flow_export_CFLAGS = $(MYSQLCFLAGS) $(PGSQLCFLAGS) -+flow_export_LDADD = -lft $(MYSQLLIB) $(PGSQLLIB) - flow_export_DEPENDENCIES = ftbuild.h - - flow_header_SOURCES = flow-header.c -@@ -117,8 +117,8 @@ - flow_split_DEPENDENCIES = ftbuild.h - - flow_xlate_SOURCES = flow-xlate.c --flow_xlate_LDFLAGS = -L../lib --flow_xlate_LDADD = -lft @CRYPTOLIB@ -+flow_xlate_LDFLAGS = -L../lib $(CRYPTOLDFLAGS) -+flow_xlate_LDADD = -lft $(CRYPTOLIB) - flow_xlate_DEPENDENCIES = ftbuild.h - - flow_tag_SOURCES = flow-tag.c diff --git a/flow-tools-0.68b.patch b/flow-tools-0.68b.patch deleted file mode 100644 index 5b6ab3e..0000000 --- a/flow-tools-0.68b.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff -urN flow-tools-0.68/lib/ftfile.c flow-tools-0.68.a/lib/ftfile.c ---- flow-tools-0.68/lib/ftfile.c 2003-02-13 05:38:42.000000000 +0300 -+++ flow-tools-0.68.a/lib/ftfile.c 2005-10-30 00:27:33.000000000 +0400 -@@ -413,16 +413,17 @@ - int done, u_int32 ftime) - { - struct tm *tm; -+ time_t _t = (time_t) ftime; - char *prefix, dbuf[64]; - long gmt_val; - char gmt_sign; - int tm_gmtoff; - -- if (!(tm = localtime ((time_t*)&ftime))) { -+ if (!(tm = localtime (&_t))) { - snprintf(buf, bsize, "."); - } - -- tm_gmtoff = get_gmtoff(ftime); -+ tm_gmtoff = get_gmtoff(_t); - - /* compute GMT offset */ - if (tm_gmtoff >= 0) { -@@ -502,6 +503,7 @@ - int ftfile_mkpath(u_int32 ftime, int nest) - { - struct tm *tm; -+ time_t _t = (time_t) ftime; - char buf[32]; - - /* no directories */ -@@ -512,7 +514,7 @@ - if ((nest > 3) || (nest < -3)) - return -1; - -- if (!(tm = localtime ((time_t*)&ftime))) -+ if (!(tm = localtime (&_t))) - return -1; - - if (nest == -1) diff --git a/flow-tools.spec b/flow-tools.spec index 3e0f344..383f50d 100644 --- a/flow-tools.spec +++ b/flow-tools.spec @@ -1,15 +1,22 @@ Version: 0.68 Name: flow-tools Summary: Tool set for working with NetFlow data -Release: 5%{?dist} +Release: 8%{?dist} Group: Applications/System License: BSD URL: http://www.splintered.net/sw/flow-tools/ Source0: ftp://ftp.eng.oar.net/pub/flow-tools/flow-tools-%{version}.tar.gz -Patch0: flow-tools-0.68a.patch -Patch1: flow-tools-0.68b.patch +Patch1: flow-tools-0.68-0001-Fix-first-line-of-included-python-scripts.patch +Patch2: flow-tools-0.68-0002-Fix-an-invalid-lvalue-in-assignment-compile-error.patch +Patch3: flow-tools-0.68-0003-Avoid-external-debug-variable.patch +Patch4: flow-tools-0.68-0004-Make-flow-tools-more-FHS-compliant-and-buildable-by-newer-toolchain.patch +Patch5: flow-tools-0.68-0005-Fix-breakage-on-64bit-platforms.patch +Patch6: flow-tools-0.68-0006-Fix-unitialized-variable-in-flow-send.patch +Patch7: flow-tools-0.68-0007-Add-extra-debugging-to-ftpdu_verify.patch +Patch8: flow-tools-0.68-0008-Fix-unitialized-variable-in-flow-export.c.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: openssl-devel mysql-devel postgresql-devel autoconf zlib-devel +BuildRequires: openssl-devel mysql-devel postgresql-devel autoconf automake libtool zlib-devel %description Flow-tools is library and a collection of programs used to collect, @@ -39,8 +46,14 @@ libft. %prep %setup -q -%patch -p1 %patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 %build autoreconf -f -i -s @@ -79,6 +92,16 @@ rm -rf $RPM_BUILD_ROOT %{_includedir}/*.h %changelog +* Sat Jun 10 2006 Paul P Komkoff Jr 0.68-8 +- Split patches in more convenient way (and bug upstream) +- Fix 2 unitialized variable bugs + +* Sun Feb 19 2006 Paul P Komkoff Jr 0.68-7 +- Rebuild + +* Mon Nov 14 2005 Paul P Komkoff Jr 0.68-6 +- Rebuild + * Sun Oct 30 2005 Paul P Komkoff Jr 0.68-5 - Fix flow-capture segfaults on platforms with 64bit time_t From 2824539018d7ec7c39a7895d9530f1064437d33c Mon Sep 17 00:00:00 2001 From: Paul P Komkoff Jr Date: Thu, 23 Nov 2006 05:57:36 +0000 Subject: [PATCH 04/12] Fix flow report 72 (by reaper@surnet.ru) bz#212928 --- flow-tools-0.68.rpt72.patch | 15 +++++++++++++++ flow-tools.spec | 18 ++++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 flow-tools-0.68.rpt72.patch diff --git a/flow-tools-0.68.rpt72.patch b/flow-tools-0.68.rpt72.patch new file mode 100644 index 0000000..6ab2bf4 --- /dev/null +++ b/flow-tools-0.68.rpt72.patch @@ -0,0 +1,15 @@ +--- flow-tools-0.68/lib/ftstat.c.orig 2005-05-10 21:48:12.000000000 +0600 ++++ flow-tools-0.68/lib/ftstat.c 2006-04-10 14:59:28.000000000 +0600 +@@ -11673,10 +11673,10 @@ + ftch_recprefix_tag, ftch_recprefix_tagp); + + FT_RECGET_DSTADDR(cur,rec,*fo); +- FT_RECGET_DST_TAG(cur,rec,*fo); ++ FT_RECGET_SRC_TAG(cur,rec,*fo); + + ftch_recprefix_tag.prefix = cur.dstaddr; +- ftch_recprefix_tag.tag = cur.dst_tag; ++ ftch_recprefix_tag.tag = cur.src_tag; + + /* only use mask if option set */ + if (rpt->options & (FT_STAT_OPT_DST_PREFIX_MASK|FT_STAT_OPT_DST_PREFIX_LEN)) { diff --git a/flow-tools.spec b/flow-tools.spec index 383f50d..c7121d3 100644 --- a/flow-tools.spec +++ b/flow-tools.spec @@ -1,7 +1,7 @@ Version: 0.68 Name: flow-tools Summary: Tool set for working with NetFlow data -Release: 8%{?dist} +Release: 12%{?dist} Group: Applications/System License: BSD URL: http://www.splintered.net/sw/flow-tools/ @@ -14,9 +14,10 @@ Patch5: flow-tools-0.68-0005-Fix-breakage-on-64bit-platforms.patch Patch6: flow-tools-0.68-0006-Fix-unitialized-variable-in-flow-send.patch Patch7: flow-tools-0.68-0007-Add-extra-debugging-to-ftpdu_verify.patch Patch8: flow-tools-0.68-0008-Fix-unitialized-variable-in-flow-export.c.patch +Patch9: flow-tools-0.68.rpt72.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: openssl-devel mysql-devel postgresql-devel autoconf automake libtool zlib-devel +BuildRequires: openssl-devel mysql-devel postgresql-devel autoconf automake libtool zlib-devel bison flex tcp_wrappers %description Flow-tools is library and a collection of programs used to collect, @@ -54,6 +55,7 @@ libft. %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 %build autoreconf -f -i -s @@ -92,6 +94,18 @@ rm -rf $RPM_BUILD_ROOT %{_includedir}/*.h %changelog +* Thu Nov 16 2006 Paul P Komkoff Jr - 0.68-12 +- Fix flow report 72 (by reaper@surnet.ru) bz#212928 + +* Sun Sep 10 2006 Paul P Komkoff Jr - 0.68-11 +- rebuild + +* Sun Jul 9 2006 Paul P Komkoff Jr 0.68-10 +- Rebuild + +* Sun Jul 9 2006 Paul P Komkoff Jr 0.68-9 +- Fix build in mock with minimal build environment #197706 + * Sat Jun 10 2006 Paul P Komkoff Jr 0.68-8 - Split patches in more convenient way (and bug upstream) - Fix 2 unitialized variable bugs From 90cfde5ebd33fabcfd2329956d6441bb345c1446 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:28:21 +0000 Subject: [PATCH 05/12] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3535a42..d5f19cf 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: flow-tools -# $Id$ +# $Id: Makefile,v 1.1 2005/09/07 17:58:47 stingray Exp $ NAME := flow-tools SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From ab5549a98e850d500f55ff1c41e0cfb0ac106f98 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 9 Jul 2010 18:24:44 +0000 Subject: [PATCH 06/12] Initialize branch EL-4 for flow-tools --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..6ec5cef --- /dev/null +++ b/branch @@ -0,0 +1 @@ +EL-4 From 9153569fb3779f9dde1172958376dff0e077a929 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 12 Jul 2010 15:09:55 +0000 Subject: [PATCH 07/12] Update to 0.68.5 --- .cvsignore | 2 +- flow-capture.init | 112 ++++++++ flow-capture.sysconfig | 2 + ...irst-line-of-included-python-scripts.patch | 48 ---- ...d-lvalue-in-assignment-compile-error.patch | 189 ------------ ...8-0003-Avoid-external-debug-variable.patch | 31 -- ...ant-and-buildable-by-newer-toolchain.patch | 236 --------------- ...0005-Fix-breakage-on-64bit-platforms.patch | 58 ---- ...ix-unitialized-variable-in-flow-send.patch | 30 -- ...-Add-extra-debugging-to-ftpdu_verify.patch | 63 ---- ...nitialized-variable-in-flow-export.c.patch | 31 -- flow-tools-0.68.rpt72.patch | 15 - flow-tools.spec | 269 +++++++++++++++--- import.log | 1 + sources | 2 +- 15 files changed, 347 insertions(+), 742 deletions(-) create mode 100644 flow-capture.init create mode 100644 flow-capture.sysconfig delete mode 100644 flow-tools-0.68-0001-Fix-first-line-of-included-python-scripts.patch delete mode 100644 flow-tools-0.68-0002-Fix-an-invalid-lvalue-in-assignment-compile-error.patch delete mode 100644 flow-tools-0.68-0003-Avoid-external-debug-variable.patch delete mode 100644 flow-tools-0.68-0004-Make-flow-tools-more-FHS-compliant-and-buildable-by-newer-toolchain.patch delete mode 100644 flow-tools-0.68-0005-Fix-breakage-on-64bit-platforms.patch delete mode 100644 flow-tools-0.68-0006-Fix-unitialized-variable-in-flow-send.patch delete mode 100644 flow-tools-0.68-0007-Add-extra-debugging-to-ftpdu_verify.patch delete mode 100644 flow-tools-0.68-0008-Fix-unitialized-variable-in-flow-export.c.patch delete mode 100644 flow-tools-0.68.rpt72.patch create mode 100644 import.log diff --git a/.cvsignore b/.cvsignore index 377cc43..05baf6d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -flow-tools-0.68.tar.gz +flow-tools-0.68.5.tar.bz2 diff --git a/flow-capture.init b/flow-capture.init new file mode 100644 index 0000000..0931a32 --- /dev/null +++ b/flow-capture.init @@ -0,0 +1,112 @@ +#!/bin/sh +# +# flow-capture Capture traffic flow data +# +# chkconfig: - 90 10 +# description: Capture traffic flow data + +### BEGIN INIT INFO +# Provides: flow-capture +# Required-Start: $local_fs $network +# Required-Stop: $local_fs $network +# Default-Stop: 0 1 2 3 4 5 6 +# Short-Description: Capture traffic flow data +# Description: Capture traffic flow data +### END INIT INFO + +# Source function library. +. /etc/rc.d/init.d/functions + +prog="flow-capture" +exec="/usr/bin/$prog" +config="/etc/sysconfig/$prog" +lockfile=/var/lock/subsys/$prog + +[ -e $config ] && . $config + +# Define the flow-tools username +FLOWTOOLS_USER="${FLOWTOOLS_USER:-flow-tools}" + +# Add pidfile +OPTIONS="-p /var/run/flow-capture.pid $OPTIONS" + +# Check that networking is up. +if [ "$NETWORKING" = "no" ] +then + exit 0 +fi + +start() { + [ -x $exec ] || exit 5 + [ -f $config ] || exit 6 + echo -n $"Starting $prog: " + # if not running, start it up here, usually something like "daemon $exec" + daemon --user=$FLOWTOOLS_USER $exec $OPTIONS + retval=$? + echo + [ $retval -eq 0 ] && touch $lockfile + return $retval +} + +stop() { + echo -n $"Stopping $prog: " + killproc $prog + retval=$? + echo + [ $retval -eq 0 ] && rm -f $lockfile + return $retval +} + +restart() { + stop + start +} + +reload() { + restart +} + +force_reload() { + restart +} + +rh_status() { + # run checks to determine if the service is running or use generic status + status $prog +} + +rh_status_q() { + rh_status >/dev/null 2>&1 +} + +case "$1" in + start) + rh_status_q && exit 0 + $1 + ;; + stop) + rh_status_q || exit 0 + $1 + ;; + restart) + $1 + ;; + reload) + rh_status_q || exit 7 + $1 + ;; + force-reload) + force_reload + ;; + status) + rh_status + ;; + condrestart|try-restart) + rh_status_q || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}" + exit 2 +esac +exit $? diff --git a/flow-capture.sysconfig b/flow-capture.sysconfig new file mode 100644 index 0000000..33a3d07 --- /dev/null +++ b/flow-capture.sysconfig @@ -0,0 +1,2 @@ +# Change the source IP and port to what is used on your network +OPTIONS="-n 287 -N 0 -w /var/flow-tools -S 5 0/0/8818" diff --git a/flow-tools-0.68-0001-Fix-first-line-of-included-python-scripts.patch b/flow-tools-0.68-0001-Fix-first-line-of-included-python-scripts.patch deleted file mode 100644 index 19e5c3b..0000000 --- a/flow-tools-0.68-0001-Fix-first-line-of-included-python-scripts.patch +++ /dev/null @@ -1,48 +0,0 @@ -From nobody Mon Sep 17 00:00:00 2001 -From: Paul P Komkoff Jr -Date: Sat, 10 Jun 2006 20:45:55 +0400 -Subject: [PATCH 1/8] Fix first line of included python scripts. - -We need to do this to allow execution on FHS-compliant systems. - ---- - - bin/flow-log2rrd | 2 +- - bin/flow-rpt2rrd | 2 +- - bin/flow-rptfmt | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -250b73e99e719fdeb26140e7f8ebab68963e243b -diff --git a/bin/flow-log2rrd b/bin/flow-log2rrd -index 0567ba5..db4fdda 100755 ---- a/bin/flow-log2rrd -+++ b/bin/flow-log2rrd -@@ -1,4 +1,4 @@ --#!/usr/local/bin/python -+#!/bin/env python - - import getopt - import os -diff --git a/bin/flow-rpt2rrd b/bin/flow-rpt2rrd -index 72a74c7..7698f2b 100755 ---- a/bin/flow-rpt2rrd -+++ b/bin/flow-rpt2rrd -@@ -1,4 +1,4 @@ --#!/usr/local/bin/python -+#!/bin/env python - - import getopt - import os -diff --git a/bin/flow-rptfmt b/bin/flow-rptfmt -index 047d1ba..f663fae 100755 ---- a/bin/flow-rptfmt -+++ b/bin/flow-rptfmt -@@ -1,4 +1,4 @@ --#!/usr/local/bin/python -+#!/bin/env python - - import sys - import string --- -1.3.3 - diff --git a/flow-tools-0.68-0002-Fix-an-invalid-lvalue-in-assignment-compile-error.patch b/flow-tools-0.68-0002-Fix-an-invalid-lvalue-in-assignment-compile-error.patch deleted file mode 100644 index 6ec8037..0000000 --- a/flow-tools-0.68-0002-Fix-an-invalid-lvalue-in-assignment-compile-error.patch +++ /dev/null @@ -1,189 +0,0 @@ -From nobody Mon Sep 17 00:00:00 2001 -From: Paul P Komkoff Jr -Date: Sat, 10 Jun 2006 20:49:45 +0400 -Subject: [PATCH 2/8] Fix an "invalid lvalue in assignment" compile error. - ---- - - lib/ftchash.c | 2 +- - lib/ftio.c | 4 ++-- - lib/ftlib.h | 3 ++- - lib/fttlv.c | 34 +++++++++++++++++----------------- - lib/support.c | 5 +++++ - 5 files changed, 27 insertions(+), 21 deletions(-) - -075301dae1b92110e6cc339b0df88b7fc82c31a6 -diff --git a/lib/ftchash.c b/lib/ftchash.c -index 9cc7efa..28bafbf 100644 ---- a/lib/ftchash.c -+++ b/lib/ftchash.c -@@ -326,7 +326,7 @@ void *ftchash_foreach(struct ftchash *ft - (char*)ftch->traverse_chunk->base+ftch->traverse_chunk->next) { - - ret = ftch->traverse_rec; -- (char*)ftch->traverse_rec += ftch->d_size; -+ ftch->traverse_rec = vpadd(ftch->traverse_rec, ftch->d_size); - return ret; - - } else { -diff --git a/lib/ftio.c b/lib/ftio.c -index f6c739c..1082416 100644 ---- a/lib/ftio.c -+++ b/lib/ftio.c -@@ -2267,7 +2267,7 @@ int readn(register int fd, register void - break; - - nleft -= nread; -- (char*)ptr += nread; -+ ptr = vpadd(ptr, nread); - } - return (nbytes - nleft); - } /* readn */ -@@ -2292,7 +2292,7 @@ int writen(register int fd, register voi - return(nwritten); /* error */ - - nleft -= nwritten; -- (char*)ptr += nwritten; -+ ptr = vpadd(ptr,nwritten); - } - return(nbytes - nleft); - } /* writen */ -diff --git a/lib/ftlib.h b/lib/ftlib.h -index f91ad0a..66bf2f3 100644 ---- a/lib/ftlib.h -+++ b/lib/ftlib.h -@@ -152,7 +152,6 @@ #define FT_PDU_V8_11_MAXFLOWS 44 /* max - #define FT_PDU_V8_12_MAXFLOWS 44 /* max records in V8 DST_PREFIX_TOS packet */ - #define FT_PDU_V8_13_MAXFLOWS 35 /* max records in V8 PREFIX_TOS packet */ - #define FT_PDU_V8_14_MAXFLOWS 35 /* max records in V8 PREFIX_PORT_TOS packet */ -- - #define FT_PDU_V8_1_VERSION 2 /* version of AS packet */ - #define FT_PDU_V8_2_VERSION 2 /* version of PROTO PORT packet */ - #define FT_PDU_V8_3_VERSION 2 /* version of SRC PREFIX packet */ -@@ -3029,6 +3028,8 @@ #ifndef IN_CLASSD_SSM - #define IN_CLASSD_SSM(i) (((u_int32_t)(i) & 0xff000000) == 0xe8000000) - #endif /* IN_CLASSD_SSM */ - -+void *vpadd(const void* v, const int change); -+ - /* MACHINE DEPENDANT */ - #define fmt_uint fmt_uint32 - -diff --git a/lib/fttlv.c b/lib/fttlv.c -index 7035813..330a783 100644 ---- a/lib/fttlv.c -+++ b/lib/fttlv.c -@@ -68,10 +68,10 @@ int fttlv_enc_uint32(void *buf, int buf_ - } - - bcopy(&t, buf, 2); -- (char*)buf+= 2; -+ buf = vpadd(buf, 2); - - bcopy(&len, buf, 2); -- (char*)buf+= 2; -+ buf = vpadd(buf, 2); - - bcopy(&v, buf, 4); - -@@ -107,10 +107,10 @@ int fttlv_enc_uint16(void *buf, int buf_ - } - - bcopy(&t, buf, 2); -- (char*)buf+= 2; -+ buf = vpadd(buf, 2); - - bcopy(&len, buf, 2); -- (char*)buf+= 2; -+ buf = vpadd(buf, 2); - - bcopy(&v, buf, 2); - -@@ -145,10 +145,10 @@ int fttlv_enc_uint8(void *buf, int buf_s - } - - bcopy(&t, buf, 2); -- (char*)buf+= 2; -+ buf = vpadd(buf, 2); - - bcopy(&len, buf, 2); -- (char*)buf+= 2; -+ buf = vpadd(buf, 2); - - bcopy(&v, buf, 1); - -@@ -183,10 +183,10 @@ int fttlv_enc_str(void *buf, int buf_siz - } - - bcopy(&t, buf, 2); -- (char*)buf+= 2; -+ buf = vpadd(buf, 2); - - bcopy(&len, buf, 2); -- (char*)buf+= 2; -+ buf = vpadd(buf, 2); - - bcopy(v, buf, len); - -@@ -230,16 +230,16 @@ int fttlv_enc_ifname(void *buf, int buf_ - return -1; - - bcopy(&t, buf, 2); -- (char*)buf+= 2; -+ buf = vpadd(buf, 2); - - bcopy(&len, buf, 2); -- (char*)buf+= 2; -+ buf = vpadd(buf, 2); - - bcopy(&ip, buf, 4); -- (char*)buf += 4; -+ buf = vpadd(buf, 4); - - bcopy(&ifIndex, buf, 2); -- (char*)buf += 2; -+ buf = vpadd(buf, 2); - - bcopy(name, buf, n); - -@@ -287,19 +287,19 @@ int fttlv_enc_ifalias(void *buf, int buf - } - - bcopy(&t, buf, 2); -- (char*)buf+= 2; -+ buf = vpadd(buf, 2); - - bcopy(&len, buf, 2); -- (char*)buf+= 2; -+ buf = vpadd(buf, 2); - - bcopy(&ip, buf, 4); -- (char*)buf += 4; -+ buf = vpadd(buf, 4); - - bcopy(&entries, buf, 2); -- (char*)buf += 2; -+ buf = vpadd(buf, 2); - - bcopy(ifIndex_list, buf, esize); -- (char*)buf += esize; -+ buf = vpadd(buf, esize); - - bcopy(name, buf, n); - -diff --git a/lib/support.c b/lib/support.c -index a32ffe7..2e1db9f 100644 ---- a/lib/support.c -+++ b/lib/support.c -@@ -736,3 +736,8 @@ int udp_cksum(struct ip *ip, struct udph - return sum; - } /* udp_cksum */ - -+// void pointer add -+ -+void * vpadd(const void *v, const int change) { -+ return (void *) (((char*) v) + change); -+} --- -1.3.3 - diff --git a/flow-tools-0.68-0003-Avoid-external-debug-variable.patch b/flow-tools-0.68-0003-Avoid-external-debug-variable.patch deleted file mode 100644 index 906b9db..0000000 --- a/flow-tools-0.68-0003-Avoid-external-debug-variable.patch +++ /dev/null @@ -1,31 +0,0 @@ -From nobody Mon Sep 17 00:00:00 2001 -From: Paul P Komkoff Jr -Date: Sat, 10 Jun 2006 20:51:50 +0400 -Subject: [PATCH 3/8] Avoid external "debug" variable. - -When buildinf flow-tools as bunch of binaries depending on shared library, -extern int debug shows in too much places. Disable it for now until better -solution will be developed. - ---- - - lib/ftfile.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -1707e321511feb9b7cb117fb6be4d8bcfa8996de -diff --git a/lib/ftfile.c b/lib/ftfile.c -index 2f3ae76..f25e849 100644 ---- a/lib/ftfile.c -+++ b/lib/ftfile.c -@@ -53,7 +53,7 @@ #endif - - int load_dir(char *prefix, struct ftfile_entries *fte, int flags, int *depth); - --extern int debug; -+#define debug 0 - - /* - * function: ftfile_entry_new --- -1.3.3 - diff --git a/flow-tools-0.68-0004-Make-flow-tools-more-FHS-compliant-and-buildable-by-newer-toolchain.patch b/flow-tools-0.68-0004-Make-flow-tools-more-FHS-compliant-and-buildable-by-newer-toolchain.patch deleted file mode 100644 index d574f1b..0000000 --- a/flow-tools-0.68-0004-Make-flow-tools-more-FHS-compliant-and-buildable-by-newer-toolchain.patch +++ /dev/null @@ -1,236 +0,0 @@ -From nobody Mon Sep 17 00:00:00 2001 -From: Paul P Komkoff Jr -Date: Sat, 10 Jun 2006 20:53:33 +0400 -Subject: [PATCH 4/8] Make flow-tools more FHS-compliant and buildable by newer toolchain. - -Here we are switching to new toolchain (autoconf, automake & libtool), -changing some paths (obviously config files should be put in sysconfdir - -usually etc - and not in localstatedir which is var) - ---- - - configs/Makefile.am | 4 ++-- - configure.in | 45 ++++++++++++++++++++++++++++++--------------- - lib/Makefile.am | 10 +++++----- - lib/ftpaths.h.in | 22 +++++++++++----------- - src/Makefile.am | 12 ++++++------ - 5 files changed, 54 insertions(+), 39 deletions(-) - -b03c8b4e55c5f6082ff427559ae5a8bc3e95b8f0 -diff --git a/configs/Makefile.am b/configs/Makefile.am -index 9b06b52..6ca85cc 100644 ---- a/configs/Makefile.am -+++ b/configs/Makefile.am -@@ -1,6 +1,6 @@ --ftsymdir=$(localstatedir)/sym -+ftsymdir=$(sysconfdir)/sym - ftsym_DATA = ip-prot.sym ip-type.sym tcp-port.sym asn.sym tag.sym - --ftcfgdir=$(localstatedir)/cfg -+ftcfgdir=$(sysconfdir)/cfg - ftcfg_DATA = map.cfg tag.cfg filter.cfg stat.cfg mask.cfg xlate.cfg - -diff --git a/configure.in b/configure.in -index 01987e8..597bbbd 100644 ---- a/configure.in -+++ b/configure.in -@@ -1,31 +1,32 @@ - dnl Process this file with autoconf to produce a configure script. --AC_INIT(lib/bit1024.c) -+AC_INIT(flow-tools, 0.68) - --AC_PREFIX_DEFAULT(/usr/local/netflow) -+AC_PREFIX_DEFAULT(/usr/local/flow-tools) - --AM_INIT_AUTOMAKE(flow-tools, 0.68) --AM_CONFIG_HEADER(lib/ftconfig.h:lib/ftconfig.h.in) -+AM_INIT_AUTOMAKE -+AM_CONFIG_HEADER(lib/ftconfig.h) - --CFLAGS="-g -Wall" -+dnl CFLAGS="-g -Wall" - - dnl Checks for programs. -+AC_PROG_LIBTOOL - AC_PROG_CC - AC_PROG_INSTALL - AC_PROG_MAKE_SET - AC_PROG_YACC - YACC="$YACC -d" --AC_PROG_RANLIB - AM_PROG_LEX - - AC_SUBST(YLIB) - AC_SUBST(MYSQLLIB) - AC_SUBST(MYSQLCFLAGS) --AC_SUBST(MYSQLINCLUDE) -+AC_SUBST(MYSQLLDFLAGS) - AC_SUBST(PGSQLLIB) - AC_SUBST(PGSQLCFLAGS) --AC_SUBST(PGSQLINCLUDE) -+AC_SUBST(PGSQLLDFLAGS) - AC_SUBST(CRYPTOLIB) - AC_SUBST(OPENSSLINCLUDE) -+AC_SUBST(OPENSSLLDFLAGS) - - dnl extra argument: --with-mysql - WITH_MYSQL= -@@ -66,37 +67,51 @@ AC_ARG_WITH(openssl, - dnl Checks for libraries. - - if test "x$WHERE_MYSQL" != "x"; then -- LIBS="-L$WHERE_MYSQL/lib/mysql" -+ old_LIBS="$LIBS" -+ old_LDFLAGS="$LDFLAGS" -+ LDFLAGS="$LDFLAGS -L$WHERE_MYSQL/lib/mysql" - AC_CHECK_LIB(mysqlclient, my_init, - [ -- MYSQLCFLAGS="-L$WHERE_MYSQL/lib/mysql -I$WHERE_MYSQL/include/mysql" -+ MYSQLCFLAGS="-I$WHERE_MYSQL/include/mysql" -+ MYSQLLDFLAGS="-L$WHERE_MYSQL/lib/mysql" - MYSQLLIB="-lmysqlclient" - AC_DEFINE(HAVE_MYSQL) - ] - ) -+ LIBS="$old_LIBS" -+ LDFLAGS="$old_LDFLAGS" - fi - - if test "x$WHERE_OPENSSL" != "x"; then -- LIBS="-L$WHERE_OPENSSL/lib" -+ old_LIBS="$LIBS" -+ old_LDFLAGS="$LDFLAGS" -+ LDFLAGS="$LDFLAGS -L$WHERE_OPENSSL/lib" - AC_CHECK_LIB(crypto, EVP_EncryptUpdate, - [ -- OPENSSLCFLAGS="-L$WHERE_OPENSSL/lib -I$WHERE_OPENSSL/include" -+ OPENSSLCFLAGS="-I$WHERE_OPENSSL/include" -+ OPENSSLLDFLAGS="-L$WHERE_OPENSSL/lib" - CRYPTOLIB="-lcrypto" - AC_DEFINE(HAVE_OPENSSL) - ] - ) -+ LIBS="$old_LIBS" -+ LDFLAGS="$old_LDFLAGS" - fi - -- - if test "x$WHERE_PGSQL" != "x"; then -- LIBS="-L$WHERE_PGSQL/lib/pgsql" -+ old_LIBS="$LIBS" -+ old_LDFLAGS="$LDFLAGS" -+ LDFLAGS="-L$WHERE_PGSQL/lib/pgsql" - AC_CHECK_LIB(pq, PQsetdbLogin, - [ -- PGSQLCFLAGS="-L$WHERE_PGSQL/lib -I$WHERE_PGSQL/include/pgsql" -+ PGSQLCFLAGS="-I$WHERE_PGSQL/include/pgsql" -+ PGSQLLDFLAGS="-L$WHERE_PGSQL/lib" - PGSQLLIB="-lpq" - AC_DEFINE(HAVE_PGSQL) - ] - ) -+ LIBS="$old_LIBS" -+ LDFLAGS="$old_LDFLAGS" - fi - - AC_CHECK_LIB(y, main,YLIB="$YLIB -ly",) -diff --git a/lib/Makefile.am b/lib/Makefile.am -index 08e684a..5a4727b 100644 ---- a/lib/Makefile.am -+++ b/lib/Makefile.am -@@ -2,17 +2,17 @@ ## Process this file with automake to pr - - #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 - --DEFS=-I. -I$(srcdir)/lib -+#DEFS=-I. -I$(srcdir)/lib - - include_HEADERS = ftlib.h ftqueue.h radix.h ftpaths.h ftconfig.h --lib_LIBRARIES = libft.a -+lib_LTLIBRARIES = libft.la - --libft_a_SOURCES = ftio.c ftswap.c ftencode.c ftdecode.c ftprof.c bit1024.c \ -+libft_la_SOURCES = ftio.c ftswap.c ftencode.c ftdecode.c ftprof.c bit1024.c \ - fmt.c support.c ftfile.c fttlv.c ftmap.c ftrec.c fterr.c \ - ftchash.c ftsym.c radix.c fttag.c ftfil.c ftstat.c getdate.c ftxfield.c\ - ftmask.c ftvar.c ftxlate.c - --libft_a_LIBADD = @LIBOBJS@ -+libft_la_LIBADD = $(LTLIBOBJS) $(CRYPTOLIB) - -diff --git a/lib/ftpaths.h.in b/lib/ftpaths.h.in -index ae8e30a..b0c91b1 100644 ---- a/lib/ftpaths.h.in -+++ b/lib/ftpaths.h.in -@@ -29,17 +29,17 @@ - #ifndef FTPATHS_H - #define FTPATHS_H - --#define FT_PATH_CFG_MAP "@localstatedir@/cfg/map.cfg" --#define FT_PATH_CFG_TAG "@localstatedir@/cfg/tag.cfg" --#define FT_PATH_CFG_FILTER "@localstatedir@/cfg/filter.cfg" --#define FT_PATH_CFG_STAT "@localstatedir@/cfg/stat.cfg" --#define FT_PATH_CFG_MASK "@localstatedir@/cfg/mask.cfg" --#define FT_PATH_CFG_XLATE "@localstatedir@/cfg/xlate.cfg" -+#define FT_PATH_CFG_MAP "@sysconfdir@/cfg/map.cfg" -+#define FT_PATH_CFG_TAG "@sysconfdir@/cfg/tag.cfg" -+#define FT_PATH_CFG_FILTER "@sysconfdir@/cfg/filter.cfg" -+#define FT_PATH_CFG_STAT "@sysconfdir@/cfg/stat.cfg" -+#define FT_PATH_CFG_MASK "@sysconfdir@/cfg/mask.cfg" -+#define FT_PATH_CFG_XLATE "@sysconfdir@/cfg/xlate.cfg" - --#define FT_PATH_SYM_IP_PROT "@localstatedir@/sym/ip-prot.sym" --#define FT_PATH_SYM_IP_TYPE "@localstatedir@/sym/ip-type.sym" --#define FT_PATH_SYM_TCP_PORT "@localstatedir@/sym/tcp-port.sym" --#define FT_PATH_SYM_ASN "@localstatedir@/sym/asn.sym" --#define FT_PATH_SYM_TAG "@localstatedir@/sym/tag.sym" -+#define FT_PATH_SYM_IP_PROT "@sysconfdir@/sym/ip-prot.sym" -+#define FT_PATH_SYM_IP_TYPE "@sysconfdir@/sym/ip-type.sym" -+#define FT_PATH_SYM_TCP_PORT "@sysconfdir@/sym/tcp-port.sym" -+#define FT_PATH_SYM_ASN "@sysconfdir@/sym/asn.sym" -+#define FT_PATH_SYM_TAG "@sysconfdir@/sym/tag.sym" - - #endif /* FTPATHS_H */ -diff --git a/src/Makefile.am b/src/Makefile.am -index c5ac63b..f85f427 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -7,7 +7,7 @@ DEFS=-I$(srcdir)/../lib -L$(srcdir)/../l - - #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 - - bin_PROGRAMS = flow-capture flow-cat flow-stat flow-print flow-dscan \ - flow-send flow-receive flow-gen flow-expire \ -@@ -101,9 +101,9 @@ flow_filter_LDADD = -lft @LEXLIB@ @YLIB - flow_filter_DEPENDENCIES = ftbuild.h - - flow_export_SOURCES = flow-export.c --flow_export_LDFLAGS = -L../lib --flow_export_CFLAGS = @MYSQLCFLAGS@ @PGSQLCFLAGS@ --flow_export_LDADD = -lft @MYSQLLIB@ @PGSQLLIB@ -+flow_export_LDFLAGS = -L../lib $(MYSQLLDFLAGS) $(PGSQLLDFLAGS) -+flow_export_CFLAGS = $(MYSQLCFLAGS) $(PGSQLCFLAGS) -+flow_export_LDADD = -lft $(MYSQLLIB) $(PGSQLLIB) - flow_export_DEPENDENCIES = ftbuild.h - - flow_header_SOURCES = flow-header.c -@@ -117,8 +117,8 @@ flow_split_LDADD = -lft - flow_split_DEPENDENCIES = ftbuild.h - - flow_xlate_SOURCES = flow-xlate.c --flow_xlate_LDFLAGS = -L../lib --flow_xlate_LDADD = -lft @CRYPTOLIB@ -+flow_xlate_LDFLAGS = -L../lib $(CRYPTOLDFLAGS) -+flow_xlate_LDADD = -lft $(CRYPTOLIB) - flow_xlate_DEPENDENCIES = ftbuild.h - - flow_tag_SOURCES = flow-tag.c --- -1.3.3 - diff --git a/flow-tools-0.68-0005-Fix-breakage-on-64bit-platforms.patch b/flow-tools-0.68-0005-Fix-breakage-on-64bit-platforms.patch deleted file mode 100644 index e48579c..0000000 --- a/flow-tools-0.68-0005-Fix-breakage-on-64bit-platforms.patch +++ /dev/null @@ -1,58 +0,0 @@ -From nobody Mon Sep 17 00:00:00 2001 -From: Paul P Komkoff Jr -Date: Sat, 10 Jun 2006 20:55:20 +0400 -Subject: [PATCH 5/8] Fix breakage on 64bit platforms. - -Due to variable size differences it is nesessary to create temporary -variable of type time_t to hold the time. - ---- - - lib/ftfile.c | 8 +++++--- - 1 files changed, 5 insertions(+), 3 deletions(-) - -bc0750fd6719d64377e578373ad4325e1440eb6a -diff --git a/lib/ftfile.c b/lib/ftfile.c -index f25e849..ec17771 100644 ---- a/lib/ftfile.c -+++ b/lib/ftfile.c -@@ -413,16 +413,17 @@ void ftfile_pathname(char *buf, int bsiz - int done, u_int32 ftime) - { - struct tm *tm; -+ time_t _t = (time_t) ftime; - char *prefix, dbuf[64]; - long gmt_val; - char gmt_sign; - int tm_gmtoff; - -- if (!(tm = localtime ((time_t*)&ftime))) { -+ if (!(tm = localtime (&_t))) { - snprintf(buf, bsize, "."); - } - -- tm_gmtoff = get_gmtoff(ftime); -+ tm_gmtoff = get_gmtoff(_t); - - /* compute GMT offset */ - if (tm_gmtoff >= 0) { -@@ -502,6 +503,7 @@ void ftfile_pathname(char *buf, int bsiz - int ftfile_mkpath(u_int32 ftime, int nest) - { - struct tm *tm; -+ time_t _t = (time_t) ftime; - char buf[32]; - - /* no directories */ -@@ -512,7 +514,7 @@ int ftfile_mkpath(u_int32 ftime, int nes - if ((nest > 3) || (nest < -3)) - return -1; - -- if (!(tm = localtime ((time_t*)&ftime))) -+ if (!(tm = localtime (&_t))) - return -1; - - if (nest == -1) --- -1.3.3 - diff --git a/flow-tools-0.68-0006-Fix-unitialized-variable-in-flow-send.patch b/flow-tools-0.68-0006-Fix-unitialized-variable-in-flow-send.patch deleted file mode 100644 index 7cdfb09..0000000 --- a/flow-tools-0.68-0006-Fix-unitialized-variable-in-flow-send.patch +++ /dev/null @@ -1,30 +0,0 @@ -From nobody Mon Sep 17 00:00:00 2001 -From: Paul P Komkoff Jr -Date: Sat, 10 Jun 2006 20:57:01 +0400 -Subject: [PATCH 6/8] Fix unitialized variable in flow-send - -Variable hdr_len in flow-send.c was not initialized prior to usage in case -we aren't using spoofing. Fixed. - ---- - - src/flow-send.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -e9825a203d8b36576c8b8e92b4ab0ceb74cd0b05 -diff --git a/src/flow-send.c b/src/flow-send.c -index 83ca926..ad87024 100644 ---- a/src/flow-send.c -+++ b/src/flow-send.c -@@ -76,7 +76,7 @@ int main(int argc, char **argv) - u_int32 privacy_mask; - unsigned int v1, v2, one; - int i, n, ret, tx_delay, udp_sock; -- int src_ip_spoof, hdr_len; -+ int src_ip_spoof, hdr_len = 0; - void *rec; - - /* init fterr */ --- -1.3.3 - diff --git a/flow-tools-0.68-0007-Add-extra-debugging-to-ftpdu_verify.patch b/flow-tools-0.68-0007-Add-extra-debugging-to-ftpdu_verify.patch deleted file mode 100644 index 3941844..0000000 --- a/flow-tools-0.68-0007-Add-extra-debugging-to-ftpdu_verify.patch +++ /dev/null @@ -1,63 +0,0 @@ -From nobody Mon Sep 17 00:00:00 2001 -From: Ben Feinstein -Date: Sat, 10 Jun 2006 20:59:13 +0400 -Subject: [PATCH 7/8] Add extra debugging to ftpdu_verify() - ---- - - lib/ftdecode.c | 16 +++++++++++++--- - 1 files changed, 13 insertions(+), 3 deletions(-) - -6c73ed47b26944f97fa8d5cfed1719b8146c124a -diff --git a/lib/ftdecode.c b/lib/ftdecode.c -index ff6b0cf..8884db9 100644 ---- a/lib/ftdecode.c -+++ b/lib/ftdecode.c -@@ -122,8 +122,10 @@ int ftpdu_verify(struct ftpdu *ftpdu) - ret = -1; - - /* enough bytes to decode the count and version? */ -- if (ftpdu->bused < 4) -+ if (ftpdu->bused < 4) { -+ fterr_warnx("not enough bytes to decode the count and version."); - goto ftpdu_verify_out_quick; -+ } - - ph = (struct ftpdu_header*)&ftpdu->buf; - -@@ -158,15 +160,22 @@ #endif /* LITTLE_ENDIAN */ - case 5: - - /* max PDU's in record */ -- if (ph->count > FT_PDU_V5_MAXFLOWS) -+ if (ph->count > FT_PDU_V5_MAXFLOWS) { -+ fterr_warnx("too many pdus (%d) in record, max %d", ph->count, -+ FT_PDU_V5_MAXFLOWS); - goto ftpdu_verify_out; -+ } -+ - - size = offsetof(struct ftpdu_v5, records) + - ph->count * sizeof (struct ftrec_v5); - - /* PDU received size == PDU expected size? */ -- if (size != ftpdu->bused) -+ if (size != ftpdu->bused) { -+ fterr_warnx("pdu received size was wrong. expected %d got %d", -+ ftpdu->bused, size); - goto ftpdu_verify_out; -+ } - - ftpdu->ftv.d_version = 5; - ftpdu->decodef = fts3rec_pdu_v5_decode; -@@ -516,6 +525,7 @@ #endif /* LITTLE_ENDIAN */ - break; /* 8 */ - - default: -+ fterr_warnx("ftpdu version not set."); - goto ftpdu_verify_out; - - } /* switch ph->version */ --- -1.3.3 - diff --git a/flow-tools-0.68-0008-Fix-unitialized-variable-in-flow-export.c.patch b/flow-tools-0.68-0008-Fix-unitialized-variable-in-flow-export.c.patch deleted file mode 100644 index 3486689..0000000 --- a/flow-tools-0.68-0008-Fix-unitialized-variable-in-flow-export.c.patch +++ /dev/null @@ -1,31 +0,0 @@ -From nobody Mon Sep 17 00:00:00 2001 -From: Ben Feinstein -Date: Sat, 10 Jun 2006 21:01:04 +0400 -Subject: [PATCH 8/8] Fix unitialized variable in flow-export.c - -Without this patch, flow-export utility will misformat its SQL output when -using the MySQL output format causing the export to fail. Specifcally, the -commas between the fields are getting mangled. - ---- - - src/flow-export.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -bcb0b33cc9bb9427726db853a093d081dc77a1c6 -diff --git a/src/flow-export.c b/src/flow-export.c -index 52ae4d2..22b0330 100644 ---- a/src/flow-export.c -+++ b/src/flow-export.c -@@ -961,7 +961,7 @@ #endif /* PGSQL */ - - int fmt_xfields_type(char *buf, u_int64 xfield) - { -- int comma; -+ int comma = 0; - - buf[0] = 0; - --- -1.3.3 - diff --git a/flow-tools-0.68.rpt72.patch b/flow-tools-0.68.rpt72.patch deleted file mode 100644 index 6ab2bf4..0000000 --- a/flow-tools-0.68.rpt72.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- flow-tools-0.68/lib/ftstat.c.orig 2005-05-10 21:48:12.000000000 +0600 -+++ flow-tools-0.68/lib/ftstat.c 2006-04-10 14:59:28.000000000 +0600 -@@ -11673,10 +11673,10 @@ - ftch_recprefix_tag, ftch_recprefix_tagp); - - FT_RECGET_DSTADDR(cur,rec,*fo); -- FT_RECGET_DST_TAG(cur,rec,*fo); -+ FT_RECGET_SRC_TAG(cur,rec,*fo); - - ftch_recprefix_tag.prefix = cur.dstaddr; -- ftch_recprefix_tag.tag = cur.dst_tag; -+ ftch_recprefix_tag.tag = cur.src_tag; - - /* only use mask if option set */ - if (rpt->options & (FT_STAT_OPT_DST_PREFIX_MASK|FT_STAT_OPT_DST_PREFIX_LEN)) { diff --git a/flow-tools.spec b/flow-tools.spec index c7121d3..d1d6ea1 100644 --- a/flow-tools.spec +++ b/flow-tools.spec @@ -1,23 +1,31 @@ -Version: 0.68 +%bcond_without fedora + +%global uid 40 +%global username flow-tools +%global homedir %{_localstatedir}/%{name} +%global gecos "Network flow monitoring" + +Version: 0.68.5 Name: flow-tools Summary: Tool set for working with NetFlow data -Release: 12%{?dist} +Release: 1%{?dist} Group: Applications/System License: BSD -URL: http://www.splintered.net/sw/flow-tools/ -Source0: ftp://ftp.eng.oar.net/pub/flow-tools/flow-tools-%{version}.tar.gz -Patch1: flow-tools-0.68-0001-Fix-first-line-of-included-python-scripts.patch -Patch2: flow-tools-0.68-0002-Fix-an-invalid-lvalue-in-assignment-compile-error.patch -Patch3: flow-tools-0.68-0003-Avoid-external-debug-variable.patch -Patch4: flow-tools-0.68-0004-Make-flow-tools-more-FHS-compliant-and-buildable-by-newer-toolchain.patch -Patch5: flow-tools-0.68-0005-Fix-breakage-on-64bit-platforms.patch -Patch6: flow-tools-0.68-0006-Fix-unitialized-variable-in-flow-send.patch -Patch7: flow-tools-0.68-0007-Add-extra-debugging-to-ftpdu_verify.patch -Patch8: flow-tools-0.68-0008-Fix-unitialized-variable-in-flow-export.c.patch -Patch9: flow-tools-0.68.rpt72.patch +URL: http://code.google.com/p/%{name}/ +Source0: http://%{name}.googlecode.com/files/%{name}-%{version}.tar.bz2 +Source1: flow-capture.init +Source2: flow-capture.sysconfig +BuildRequires: openssl-devel mysql-devel postgresql-devel zlib-devel +BuildRequires: bison flex tcp_wrappers-devel +BuildRequires: fedora-usermgmt-devel doxygen +%{?FE_USERADD_REQ} +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +Requires(post): initscripts chkconfig +Requires(preun): initscripts chkconfig +Requires(postun): initscripts +Provides: group(%username) = %uid +Provides: user(%username) = %uid -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: openssl-devel mysql-devel postgresql-devel autoconf automake libtool zlib-devel bison flex tcp_wrappers %description Flow-tools is library and a collection of programs used to collect, @@ -45,55 +53,238 @@ contributed and are included in the distribution. This package contains header files required to build applications that use libft. +%package rrdtool +Summary: Scripts for flow-tools to build rrd graphs +Group: Applications/System +Requires: %{name} = %{version}-%{release} rrdtool-python + +%description rrdtool +Flow-tools is library and a collection of programs used to collect, +send, process, and generate reports from NetFlow data. The tools can be +used together on a single server or distributed to multiple servers for +large deployments. The flow-toools library provides an API for development +of custom applications for NetFlow export versions 1,5,6 and the 14 currently +defined version 8 subversions. A Perl and Python interface have been +contributed and are included in the distribution. + +This package contains scripts that use python-rrdtool to create rrds and graphs +from flow data. + +%package docs +Summary: HTML and other redundant docs for flow-tools +Group: Applications/System +Requires: %{name} = %{version}-%{release} + +%description docs +Flow-tools is library and a collection of programs used to collect, +send, process, and generate reports from NetFlow data. The tools can be +used together on a single server or distributed to multiple servers for +large deployments. The flow-toools library provides an API for development +of custom applications for NetFlow export versions 1,5,6 and the 14 currently +defined version 8 subversions. A Perl and Python interface have been +contributed and are included in the distribution. + +This package contains additional documentation, such as man pages in html format. + %prep %setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 %build -autoreconf -f -i -s -%configure --localstatedir=%{_localstatedir}/ft --sysconfdir=%{_sysconfdir}/flow-tools --enable-static=no --with-mysql --with-pgsql --with-openssl +%configure \ + --localstatedir=%{_localstatedir}/%{name} \ + --sysconfdir=%{_sysconfdir}/%{name} \ + --enable-static=no \ + --with-mysql \ + --with-postgresql \ + --with-openssl + +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT -%makeinstall localstatedir=$RPM_BUILD_ROOT%{_localstatedir}/ft sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir}/flow-tools +make DESTDIR=$RPM_BUILD_ROOT install find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';' -mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/ft +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/%{name} +install -d $RPM_BUILD_ROOT%{_initrddir} +install -m 0755 %SOURCE1 $RPM_BUILD_ROOT%{_initrddir}/flow-capture +install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig +install -m 0644 %SOURCE2 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/flow-capture %clean rm -rf $RPM_BUILD_ROOT -%post -p /sbin/ldconfig +%pre +%__fe_groupadd %uid -r %username &>/dev/null || : +%__fe_useradd %uid -r -s /sbin/nologin -d %homedir -M \ + -c '%gecos' -g %username %username &>/dev/null || : -%postun -p /sbin/ldconfig +%post +/sbin/ldconfig +/sbin/chkconfig --add flow-capture + +%preun +if [ $1 = 0 ]; then + /sbin/service flow-capture stop >/dev/null 2>&1 + /sbin/chkconfig --del flow-capture +fi + +%postun +/sbin/ldconfig +if [ "$1" -ge "1" ]; then + /sbin/service flow-capture condrestart >/dev/null 2>&1 || : +fi + +%__fe_userdel %username &>/dev/null || : +%__fe_groupdel %username &>/dev/null || : %files %defattr(-,root,root) -%doc README TODO COPYING SECURITY ChangeLog docs/*.html -%{_mandir}/man1/* -%{_bindir}/* +%doc README README.fork COPYING ChangeLog +%{_mandir}/man1/flow-capture.1* +%{_mandir}/man1/flow-cat.1* +%{_mandir}/man1/flow-dscan.1* +%{_mandir}/man1/flow-expire.1* +%{_mandir}/man1/flow-export.1* +%{_mandir}/man1/flow-fanout.1* +%{_mandir}/man1/flow-filter.1* +%{_mandir}/man1/flow-gen.1* +%{_mandir}/man1/flow-header.1* +%{_mandir}/man1/flow-import.1* +%{_mandir}/man1/flow-mask.1* +%{_mandir}/man1/flow-merge.1* +%{_mandir}/man1/flow-nfilter.1* +%{_mandir}/man1/flow-print.1* +%{_mandir}/man1/flow-receive.1* +%{_mandir}/man1/flow-report.1* +%{_mandir}/man1/flow-rptfmt.1* +%{_mandir}/man1/flow-send.1* +%{_mandir}/man1/flow-split.1* +%{_mandir}/man1/flow-stat.1* +%{_mandir}/man1/flow-tag.1* +%{_mandir}/man1/flow-tools-examples.1* +%{_mandir}/man1/flow-tools.1* +%{_mandir}/man1/flow-xlate.1* +%{_bindir}/flow-capture +%{_bindir}/flow-cat +%{_bindir}/flow-dscan +%{_bindir}/flow-expire +%{_bindir}/flow-export +%{_bindir}/flow-fanout +%{_bindir}/flow-filter +%{_bindir}/flow-gen +%{_bindir}/flow-header +%{_bindir}/flow-import +%{_bindir}/flow-mask +%{_bindir}/flow-merge +%{_bindir}/flow-nfilter +%{_bindir}/flow-print +%{_bindir}/flow-receive +%{_bindir}/flow-report +%{_bindir}/flow-rptfmt +%{_bindir}/flow-send +%{_bindir}/flow-split +%{_bindir}/flow-stat +%{_bindir}/flow-tag +%{_bindir}/flow-xlate %{_libdir}/*.so.* -%dir %{_sysconfdir}/flow-tools/ -%dir %{_sysconfdir}/flow-tools/cfg/ -%dir %{_sysconfdir}/flow-tools/sym/ -%config(noreplace) %{_sysconfdir}/flow-tools/cfg/* -%config(noreplace) %{_sysconfdir}/flow-tools/sym/* -%{_localstatedir}/ft/ +%dir %{_sysconfdir}/%{name}/ +%dir %{_sysconfdir}/%{name}/cfg/ +%dir %{_sysconfdir}/%{name}/sym/ +%config(noreplace) %{_sysconfdir}/%{name}/cfg/* +%config(noreplace) %{_sysconfdir}/%{name}/sym/* +%config(noreplace) %{_sysconfdir}/sysconfig/flow-capture +%{_initrddir}/flow-capture +%attr(-,flow-tools,flow-tools) %{_localstatedir}/%{name}/ +%dir %{_datadir}/%{name}/ +%{_datadir}/%{name}/* %files devel %defattr(-,root,root,-) %{_libdir}/*.so %{_includedir}/*.h +%files rrdtool +%defattr(-,root,root) +%{_bindir}/flow-rpt2rrd +%{_bindir}/flow-log2rrd +%{_mandir}/man1/flow-rpt2rrd.1* +%{_mandir}/man1/flow-log2rrd.1* + +%files docs +%defattr(-,root,root) +%doc docs/*.html ChangeLog.old TODO INSTALL SECURITY + %changelog +* Thu Feb 25 2010 Paul P Komkoff Jr - 0.68.5 +- bunch of fixes from upstream + +* Fri Aug 21 2009 Tomas Mraz - 0.68.4.1-4 +- rebuilt with new openssl + +* Fri Jul 24 2009 Fedora Release Engineering - 0.68.4.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Feb 24 2009 Fedora Release Engineering - 0.68.4.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Mon Feb 2 2009 Paul P Komkoff Jr - 0.68.4.1-1 +- fix for pcap generation, by Dave Plonka +- split out -rrdtool subpackage, for those who don't need rrdtool on their servers. + +* Sat Jan 24 2009 Caolán McNamara - 0.68.4-2 +- rebuild for dependencies + +* Mon Mar 31 2008 Paul P Komkoff Jr - 0.68.4-1 +- New upstream version + +* Tue Feb 19 2008 Fedora Release Engineering - 0.68.4-0.2.rc1 +- Autorebuild for GCC 4.3 + +* Tue Feb 19 2008 Paul P Komkoff Jr - 0.68.4-0.1.rc1 +- new upstream release candidate + +* Fri Dec 07 2007 Release Engineering - 0.68.3-2 +- Rebuild for deps + +* Mon Nov 12 2007 Paul P Komkoff Jr - 0.68.3-1 +- new upstream release +- build tools as PIE +- get rid of ftpaths.h +- do not ship ftconfig.c +- do not require libft + +* Sat Nov 3 2007 Paul P Komkoff Jr - 0.68.2-1 +- New upstream release + +* Thu Sep 13 2007 Orion Poplawski - 0.68.1-2 +- Add user and init scripts + +* Sun Aug 5 2007 Paul P Komkoff Jr - 0.68.1-1 +- New upstream release + +* Sun Jul 15 2007 Paul P Komkoff Jr - 0.68.1-0.1.rc3 +- New upstream rc + +* Sun Jul 15 2007 Paul P Komkoff Jr - 0.68.1-0.1.rc2 +- Switch to 0.68.1 fork +- Drop all patches +- Sanitize spec + +* Sun Mar 25 2007 Paul P Komkoff Jr - 0.68-16 +- getopt() is now in unistd.h + +* Sun Mar 18 2007 Paul P Komkoff Jr - 0.68-15 +- Add runtime dependency for python-rrdtool + +* Fri Dec 15 2006 Paul P. Komkoff Jr +- rebuilt + +* Thu Dec 14 2006 Jason L Tibbitts III - 0.68-13 +- Rebuild for new Postgres + * Thu Nov 16 2006 Paul P Komkoff Jr - 0.68-12 - Fix flow report 72 (by reaper@surnet.ru) bz#212928 diff --git a/import.log b/import.log new file mode 100644 index 0000000..b04a966 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +flow-tools-0_68_5-1_el6:EL-4:flow-tools-0.68.5-1.el6.src.rpm:1278947380 diff --git a/sources b/sources index dba332c..bc93b26 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c9e0a8b53c79611b6bffcb9d510a5a38 flow-tools-0.68.tar.gz +3c5e75da2822ab6b4947c928c09ea365 flow-tools-0.68.5.tar.bz2 From 0ebba29fc030e85fca3d1a31f78d67c79a5438f1 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 12 Jul 2010 22:22:24 +0000 Subject: [PATCH 08/12] Use tcp_wrappers (not -devel) on EL-4 --- flow-tools.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flow-tools.spec b/flow-tools.spec index d1d6ea1..c0ae3f3 100644 --- a/flow-tools.spec +++ b/flow-tools.spec @@ -16,7 +16,7 @@ Source0: http://%{name}.googlecode.com/files/%{name}-%{version}.tar.bz2 Source1: flow-capture.init Source2: flow-capture.sysconfig BuildRequires: openssl-devel mysql-devel postgresql-devel zlib-devel -BuildRequires: bison flex tcp_wrappers-devel +BuildRequires: bison flex tcp_wrappers BuildRequires: fedora-usermgmt-devel doxygen %{?FE_USERADD_REQ} BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) From 5d6e693e6453b3b2ca9d28ce3c8c42a9144fdd68 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 12 Jul 2010 23:12:55 +0000 Subject: [PATCH 09/12] Drop unused and EL-4 incompatible %bcond macro --- flow-tools.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/flow-tools.spec b/flow-tools.spec index c0ae3f3..5d84c7e 100644 --- a/flow-tools.spec +++ b/flow-tools.spec @@ -1,5 +1,3 @@ -%bcond_without fedora - %global uid 40 %global username flow-tools %global homedir %{_localstatedir}/%{name} From f308bb3dec69e811a7f0079b8a15f5bdcbbb54d1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 28 Jul 2010 14:34:41 +0000 Subject: [PATCH 10/12] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - import.log | 1 - 4 files changed, 23 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch delete mode 100644 import.log diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index d5f19cf..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: flow-tools -# $Id: Makefile,v 1.1 2005/09/07 17:58:47 stingray Exp $ -NAME := flow-tools -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index 6ec5cef..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -EL-4 diff --git a/import.log b/import.log deleted file mode 100644 index b04a966..0000000 --- a/import.log +++ /dev/null @@ -1 +0,0 @@ -flow-tools-0_68_5-1_el6:EL-4:flow-tools-0.68.5-1.el6.src.rpm:1278947380 From e33a99e8cb6006841e5ef96bc07909ac30a980e1 Mon Sep 17 00:00:00 2001 From: "Paul P. Komkoff" Date: Mon, 28 Nov 2011 17:37:44 +0400 Subject: [PATCH 11/12] Failed merge --- flow-tools.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/flow-tools.spec b/flow-tools.spec index ae8cb8b..8b560b7 100644 --- a/flow-tools.spec +++ b/flow-tools.spec @@ -1,5 +1,3 @@ -%bcond_without fedora - %global uid 40 %global username flow-tools %global homedir %{_localstatedir}/%{name} From fdd9f95558775031308b38a9a9f9afad0ce8d173 Mon Sep 17 00:00:00 2001 From: "Paul P. Komkoff" Date: Mon, 28 Nov 2011 17:59:15 +0400 Subject: [PATCH 12/12] Failed merge --- flow-tools.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flow-tools.spec b/flow-tools.spec index 8b560b7..ddb6e5d 100644 --- a/flow-tools.spec +++ b/flow-tools.spec @@ -14,7 +14,7 @@ Source0: http://%{name}.googlecode.com/files/%{name}-%{version}.tar.bz2 Source1: flow-capture.init Source2: flow-capture.sysconfig BuildRequires: openssl-devel mysql-devel postgresql-devel zlib-devel -BuildRequires: bison flex tcp_wrappers-devel +BuildRequires: bison flex tcp_wrappers BuildRequires: fedora-usermgmt-devel doxygen %{?FE_USERADD_REQ} BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)