summaryrefslogtreecommitdiff
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/softflowd
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
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/softflowd')
-rw-r--r--net-analyzer/softflowd/Manifest1
-rw-r--r--net-analyzer/softflowd/files/softflowd-0.9.9-_GNU_SOURCE.patch13
-rw-r--r--net-analyzer/softflowd/files/softflowd-0.9.9-no-strip.patch12
-rw-r--r--net-analyzer/softflowd/files/softflowd.confd9
-rw-r--r--net-analyzer/softflowd/files/softflowd.initd54
-rw-r--r--net-analyzer/softflowd/metadata.xml8
-rw-r--r--net-analyzer/softflowd/softflowd-0.9.9-r1.ebuild33
7 files changed, 130 insertions, 0 deletions
diff --git a/net-analyzer/softflowd/Manifest b/net-analyzer/softflowd/Manifest
new file mode 100644
index 000000000000..78235c820add
--- /dev/null
+++ b/net-analyzer/softflowd/Manifest
@@ -0,0 +1 @@
+DIST softflowd-0.9.9.tar.gz 91939 SHA256 2313f2c50ea9b3f2db3524e38ec7cd71f9a6e885ac2e3b55ab037bccf8173612 SHA512 4d579c2a087c0f3cd4d2020bcfbddf9dab73254e40678b3509c93bec212bf8b5692f76bfb4e766577e431ff508f0bce0a2cf326184f192e3c5dc8ddf38514dbd WHIRLPOOL c16dd9596ececffac3d698e56c244359a6db4b9cc8f721bc51fd2b900316ed493313ba971d9e1efd8c874acbbfd47f48cf099c63c750b282a1cd3af39bf4e690
diff --git a/net-analyzer/softflowd/files/softflowd-0.9.9-_GNU_SOURCE.patch b/net-analyzer/softflowd/files/softflowd-0.9.9-_GNU_SOURCE.patch
new file mode 100644
index 000000000000..cb4844803e00
--- /dev/null
+++ b/net-analyzer/softflowd/files/softflowd-0.9.9-_GNU_SOURCE.patch
@@ -0,0 +1,13 @@
+setresuid and setresgid need _GNU_SOURCE which clashes with _BSD_SOURCE
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -87,7 +87,7 @@
+ AC_SEARCH_LIBS(socket, socket)
+ AC_CHECK_LIB(pcap, pcap_open_live)
+
+-AC_CHECK_FUNCS(closefrom daemon setresuid setreuid setresgid setgid strlcpy strlcat)
++AC_CHECK_FUNCS(closefrom daemon setreuid setgid strlcpy strlcat)
+
+ AC_CHECK_TYPES([u_int64_t, int64_t, uint64_t, u_int32_t, int32_t, uint32_t])
+ AC_CHECK_TYPES([u_int16_t, int16_t, uint16_t, u_int8_t, int8_t, uint8_t])
diff --git a/net-analyzer/softflowd/files/softflowd-0.9.9-no-strip.patch b/net-analyzer/softflowd/files/softflowd-0.9.9-no-strip.patch
new file mode 100644
index 000000000000..c48603a7f491
--- /dev/null
+++ b/net-analyzer/softflowd/files/softflowd-0.9.9-no-strip.patch
@@ -0,0 +1,12 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -52,7 +52,7 @@
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(sbindir)
+ [ -d $(DESTDIR)$(mandir)/man8 ] || \
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man8
+- $(INSTALL) -m 0755 -s softflowd $(DESTDIR)$(sbindir)/softflowd
+- $(INSTALL) -m 0755 -s softflowctl $(DESTDIR)$(sbindir)/softflowctl
++ $(INSTALL) -m 0755 softflowd $(DESTDIR)$(sbindir)/softflowd
++ $(INSTALL) -m 0755 softflowctl $(DESTDIR)$(sbindir)/softflowctl
+ $(INSTALL) -m 0644 softflowd.8 $(DESTDIR)$(mandir)/man8/softflowd.8
+ $(INSTALL) -m 0644 softflowctl.8 $(DESTDIR)$(mandir)/man8/softflowctl.8
diff --git a/net-analyzer/softflowd/files/softflowd.confd b/net-analyzer/softflowd/files/softflowd.confd
new file mode 100644
index 000000000000..dc1a36c874cd
--- /dev/null
+++ b/net-analyzer/softflowd/files/softflowd.confd
@@ -0,0 +1,9 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# Copy conf file to softflowd.interface
+
+# SOFTFLOWD_COLLECTOR=host:port
+# SOFTFLOWD_TIMEOUTS="maxlife=600"
+# SOFTFLOWD_MAXFLOWS=17000
+# SOFTFLOWD_EXTRA=
+# SOFTFLOWD_INTERFACE_IDX=
diff --git a/net-analyzer/softflowd/files/softflowd.initd b/net-analyzer/softflowd/files/softflowd.initd
new file mode 100644
index 000000000000..b29d3eaaf668
--- /dev/null
+++ b/net-analyzer/softflowd/files/softflowd.initd
@@ -0,0 +1,54 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+softflowd_checkconfig() {
+ SOFTFLOWD_INTERFACE=${SVCNAME#*.}
+ if [ ${SOFTFLOWD_INTERFACE} = ${SVCNAME} ]; then
+ eerror "You have to create an init script for each interface:"
+ eerror "ln -s softflowd /etc/init.d/softflowd.eth0"
+ return 1
+ fi
+
+ if [ -z "${SOFTFLOWD_COLLECTOR}" ]; then
+ eerror "Specify the host and port that the accounting datagrams are to be"
+ eerror "sent to in /etc/conf.d/${SVCNAME}."
+ eerror "Example: SOFTFLOWD_COLLECTOR=collector.example.com:9995"
+ return 1
+ fi
+ SOFTFLOWD_PIDFILE="/var/run/softflowd.${SOFTFLOWD_INTERFACE}.pid"
+ SOFTFLOWD_CTLFILE="/var/run/softflowd.${SOFTFLOWD_INTERFACE}.ctl"
+}
+
+
+start() {
+ softflowd_checkconfig || return 1
+
+ ebegin "Starting softflowd on interface ${SOFTFLOWD_INTERFACE}"
+ iface_arg=${SOFTFLOWD_INTERFACE}
+ [ -n "${SOFTFLOWD_INTERFACE_IDX}" ] && iface_arg="${SOFTFLOWD_INTERFACE_IDX}:${iface_arg}"
+ start-stop-daemon --start \
+ --exec /usr/sbin/softflowd \
+ -- -i "${iface_arg}" \
+ -n "${SOFTFLOWD_COLLECTOR}" \
+ -p "${SOFTFLOWD_PIDFILE}" \
+ -c "${SOFTFLOWD_CTLFILE}" \
+ -t "${SOFTFLOWD_TIMEOUTS-maxlife=600}" \
+ -m "${SOFTFLOWD_MAXFLOWS-17000}" \
+ ${SOFTFLOWD_EXTRA}
+ eend $?
+}
+
+stop() {
+ softflowd_checkconfig || return 1
+
+ ebegin "Stopping softflowd on interface ${SOFTFLOWD_INTERFACE}"
+ # use softflowd's own way to shut it down
+ /usr/sbin/softflowctl -c ${SOFTFLOWD_CTLFILE} shutdown
+ eend $?
+}
diff --git a/net-analyzer/softflowd/metadata.xml b/net-analyzer/softflowd/metadata.xml
new file mode 100644
index 000000000000..bf548f3b7c78
--- /dev/null
+++ b/net-analyzer/softflowd/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<upstream>
+<remote-id type="google-code">softflowd</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/net-analyzer/softflowd/softflowd-0.9.9-r1.ebuild b/net-analyzer/softflowd/softflowd-0.9.9-r1.ebuild
new file mode 100644
index 000000000000..06446a44b830
--- /dev/null
+++ b/net-analyzer/softflowd/softflowd-0.9.9-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="flow-based network traffic analyser capable of Cisco NetFlow data export"
+HOMEPAGE="http://www.mindrot.org/projects/softflowd/"
+SRC_URI="http://softflowd.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="net-libs/libpcap"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-no-strip.patch
+ epatch "${FILESDIR}"/${P}-_GNU_SOURCE.patch
+ eautoreconf
+}
+
+src_install() {
+ default
+
+ docinto examples
+ dodoc collector.pl
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+}