diff options
author | Benjamin Smee <strerror@gentoo.org> | 2005-06-22 14:46:54 +0000 |
---|---|---|
committer | Benjamin Smee <strerror@gentoo.org> | 2005-06-22 14:46:54 +0000 |
commit | f0bf5e83137dca9c2947310518bc13fa96c09fd9 (patch) | |
tree | df79c81778d4abf3b8620a6c8d20a5e100c47337 /net-analyzer | |
parent | version bump for #71656, which also fixes #43132, #64743, and probably #77285... (diff) | |
download | historical-f0bf5e83137dca9c2947310518bc13fa96c09fd9.tar.gz historical-f0bf5e83137dca9c2947310518bc13fa96c09fd9.tar.bz2 historical-f0bf5e83137dca9c2947310518bc13fa96c09fd9.zip |
Added some init scripts and config files. Also added directory structure. Changed created user.
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/flow-tools/ChangeLog | 9 | ||||
-rw-r--r-- | net-analyzer/flow-tools/Manifest | 17 | ||||
-rw-r--r-- | net-analyzer/flow-tools/files/digest-flow-tools-0.68-r1 | 1 | ||||
-rwxr-xr-x | net-analyzer/flow-tools/files/flowcapture.confd | 46 | ||||
-rwxr-xr-x | net-analyzer/flow-tools/files/flowcapture.initd | 20 | ||||
-rwxr-xr-x | net-analyzer/flow-tools/files/linkme | 15 | ||||
-rw-r--r-- | net-analyzer/flow-tools/flow-tools-0.68-r1.ebuild | 91 |
7 files changed, 187 insertions, 12 deletions
diff --git a/net-analyzer/flow-tools/ChangeLog b/net-analyzer/flow-tools/ChangeLog index 3bc488878628..051502b074d3 100644 --- a/net-analyzer/flow-tools/ChangeLog +++ b/net-analyzer/flow-tools/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-analyzer/flow-tools # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/flow-tools/ChangeLog,v 1.12 2005/05/14 12:09:42 ka0ttic Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/flow-tools/ChangeLog,v 1.13 2005/06/22 14:46:54 strerror Exp $ + +*flow-tools-0.68-r1 (22 Jun 2005) + + 22 Jun 2005; Benjamin Smee <strerror@gentoo.org> +files/flowcapture.confd, + +files/flowcapture.initd, +files/linkme, +flow-tools-0.68-r1.ebuild: + Added some init scripts and config files. Also added directory structure. + Changed created user. *flow-tools-0.68 (14 May 2005) diff --git a/net-analyzer/flow-tools/Manifest b/net-analyzer/flow-tools/Manifest index de667c3f16dd..cc732310c8d6 100644 --- a/net-analyzer/flow-tools/Manifest +++ b/net-analyzer/flow-tools/Manifest @@ -1,10 +1,8 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - MD5 50b2beaf69c3163fee00bda59f3e906a flow-tools-0.67.ebuild 2108 MD5 8f9c6d7e1e7e86ef04599a7774c85b16 flow-tools-0.66.ebuild 1001 +MD5 da7042ce12ffdb3fb40c5c8bc4f282a5 flow-tools-0.68-r1.ebuild 2355 MD5 5560c24bf2e48922e1a5dcc9288bca44 flow-tools-0.68.ebuild 2174 -MD5 ea709dcf81f9f53064ac3f70de624c2b ChangeLog 2438 +MD5 8f0e96a56941e3d7723e42e72bf24441 ChangeLog 2723 MD5 657939d746987d289ffa06516ae69d46 metadata.xml 261 MD5 4274d0fb58b88876a5767ab9d1c6204c files/digest-flow-tools-0.66 67 MD5 1101576a17a0a70941408d279474aa97 files/digest-flow-tools-0.67 67 @@ -13,14 +11,11 @@ MD5 cfccfe9cd55f47b95bf235bf7fa7d304 files/flow-tools-0.67-gcc34.diff 1403 MD5 7308473949f268c686c9dfedf343213c files/flow-tools-0.68-fix-a-zillion-warnings.diff 20333 MD5 c6c737d5afc1661a098632c246dec51e files/flow-tools-0.67-debug.patch 313 MD5 3164389b3ab0f7170727e6ea6b419256 files/flow-tools-0.67-fix-configure.diff 3510 +MD5 a3079e6e4ce9d077caa0939f51e806f2 files/flowcapture.confd 1590 +MD5 e093ab64e5496e26be23026c3436ddde files/flowcapture.initd 430 MD5 09baff60cf1fc75fdf326c0d70f0b250 files/flow-tools-0.68-fix-configure.diff 4311 MD5 16e9d55df0b78a82c236db3bcad399a5 files/flow-tools-0.67-fix-a-zillion-warnings.diff 18805 +MD5 94581c1ca18b1891395fe1f3daeb04ca files/linkme 283 MD5 f16f4ba51648f2b7f0e3830bc7670f6e files/flow-tools-0.67-nodebug.patch 933 +MD5 4550f09b9ca0a0f2e3e83beadfa3f964 files/digest-flow-tools-0.68-r1 67 MD5 eddbfc9694d3f0b00a46f84a0e58a651 files/flow-tools-0.67-memleak.patch 465 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.1 (GNU/Linux) - -iD8DBQFCherVEZCkKN40op4RAr7+AKC5XaWiXXl+5hVJvN61iyCgNnBHVwCfcZPP -6+gTPksTVOiuk6Ht75okQ24= -=L648 ------END PGP SIGNATURE----- diff --git a/net-analyzer/flow-tools/files/digest-flow-tools-0.68-r1 b/net-analyzer/flow-tools/files/digest-flow-tools-0.68-r1 new file mode 100644 index 000000000000..cd3d9265e6ee --- /dev/null +++ b/net-analyzer/flow-tools/files/digest-flow-tools-0.68-r1 @@ -0,0 +1 @@ +MD5 c9e0a8b53c79611b6bffcb9d510a5a38 flow-tools-0.68.tar.gz 987151 diff --git a/net-analyzer/flow-tools/files/flowcapture.confd b/net-analyzer/flow-tools/files/flowcapture.confd new file mode 100755 index 000000000000..c4a7790821f2 --- /dev/null +++ b/net-analyzer/flow-tools/files/flowcapture.confd @@ -0,0 +1,46 @@ +# 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 + +# pid file location +PIDFILE=/var/run/flows/flowcap.pid + +# 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 $PIDFILE -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 $PIDFILE -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 000000000000..6d0c113b76d4 --- /dev/null +++ b/net-analyzer/flow-tools/files/flowcapture.initd @@ -0,0 +1,20 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +start() { + ebegin "Starting flow-capture" + start-stop-daemon --start --quiet -c ${USER} --exec /usr/bin/flow-capture \ + -- ${FLOW_OPTS} >/dev/null 2>&1 + eend $? +} + +stop() { + ebegin "Stopping flow-capture" + start-stop-daemon --stop --quiet --pidfile ${PIDFILE}.${PORT} + eend $? +} diff --git a/net-analyzer/flow-tools/files/linkme b/net-analyzer/flow-tools/files/linkme new file mode 100755 index 000000000000..4f666d903d42 --- /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-r1.ebuild b/net-analyzer/flow-tools/flow-tools-0.68-r1.ebuild new file mode 100644 index 000000000000..02089b6cadfd --- /dev/null +++ b/net-analyzer/flow-tools/flow-tools-0.68-r1.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: + +inherit eutils flag-o-matic + +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="~x86 ~amd64" +IUSE="mysql postgres debug ssl" + +RDEPEND="sys-apps/tcp-wrappers + sys-libs/zlib + sys-devel/flex + !postgres? ( mysql? ( dev-db/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 /bin/false /var/lib/flows flows +} + +src_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/${P}-fix-configure.diff + epatch ${FILESDIR}/${P}-fix-a-zillion-warnings.diff + use debug || epatch ${FILESDIR}/${PN}-0.67-nodebug.patch + epatch ${FILESDIR}/${PN}-0.67-memleak.patch + epatch ${FILESDIR}/${PN}-0.67-debug.patch + + sed -i "s|^[^#]\(^.*CFLAGS=\).*$|\1-Wall|g" \ + configure.in src/Makefile.am lib/Makefile.am || die "sed CFLAGS failed" +} + +src_compile() { + einfo "Running autoreconf" + autoreconf -f -i || 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 COPYING ChangeLog README INSTALL 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 +} |