diff options
author | Tom Wijsman <tomwij@gentoo.org> | 2013-03-03 17:02:14 +0000 |
---|---|---|
committer | Tom Wijsman <tomwij@gentoo.org> | 2013-03-03 17:02:14 +0000 |
commit | 5de5f1e119a8d7aa0115ae1858325656ca9540c2 (patch) | |
tree | 82dfed6db39e53dc411acea940b624abf51d960f /net-misc/samplicator | |
parent | New ebuilds for samplicator, contributed by Vladimir Pavljuchenkov who will p... (diff) | |
download | historical-5de5f1e119a8d7aa0115ae1858325656ca9540c2.tar.gz historical-5de5f1e119a8d7aa0115ae1858325656ca9540c2.tar.bz2 historical-5de5f1e119a8d7aa0115ae1858325656ca9540c2.zip |
New ebuilds for samplicator, contributed by Vladimir Pavljuchenkov who will proxy maintain this. Fixes bug #459310.
Package-Manager: portage-2.1.11.52/cvs/Linux x86_64
Manifest-Sign-Key: 0x6D34E57D
Diffstat (limited to 'net-misc/samplicator')
-rw-r--r-- | net-misc/samplicator/Manifest | 21 | ||||
-rw-r--r-- | net-misc/samplicator/files/samplicator.8 | 86 | ||||
-rw-r--r-- | net-misc/samplicator/files/samplicator.conf | 8 | ||||
-rw-r--r-- | net-misc/samplicator/files/samplicator.initd | 40 | ||||
-rw-r--r-- | net-misc/samplicator/metadata.xml | 25 | ||||
-rw-r--r-- | net-misc/samplicator/samplicator-1.3.6.ebuild | 54 |
6 files changed, 231 insertions, 3 deletions
diff --git a/net-misc/samplicator/Manifest b/net-misc/samplicator/Manifest index c5002c006e62..495ea3fe1dfc 100644 --- a/net-misc/samplicator/Manifest +++ b/net-misc/samplicator/Manifest @@ -1,8 +1,23 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + 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 +AUX samplicator.initd 1106 SHA256 20d056c5bdc80612570698f0cf8ddff1f95ebff09b47af050df51c4839b1a8df SHA512 08eda5c5532b2a2606c0abb21ee7f88b59cd490cdace948a789ea719f79dcff50b5ecef58f7a9a2d0976d9cbd74aada9cc68da1f4ca8ae4a03708aa2fcc5af37 WHIRLPOOL 59f4b432fad25300021c84e757be82b4166498bf4165abddcad8e737d8d9be984155188333abf8feccfd90b424a0d32faf26ad41a50ecd98d1b01dba51a27d2b 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 +EBUILD samplicator-1.3.6.ebuild 1631 SHA256 8de7d95300efb9ec5dd0bb54f6dc7fae6415c480c81d12592dc33a5598248672 SHA512 d7f3cf3e7719ab895989259c4a73e18914a9a519fabc175d0bce813c52fb758ec80cc9aeb5920a94dd3455d8dc05ce114a771da298a33e0c9df14f11de192391 WHIRLPOOL 4ec17c1142af1748d41c14e12f6ef103e0496bf490dbba73c5296f8411040ab9c4b1cc4824efaf4fd079744d3a78cf0e20de2025ce3ea3b002ddaf7b84cbe3e0 +EBUILD samplicator-1.3.7_beta6.ebuild 1678 SHA256 2a18c4206dea561beaf7fa0ea0d16b6639c078164a0b1b330e1d3ff84043d452 SHA512 164f92144f3bc6cf0890429971ddfa52a5e8b6a45a5f90ae15524a065ece4f19636942eaaf0319d575e6fe242930c7e98ff77e4550ead68a9d31bfafd3df66fa WHIRLPOOL 1a3a676ae7b286b2d9075f43b474165ff0e0781c50feaae5f2ecc7bde92bfbd4aeb6528fe23da3179c3ecc2211176cab6a9e191a922075486492d8ba6d775b9c +MISC ChangeLog 605 SHA256 021380f2858a289ff6d8e3146228dbe5a421f803b2a166f0869d087dce94b0ee SHA512 51bb7073cc3e5b388e346f08035c1f629370afeb082bb3b871bc89176ea53ad68c88f499459cf433b87d459f57a84232c8de77e26ed706994a091f3fb36e46fb WHIRLPOOL 13b6b8616f083a6e8bd2812a4e221ad24f91ad5ba3f7c18805d2e5311904df509af992e6de7fb96704cfeda8a0320907918fdb46bf3e30b75344a1452b773638 MISC metadata.xml 1034 SHA256 e595298f0658e1b4ee4f4db013122ceb88c2997d158c3897f2113ae0dc48f959 SHA512 1ab321878ef34b15cb0dd0514480af8c4f226a3225c816eef4490561bcf3a3f01749e93b765f47e7980159a09be60d81496a3d8ba7649952543588c75e754bac WHIRLPOOL 18bc4373351a69af84ab5b10de81b20d0a7a46018061af21c3edbdd6509341d6245d2b25b84a60ba5ec62428db3b28c67c0be8316bd211f91a5c52923b1700ec +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.19 (GNU/Linux) + +iQEcBAEBCAAGBQJRM4ITAAoJEJWyH81tNOV9GUcH/0Z26OtqjyFVJrPkdQOsOXgB +LhOuvzR3TMm222P5BRxQpF8ZORaXqnSkrpKIHPGvCMyisGGsc6QuCbdToRNUIf2L +vtYzy7jqB1Tyl7IZGLuZwub4VHPgc1lM+VhNs0yHlIUJp70o4utbqGrWnslBa10v +NGI30+7BxmB9sa/jGOMCYkGOeZ1VaBRunYrhAO/NC/v2XFZ02qWXcagPS5MBHQpb +uD7J9L18HhNXHw9IJK0kbc1S+W5ZFl2YeIZvu4lrraMxnI35UMWPg33PPYgTVrRY +IRM2IIGSLeFlMmxYDl4AcAE009c9FqAz7N6FUiUJ74NTE5x2zw8Lxi2aS+7Uc5w= +=UMJp +-----END PGP SIGNATURE----- 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" +} |