summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/flow-tools/ChangeLog10
-rw-r--r--net-analyzer/flow-tools/files/digest-flow-tools-0.68-r53
-rw-r--r--net-analyzer/flow-tools/files/flow-tools-0.68-another-amd64-casting-fixes.patch65
-rw-r--r--net-analyzer/flow-tools/flow-tools-0.68-r5.ebuild97
4 files changed, 174 insertions, 1 deletions
diff --git a/net-analyzer/flow-tools/ChangeLog b/net-analyzer/flow-tools/ChangeLog
index be63e7afd687..47ddf0932ffd 100644
--- a/net-analyzer/flow-tools/ChangeLog
+++ b/net-analyzer/flow-tools/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-analyzer/flow-tools
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/flow-tools/ChangeLog,v 1.29 2007/04/09 16:17:07 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/flow-tools/ChangeLog,v 1.30 2007/05/15 16:10:29 pva Exp $
+
+*flow-tools-0.68-r5 (15 May 2007)
+
+ 15 May 2007; <pva@gentoo.org>
+ +files/flow-tools-0.68-another-amd64-casting-fixes.patch,
+ +flow-tools-0.68-r5.ebuild:
+ Fixed amd64 specific problem reported by Alexander Zubkov <green AT
+ mes.msu.ru> in bug #177955.
*flow-tools-0.68-r4 (09 Apr 2007)
diff --git a/net-analyzer/flow-tools/files/digest-flow-tools-0.68-r5 b/net-analyzer/flow-tools/files/digest-flow-tools-0.68-r5
new file mode 100644
index 000000000000..3db6eb93276d
--- /dev/null
+++ b/net-analyzer/flow-tools/files/digest-flow-tools-0.68-r5
@@ -0,0 +1,3 @@
+MD5 c9e0a8b53c79611b6bffcb9d510a5a38 flow-tools-0.68.tar.gz 987151
+RMD160 71bfd1a40cb34fae55b2769d93208d13b3b0a927 flow-tools-0.68.tar.gz 987151
+SHA256 69d5353b339f917fc141919db042b007d5c8d31c9ad1bc2f989a41aa41d629df flow-tools-0.68.tar.gz 987151
diff --git a/net-analyzer/flow-tools/files/flow-tools-0.68-another-amd64-casting-fixes.patch b/net-analyzer/flow-tools/files/flow-tools-0.68-another-amd64-casting-fixes.patch
new file mode 100644
index 000000000000..1d795e1d4eaa
--- /dev/null
+++ b/net-analyzer/flow-tools/files/flow-tools-0.68-another-amd64-casting-fixes.patch
@@ -0,0 +1,65 @@
+diff -Naur flow-tools-0.68.orig/lib/ftio.c flow-tools-0.68/lib/ftio.c
+--- flow-tools-0.68.orig/lib/ftio.c 2007-05-15 18:56:54.000000000 +0000
++++ flow-tools-0.68/lib/ftio.c 2007-05-15 18:48:02.000000000 +0000
+@@ -1605,6 +1605,7 @@
+ u_int32 flags, fields;
+ u_long period;
+ int n, streaming2;
++ time_t _ftime;
+
+ fth = &ftio->fth;
+
+@@ -1639,17 +1640,21 @@
+ }
+
+ if (!streaming2)
+- if (fields & FT_FIELD_CAP_START)
++ if (fields & FT_FIELD_CAP_START) {
++ _ftime = (time_t)fth->cap_start;
+ fprintf(std, "%c capture start: %s", cc,
+- ctime((time_t*)&fth->cap_start));
++ ctime(&_ftime));
++ }
+
+ if (!streaming2) {
+
+ if ((flags & FT_HEADER_FLAG_DONE) || (flags & FT_HEADER_FLAG_PRELOADED)) {
+
+- if (fields & FT_FIELD_CAP_END)
++ if (fields & FT_FIELD_CAP_END) {
++ _ftime = (time_t)fth->cap_end;
+ fprintf(std, "%c capture end: %s", cc,
+- ctime((time_t*)&fth->cap_end));
++ ctime(&_ftime));
++ }
+
+ period = fth->cap_end - fth->cap_start;
+ if ((fields & FT_FIELD_CAP_END) && (fields & FT_FIELD_CAP_START))
+diff -Naur flow-tools-0.68.orig/lib/ftstat.c flow-tools-0.68/lib/ftstat.c
+--- flow-tools-0.68.orig/lib/ftstat.c 2007-05-15 18:56:54.000000000 +0000
++++ flow-tools-0.68/lib/ftstat.c 2007-05-15 18:51:00.000000000 +0000
+@@ -12363,7 +12363,7 @@
+ {
+ int comma, sort_field;
+ char *buf, fmt_buf[32];
+- time_t now;
++ time_t now, _ftime;
+
+ /* shortcut */
+ if (!(rpt->out->options & FT_STAT_OPT_HEADER))
+@@ -12619,11 +12619,13 @@
+ fprintf(fp, "# records_shown: %s\n", fmt_buf);
+ }
+
++ _ftime = (time_t)rpt->time_start;
+ fprintf(fp, "# first-flow: %lu %s",
+- (unsigned long)rpt->time_start, ctime((time_t*)&rpt->time_start));
++ (unsigned long)rpt->time_start, ctime(&_ftime));
+
++ _ftime = (time_t)rpt->time_end;
+ fprintf(fp, "# last-flow: %lu %s",
+- (unsigned long)rpt->time_end, ctime((time_t*)&rpt->time_end));
++ (unsigned long)rpt->time_end, ctime(&_ftime));
+
+ now = time((time_t*)0L);
+
diff --git a/net-analyzer/flow-tools/flow-tools-0.68-r5.ebuild b/net-analyzer/flow-tools/flow-tools-0.68-r5.ebuild
new file mode 100644
index 000000000000..ab231a311710
--- /dev/null
+++ b/net-analyzer/flow-tools/flow-tools-0.68-r5.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/flow-tools/flow-tools-0.68-r5.ebuild,v 1.1 2007/05/15 16:10:29 pva Exp $
+
+WANT_AUTOMAKE="1.6"
+WANT_AUTOCONF="latest"
+inherit eutils flag-o-matic autotools
+
+DESCRIPTION="Flow-tools is a package for collecting and processing NetFlow data"
+HOMEPAGE="http://www.splintered.net/sw/flow-tools/"
+SRC_URI="ftp://ftp.eng.oar.net/pub/flow-tools/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~ppc ~x86"
+IUSE="mysql postgres debug ssl"
+
+RDEPEND="sys-apps/tcp-wrappers
+ sys-libs/zlib
+ sys-devel/flex
+ !postgres? ( mysql? ( virtual/mysql ) )
+ !mysql? ( postgres? ( dev-db/postgresql ) )
+ ssl? ( dev-libs/openssl )"
+
+DEPEND="${RDEPEND}
+ sys-devel/bison"
+
+pkg_setup() {
+ if use mysql && use postgres ; then
+ echo
+ eerror "The mysql and postgres USE flags are mutually exclusive."
+ eerror "Please choose either USE=mysql or USE=postgres, but not both."
+ die
+ fi
+
+ enewgroup flows
+ enewuser flows -1 -1 /var/lib/flows flows
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-fix-configure.diff
+ epatch "${FILESDIR}"/${P}-fix-a-zillion-warnings-updated.diff
+ epatch "${FILESDIR}"/${P}-another-amd64-casting-fixes.patch
+ use debug || epatch ${FILESDIR}/${PN}-0.67-nodebug.patch
+ epatch "${FILESDIR}"/${PN}-0.67-memleak.patch
+
+ sed -i "s|^[^#]\(^.*CFLAGS=\).*$|\1-Wall|g" \
+ configure.in src/Makefile.am lib/Makefile.am || die "sed CFLAGS failed"
+
+ # bug 122842, we have /usr/bin/python and not /usr/local/bin/python
+ sed -i -e "s:/usr/local/bin/python:/usr/bin/python:g" \
+ "${S}"/bin/flow-{rptfmt,rpt2rrd,log2rrd}
+}
+
+src_compile() {
+ AM_OPTS="-f -i"
+ eautoreconf || die "autoreconf failed"
+
+ use mysql && append-flags "-L/usr/lib/mysql -I/usr/include/mysql"
+ use postgres && append-flags "-L/usr/lib/postgres -I/usr/include/postgres"
+
+ econf \
+ --localstatedir=/etc/flow-tools \
+ --enable-lfs \
+ $(use_with ssl openssl) \
+ $(use_with mysql) \
+ $(use_with postgres pgsql) \
+ || die "econf failed"
+
+ emake CFLAGS="${CFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failed"
+ dodoc ChangeLog README SECURITY TODO
+
+ keepdir /var/lib/flows
+ keepdir /var/lib/flows/bin
+ exeinto /var/lib/flows/bin
+ doexe "${FILESDIR}"/linkme
+ keepdir /var/run/flows
+
+ newinitd "${FILESDIR}/flowcapture.initd" flowcapture
+ newconfd "${FILESDIR}/flowcapture.confd" flowcapture
+
+}
+
+pkg_postinst() {
+ chown flows:flows /var/run/flows
+ chown flows:flows /var/lib/flows
+ chown flows:flows /var/lib/flows/bin
+ chmod 0755 /var/run/flows
+ chmod 0755 /var/lib/flows
+ chmod 0755 /var/lib/flows/bin
+}