diff options
author | Luca Longinotti <chtekk@gentoo.org> | 2006-08-09 18:09:00 +0000 |
---|---|---|
committer | Luca Longinotti <chtekk@gentoo.org> | 2006-08-09 18:09:00 +0000 |
commit | 3f88cc4c893c6e951b3c8c889f5ca7a107fd3a57 (patch) | |
tree | 93796818692f7bc8c5e9f3c6b8591a96cd00a13c /net-analyzer/smokeping | |
parent | Version bump: ebuild cleanup, updated patch. (diff) | |
download | gentoo-2-3f88cc4c893c6e951b3c8c889f5ca7a107fd3a57.tar.gz gentoo-2-3f88cc4c893c6e951b3c8c889f5ca7a107fd3a57.tar.bz2 gentoo-2-3f88cc4c893c6e951b3c8c889f5ca7a107fd3a57.zip |
Add package, closes bug #66980.
(Portage version: 2.1.1_pre4-r4)
Diffstat (limited to 'net-analyzer/smokeping')
-rw-r--r-- | net-analyzer/smokeping/ChangeLog | 12 | ||||
-rw-r--r-- | net-analyzer/smokeping/Manifest | 28 | ||||
-rw-r--r-- | net-analyzer/smokeping/files/78_smokeping.conf | 17 | ||||
-rw-r--r-- | net-analyzer/smokeping/files/config.dist | 174 | ||||
-rw-r--r-- | net-analyzer/smokeping/files/digest-smokeping-2.0.9 | 3 | ||||
-rw-r--r-- | net-analyzer/smokeping/files/smokeping.init | 69 | ||||
-rw-r--r-- | net-analyzer/smokeping/metadata.xml | 8 | ||||
-rw-r--r-- | net-analyzer/smokeping/smokeping-2.0.9.ebuild | 99 |
8 files changed, 410 insertions, 0 deletions
diff --git a/net-analyzer/smokeping/ChangeLog b/net-analyzer/smokeping/ChangeLog new file mode 100644 index 000000000000..573be8515c37 --- /dev/null +++ b/net-analyzer/smokeping/ChangeLog @@ -0,0 +1,12 @@ +# ChangeLog for net-analyzer/smokeping +# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/smokeping/ChangeLog,v 1.1 2006/08/09 18:09:00 chtekk Exp $ + +*smokeping-2.0.9 (09 Aug 2006) + + 09 Aug 2006; Luca Longinotti <chtekk@gentoo.org> +files/78_smokeping.conf, + +files/config.dist, +files/smokeping.init, +metadata.xml, + +smokeping-2.0.9.ebuild: + Add package, closes bug #66980. Thanks to Lee Thompson and Steve Clement for + the initial ebuild. + diff --git a/net-analyzer/smokeping/Manifest b/net-analyzer/smokeping/Manifest new file mode 100644 index 000000000000..017d58f6b078 --- /dev/null +++ b/net-analyzer/smokeping/Manifest @@ -0,0 +1,28 @@ +AUX 78_smokeping.conf 376 RMD160 6a5ab3e4d5d94e6b410f52dfdbf99fe3e8ef32ab SHA1 1ef976cddf5bd1cfc5f68dacc2172d075be4677c SHA256 c29e0c2e83b28f1aac3cda5d4990f0eee5fdc9e2abd084b07a538aec29860b0e +MD5 bf6b85058b4bd9a08549957342eab268 files/78_smokeping.conf 376 +RMD160 6a5ab3e4d5d94e6b410f52dfdbf99fe3e8ef32ab files/78_smokeping.conf 376 +SHA256 c29e0c2e83b28f1aac3cda5d4990f0eee5fdc9e2abd084b07a538aec29860b0e files/78_smokeping.conf 376 +AUX config.dist 2962 RMD160 e19833de607c6b8a6c88b26b4c903736e9b5ca86 SHA1 7dd78fdf8f0129c3e2b47015b67381e7b127332d SHA256 031f0cb72de57812ed34f463d71e90d05fb7b0e2b8df79d5e6ec42e67dfeca7e +MD5 6fd6e657d1d0286ab82689e55ae7d9cb files/config.dist 2962 +RMD160 e19833de607c6b8a6c88b26b4c903736e9b5ca86 files/config.dist 2962 +SHA256 031f0cb72de57812ed34f463d71e90d05fb7b0e2b8df79d5e6ec42e67dfeca7e files/config.dist 2962 +AUX smokeping.init 1632 RMD160 c041fb04e1d63dfd077ecd7abd0248eb7dc63c1c SHA1 b7e08ea0bcf5490c4e9b1124e39aab724fda87af SHA256 625634db58c5eca142d6bf13741e5afbb18ecdbbd780cbfeafe13711a94dc929 +MD5 a85c9870f88c721b06c03d7cf6605133 files/smokeping.init 1632 +RMD160 c041fb04e1d63dfd077ecd7abd0248eb7dc63c1c files/smokeping.init 1632 +SHA256 625634db58c5eca142d6bf13741e5afbb18ecdbbd780cbfeafe13711a94dc929 files/smokeping.init 1632 +DIST smokeping-2.0.9.tar.gz 393777 RMD160 3ddbe35f6ec634773d6facc5d7e4c17c17753984 SHA1 89427122eada5fdf5f6145705f080583fb2d245a SHA256 c9fc10d04afae31ac5283101f0211e842faf98784301178833ada1e3e4a0dcf5 +EBUILD smokeping-2.0.9.ebuild 3080 RMD160 d1c0aa02682a55a647c24a5f71c68417cda95258 SHA1 bba44a8a040a919b68e5e1ee2bffcea78bce2e48 SHA256 4db52435220547ee6e81368faad23178167a13422722e7ece8330ab08e581558 +MD5 b06b55835269039edb6f925e5c1e6a42 smokeping-2.0.9.ebuild 3080 +RMD160 d1c0aa02682a55a647c24a5f71c68417cda95258 smokeping-2.0.9.ebuild 3080 +SHA256 4db52435220547ee6e81368faad23178167a13422722e7ece8330ab08e581558 smokeping-2.0.9.ebuild 3080 +MISC ChangeLog 421 RMD160 eacdc8cf0d1d6577b6933fe189972c91ae0c205a SHA1 465f18f413b6b4d714a29be188d05997b1dd2209 SHA256 b5dfff870563f8c677f461087d33a74873ddd5092b933aab5d8cc7d93eb33cd3 +MD5 25b25398aa9139828a2f6b6949eccc80 ChangeLog 421 +RMD160 eacdc8cf0d1d6577b6933fe189972c91ae0c205a ChangeLog 421 +SHA256 b5dfff870563f8c677f461087d33a74873ddd5092b933aab5d8cc7d93eb33cd3 ChangeLog 421 +MISC metadata.xml 230 RMD160 fd2ff2b82d75b757b306ba2de0f742b6cd1f966e SHA1 b4e616879ea88965ecb0709eaa12d7fe1d5dbe1d SHA256 903c9de2c99aeba3f9543766df6ea311ad16e4e44c2e9f66519880eccb76050e +MD5 b1bcc1a84490adeeaff207fb5578fa44 metadata.xml 230 +RMD160 fd2ff2b82d75b757b306ba2de0f742b6cd1f966e metadata.xml 230 +SHA256 903c9de2c99aeba3f9543766df6ea311ad16e4e44c2e9f66519880eccb76050e metadata.xml 230 +MD5 81d1df4235dfdb4f6c31e7c7e7612a1f files/digest-smokeping-2.0.9 247 +RMD160 5970b92757c24b8c4067b5684e1c6ba10d8915e7 files/digest-smokeping-2.0.9 247 +SHA256 1cf4755243694a82121a0a5b8f46731cabfd1bfc61b951aa3e5dd3ef44fa51ae files/digest-smokeping-2.0.9 247 diff --git a/net-analyzer/smokeping/files/78_smokeping.conf b/net-analyzer/smokeping/files/78_smokeping.conf new file mode 100644 index 000000000000..e710ae822342 --- /dev/null +++ b/net-analyzer/smokeping/files/78_smokeping.conf @@ -0,0 +1,17 @@ +### +### Setup the smokeping image cache +### +<IfModule mod_alias.c> + Alias "/.simg/" "/var/lib/smokeping/.simg/" + <IfModule mod_perl.c> + <Directory "/var/lib/smokeping/.simg/"> + Options -Indexes MultiViews + AllowOverride None + <IfModule mod_access.c> + Order deny,allow + Deny from all + Allow from 127.0.0.1 + </IfModule> + </Directory> + </IfModule> +</IfModule> diff --git a/net-analyzer/smokeping/files/config.dist b/net-analyzer/smokeping/files/config.dist new file mode 100644 index 000000000000..3c6796c4b841 --- /dev/null +++ b/net-analyzer/smokeping/files/config.dist @@ -0,0 +1,174 @@ +# Note that all IP addresses in this file are false, to prevent some +# machine falling uder a deadly DOS storm because all users keep +# the same addresses in their config. + +*** General *** + +owner = Joe Random +contact = joe@some.place.xyz +mailhost = smtp.mailhost.abc +sendmail = /usr/lib/sendmail +imgcache = /var/lib/smokeping/.simg +imgurl = ../.simg +datadir = /var/lib/smokeping +piddir = /var/lib/smokeping +cgiurl = http://some.place.xyz/cgi-perl/smokeping.pl +smokemail = /etc/smokemail.dist +# specify this to get syslog logging +syslogfacility = local0 +# each probe is now run in its own process +# disable this to revert to the old behaviour +# concurrentprobes = no + +*** Alerts *** +to = admin@some.place.xyz +from = smokealert@some.place.xyz + ++bigloss +type = loss +# in percent +pattern = ==0%,==0%,==0%,==0%,>0%,>0%,>0% +comment = suddenly there is packet loss + ++someloss +type = loss +# in percent +pattern = >0%,*12*,>0%,*12*,>0% +comment = loss 3 times in a row + ++startloss +type = loss +# in percent +pattern = ==S,>0%,>0%,>0% +comment = loss at startup + ++rttdetect +type = rtt +# in milli seconds +pattern = <10,<10,<10,<10,<10,<100,>100,>100,>100 +comment = routing mesed up again ? + +*** Database *** + +step = 300 +pings = 20 + +# consfn mrhb steps total + +AVERAGE 0.5 1 1008 +AVERAGE 0.5 12 4320 + MIN 0.5 12 4320 + MAX 0.5 12 4320 +AVERAGE 0.5 144 720 + MAX 0.5 144 720 + MIN 0.5 144 720 + +*** Presentation *** + +template = /etc/smokeping.template + ++ overview + +width = 600 +height = 50 +range = 10h + ++ detail + +width = 600 +height = 200 +unison_tolerance = 2 + +"Last 3 Hours" 3h +"Last 30 Hours" 30h +"Last 10 Days" 10d +"Last 400 Days" 400d + +*** Probes *** + ++ FPing + +binary = /usr/sbin/fping + +*** Targets *** + +probe = FPing + +menu = Top +title = Network Latency Grapher +remark = Welcome to the SmokePing website of YYZ. \ + Here you will learn all about the latency of our network. + ++ World + +menu = World +title = Worldwide Connectivity + +++ Europe + +menu = Europe +title = European Connectivity + ++++ Switzerland + +menu = Switzerland +title = Swiss Connectivity +alerts = bigloss,someloss,startloss + +++++ SBB + +menu = SBB/CFF/FFS +title = Swiss Federal Railways Webserver +host = www.railway-server.abc + +++++ Tiscali + +menu = Tiscali Web +title = Tiscali Webserver www.tiscali.abc +host = www.tiscali-web.abc + ++++ UK + +menu = United Kingdom +title = United Kingdom + +++++ UCL + +menu = UCL +title = UCL +host = www.ucl-abc.acc.uki + +++ USA + +menu = North America +title =North American Connectivity + ++++ MIT + +menu = MIT +title = Massachusetts Institute of Technology Webserver +host = www.gurkoman.ybc + ++++ IU + +menu = IU +title = Indiana University +host = www.iu.ali + ++++ UCB + +menu = U. C. Berkeley +title = U. C. Berkeley Webserver +host = www.berkly.udi + ++++ UCSD + +menu = U. C. San Diego +title = U. C. San Diego Webserver +host = www.ucsdddar.art + ++++ Sun + +menu = Sun Microsystems +title = Sun Microsystems Webserver +host = www.sun-web.com diff --git a/net-analyzer/smokeping/files/digest-smokeping-2.0.9 b/net-analyzer/smokeping/files/digest-smokeping-2.0.9 new file mode 100644 index 000000000000..2e6892b48215 --- /dev/null +++ b/net-analyzer/smokeping/files/digest-smokeping-2.0.9 @@ -0,0 +1,3 @@ +MD5 512c0bc38176451df7d664050b1283d9 smokeping-2.0.9.tar.gz 393777 +RMD160 3ddbe35f6ec634773d6facc5d7e4c17c17753984 smokeping-2.0.9.tar.gz 393777 +SHA256 c9fc10d04afae31ac5283101f0211e842faf98784301178833ada1e3e4a0dcf5 smokeping-2.0.9.tar.gz 393777 diff --git a/net-analyzer/smokeping/files/smokeping.init b/net-analyzer/smokeping/files/smokeping.init new file mode 100644 index 000000000000..6419ff12a098 --- /dev/null +++ b/net-analyzer/smokeping/files/smokeping.init @@ -0,0 +1,69 @@ +#!/sbin/runscript +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +opts="start stop dump restore" + +depend() { + use dns + need net +} + +checkconfig() { + if [[ ! -e "/usr/bin/smokeping" ]] ; then + eerror "You need /usr/bin/smokeping to run smokeping!" + return 1 + fi + if [[ ! -e "/etc/smokeping" ]] ; then + eerror "You need /etc/smokeping to run smokeping!" + return 1 + fi + einfo "Please remember to setup smokeping at /etc/smokeping!" +} + +start() { + checkconfig || return 1 + + ebegin "Starting smokeping" + start-stop-daemon --start --name smokeping \ + --exec /usr/bin/smokeping \ + --chuid smokeping:smokeping + eend $? +} + +stop() { + ebegin "Stopping smokeping" + start-stop-daemon --stop \ + --pidfile /var/lib/smokeping/smokeping.pid + eend $? +} + +dump() { + ebegin "Dumping smokeping rrd files to XML for backup or upgrade use" + if service_started "${myservice}" ; then + eerror "You need to stop smokeping before dumping files!" + return 1 + fi + for f in `find /var/lib/smokeping -name '*.rrd' -print` ; do + f_xml=`dirname $f`/`basename $f .rrd`.xml + rrdtool dump "$f" > "${f_xml}" + chown root:0 "${f_xml}" + done + eend $? +} + +restore() { + ebegin "Restoring smokeping rrd files from XML dump files" + if service_started "${myservice}" ; then + eerror "You need to stop smokeping before restoring files!" + return 1 + fi + for f in `find /var/lib/smokeping -name '*.xml' -print` ; do + f_rrd=`dirname $f`/`basename $f .xml`.rrd + mv -f "${f_rrd}" "${f_rrd}.bak" + chown root:0 "${f_rrd}.bak" + rrdtool restore "$f" "${f_rrd}" + chown smokeping:smokeping "${f_rrd}" + done + eend $? +} diff --git a/net-analyzer/smokeping/metadata.xml b/net-analyzer/smokeping/metadata.xml new file mode 100644 index 000000000000..c9a807a76004 --- /dev/null +++ b/net-analyzer/smokeping/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>chtekk@gentoo.org</email> + <name>Luca Longinotti</name> +</maintainer> +</pkgmetadata> diff --git a/net-analyzer/smokeping/smokeping-2.0.9.ebuild b/net-analyzer/smokeping/smokeping-2.0.9.ebuild new file mode 100644 index 000000000000..fa06a36e5a94 --- /dev/null +++ b/net-analyzer/smokeping/smokeping-2.0.9.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/smokeping/smokeping-2.0.9.ebuild,v 1.1 2006/08/09 18:09:00 chtekk Exp $ + +inherit perl-module eutils + +KEYWORDS="~x86 ~amd64" + +DESCRIPTION="A powerful latency measurement tool." +SRC_URI="http://people.ee.ethz.ch/~oetiker/webtools/smokeping/pub/${P}.tar.gz" +HOMEPAGE="http://people.ee.ethz.ch/~oetiker/webtools/smokeping/" +LICENSE="GPL-2" +SLOT="0" +IUSE="apache2" + +DEPEND="dev-lang/perl + perl-core/libnet + >=net-analyzer/rrdtool-1.2 + net-analyzer/fping + apache2? ( >=net-www/apache-2.0.54-r30 >=www-apache/mod_perl-2.0.1 )" +RDEPEND="${DEPEND}" + +pkg_setup() { + enewgroup smokeping + enewuser smokeping -1 -1 /var/lib/smokeping smokeping +} + +src_compile() { + # There is a makefile we don't want to run so leave this here + einfo "Skip compile." +} + +src_install() { + # First move all the perl modules into the vendor lib area of Perl + perlinfo + insinto ${VENDOR_LIB} + doins lib/*.pm + ### This one kind of concerns me, possible conflict with other software + insinto ${VENDOR_LIB}/Config + doins lib/Config/*.pm + insinto ${VENDOR_LIB}/Smokeping + doins lib/Smokeping/*.pm + insinto ${VENDOR_LIB}/Smokeping/matchers + doins lib/Smokeping/matchers/*.pm + insinto ${VENDOR_LIB}/Smokeping/probes + doins lib/Smokeping/probes/*.pm + + # Create the files in var for rrd file storage and the cgi webserver script + keepdir /var/lib/${PN}/.simg + fowners smokeping:smokeping /var/lib/${PN} + if use apache2 ; then + fowners apache:apache /var/lib/${PN}/.simg + else + fowners smokeping:smokeping /var/lib/${PN}/.simg + fi + fperms 775 /var/lib/${PN} /var/lib/${PN}/.simg + exeinto /var/www/localhost/perl + newexe htdocs/${PN}.cgi.dist ${PN}.pl + dosed 's:^use lib:#use lib:g' /var/www/localhost/perl/${PN}.pl + dosed 's:sepp/bin/speedy:bin/perl:' /var/www/localhost/perl/${PN}.pl + dosed 's:/home/oetiker/data/projects/AADJ-smokeping/dist/etc/config:/etc/smokeping:' \ + /var/www/localhost/perl/${PN}.pl + + # Create the binary + newbin bin/${PN}.dist ${PN} + dosed 's:/usr/sepp/bin/perl-5.8.4:/usr/bin/perl:g' /usr/bin/${PN} + dosed 's:^use lib:#use lib:g' /usr/bin/${PN} + # dosed 's:/sepp::' /usr/bin/${PN} + dosed 's:etc/config.dist:/etc/smokeping:' /usr/bin/${PN} + + # Create the config files + insinto /etc + newins "${FILESDIR}/config.dist" ${PN} + newins etc/basepage.html.dist ${PN}.template + doins etc/smokemail.dist + exeinto /etc/init.d + newexe "${FILESDIR}/${PN}.init" ${PN} + if use apache2 ; then + insinto /etc/apache2/modules.d + doins "${FILESDIR}/78_${PN}.conf" + fi +} + +pkg_postinst() { + chown smokeping:smokeping "${ROOT}/var/lib/${PN}" + chmod 755 "${ROOT}/var/lib/${PN}" + einfo + einfo "Four more steps are needed to get ${PN} un&running:" + einfo "1) You need to edit /etc/${PN}" + einfo "2) You need to edit the template at /etc/${PN}.template" + einfo "3) You need to make the fping binary setuid root:" + einfo " # chmod 4755 /usr/sbin/fping" + if use apache2 ; then + einfo "4) Make sure to add -D PERL to APACHE2_OPTS in /etc/conf.d/apache2" + einfo " and to restart apache2." + fi + einfo "You can now start ${PN} with '/etc/init.d/${PN} start'." + einfo +} |