summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2016-07-28 17:45:27 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2016-07-28 17:45:44 -0700
commita3508c8b9bced6ce2ae49816022b85e2dcd9af2e (patch)
tree9561e0731f7ded54b3e90ffedf63bc051318d11a /net-analyzer
parentgames-action/xbomber: add a blocker for sci-biology/emboss #589918 (diff)
downloadgentoo-a3508c8b9bced6ce2ae49816022b85e2dcd9af2e.tar.gz
gentoo-a3508c8b9bced6ce2ae49816022b85e2dcd9af2e.tar.bz2
gentoo-a3508c8b9bced6ce2ae49816022b85e2dcd9af2e.zip
net-analyzer/flow-tools: get to the bottom of the weird pidfile behavior in the codebase, -p is not the full path!.
Package-Manager: portage-2.2.28
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/flow-tools/files/flowcapture.confd9
-rw-r--r--net-analyzer/flow-tools/files/flowcapture.initd6
-rw-r--r--net-analyzer/flow-tools/flow-tools-0.68.5.1-r8.ebuild75
3 files changed, 86 insertions, 4 deletions
diff --git a/net-analyzer/flow-tools/files/flowcapture.confd b/net-analyzer/flow-tools/files/flowcapture.confd
index 20a238584d0f..e926d64a8eec 100644
--- a/net-analyzer/flow-tools/files/flowcapture.confd
+++ b/net-analyzer/flow-tools/files/flowcapture.confd
@@ -39,10 +39,13 @@ WORKDIR=/var/lib/flows/ft
# user to run as
USER=flows
-# Pidfile
-PIDFILE=/run/flows/flowcapture.pid.${PORT}
+# 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 -w $WORKDIR $LOCALIP/$REMOTEIP/$PORT -V $FLOW_VER -E $SIZE -n $ROTATIONS -N $NEST -R $ROTATE_PROG"
+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
index e03d493ee10d..a31ed5ebea29 100644
--- a/net-analyzer/flow-tools/files/flowcapture.initd
+++ b/net-analyzer/flow-tools/files/flowcapture.initd
@@ -3,7 +3,11 @@
# Distributed under the terms of the GNU General Public License v2
PORT=${PORT:=2055}
-PIDFILE=${PIDFILE:=/run/flows/flowcapture.pid.${PORT}}
+# 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}.${PORT}}
depend() {
use net
diff --git a/net-analyzer/flow-tools/flow-tools-0.68.5.1-r8.ebuild b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r8.ebuild
new file mode 100644
index 000000000000..087e3c9d9048
--- /dev/null
+++ b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r8.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+}