summaryrefslogtreecommitdiff
path: root/net-analyzer/softflowd/files
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/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz
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/files')
-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
4 files changed, 88 insertions, 0 deletions
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 00000000000..cb4844803e0
--- /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 00000000000..c48603a7f49
--- /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 00000000000..dc1a36c874c
--- /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 00000000000..b29d3eaaf66
--- /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 $?
+}