summaryrefslogtreecommitdiff
path: root/net-analyzer/flow-tools
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-analyzer/flow-tools
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-analyzer/flow-tools')
-rw-r--r--net-analyzer/flow-tools/Manifest1
-rw-r--r--net-analyzer/flow-tools/files/flow-tools-0.68.5.1-run.patch22
-rw-r--r--net-analyzer/flow-tools/files/flow-tools-0.68.5.1-syslog.patch47
-rwxr-xr-xnet-analyzer/flow-tools/files/flowcapture.confd45
-rwxr-xr-xnet-analyzer/flow-tools/files/flowcapture.initd23
-rwxr-xr-xnet-analyzer/flow-tools/files/linkme15
-rw-r--r--net-analyzer/flow-tools/flow-tools-0.68.5.1-r2.ebuild78
-rw-r--r--net-analyzer/flow-tools/flow-tools-0.68.5.1-r4.ebuild72
-rw-r--r--net-analyzer/flow-tools/flow-tools-0.68.5.1-r5.ebuild72
-rw-r--r--net-analyzer/flow-tools/flow-tools-0.68.5.1-r6.ebuild72
-rw-r--r--net-analyzer/flow-tools/metadata.xml15
11 files changed, 462 insertions, 0 deletions
diff --git a/net-analyzer/flow-tools/Manifest b/net-analyzer/flow-tools/Manifest
new file mode 100644
index 00000000000..61b36de045d
--- /dev/null
+++ b/net-analyzer/flow-tools/Manifest
@@ -0,0 +1 @@
+DIST flow-tools-0.68.5.1.tar.bz2 914062 SHA256 80bbd3791b59198f0d20184761d96ba500386b0a71ea613c214a50aa017a1f67 SHA512 ae17ba39854daa8ef3deecd3a554bb6d1fa47648cb791d8225a40bec13f65bf0692871660b2c3490d133b1251875c323d066bb0c0483eceb0707cec9b7714c57 WHIRLPOOL 2e7b98abab82ec07639356c07c89bb480276fec945c48ef86188a70a28ff54ab5dd1f1c7b69945d7b4e2687aafee06bef81dceea655b15aa735c50455723be83
diff --git a/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-run.patch b/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-run.patch
new file mode 100644
index 00000000000..e1b06eee7e0
--- /dev/null
+++ b/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-run.patch
@@ -0,0 +1,22 @@
+--- a/src/flow-fanout.c
++++ b/src/flow-fanout.c
+@@ -57,7 +57,7 @@
+ #endif
+
+
+-#define FANOUT_PIDFILE "/var/run/flow-fanout.pid"
++#define FANOUT_PIDFILE "/run/flow-fanout.pid"
+
+ #define SELECT_TIMEOUT 5 /* 5 seconds */
+
+--- a/src/flow-capture.c
++++ b/src/flow-capture.c
+@@ -61,7 +61,7 @@
+
+ void fterr_exit_handler(int code);
+
+-#define CAPTURE_PIDFILE "/var/run/flow-capture.pid"
++#define CAPTURE_PIDFILE "/run/flow-capture.pid"
+
+ #define SELECT_TIMEOUT 1 /* 1 second */
+
diff --git a/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-syslog.patch b/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-syslog.patch
new file mode 100644
index 00000000000..cb17471072b
--- /dev/null
+++ b/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-syslog.patch
@@ -0,0 +1,47 @@
+--- a/lib/fterr.c
++++ b/lib/fterr.c
+@@ -112,7 +112,7 @@
+ fprintf(((fterr_file) ? fterr_file : stderr), "%s\n", buf2);
+
+ if (fterr_flags & FTERR_SYSLOG)
+- syslog(LOG_INFO, buf);
++ syslog(LOG_INFO, "%s", buf);
+
+ } /* fterr_info */
+
+@@ -134,7 +134,7 @@
+
+ if (fterr_flags & FTERR_SYSLOG) {
+ snprintf(buf2, 1024, "%s: %s", buf, strerror(errno));
+- syslog(LOG_INFO, buf2);
++ syslog(LOG_INFO, "%s", buf2);
+ }
+
+ if (fterr_exit)
+@@ -159,7 +159,7 @@
+ }
+
+ if (fterr_flags & FTERR_SYSLOG)
+- syslog(LOG_INFO, buf);
++ syslog(LOG_INFO, "%s", buf);
+
+ if (fterr_exit)
+ fterr_exit(code);
+@@ -183,7 +183,7 @@
+ }
+
+ if (fterr_flags & FTERR_SYSLOG)
+- syslog(LOG_INFO, buf);
++ syslog(LOG_INFO, "%s", buf);
+
+ } /* fterr_warnx */
+
+@@ -205,7 +205,7 @@
+
+ if (fterr_flags & FTERR_SYSLOG) {
+ snprintf(buf2, 1024, "%s: %s", buf, strerror(errno));
+- syslog(LOG_INFO, buf2);
++ syslog(LOG_INFO, "%s", buf2);
+ }
+
+ } /* fterr_warn */
diff --git a/net-analyzer/flow-tools/files/flowcapture.confd b/net-analyzer/flow-tools/files/flowcapture.confd
new file mode 100755
index 00000000000..82ce38a4bc7
--- /dev/null
+++ b/net-analyzer/flow-tools/files/flowcapture.confd
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# Config file for /etc/init.d/flowcap
+
+# This is the default and should be left unless you know what you are doing
+FLOW_VER=5
+
+# local ip. if configured flow-capture will only ps flows sent to this ip.
+LOCALIP=0
+
+# You probably don't want to change this, but in case you do - nest level
+NEST=0
+
+# port to listen on
+PORT=2055
+
+# remote ip. If this is configured only flows from this exporter will be accepted
+# by default we will accept any flows sent to us
+REMOTEIP=0
+
+# program used to rotate
+ROTATE_PROG="/var/lib/flows/bin/linkme"
+
+# number of rotations per day
+ROTATIONS=287
+
+# Retain the maximum number of files so that the total storage is less than SIZE
+# The letters b,K,M,G can be used as multipliers, ie 16 Megabytes is 16M.
+SIZE=1G
+
+# interval in mins at which flowscan will print out stats in logs
+#STAT_INT=5
+# NOTE: with versions of flow-tools >=0.67 there is a bug that will cause a loop if you specify the STAT_INT
+# Only use that variable if you using an older flow-tools (and consequently a custom built ebuild as this config file is not in our older ebuilds)
+
+# dir we will be saving flows and working in
+WORKDIR=/var/lib/flows/ft
+
+# user to run as
+USER=flows
+
+# This pulls in the options above
+FLOW_OPTS="-p /run/flows/flowcapture.pid -w $WORKDIR $LOCALIP/$REMOTEIP/$PORT -V $FLOW_VER -E $SIZE -n $ROTATIONS -N $NEST -R $ROTATE_PROG"
+# Use below only if you have sorted out the STAT_INT problem
+#FLOW_OPTS="-p /run/flows/flowcapture.pid -w $WORKDIR $LOCALIP/$REMOTEIP/$PORT -S $STAT_INT -V $FLOW_VER -E $SIZE -n $ROTATIONS -N $NEST -R $ROTATE_PROG"
diff --git a/net-analyzer/flow-tools/files/flowcapture.initd b/net-analyzer/flow-tools/files/flowcapture.initd
new file mode 100755
index 00000000000..dc01c67d3d6
--- /dev/null
+++ b/net-analyzer/flow-tools/files/flowcapture.initd
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting flow-capture"
+ checkpath -d -o flows /run/flows
+ start-stop-daemon --start --user ${USER} --exec /usr/bin/flow-capture \
+ --pidfile /run/flows/flowcapture.pid.${PORT} \
+ -- ${FLOW_OPTS} >/dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping flow-capture"
+ start-stop-daemon --stop --quiet --exec /usr/bin/flow-capture \
+ --pidfile /run/flows/flowcapture.pid.${PORT}
+ eend $?
+}
diff --git a/net-analyzer/flow-tools/files/linkme b/net-analyzer/flow-tools/files/linkme
new file mode 100755
index 00000000000..4f666d903d4
--- /dev/null
+++ b/net-analyzer/flow-tools/files/linkme
@@ -0,0 +1,15 @@
+#!/usr/bin/perl
+
+$base = "/var/lib/flows";
+if ($ARGV[0] =~ /.*[\/]*(ft-v05[^\/]*$)/) {
+$fileName = $1;
+} else {
+print "Must specify file\n";
+exit 1;
+}
+
+unless ( symlink("$base/ft/$fileName","$base/$fileName") ) {
+print "Unable to create symbolic link: $base/$fileName\n";
+exit 1;
+}
+
diff --git a/net-analyzer/flow-tools/flow-tools-0.68.5.1-r2.ebuild b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r2.ebuild
new file mode 100644
index 00000000000..4a69fabddc2
--- /dev/null
+++ b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r2.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils user
+
+DESCRIPTION="library and programs to collect, send, process, and generate reports from NetFlow data"
+HOMEPAGE="http://code.google.com/p/flow-tools/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.bz2"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="debug mysql postgres ssl static-libs"
+
+RDEPEND="sys-apps/tcp-wrappers
+ sys-libs/zlib
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ ssl? ( dev-libs/openssl )"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ sys-devel/bison"
+
+DOCS=( ChangeLog README SECURITY TODO )
+
+pkg_setup() {
+ enewgroup flows
+ enewuser flows -1 -1 /var/lib/flows flows
+}
+
+src_prepare() {
+ sed -i \
+ -e 's|/var/run/|/run/|g' \
+ src/flow-capture.c \
+ src/flow-fanout.c \
+ || die
+}
+
+src_configure() {
+ local myconf="--sysconfdir=/etc/flow-tools"
+ use mysql && myconf="${myconf} --with-mysql"
+ if use postgres; then
+ myconf="${myconf} --with-postgresql=yes"
+ else
+ myconf="${myconf} --with-postgresql=no"
+ fi
+ use ssl && myconf="${myconf} --with-openssl"
+ econf ${myconf} $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+
+ prune_libtool_files
+
+ exeinto /var/lib/flows/bin
+ doexe "${FILESDIR}"/linkme
+
+ keepdir /var/lib/flows/ft
+
+ newinitd "${FILESDIR}/flowcapture.initd" flowcapture
+ newconfd "${FILESDIR}/flowcapture.confd" flowcapture
+
+ fowners flows:flows /var/lib/flows
+ fowners flows:flows /var/lib/flows/bin
+ fowners flows:flows /var/lib/flows/ft
+
+ fperms 0755 /var/lib/flows
+ fperms 0755 /var/lib/flows/bin
+}
+
+pkg_preinst() {
+ enewgroup flows
+ enewuser flows -1 -1 /var/lib/flows flows
+}
diff --git a/net-analyzer/flow-tools/flow-tools-0.68.5.1-r4.ebuild b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r4.ebuild
new file mode 100644
index 00000000000..2304aaca962
--- /dev/null
+++ b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r4.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils user
+
+DESCRIPTION="library and programs to collect, send, process, and generate reports from NetFlow data"
+HOMEPAGE="http://code.google.com/p/flow-tools/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.bz2"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug mysql postgres ssl static-libs"
+
+RDEPEND="sys-apps/tcp-wrappers
+ sys-libs/zlib
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ ssl? ( dev-libs/openssl )"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ sys-devel/bison"
+
+DOCS=( ChangeLog README SECURITY TODO )
+
+pkg_setup() {
+ enewgroup flows
+ enewuser flows -1 -1 /var/lib/flows flows
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-run.patch
+ epatch "${FILESDIR}"/${P}-syslog.patch
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(usex mysql --with-mysql '') \
+ $(usex postgres --with-postgresql=yes --with-postgresql=no) \
+ $(usex ssl --with-openssl '') \
+ --sysconfdir=/etc/flow-tools
+}
+
+src_install() {
+ default
+
+ prune_libtool_files
+
+ exeinto /var/lib/flows/bin
+ doexe "${FILESDIR}"/linkme
+
+ keepdir /var/lib/flows/ft
+
+ newinitd "${FILESDIR}/flowcapture.initd" flowcapture
+ newconfd "${FILESDIR}/flowcapture.confd" flowcapture
+
+ fowners flows:flows /var/lib/flows
+ fowners flows:flows /var/lib/flows/bin
+ fowners flows:flows /var/lib/flows/ft
+
+ fperms 0755 /var/lib/flows
+ fperms 0755 /var/lib/flows/bin
+}
+
+pkg_preinst() {
+ enewgroup flows
+ enewuser flows -1 -1 /var/lib/flows flows
+}
diff --git a/net-analyzer/flow-tools/flow-tools-0.68.5.1-r5.ebuild b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r5.ebuild
new file mode 100644
index 00000000000..2304aaca962
--- /dev/null
+++ b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r5.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils user
+
+DESCRIPTION="library and programs to collect, send, process, and generate reports from NetFlow data"
+HOMEPAGE="http://code.google.com/p/flow-tools/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.bz2"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug mysql postgres ssl static-libs"
+
+RDEPEND="sys-apps/tcp-wrappers
+ sys-libs/zlib
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ ssl? ( dev-libs/openssl )"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ sys-devel/bison"
+
+DOCS=( ChangeLog README SECURITY TODO )
+
+pkg_setup() {
+ enewgroup flows
+ enewuser flows -1 -1 /var/lib/flows flows
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-run.patch
+ epatch "${FILESDIR}"/${P}-syslog.patch
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(usex mysql --with-mysql '') \
+ $(usex postgres --with-postgresql=yes --with-postgresql=no) \
+ $(usex ssl --with-openssl '') \
+ --sysconfdir=/etc/flow-tools
+}
+
+src_install() {
+ default
+
+ prune_libtool_files
+
+ exeinto /var/lib/flows/bin
+ doexe "${FILESDIR}"/linkme
+
+ keepdir /var/lib/flows/ft
+
+ newinitd "${FILESDIR}/flowcapture.initd" flowcapture
+ newconfd "${FILESDIR}/flowcapture.confd" flowcapture
+
+ fowners flows:flows /var/lib/flows
+ fowners flows:flows /var/lib/flows/bin
+ fowners flows:flows /var/lib/flows/ft
+
+ fperms 0755 /var/lib/flows
+ fperms 0755 /var/lib/flows/bin
+}
+
+pkg_preinst() {
+ enewgroup flows
+ enewuser flows -1 -1 /var/lib/flows flows
+}
diff --git a/net-analyzer/flow-tools/flow-tools-0.68.5.1-r6.ebuild b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r6.ebuild
new file mode 100644
index 00000000000..c42226b87aa
--- /dev/null
+++ b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r6.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils user
+
+DESCRIPTION="library and programs to collect, send, process, and generate reports from NetFlow data"
+HOMEPAGE="http://code.google.com/p/flow-tools/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.bz2"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug mysql postgres ssl static-libs"
+
+RDEPEND="sys-apps/tcp-wrappers
+ sys-libs/zlib
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ ssl? ( dev-libs/openssl )"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ sys-devel/bison"
+
+DOCS=( ChangeLog README SECURITY TODO )
+
+pkg_setup() {
+ enewgroup flows
+ enewuser flows -1 -1 /var/lib/flows flows
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-run.patch
+ epatch "${FILESDIR}"/${P}-syslog.patch
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(usex mysql --with-mysql '') \
+ $(usex postgres --with-postgresql=yes --with-postgresql=no) \
+ $(usex ssl --with-openssl '') \
+ --sysconfdir=/etc/flow-tools
+}
+
+src_install() {
+ default
+
+ prune_libtool_files
+
+ exeinto /var/lib/flows/bin
+ doexe "${FILESDIR}"/linkme
+
+ keepdir /var/lib/flows/ft
+
+ newinitd "${FILESDIR}/flowcapture.initd" flowcapture
+ newconfd "${FILESDIR}/flowcapture.confd" flowcapture
+
+ fowners flows:flows /var/lib/flows
+ fowners flows:flows /var/lib/flows/bin
+ fowners flows:flows /var/lib/flows/ft
+
+ fperms 0755 /var/lib/flows
+ fperms 0755 /var/lib/flows/bin
+}
+
+pkg_preinst() {
+ enewgroup flows
+ enewuser flows -1 -1 /var/lib/flows flows
+}
diff --git a/net-analyzer/flow-tools/metadata.xml b/net-analyzer/flow-tools/metadata.xml
new file mode 100644
index 00000000000..2ba3ac52530
--- /dev/null
+++ b/net-analyzer/flow-tools/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription lang="en">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.</longdescription>
+ <upstream>
+ <remote-id type="google-code">flow-tools</remote-id>
+ </upstream>
+</pkgmetadata>