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/softflowd |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-analyzer/softflowd')
-rw-r--r-- | net-analyzer/softflowd/Manifest | 9 | ||||
-rw-r--r-- | net-analyzer/softflowd/files/softflowd-0.9.9-_GNU_SOURCE.patch | 13 | ||||
-rw-r--r-- | net-analyzer/softflowd/files/softflowd-0.9.9-no-strip.patch | 12 | ||||
-rw-r--r-- | net-analyzer/softflowd/files/softflowd.confd | 9 | ||||
-rw-r--r-- | net-analyzer/softflowd/files/softflowd.initd | 53 | ||||
-rw-r--r-- | net-analyzer/softflowd/metadata.xml | 11 | ||||
-rw-r--r-- | net-analyzer/softflowd/softflowd-0.9.9-r1.ebuild | 32 |
7 files changed, 139 insertions, 0 deletions
diff --git a/net-analyzer/softflowd/Manifest b/net-analyzer/softflowd/Manifest new file mode 100644 index 000000000000..7b83d6983dc3 --- /dev/null +++ b/net-analyzer/softflowd/Manifest @@ -0,0 +1,9 @@ +AUX softflowd-0.9.9-_GNU_SOURCE.patch 506 SHA256 b05ae8c552040137d1acf448d4fb0bbe8e4d9ec59576c2d3a82707660a434d6c SHA512 b4e12a3e22bc055fce39427885e44803cde613a191ce44fc4b9e08d0d9eb480a899ee8eec1ef1a9561063850aa420ef1dffba63de07add6308ab79ec63e81119 WHIRLPOOL 9a9d2e3d68fbf38929e3ef874f0f458fedef09420fbe46e1cc55662b6d91472c661cfd5bbae11b69fee9b375a424a625100b1615615b425b62286e659c9ca819 +AUX softflowd-0.9.9-no-strip.patch 605 SHA256 de352df2b464190b7e9913d40ac97557bcee5209a70ffd043f687decef9745ab SHA512 4c42a64634dbe852d5c1563face382553c8091b8c36ce5fb40eab40492338019abb2b26b0e9c47fca602a324827fb130131ce16a32cd2450612ba6ffd3501d77 WHIRLPOOL 3f9b7bcc1705e60a059a597247386a2dff1bee7b9f0259749c2f1ce3e94a34c2907dad11c642c2d7850d2e473ac625762fffff5733b5a88e0b6bd12b9ba4a846 +AUX softflowd.confd 288 SHA256 75f4f17f168fe89ac9fa26d9188ea0f46a2ff14a56df257de8ef8c0e69e81780 SHA512 78edfe72bee5998ac6d91e97a119370e223f1fe868de43dfff70e127f202af8f17b3f96c6d0ed8f23ad022e314a1dd3cc0c3da19e85cd7af427671f7247710cb WHIRLPOOL d3502b35c32da91ac96497f45118273a06ba358ddb0379c7fec9e625ba571d6fdf786f4215722ed9ad6bd243c177d26124b0393689c883442daa6bc5293fa78a +AUX softflowd.initd 1536 SHA256 f42a5fb7842929d77c18975f37e3573b3573fd6b244e4aeca1ca14c5e760531a SHA512 42ce99bbcc6ddfbb6a3e4c54100cce05ab1edf4c977c6c97e224b427f64fd8cf42f727dd6f4454919232987f177c6875f0ed86c89712b1a042be340a2d6e8ffc WHIRLPOOL b12e626176c8d8e4e7255914c51b74eeb7ec0007703c1711fa0e1a30a9d2315419e6899e26f9d47deaeb0a0e85c993cf26e300e3bfd1d3049c87da59490a49bc +DIST softflowd-0.9.9.tar.gz 91939 SHA256 2313f2c50ea9b3f2db3524e38ec7cd71f9a6e885ac2e3b55ab037bccf8173612 SHA512 4d579c2a087c0f3cd4d2020bcfbddf9dab73254e40678b3509c93bec212bf8b5692f76bfb4e766577e431ff508f0bce0a2cf326184f192e3c5dc8ddf38514dbd WHIRLPOOL c16dd9596ececffac3d698e56c244359a6db4b9cc8f721bc51fd2b900316ed493313ba971d9e1efd8c874acbbfd47f48cf099c63c750b282a1cd3af39bf4e690 +EBUILD softflowd-0.9.9-r1.ebuild 714 SHA256 c8bd72d46d146e8c151cee6ef32761a8c2838bd85e20b7c815a9541ca38f3dd6 SHA512 b985d3acab2f5750f489b4b6726d2caebf2dcc5023ae2049b63cd114d3aa3a7ff58fac78d723bfd522eee8b62e08b01558bbd7359b516d3b706253e6a8a5ca08 WHIRLPOOL 7ccd2b333c93e1768dfb5fbb66c0ed151114e1b5521d873cc3bacb409468acdc2e8c7c3f3164c774e66310d44f5f65ad482e6e0771ab56ecbe86c72bbc21de85 +MISC ChangeLog 2876 SHA256 6304eaf321fcf11d227cf658a3773c708ae978536dca28250e6f78f31486d553 SHA512 9e5ff91d10468cc05ffe3f23be18b441107829d8dfc0af9c43fbdaa230cf56d15231f830557b5f0833420e496b0df7a356d21be9a4a2fd9e8367c6a1d4bfd1b5 WHIRLPOOL a046a94ce37e569b49e3b1ca3fd8f3c0a2a49cd74de42c6f1b18e977358589b01da6d4ecf87d1e18813f76f1a24a53fde34e4b9418790b5b2adda9d3fd9d9228 +MISC ChangeLog-2015 1291 SHA256 083af2df78787c53d89c9e8d0da3c92783e9612d09732bb347ee1ef2d4732863 SHA512 c8be0485221b4eeb229290f3d0beca56a446355676e7bf5b9d1f773be931f2293c8885603827a0dbca9cde066568071de87c4b22d5b4df889e393f8ec43a3e6f WHIRLPOOL 2c338e079cfbff48a04d580fdfbf2976346bc3dae14b8c64dfb39b925faa3ece6f2274daf0a8fdb2aae2f2df6343619b8fd1a5578ec036b83fff3dfef122f9fb +MISC metadata.xml 349 SHA256 6a843b07555943d3c65a949975beac94b7e8f600145f12441156ecbd1d943a12 SHA512 88f4bf4966aa0b70cf2f7872ae143dbe9f105bb4de34b3d893092183f369002414ae50a3baae6eb314d49ea84764c250e7b4fb3109ad8c179eb93f116417e68f WHIRLPOOL 50193edb94274d39c407baa9c6d717a42e2451fb77e47b5b69d4de53a540c80b36238927cc31eda2501334e50e58f56bf97fdc1e9fab20c78d6c07bcc18988fe 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..c0c2a831c629 --- /dev/null +++ b/net-analyzer/softflowd/files/softflowd.initd @@ -0,0 +1,53 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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..35892ab7c2d1 --- /dev/null +++ b/net-analyzer/softflowd/metadata.xml @@ -0,0 +1,11 @@ +<?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> +<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..cb7d09e3425e --- /dev/null +++ b/net-analyzer/softflowd/softflowd-0.9.9-r1.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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="https://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} +} |