summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Wijsman <tomwij@gentoo.org>2013-03-03 17:02:11 +0000
committerTom Wijsman <tomwij@gentoo.org>2013-03-03 17:02:11 +0000
commitffdf42bbac0856f02e9918c8b205900095fd9a3d (patch)
tree24da333be0fce2d16145383faa7334b1b20a6ffa /net-misc/samplicator
parentremoved myself from metadata.xml (diff)
downloadgentoo-2-ffdf42bbac0856f02e9918c8b205900095fd9a3d.tar.gz
gentoo-2-ffdf42bbac0856f02e9918c8b205900095fd9a3d.tar.bz2
gentoo-2-ffdf42bbac0856f02e9918c8b205900095fd9a3d.zip
New ebuilds for samplicator, contributed by Vladimir Pavljuchenkov who will proxy maintain this. Fixes bug #459310.
(Portage version: 2.1.11.52/cvs/Linux x86_64, signed Manifest commit with key 6D34E57D)
Diffstat (limited to 'net-misc/samplicator')
-rw-r--r--net-misc/samplicator/ChangeLog12
-rw-r--r--net-misc/samplicator/Manifest8
-rw-r--r--net-misc/samplicator/files/samplicator.886
-rw-r--r--net-misc/samplicator/files/samplicator.conf8
-rw-r--r--net-misc/samplicator/files/samplicator.initd40
-rw-r--r--net-misc/samplicator/metadata.xml25
-rw-r--r--net-misc/samplicator/samplicator-1.3.6.ebuild54
-rw-r--r--net-misc/samplicator/samplicator-1.3.7_beta6.ebuild57
8 files changed, 290 insertions, 0 deletions
diff --git a/net-misc/samplicator/ChangeLog b/net-misc/samplicator/ChangeLog
new file mode 100644
index 000000000000..70cb4524c500
--- /dev/null
+++ b/net-misc/samplicator/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for net-misc/samplicator
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/samplicator/ChangeLog,v 1.1 2013/03/03 17:02:11 tomwij Exp $
+
+*samplicator-1.3.7_beta6 (03 Mar 2013)
+*samplicator-1.3.6 (03 Mar 2013)
+
+ 03 Mar 2013; Tom Wijsman <TomWij@gentoo.org> +files/samplicator.8,
+ +files/samplicator.conf, +files/samplicator.initd, +metadata.xml,
+ +samplicator-1.3.6.ebuild, +samplicator-1.3.7_beta6.ebuild:
+ New ebuilds for samplicator, contributed by Vladimir Pavljuchenkov who will
+ proxy maintain this. Fixes bug #459310.
diff --git a/net-misc/samplicator/Manifest b/net-misc/samplicator/Manifest
new file mode 100644
index 000000000000..c5002c006e62
--- /dev/null
+++ b/net-misc/samplicator/Manifest
@@ -0,0 +1,8 @@
+AUX samplicator.8 2278 SHA256 bb36a0df436fc0db4c53bb9d832f88f9c1c4c1331e7babcaef96ee9aacaf9dd4 SHA512 008d797b15fa217d5e6eaed2923ddb1abe580fd8d1092309d3295c75667cde8d15e35b39827827c8cabd5e988f70846cb5e58f673eef5be59f6b874ea400b2c0 WHIRLPOOL b3a46c99fa8fd5024fe6cc11268fc720f8f6dd1248fe1ccc73ee0c78d8381cadb78f80a2bb9e2bee8f9f414c56f45d999643916201c0f88978d86f1908fd9cce
+AUX samplicator.conf 199 SHA256 dc777a834e22a3093dc18cbb9e93c132a266a562882b11d703b41e1f1a447f9f SHA512 6c9240d821fabd23f5a7e7dd3762b17622c8a45b137112bb376ec4f1b52b03c34f4bed76801be20e34dc1045923e24722bb515d974bd06bcc8d19dc20925e691 WHIRLPOOL d993c18d5899eb78565042ba0b672c19f173359af69bc07e6a52a386a948829f77b2cf76322c7dd16580615c2ec11afc7572d7052bdde5c97102f05eb122c052
+AUX samplicator.initd 1000 SHA256 49c92f28b35b4fa15b3cefd964ddb88b85086022d2394d5c878d37f13dae30ae SHA512 03d65f577402b9a6e3ec7eb16f0c3ecd47fc643f228fea9fdaced0ba4f4aaa9694dcb266313f6a8c50e28fdb0601ff3a2599cb1f4f9223c48ec81d265be8320a WHIRLPOOL c27c5f856457716b2ea0d8285066c4e426318aabe4abe8b3a6289d0004d8841ecd15f1681b1be180d536483d68d526bf1428866b0cf4ce6e25c6a2bac7b29f90
+DIST samplicator-1.3.6.tar.gz 87901 SHA256 d5af47be6fc6cdbd9b5d116c65a92c6b9fd546df1c9cd61c831b5b85eb1f2742 SHA512 a4023344ec911d3dc6992ddce139e6f1c86a67bd9948a3f92a995dc26aeda1753becea4b0f5d9ad45a06d628029bffc0a77c28fbd277da9faf42100c01d55f31 WHIRLPOOL c499abfe21ed1d8062ab8fad1b6ae87a45217a797f8997588bf6aa8acd2b743dac4e9d5df965208ffd999dd7fa59e7e413956a2ddb5f86cdbac77de854ff9737
+DIST samplicator-1.3.7-beta6.tar.gz 95603 SHA256 8f1da80f2b32ef0e41a720fe1c98905f6e4cb1acb2949dbdddbb665a09655faf SHA512 fbb22dbe37afe5d1a855866da0ca0b1c8a8165bf366a45ca25648c9e30448adc959143a2571661cc1ae59332557a58d0fa3c87b405fca6c8543bed38cf12e622 WHIRLPOOL 9a0685793774c985bea33a0cbb4fffd40f8a1e38a03a9243008188b8e725574e3a34519a616ff8262cd081afcf59d87635aae8ce192f1fdc7088d0149a90ee86
+EBUILD samplicator-1.3.6.ebuild 1524 SHA256 0c008ce10d29013058097390f022efbc069e89d941b59eecde5007c0404b6142 SHA512 55d61cdbfff178556ff73dc062cdb43a091765f45150dfa823da06cc233564988f031296f5a034b1ce0e3ee4249c5ac01840f6640a35de348ba90f0486a84170 WHIRLPOOL f909fc0b67355953c4413ec192578ef9ca3833403ede3f6252501b0fd292e74435a2c3adef7c02ab0d56e62e74bf08ee0572c7435d48c89de91ec3bbd3965f62
+EBUILD samplicator-1.3.7_beta6.ebuild 1565 SHA256 94722557f883bf2e06797914b62a8546b2a94ac271969b54477a4c309a57c397 SHA512 07936c942536ba6bb72aa2edd9bd554a32781532a6c95a0269dc45fb8df9f24fe6d38eff1ad050e293940babcb2fb9acb4a5b75ede6dae2ca02c04946eea0813 WHIRLPOOL 190368cabd29e0806d4c2e4347b33ba02ec1b8a8aa6f751b01c880c48abcb4fb48cb8b1cbe2bb088e854ae6e6bb3413421e89f00147e4ae848c120a344789c75
+MISC metadata.xml 1034 SHA256 e595298f0658e1b4ee4f4db013122ceb88c2997d158c3897f2113ae0dc48f959 SHA512 1ab321878ef34b15cb0dd0514480af8c4f226a3225c816eef4490561bcf3a3f01749e93b765f47e7980159a09be60d81496a3d8ba7649952543588c75e754bac WHIRLPOOL 18bc4373351a69af84ab5b10de81b20d0a7a46018061af21c3edbdd6509341d6245d2b25b84a60ba5ec62428db3b28c67c0be8316bd211f91a5c52923b1700ec
diff --git a/net-misc/samplicator/files/samplicator.8 b/net-misc/samplicator/files/samplicator.8
new file mode 100644
index 000000000000..1ddef2407238
--- /dev/null
+++ b/net-misc/samplicator/files/samplicator.8
@@ -0,0 +1,86 @@
+.TH samplicator 8 "February 25, 2013" "" "samplicator"
+.SH NAME
+.B samplicator
+\- UDP packets forwarder and duplicator
+.SH SYNOPSIS
+.B samplicator
+.RB [ \-p
+.IR port ]
+.RB [ \-s
+.IR address ]
+.RB [ \-d
+.IR level ]
+.RB [ \-b
+.IR size ]
+.RB [ \-n ]
+.RB [ \-S ]
+.RB [ \-x
+.IR delay ]
+.RB [ \-c
+.IR config ]
+.RB [ \-f ]
+.RB [ \-h ]
+.RB A.B.C.D[/\fIport\fP[/\fIfreq\fP][,\fIttl\fP]]
+.SH DESCRIPTION
+.B samplicator
+is simple program listens for UDP datagrams (NetFlow, sFlow, SNMP Trap, Syslog)
+on a network port, and sends copies of these datagrams on to a set of destinations.
+Optionally, it can perform sampling, i.e. rather than forwarding every packet,
+forward only 1 in N. Another option is that it can "spoof" the IP source address,
+so that the copies appear to come from the original source, rather than the relay.
+.SH OPTIONS
+The following command-line options are accepted by the server:
+.IP "\-p \fIport\fP"
+UDP port to accept flows on. Default \- 2000.
+.IP "\-s \fIaddress\fP"
+interface address to accept flows on. Default \- any.
+.IP "\-d \fIlevel\fP"
+debug level
+.IP "\-b \fIsize\fP"
+set socket buffer size. Default \- 65536.
+.IP \-n
+don't compute UDP checksum (leave at 0)
+.IP \-S
+maintain (spoof) source addresses
+.IP "\-x \fIdelay\fP"
+transmit delay in microseconds
+.IP "\-c \fIconfig\fP"
+specify a config file to read
+.IP \-f
+fork program into background
+.IP \-h
+print this usage message and exit
+.IP A.B.C.D
+is the receiver's IP address
+.IP "\fIport\fP"
+is the UDP port to send to. Default \- 2000.
+.IP "\fIfreq\fP"
+is the sampling rate. Default \- 1.
+.IP "\fIttl\fP"
+is the sending packets TTL value. Default \- 64.
+.SH CONFIG
+A.B.C.D[/E.F.G.H]: receiver
+.IP A.B.C.D
+is the senders IP address
+.IP E.F.G.H
+is a mask to apply to the sender. Default \- 255.255.255.255.
+.IP receiver
+is the IP address of receiver
+.SH NOTES
+.B samplicator
+currently only supports IPv4.
+.PP
+Receivers specified on the command line will get all packets, those specified in the
+.IR config
+will get only packets with a matching source.
+
+.SH FILES
+.B
+/usr/sbin/samplicate
+
+.SH AUTHOR
+.B samplicator
+was originally written by Simon Leinen <simon.einen@gmail.com>.
+.PP
+This manual page was written by Vladimir Pavljuchenkov <spiderx@spiderx.dp.ua>
+for Gentoo Linux (and may be used by others) \ No newline at end of file
diff --git a/net-misc/samplicator/files/samplicator.conf b/net-misc/samplicator/files/samplicator.conf
new file mode 100644
index 000000000000..3f38ccc9887b
--- /dev/null
+++ b/net-misc/samplicator/files/samplicator.conf
@@ -0,0 +1,8 @@
+# Config file for /etc/init.d/samplicator
+
+# Various options.
+# run `samplicator -h` for valid cmdline options
+OPTS="-f -S -p 2000"
+
+# Receiver config file
+#CONFIG="-c /etc/samplicator/receiver.conf" \ No newline at end of file
diff --git a/net-misc/samplicator/files/samplicator.initd b/net-misc/samplicator/files/samplicator.initd
new file mode 100644
index 000000000000..dd3af2176755
--- /dev/null
+++ b/net-misc/samplicator/files/samplicator.initd
@@ -0,0 +1,40 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/samplicator/files/samplicator.initd,v 1.1 2013/03/03 17:02:11 tomwij Exp $
+
+NAME=${SVCNAME##*.}
+if [ -n "${NAME}" -a "${SVCNAME}" != "samplicator" ]; then
+ PID="/run/samplicator.${NAME}.pid"
+ PNAME=$(echo ${RC_SVCNAME} | sed 's/\..*//g')
+ CONF_DEFAULT="/etc/conf.d/samplicator.${NAME}"
+else
+ PID="/run/samplicator.pid"
+ PNAME=${RC_SVCNAME}
+ CONF_DEFAULT="/etc/conf.d/samplicator"
+fi
+CONF=${CONF:-${CONF_DEFAULT}}
+EXEC=${EXEC:-/usr/bin/samplicate}
+
+depend() {
+ need net
+ provide samplicator
+}
+
+start() {
+ ebegin "Starting samplicator"
+ start-stop-daemon --start --quiet --background --make-pidfile --pidfile ${PID} --exec ${EXEC} -- ${OPTS} ${CONFIG}
+ eend $?
+}
+
+start_post() {
+ pgrep -n $(echo ${PNAME} | sed 's/or/e/') > ${PID}
+}
+
+stop() {
+ ebegin "Stopping samplicator"
+ start-stop-daemon --stop --quiet --pidfile ${PID}
+ rm -f ${PID}
+ eend $?
+}
+
diff --git a/net-misc/samplicator/metadata.xml b/net-misc/samplicator/metadata.xml
new file mode 100644
index 000000000000..136d439dfde1
--- /dev/null
+++ b/net-misc/samplicator/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>spiderx@spiderx.dp.ua</email>
+ <name>Vladimir Pavljuchenkov</name>
+ <description>Primary maintainer.</description>
+ </maintainer>
+ <maintainer>
+ <email>TomWij@gentoo.org</email>
+ <name>Tom Wijsman</name>
+ <description>Committer, please CC him.</description>
+ </maintainer>
+ <longdescription>
+ This small program receives UDP datagrams on a given port, and resends
+ those datagrams to a specified set of receivers. In addition, a
+ sampling divisor N may be specified individually for each receiver,
+ which will then only receive one in N of the received packets.
+ </longdescription>
+ <upstream>
+ <changelog>https://code.google.com/p/samplicator/source/browse/trunk/ChangeLog</changelog>
+ <doc>https://code.google.com/p/samplicator/source/browse/trunk/README</doc>
+ <bugs-to>mailto:simon.leinen@gmail.com</bugs-to>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/samplicator/samplicator-1.3.6.ebuild b/net-misc/samplicator/samplicator-1.3.6.ebuild
new file mode 100644
index 000000000000..9305fe980eb2
--- /dev/null
+++ b/net-misc/samplicator/samplicator-1.3.6.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/samplicator/samplicator-1.3.6.ebuild,v 1.1 2013/03/03 17:02:11 tomwij Exp $
+
+EAPI="5"
+
+inherit eutils
+
+DESCRIPTION="UDP packets forwarder and duplicator"
+HOMEPAGE="http://${PN}.googlecode.com/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="Artistic GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+pkg_setup() {
+ # Add samplicator group and user to system
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /etc/${PN} ${PN}
+}
+
+src_install() {
+ # Install and copy documentation
+ default
+
+ # Install Gentoo init script and its config
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf ${PN}
+
+ # Install manual page
+ doman "${FILESDIR}"/${PN}.8
+}
+
+pkg_postinst() {
+ ewarn ""
+ ewarn "Don't specify the receiver on the command line, because it will get all packets."
+ ewarn "Instead of this, specify it in a config file; defined in such way it will only get packets with a matching source."
+ ewarn ""
+
+ einfo "For every receiver type create a file in directory /etc/${PN} (see example below)"
+ einfo "and specify the path to it in variable CONFIG of the corresponding initscript config file in /etc/conf.d/"
+ einfo ""
+ einfo "Receiver config examples: "
+ einfo ""
+ einfo " /etc/${PN}/netflow:"
+ einfo " 10.0.0.0/255.0.0.0:1.1.1.1/9996 2.2.2.2/9996 3.3.3.3/9996"
+ einfo ""
+ einfo " /etc/${PN}/syslog:"
+ einfo " 10.0.0.0/255.255.0.0:2.2.2.2/514 3.3.3.3/514"
+ einfo ""
+ einfo " /etc/${PN}/snmp:"
+ einfo " 10.0.0.0/255.255.255.255:3.3.3.3/162"
+}
diff --git a/net-misc/samplicator/samplicator-1.3.7_beta6.ebuild b/net-misc/samplicator/samplicator-1.3.7_beta6.ebuild
new file mode 100644
index 000000000000..880db66ae4c2
--- /dev/null
+++ b/net-misc/samplicator/samplicator-1.3.7_beta6.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/samplicator/samplicator-1.3.7_beta6.ebuild,v 1.1 2013/03/03 17:02:10 tomwij Exp $
+
+EAPI="5"
+
+inherit eutils
+
+DESCRIPTION="UDP packets forwarder and duplicator"
+HOMEPAGE="http://${PN}.googlecode.com/"
+MY_P=${P/_/-}
+SRC_URI="http://${PN}.googlecode.com/files/${MY_P}.tar.gz"
+
+LICENSE="Artistic GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ # Add samplicator group and user to system
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /etc/${PN} ${PN}
+}
+
+src_install() {
+ # Install and copy documentation
+ default
+
+ # Install Gentoo init script and its config
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf ${PN}
+
+ # Install manual page
+ doman "${FILESDIR}"/${PN}.8
+}
+
+pkg_postinst() {
+ ewarn ""
+ ewarn "Don't specify the receiver on the command line, because it will get all packets."
+ ewarn "Instead of this, specify it in a config file; defined in such way it will only get packets with a matching source."
+ ewarn ""
+
+ einfo "For every receiver type create a file in directory /etc/${PN} (see example below)"
+ einfo "and specify the path to it in variable CONFIG of the corresponding initscript config file in /etc/conf.d/"
+ einfo ""
+ einfo "Receiver config examples: "
+ einfo ""
+ einfo " /etc/${PN}/netflow:"
+ einfo " 10.0.0.0/255.0.0.0:1.1.1.1/9996 2.2.2.2/9996 3.3.3.3/9996"
+ einfo ""
+ einfo " /etc/${PN}/syslog:"
+ einfo " 10.0.0.0/255.255.0.0:2.2.2.2/514 3.3.3.3/514"
+ einfo ""
+ einfo " /etc/${PN}/snmp:"
+ einfo " 10.0.0.0/255.255.255.255:3.3.3.3/162"
+}