diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-analyzer/flow-tools |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-analyzer/flow-tools')
-rw-r--r-- | net-analyzer/flow-tools/Manifest | 11 | ||||
-rw-r--r-- | net-analyzer/flow-tools/files/flow-tools-0.68.5.1-run.patch | 22 | ||||
-rw-r--r-- | net-analyzer/flow-tools/files/flow-tools-0.68.5.1-syslog.patch | 47 | ||||
-rw-r--r-- | net-analyzer/flow-tools/files/flowcapture.confd | 51 | ||||
-rw-r--r-- | net-analyzer/flow-tools/files/flowcapture.initd | 30 | ||||
-rw-r--r-- | net-analyzer/flow-tools/files/linkme | 15 | ||||
-rw-r--r-- | net-analyzer/flow-tools/flow-tools-0.68.5.1-r2.ebuild | 77 | ||||
-rw-r--r-- | net-analyzer/flow-tools/flow-tools-0.68.5.1-r9.ebuild | 74 | ||||
-rw-r--r-- | net-analyzer/flow-tools/metadata.xml | 18 |
9 files changed, 345 insertions, 0 deletions
diff --git a/net-analyzer/flow-tools/Manifest b/net-analyzer/flow-tools/Manifest new file mode 100644 index 000000000000..30bee1e47325 --- /dev/null +++ b/net-analyzer/flow-tools/Manifest @@ -0,0 +1,11 @@ +AUX flow-tools-0.68.5.1-run.patch 493 SHA256 8879df3fb76ed6459a7932a471a7360adb195d26fa88f3797b1a25ccdc4a81e5 SHA512 90c9f8bc6aba4c31315294ba80ebc3f7a8b86796d6fc108ef9ebf7619df73474e1a97524b709964ba899f4569a0158d0cc0a2d5bb00e8b185186cf765b87ce9d WHIRLPOOL d58315e44f7886fcc3b944c2c6595d94b15ba7bb46a09ff1608d9876e3db46ce99c3a063b06ad80b470fc01e6caedd8e71137ca1000c11c2e032abbeed5c0417 +AUX flow-tools-0.68.5.1-syslog.patch 979 SHA256 15eab977271205917b303f79b2caf69e48f5a1a575be704ffbdbdf07e812d525 SHA512 d2d37816f437c5546916ca53bd460707366b3675ac9e9105a9611ed436d322afd6ee56fa29b1d6e68f3a02c97a62ca009d392fdb63fca411ace851dc29419537 WHIRLPOOL 31d185f356f842103c3e7f10652c1438132f3f49fbcb9c2ee37ab76adaf60386d74865292d11b22708cbb59bdca903096ace198d864c20e04397dddf80be75b0 +AUX flowcapture.confd 1928 SHA256 bcb31f5f0879300e9dca1daca792bcdfef6bab613f9c87e0c480c2f2e9acbb94 SHA512 e9dcc5d66833e9bf2905273efcb6b7cab69050da50425256629bf12203c7bd9fed87ac33a772903d78f5fbab69045bc4e0f09d26ea1442cdc5c5bd0102a09c05 WHIRLPOOL b670fb253952467cd7eef012b9ca422c3865c3fa9ea86b6b5daa1b4701f0a2623c92b6597f65d0555764a10af6c2232b52109aeccec420d5df91fbe1f64a3992 +AUX flowcapture.initd 816 SHA256 0fa880ab9f840dd8564a8381879c4322f96c81b3656a926a8752c257a6c1df00 SHA512 c3f62821efc94fb6305ba3c54415319c42a624a3c604c96497af0fdd7b4076e618a070006146346eb3de0549bc2bc36e3e3ffd9f7aba832dd18c29da0370463a WHIRLPOOL 7b43e381854b602796faea06cd26dccb76fbf8577e3027dd4408efcbcd03ad86a7dc23c39d0de9f4fb36ce615b6a760f4dcdcd6b85f25ada717713ae285e1656 +AUX linkme 283 SHA256 93cef6b11cb25a9e91b529030e66cd4c709f382993335f2c7252de89c36735da SHA512 a9db8dec8b6f2a83b8896951bf1711ec7c58dd18d2da7db7015c0a000114b3d1da9bee4dd64842c074b332a06a890b2eea1b8ffc0399ce0efa39bf6527466359 WHIRLPOOL 94af50de39a8350d194917c129fdd5cdb542e07834340db0453a897185ccd4f4da6fd6584ecf144b79c5f8981c3dbfdd7e87894fa66bc230c530d2985828dba7 +DIST flow-tools-0.68.5.1.tar.bz2 914062 SHA256 80bbd3791b59198f0d20184761d96ba500386b0a71ea613c214a50aa017a1f67 SHA512 ae17ba39854daa8ef3deecd3a554bb6d1fa47648cb791d8225a40bec13f65bf0692871660b2c3490d133b1251875c323d066bb0c0483eceb0707cec9b7714c57 WHIRLPOOL 2e7b98abab82ec07639356c07c89bb480276fec945c48ef86188a70a28ff54ab5dd1f1c7b69945d7b4e2687aafee06bef81dceea655b15aa735c50455723be83 +EBUILD flow-tools-0.68.5.1-r2.ebuild 1687 SHA256 1c3232980d47b841f308f49575e73564eb5f9b9ecd66ac425a915e5134807223 SHA512 19fab6d40f16607410ab530c2624e36a40e806bab2bcd9e336bbb03164020e9a84b376adaa9a3cabaca6441982b1effe4c4f5ccfa4f9c134888990aba6600293 WHIRLPOOL a825b46f080ea3fbc655b117bd9aa48ec865068286a7fdc948bcef26be16bbf98ed62ca911ce69ec5de2f33ce7c1f3c5b035626ea55a01ff3609b4f2f9160cd7 +EBUILD flow-tools-0.68.5.1-r9.ebuild 1615 SHA256 4abcf66b4a4bd6dd29f296753d420c7835d3ae026de7aecbe9895a833e7fcb43 SHA512 c7d85fc7c617008977f8e9d151eb1765a416d8ad7edc011b870b9b1f6727dbc80b26f1a3ce527b661d5f4da68047c4910e007e467d006796523a6135689003d8 WHIRLPOOL 620eb0adae07a2bb6f7f371fa84de47eda72c9762687d1274f6e53c92254c548dbd1da89341ef7dd7e370685321f72373153f3b69b6e5c7b125f459869df2ab0 +MISC ChangeLog 4755 SHA256 778cd6c61e54a2affa3434fdbbe4722f65915a565c9abe8c1366ea22013fb7d1 SHA512 6ebaadc39ea95d776e515b3ec3371bfc506c10078030e5781118a067af75681279683d9e9ea945c80250a9ae903a512df1f959de59aa9f9293e78683c4caf0d6 WHIRLPOOL c89c1ddcdf3ed9bc4c6634ac5ba12f8d280c9b454d4cf3945477a74a96e83aeed64c28ad2d1512957d1f2754915805058d2f502e3a5e304c06ae64c1804139aa +MISC ChangeLog-2015 13821 SHA256 6c2437fd0fae1ac63f09d3c52d2e6a21b20492146ac8e273e8f2656c8b49a6bc SHA512 16d8e6a2976c8978bdf382fca0014d23f7c86210a2a159c77b6f75f27636cb531ec201557f68c06a28580c99e45451541bde187a1e054f7925eb8c60fc236a32 WHIRLPOOL 5651bf53123f4f064ab3e8a25710023ca2e3b0a005a70cb0ffd11542b9f869398f31d6072bafa652b592a385414d395aee165c0653cfc7ae6a3128691aeaf821 +MISC metadata.xml 902 SHA256 ac8059f3d85b3dd3ac6024768d653720c53ea3647141a5d7b6724c6c522e4894 SHA512 45f900d25bc2b968ce9a04fd143106962c1a242b776840eb2c1b51f0e02d71000f9a2fdf19286f7873e07c25aa9d528597f1b1fe0e7e083c29de5304b87aeab3 WHIRLPOOL 93afbe43db6220919a11fe5f532c0e9677968df9e8c05c4b9eb9e7d7814b1513c684b9f990a926d46e17a874fd8ef209d8d32ab6ad5d1c4ab2be26a16c3f9b84 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 000000000000..e1b06eee7e00 --- /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 000000000000..cb17471072bc --- /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 100644 index 000000000000..e926d64a8eec --- /dev/null +++ b/net-analyzer/flow-tools/files/flowcapture.confd @@ -0,0 +1,51 @@ +# 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 + +# Pidfile base +# The daemon takes the pidfile argument and APPENDS .$PORT itself in writing. +# It may have multiple children by original design, but this is not recommended +# for Gentoo at this time. +PIDFILE_BASE=${PIDFILE_BASE:=/run/flows/flowcapture.pid} + +# This pulls in the options above +FLOW_OPTS="-p $PIDFILE_BASE -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.$PORT -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 100644 index 000000000000..c6fc34728799 --- /dev/null +++ b/net-analyzer/flow-tools/files/flowcapture.initd @@ -0,0 +1,30 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +PORT=${PORT:=2055} +# The daemon takes the pidfile argument and APPENDS .$PORT itself in writing. +# It may have multiple children by original design, but this is not recommended +# for Gentoo at this time. +PIDFILE_BASE=${PIDFILE_BASE:=/run/flows/flowcapture.pid} +PIDFILE=${PIDFILE:=${PIDFILE_BASE}.${PORT}} + +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 ${PIDFILE} \ + -- ${FLOW_OPTS} >/dev/null 2>&1 + eend $? +} + +stop() { + ebegin "Stopping flow-capture" + start-stop-daemon --stop --quiet --exec /usr/bin/flow-capture \ + --pidfile ${PIDFILE} + eend $? +} diff --git a/net-analyzer/flow-tools/files/linkme b/net-analyzer/flow-tools/files/linkme new file mode 100644 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.5.1-r2.ebuild b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r2.ebuild new file mode 100644 index 000000000000..e6447657ab54 --- /dev/null +++ b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r2.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 +inherit eutils user + +DESCRIPTION="library and programs to collect, send, process, and generate reports from NetFlow data" +HOMEPAGE="https://code.google.com/p/flow-tools/" +SRC_URI="https://${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-r9.ebuild b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r9.ebuild new file mode 100644 index 000000000000..2245db8cff37 --- /dev/null +++ b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r9.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils user + +DESCRIPTION="library and programs to process reports from NetFlow data" +HOMEPAGE="https://code.google.com/p/flow-tools/" +SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.bz2" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="debug libressl mysql postgres ssl static-libs" + +RDEPEND="sys-apps/tcp-wrappers + sys-libs/zlib + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql:* ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + )" + +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 000000000000..e2ec7efaf9f5 --- /dev/null +++ b/net-analyzer/flow-tools/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <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> |