summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klausmann <klausman@gentoo.org>2012-08-29 08:26:37 +0000
committerTobias Klausmann <klausman@gentoo.org>2012-08-29 08:26:37 +0000
commit18f440a8afb69a0efc9a36d69e1cc967bd7b18f1 (patch)
tree7c38d863b50e0b64b3ad07cdabb56e8dd768ca15 /net-analyzer/smokeping
parentRemoving silly ebuild (5.4 depping on 5.3) (diff)
downloadgentoo-2-18f440a8afb69a0efc9a36d69e1cc967bd7b18f1.tar.gz
gentoo-2-18f440a8afb69a0efc9a36d69e1cc967bd7b18f1.tar.bz2
gentoo-2-18f440a8afb69a0efc9a36d69e1cc967bd7b18f1.zip
Added edited ebuild from Donald R. Gray Jr (as per bug 404277).
Changes: - Use upstream fix for fping-3.3 (files/smokeping_fping-3.3.patch) - Drop SSH and Radius deps since they're not strictly needed. When/if we include the necessary packages in the tree, we can re-add them - The install paths may have changed. Due to the last point and since there's a lot of sed'ing going on which pva@ might not eb OK with, it's not keyworded for anything right now. I'll review this commit with him to find out what needs to be changed.
Diffstat (limited to 'net-analyzer/smokeping')
-rw-r--r--net-analyzer/smokeping/Manifest29
-rw-r--r--net-analyzer/smokeping/files/smokeping_fping-3.3.patch43
-rw-r--r--net-analyzer/smokeping/metadata.xml7
-rw-r--r--net-analyzer/smokeping/smokeping-2.6.8.ebuild150
4 files changed, 211 insertions, 18 deletions
diff --git a/net-analyzer/smokeping/Manifest b/net-analyzer/smokeping/Manifest
index 3806524482cc..4b6f4aa9e2b8 100644
--- a/net-analyzer/smokeping/Manifest
+++ b/net-analyzer/smokeping/Manifest
@@ -1,18 +1,11 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-AUX 79_smokeping.conf 351 RMD160 96e13a810420790cdf7b5ea8969048be603e6c7e SHA1 69942bd8d0559c25a538edde540233c9ef7ff1e3 SHA256 fa4c48387598f8c6e60b7642e4284bb64196dcd233cea9f18ff37009b212ff77
-AUX config.dist 2962 RMD160 e19833de607c6b8a6c88b26b4c903736e9b5ca86 SHA1 7dd78fdf8f0129c3e2b47015b67381e7b127332d SHA256 031f0cb72de57812ed34f463d71e90d05fb7b0e2b8df79d5e6ec42e67dfeca7e
-AUX smokeping.init.2 1546 RMD160 748e7102db8cd6f75129d3b9038205d9af9e7a65 SHA1 780d740798956575e3a6598059616f740b1384ab SHA256 f98a2e8747daa94678f5263aa3ad8e86636264acc7aa3ee558d1742ac8751747
-DIST smokeping-2.4.2.tar.gz 909514 RMD160 4c91f1c6be77ef4d851821f5c0a8a60be0770527 SHA1 055d65c7e3c49cd0d6e8f96242131fe69dc3110e SHA256 ed8680d1b3fdb2b1efde3aa14b37bf7e9aee2c992c5814061dbd78e6eea00d49
-EBUILD smokeping-2.4.2-r3.ebuild 5290 RMD160 89d2e79ce0fb8c87d4ed774691b025338b5b3c00 SHA1 176d5154f006888fcd3a3163ac99f13eff96d2c1 SHA256 9f369cd388add216d9ed48047124b32a1b89929e58ce38f69eb1edbb6a41f019
-EBUILD smokeping-2.4.2-r4.ebuild 5624 RMD160 a0991d78d009fc41ac0002fb934842d7a0cc9a84 SHA1 24b923805539c2fd3449d37e923106892bd6d614 SHA256 0e50d0cced542402fa1b27982c57d80be7265129db2738768be7a736c0e2a457
-MISC ChangeLog 6606 RMD160 e2fe0e11a1f9f042467992f44b854aa62003faf8 SHA1 e74ed68d82b3ed83574642b7115950412c143d28 SHA256 1bf94a5eca1581be51049761f75abe3ba0d94a0742aa14b06255d5b0a212cdb2
-MISC metadata.xml 340 RMD160 f8cf40a60b60bc2da8d85fb3f23f5630ff4b349d SHA1 e089358462865f78b31a1f9b9860510f7c10daec SHA256 fc1db01803ff2aab2a79b301610490ebf9a1dd482c5fc47ed76c4a6a051bb46c
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.19 (GNU/Linux)
-
-iEYEARECAAYFAk/WtC0ACgkQ/ejvha5XGaNA+gCfc3zEPFsmZWdUpoL0HCqzv+He
-/B4AnA8t6k+o7MgzfHuUVIlr9JWjde+a
-=RYj4
------END PGP SIGNATURE-----
+AUX 79_smokeping.conf 351 SHA256 fa4c48387598f8c6e60b7642e4284bb64196dcd233cea9f18ff37009b212ff77 SHA512 d53abdf29e8f6bad67a654b17088c3f8dee7908ff82b0b911599e2ac6a11be84b8fa2c30b1f0b6142803ff9a5058f586946eafa112dfd26ca4f8f8664d19cfc6 WHIRLPOOL 907eff72a390aa36c7be80fb39f2204238ec8daa13f07d9b189401374cf4cc2cdf6df2842f8d0e9096bcd87670190b673d1bfa05adcca5ad0266b99d1bd79586
+AUX config.dist 2962 SHA256 031f0cb72de57812ed34f463d71e90d05fb7b0e2b8df79d5e6ec42e67dfeca7e SHA512 b9fbaf1f1d5fedf0c3ec2ced02a1cc457a24e28d1b405d61b8a97c97d9e8cee03da9fafb2526dac3c288451f6a20e4b568ed099351c88089081d8af0da47fd11 WHIRLPOOL ac4d45d87843cae5f6fbcae3b3c39b021dc35da00ad91ae69ccfec8a650baca0e6654a34e74cb6362e4e50d9fa9d482aed30ef7a6b82c3fbaf7e6889b26e4065
+AUX smokeping.init.2 1546 SHA256 f98a2e8747daa94678f5263aa3ad8e86636264acc7aa3ee558d1742ac8751747 SHA512 1aba6e08d531ca4de9df37af073b2d4f3ad01197ae02596108b9591e19ff474a1bdd6d1d980f760ffe3a924809d3188d0b2df01e776b3c9c43a8cd23d3a3a688 WHIRLPOOL 19fc271e949ab149937feb8a5d80ae264555896ae62145d35cecca48fc52596b711a4a7acc28535d400a7383d2d05d41221f8399fab6e9b86283fa5345beba52
+AUX smokeping_fping-3.3.patch 1686 SHA256 f52307a64c2b0648543799406d1809e93cc38c8acfb61fd49e0352506adcce1f SHA512 eaea689b4e7f1e38e8d36950ffe9aa49bf8bb5f3a0f64dba72c18fdf2695fcc9d16d3bb3d629518f7fc418e7c1cd9402d200bdef71d6cea34a204f51515f1603 WHIRLPOOL d2604eff7db415ee91534e1ca629c690241ec214046156cdf59942636f23ab14a305ece07ed0bda7b78b2c7e255aa39e0d9bfd1c14da8ec277897e482326eadd
+DIST smokeping-2.4.2.tar.gz 909514 SHA256 ed8680d1b3fdb2b1efde3aa14b37bf7e9aee2c992c5814061dbd78e6eea00d49 SHA512 443a7c823801b64de930765011c762b4326f3b9a3f8140c4f782802a019dca0af6a2a248c613ea189592550446e89fdce6ec7236386123ced8c2bf1197b79403 WHIRLPOOL 28115d925d7329ba76f677dfceb89b954a53dee329f62cb4e2f9b6f96a91434a3e6595b89b4af1fca2cb5eb6fb095b69da9aed8fb616c0129513ea33a28bc107
+DIST smokeping-2.6.8.tar.gz 423516 SHA256 15fd99487d01649a552d2954bc1c6b0442967a72fca51c8ff197447389b1b16c SHA512 a8d4b201b63c42e4af7ad494023dc43db706788e52c160202888e5d8332da391ce4f0304a636070612137e9a49bd448778e3359e73f219e930d0ae391d1f6c27 WHIRLPOOL fe74474f637ef46cdff0077ea108c38b86853734ccec1e9b474d42e274095045c99dc9e8b570faadc280f13e1f6af8cbb1f396625ad2a4cd9325147604a5aee6
+EBUILD smokeping-2.4.2-r3.ebuild 5290 SHA256 9f369cd388add216d9ed48047124b32a1b89929e58ce38f69eb1edbb6a41f019 SHA512 532302caadea8b65964f721d6d7399c38575b2de0962f1e323ee172be2f04caa68fa824202eb5d9e3cf7a7d9d8a4c04f1858a5465a0c421fb1a237b051dab2e9 WHIRLPOOL 3084b04f82daa2350043abd9fb755ccac4953ff9c035c815fd6b3c70e6ab9a5150d1124653177b9145a41615367012c4ec754febed3558033b69cf61b0072939
+EBUILD smokeping-2.4.2-r4.ebuild 5624 SHA256 0e50d0cced542402fa1b27982c57d80be7265129db2738768be7a736c0e2a457 SHA512 3d7c282de8bb85d74d3226c4e36f283facf3f396783bedecb4d83692a621171077d5767748bea5c9b10e6fdbc2b146bf0f92091839100c84ab7e5672be82886c WHIRLPOOL 72c594b90cbf8803f8421f1bee15aa34075458342e28778806471b8d8922acd1d85afb8491cf9f1a8ff6166611bf45d591f48bfd8963eb35ca909d377daaf1a6
+EBUILD smokeping-2.6.8.ebuild 4870 SHA256 1f80dc396056cd69b92e3f9b3b935de5d39a2bbe6046ba31617376305e8787e1 SHA512 2b61ed94860dd894be1366344b1db4b369b28816edcd10c7eb3be6f5b4445b7600383cc619a70e5a529c2dc9a7246c59b92742e6ed34027f0dc5ab9560a750d6 WHIRLPOOL 73ab10dbe7798faa67102839c6907775128cd07650fb347eff8c8967eb9b50fdf13d205487dac74caf49c9510ec983815b701b00b2a7ca302b74a5969d04492d
+MISC ChangeLog 6606 SHA256 1bf94a5eca1581be51049761f75abe3ba0d94a0742aa14b06255d5b0a212cdb2 SHA512 68fb1ce48def4b739ee9f9e0305aabfc7cada475a3d2562996cb655d1c70d537b5b8bc19f0f71eac7014d6139d8716d81309d9cd846b6f32c4e3940b844965c0 WHIRLPOOL d6b076b8d3d44e8f7ceb05692f9a6d7c2d4290b3b65ac0eaaf0cc650d2ab9570ff97d434f2c7a03fb970df51b5aa76046684dc8edf7c59b30e74f321966bf4ef
+MISC metadata.xml 684 SHA256 8bf2a557b02d78c6cb800ad6908b6ff789bc8c7191a884264350e14ea4222a01 SHA512 f8ef8a8f1fe0feb3257b713918c89f2ee0a74781a955d144c40cde9058150060796fc529eee06e2bbcdf450f360177c2bb3df9c7b3007d1cb0dc3f5b782739c9 WHIRLPOOL d9fd161ef65158bd554fd4152079814d65be17b152fd41026abc24c90f7e79b509782adca5adbaa8cbc935f1f34f510a9fa7cf93b11a6530568d76bb653b4a21
diff --git a/net-analyzer/smokeping/files/smokeping_fping-3.3.patch b/net-analyzer/smokeping/files/smokeping_fping-3.3.patch
new file mode 100644
index 000000000000..56b8b2d0088f
--- /dev/null
+++ b/net-analyzer/smokeping/files/smokeping_fping-3.3.patch
@@ -0,0 +1,43 @@
+commit 491498b57a427230069604d10b68073c0f6f5e33
+Author: Tobias Oetiker <tobi@oetiker.ch>
+Date: Wed Aug 29 09:49:57 2012 +0200
+
+ allow to configure FPing probe to read fping output form stdout instead of stderr
+
+diff --git a/lib/Smokeping/probes/FPing.pm b/lib/Smokeping/probes/FPing.pm
+index 2b932bf..0901201 100644
+--- a/lib/Smokeping/probes/FPing.pm
++++ b/lib/Smokeping/probes/FPing.pm
+@@ -32,6 +32,9 @@ your system yet, you can get a slightly enhanced version from L<www.smokeping.or
+
+ The (optional) B<packetsize> option lets you configure the packetsize for the pings sent.
+
++Since version 3.3 fping sends its statistics to stdout. Set B<usestdout> to 'true'
++so make smokeping read stdout instead of stderr.
++
+ In B<blazemode>, FPing sends one more ping than requested, and discards
+ the first RTT value returned as it's likely to be an outlier.
+
+@@ -142,7 +145,8 @@ sub ping ($){
+ $self->do_debug("Executing @cmd");
+ my $pid = open3($inh,$outh,$errh, @cmd);
+ $self->{rtts}={};
+- while (<$errh>){
++ my $fh = ($self->{properties}{usestdout} || '') eq 'true' ? $outh : $errh;
++ while (<$fh>){
+ chomp;
+ $self->do_debug("Got fping output: '$_'");
+ next unless /^\S+\s+:\s+[-\d\.]/; #filter out error messages from fping
+@@ -194,6 +198,12 @@ sub probevars {
+ _doc => "Send an extra ping and then discarge the first answer since the first is bound to be an outliner.",
+
+ },
++ usestdout => {
++ _re => '(true|false)',
++ _example => 'true',
++ _doc => "Listen for FPing output on stdout instead of stderr ... (version 3.3+ sends its statistics on stdout).",
++
++ },
+ timeout => {
+ _re => '(\d*\.)?\d+',
+ _example => 1.5,
diff --git a/net-analyzer/smokeping/metadata.xml b/net-analyzer/smokeping/metadata.xml
index 73f84d904b37..8bae13d6c415 100644
--- a/net-analyzer/smokeping/metadata.xml
+++ b/net-analyzer/smokeping/metadata.xml
@@ -8,5 +8,12 @@
<use>
<flag name='speedy'>Use <pkg>dev-perl/SpeedyCGI</pkg> instead of perl to
speed up cgi scripts</flag>
+ <flag name='dig'>Install <pkg>net-dns/bind-tools</pkg> for dig
+ functionality</flag>
+ <flag name='echoping'>Install <pkg>net-analyzer/echoping</pkg> for echoping
+ functionality</flag>
+ <flag name='fcgi'>Use <pkg>dev-perl/FCGI</pkg> for CGI</flag>
+ <flag name='telnet'>Install <pkg>dev-perl/Net-Telnet</pkg> for telnet
+ functionality</flag>
</use>
</pkgmetadata>
diff --git a/net-analyzer/smokeping/smokeping-2.6.8.ebuild b/net-analyzer/smokeping/smokeping-2.6.8.ebuild
new file mode 100644
index 000000000000..0fb0eccab02a
--- /dev/null
+++ b/net-analyzer/smokeping/smokeping-2.6.8.ebuild
@@ -0,0 +1,150 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/smokeping/smokeping-2.6.8.ebuild,v 1.1 2012/08/29 08:26:37 klausman Exp $
+
+EAPI="4"
+
+inherit eutils
+
+DESCRIPTION="A powerful latency measurement tool."
+HOMEPAGE="http://oss.oetiker.ch/smokeping/"
+SRC_URI="http://oss.oetiker.ch/smokeping/pub/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+# dropping hppa and sparc because of way too may dependencies not having
+# keywords in those architectures.
+KEYWORDS=""
+IUSE="apache2 curl dig echoping fcgi ipv6 ldap telnet"
+
+DEPEND="!apache2? ( virtual/httpd-cgi )
+ >=dev-lang/perl-5.8.8-r8
+ >=dev-perl/SNMP_Session-1.13
+ >=net-analyzer/fping-2.4_beta2-r2
+ >=net-analyzer/rrdtool-1.2[perl]
+ apache2? ( >=www-apache/mod_perl-2.0.1
+ www-apache/mod_fcgid )
+ curl? ( >=net-misc/curl-7.21.4 )
+ dev-perl/CGI-Session
+ dev-perl/Config-Grammar
+ dev-perl/Digest-HMAC
+ fcgi? ( dev-perl/FCGI )
+ dev-perl/IO-Socket-SSL
+ dev-perl/Net-DNS
+ dev-perl/libwww-perl
+ dig? ( net-dns/bind-tools )
+ echoping? ( >=net-analyzer/echoping-6.0.2 )
+ ipv6? ( >=dev-perl/Socket6-0.20 )
+ ldap? ( dev-perl/perl-ldap )
+ telnet? ( dev-perl/Net-Telnet )
+ virtual/perl-libnet"
+
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ enewgroup smokeping
+ enewuser smokeping -1 -1 /var/lib/smokeping smokeping
+}
+
+src_prepare() {
+ rm -r lib/{BER.pm,SNMP_Session.pm,SNMP_util.pm} # dev-perl/SNMP_Session
+ epatch "${FILESDIR}/smokeping_fping-3.3.patch"
+
+}
+
+src_configure() {
+ econf \
+ --sysconfdir=/etc/smokeping \
+ --with-htdocs-dir=/var/www/localhost/smokeping
+}
+
+src_compile() {
+ emake
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ newinitd "${FILESDIR}/${PN}.init.3" ${PN} || die
+
+ mv "${D}/etc/smokeping/basepage.html.dist" "${D}/etc/smokeping/basepage.html"
+ mv "${D}/etc/smokeping/config.dist" "${D}/etc/smokeping/config"
+ mv "${D}/etc/smokeping/smokemail.dist" "${D}/etc/smokeping/smokemail"
+ mv "${D}/etc/smokeping/smokeping_secrets.dist" "${D}/etc/smokeping/smokeping_secrets"
+ mv "${D}/etc/smokeping/tmail.dist" "${D}/etc/smokeping/tmail"
+
+ sed -e '/^imgcache/{s:\(^imgcache[ \t]*=\).*:\1 /var/lib/smokeping/.simg:}' \
+ -e '/^imgurl/{s:\(^imgurl[ \t]*=\).*:\1 ../.simg:}' \
+ -e '/^datadir/{s:\(^datadir[ \t]*=\).*:\1 /var/lib/smokeping:}' \
+ -e '/^piddir/{s:\(^piddir[ \t]*=\).*:\1 /var/run/smokeping:}' \
+ -e '/^cgiurl/{s#\(^cgiurl[ \t]*=\).*#\1 http://some.place.xyz/perl/smokeping.pl#}' \
+ -e '/^smokemail/{s:\(^smokemail[ \t]*=\).*:\1 /etc/smokeping/smokemail:}' \
+ -e '/^tmail/{s:\(^tmail[ \t]*=\).*:\1 /etc/smokeping/tmail:}' \
+ -e '/^secrets/{s:\(^secrets[ \t]*=\).*:\1 /etc/smokeping/smokeping_secrets:}' \
+ -e '/^template/{s:\(^template[ \t]*=\).*:\1 /etc/smokeping/basepage.html:}' \
+ -i "${D}/etc/${PN}/config" || die
+
+ sed -e '/^<script/{s:cropper/:/cropper/:}' -i "${D}/etc/${PN}/basepage.html"
+
+ sed -e 's/$FindBin::Bin\/..\/etc\/config/\/etc\/smokeping\/config/g' \
+ -i "${D}/usr/bin/smokeping" -i "${D}/usr/bin/smokeping_cgi"
+
+ sed -e 's:etc/config.dist:/etc/smokeping/config:' -i "${D}/usr/bin/tSmoke"
+
+ sed -e 's:/usr/etc/config:/etc/smokeping/config:' -i \
+ "${D}/var/www/localhost/smokeping/smokeping.fcgi.dist"
+
+ dodir /var/www/localhost/cgi-bin
+ mv "${D}/var/www/localhost/smokeping/smokeping.fcgi.dist" \
+ "${D}/var/www/localhost/cgi-bin/smokeping.fcgi"
+
+ fperms 700 /etc/${PN}/smokeping_secrets
+
+ if use apache2 ; then
+ insinto /etc/apache2/modules.d
+ doins "${FILESDIR}/79_${PN}.conf" || die
+ fi
+
+ dodir /var/cache/smokeping
+ keepdir /var/cache/smokeping
+
+ # Create the files in /var for rrd file storage
+ keepdir /var/lib/${PN}/.simg
+ fowners smokeping:smokeping /var/lib/${PN}
+
+ if use apache2 ; then
+ fowners apache:apache /var/lib/${PN}/.simg
+ fowners -R apache:apache /var/www
+ else
+ fowners smokeping:smokeping /var/lib/${PN}/.simg
+ fi
+
+ fperms 775 /var/lib/${PN} /var/lib/${PN}/.simg
+}
+
+pkg_postinst() {
+ chown smokeping:smokeping "${ROOT}/var/lib/${PN}"
+ chmod 755 "${ROOT}/var/lib/${PN}"
+ elog
+ elog "Additional steps are needed to get ${PN} up & running:"
+ elog
+ elog "First you need to edit /etc/${PN}/config. After that"
+ elog "you can start ${PN} with '/etc/init.d/${PN} start'."
+ elog
+ if use apache2 ; then
+ elog "For web interface make sure to add -D PERL to APACHE2_OPTS in"
+ elog "/etc/conf.d/apache2 and to restart apache2. To access site from"
+ elog "other places check permissions at /etc/apache2/modules.d/79_${PN}.conf"
+ elog
+ else
+ elog "For web interface configure your web server to serve perl cgi"
+ elog "script at /var/www/localhost/perl/"
+ fi
+ elog "To make cropper working you just need to copy /var/www/localhost/smokeping/cropper"
+ elog "into you htdocs (or create symlink and allow webserver to follow symlinks)."
+ elog
+ elog "We install all files required for smoketrace, but you have to"
+ elog "configure it manually. Just read 'man smoketrace'. Also you need to"
+ elog "'emerge traceroute'."
+ elog
+}