From 8bd99b0239dc60e14372e76d3a118e829089bcae Mon Sep 17 00:00:00 2001 From: Jeroen Roovers Date: Thu, 16 Feb 2017 08:20:26 +0100 Subject: [PATCH] net-analyzer/fprobe: EAPI bump. Fix bashisms by Andrew Savchenko (bug #609112). Package-Manager: Portage-2.3.3, Repoman-2.3.1 --- net-analyzer/fprobe/files/conf.d-fprobe | 2 +- net-analyzer/fprobe/files/init.d-fprobe | 8 +++--- ...obe-1.1-r2.ebuild => fprobe-1.1-r3.ebuild} | 26 +++++++++---------- 3 files changed, 18 insertions(+), 18 deletions(-) rename net-analyzer/fprobe/{fprobe-1.1-r2.ebuild => fprobe-1.1-r3.ebuild} (54%) diff --git a/net-analyzer/fprobe/files/conf.d-fprobe b/net-analyzer/fprobe/files/conf.d-fprobe index f73ccf4c5803..a93c5c10b207 100644 --- a/net-analyzer/fprobe/files/conf.d-fprobe +++ b/net-analyzer/fprobe/files/conf.d-fprobe @@ -23,7 +23,7 @@ IFACE=eth0 #LOCALIP= # SNMP iface id -SNMP_IFACE="${IFACE//eth}" +SNMP_IFACE="${IFACE#eth}" # Maximum number of concurrent flows to track # using a specified amount of memory diff --git a/net-analyzer/fprobe/files/init.d-fprobe b/net-analyzer/fprobe/files/init.d-fprobe index efa53571771d..c470af432c9c 100644 --- a/net-analyzer/fprobe/files/init.d-fprobe +++ b/net-analyzer/fprobe/files/init.d-fprobe @@ -1,5 +1,5 @@ #!/sbin/openrc-run -# Copyright 1999-2008 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 depend() { @@ -14,14 +14,14 @@ PIDFILE="/var/run/fprobe$PIDFILE_EXTRA.pid" start() { ebegin "Starting fprobe" local OPTS="" - [ "${PROMISC}" == "yes" ] || OPTS="${OPTS} -p" + [ "${PROMISC}" = "yes" ] || OPTS="${OPTS} -p" [ -n "${FILTER}" ] && OPTS="${OPTS} -f '${FILTER}'" for optname in i:IFACE s:TIMER_EXPIRED g:TIME_FRAGMENTED d:TIMER_IDLE \ e:TIMER_ACTIVE n:FLOW_VER a:LOCALIP x:SNMP_IFACE b:MEMBULK \ m:MEMLIMIT q:PENDING B:KERNBUF r:RTPRIO t:DELAY S:SNAPLEN \ c:CHROOT u:USER v:LOGLEVEL ; do - opt="${optname/:*}" optvar="${optname/*:}" - optvalue="${!optvar}" + opt="${optname%:*}" optvar="${optname#*:}" + eval optvalue='$'$optvar [ -n "$optvalue" ] && OPTS="${OPTS} -${opt} ${optvalue}" done OPTS="${OPTS} -l 1:${PIDFILE_ID} ${COLLECTORS}" diff --git a/net-analyzer/fprobe/fprobe-1.1-r2.ebuild b/net-analyzer/fprobe/fprobe-1.1-r3.ebuild similarity index 54% rename from net-analyzer/fprobe/fprobe-1.1-r2.ebuild rename to net-analyzer/fprobe/fprobe-1.1-r3.ebuild index ba10e41b4a70..8524efb16220 100644 --- a/net-analyzer/fprobe/fprobe-1.1-r2.ebuild +++ b/net-analyzer/fprobe/fprobe-1.1-r3.ebuild @@ -1,11 +1,10 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ -EAPI=5 -inherit eutils +EAPI=6 -DESCRIPTION="A libpcap-based tool to collect network traffic data and emit it as NetFlow flows" +DESCRIPTION="libpcap-based tool to collect network traffic data and emit it as NetFlow flows" HOMEPAGE="http://fprobe.sourceforge.net" LICENSE="GPL-2" @@ -15,15 +14,16 @@ KEYWORDS="~amd64 ~ppc ~x86" IUSE="debug messages" -DEPEND="net-libs/libpcap" - -src_prepare() { - # The pidfile should be created by the parent process, before the - # setuid/chroot is executed. - epatch "${FILESDIR}"/fprobe-1.1-pidfile-sanity.patch - # This seems to fail, uncertain why. - epatch "${FILESDIR}"/fprobe-1.1-setgroups.patch -} +DEPEND=" + net-libs/libpcap +" +RDEPEND=" + ${DEPEND} +" +PATCHES=( + "${FILESDIR}"/fprobe-1.1-pidfile-sanity.patch + "${FILESDIR}"/fprobe-1.1-setgroups.patch +) src_configure() { econf \ -- 2.26.2