summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2009-02-10 15:51:43 +0000
committerPeter Volkov <pva@gentoo.org>2009-02-10 15:51:43 +0000
commit43ed99102b6c68cb28b4480a2f701de03beefd61 (patch)
tree7599e9d1fb610220d0f88a4b3cb90ab295ba0f77 /net-analyzer/smokeping
parentOpps, not netmon but me should maintain this package. (diff)
downloadhistorical-43ed99102b6c68cb28b4480a2f701de03beefd61.tar.gz
historical-43ed99102b6c68cb28b4480a2f701de03beefd61.tar.bz2
historical-43ed99102b6c68cb28b4480a2f701de03beefd61.zip
Version bump, bug #229275, Raúl Porcel for report. Quite rewrote ebuild: install manpages, smoketrace, separate files for cgi and htdocs, new USE flag speedy.
Package-Manager: portage-2.1.6.7/cvs/Linux x86_64
Diffstat (limited to 'net-analyzer/smokeping')
-rw-r--r--net-analyzer/smokeping/ChangeLog12
-rw-r--r--net-analyzer/smokeping/Manifest22
-rw-r--r--net-analyzer/smokeping/files/79_smokeping.conf15
-rw-r--r--net-analyzer/smokeping/files/smokeping.init.167
-rw-r--r--net-analyzer/smokeping/metadata.xml8
-rw-r--r--net-analyzer/smokeping/smokeping-2.4.2.ebuild157
6 files changed, 263 insertions, 18 deletions
diff --git a/net-analyzer/smokeping/ChangeLog b/net-analyzer/smokeping/ChangeLog
index 391a793b07ce..811641839e06 100644
--- a/net-analyzer/smokeping/ChangeLog
+++ b/net-analyzer/smokeping/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-analyzer/smokeping
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/smokeping/ChangeLog,v 1.23 2008/08/19 14:13:13 falco Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/smokeping/ChangeLog,v 1.24 2009/02/10 15:51:42 pva Exp $
+
+*smokeping-2.4.2 (10 Feb 2009)
+
+ 10 Feb 2009; Peter Volkov <pva@gentoo.org> +files/79_smokeping.conf,
+ +files/smokeping.init.1, metadata.xml, +smokeping-2.4.2.ebuild:
+ Version bump, bug #229275, Raúl Porcel for report. Quite rewrote ebuild:
+ install manpages, smoketrace, separate files for cgi and htdocs, new USE
+ flag speedy.
19 Aug 2008; Raphael Marichez <falco@gentoo.org> smokeping-2.3.5.ebuild:
Fix Config/Grammar Perl dependencies bug 221831
diff --git a/net-analyzer/smokeping/Manifest b/net-analyzer/smokeping/Manifest
index 7057fecb6acb..3e2769cabedd 100644
--- a/net-analyzer/smokeping/Manifest
+++ b/net-analyzer/smokeping/Manifest
@@ -1,23 +1,13 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
AUX 78_smokeping.conf 376 RMD160 6a5ab3e4d5d94e6b410f52dfdbf99fe3e8ef32ab SHA1 1ef976cddf5bd1cfc5f68dacc2172d075be4677c SHA256 c29e0c2e83b28f1aac3cda5d4990f0eee5fdc9e2abd084b07a538aec29860b0e
+AUX 79_smokeping.conf 351 RMD160 96e13a810420790cdf7b5ea8969048be603e6c7e SHA1 69942bd8d0559c25a538edde540233c9ef7ff1e3 SHA256 fa4c48387598f8c6e60b7642e4284bb64196dcd233cea9f18ff37009b212ff77
AUX config.dist 2962 RMD160 e19833de607c6b8a6c88b26b4c903736e9b5ca86 SHA1 7dd78fdf8f0129c3e2b47015b67381e7b127332d SHA256 031f0cb72de57812ed34f463d71e90d05fb7b0e2b8df79d5e6ec42e67dfeca7e
AUX smokeping.init 1641 RMD160 0f2656c931fc1dac12e6ef794f55d9e0e6fe28c8 SHA1 992f118547cc153993b0427920e0cc5eb1c0d54e SHA256 d47d12cc2c48203cfaad4ab91456e22487f3b1247ab98601680b6738edd236c7
+AUX smokeping.init.1 1594 RMD160 bd5f156645748e267f7f0abc4653b35556003faa SHA1 1af862dce85b7b08b0b58663900f3d3d0e1c4779 SHA256 115759718efcbaf5f063eade146fcbf7f41606309519b44c9edd45fba9782d05
DIST smokeping-2.2.4.tar.gz 588740 RMD160 74a784ac3b9a837ba29882c1bcc16f6bdb440b9a SHA1 45e210e79017853031dee379a05647db7697d076 SHA256 a1d684785294919b6b97924484579bc64c460a39482c4dd676514712b3699da9
DIST smokeping-2.3.5.tar.gz 580458 RMD160 484efd851453024e83cb84ecad753d2051df0081 SHA1 d7ed6d1cf7fde5c8c9e1cb69c1e543cdf3f3edfa SHA256 e50eb7944ffd27897cb2af7d551592a142d33479284bb35c36bf68481ca64556
+DIST smokeping-2.4.2.tar.gz 909514 RMD160 4c91f1c6be77ef4d851821f5c0a8a60be0770527 SHA1 055d65c7e3c49cd0d6e8f96242131fe69dc3110e SHA256 ed8680d1b3fdb2b1efde3aa14b37bf7e9aee2c992c5814061dbd78e6eea00d49
EBUILD smokeping-2.2.4.ebuild 3434 RMD160 508163eccfa73e35126c8584f4ff18773773276e SHA1 65e67e495c353a96075a868edfdf59682887226a SHA256 479946714cc7ca03e36ff813c23f06d5bd4a6325414636904019388694549ea4
EBUILD smokeping-2.3.5.ebuild 3530 RMD160 a02f1ddf97dec18e665ae0f672a506d641d0598e SHA1 6e7dace2850d575762bc83cdb7dce2f39677808e SHA256 3fa31b1e1ecf02eda5b093c250b62d2d3a06fefb1ae1ff8d3e20d6068392e5e0
-MISC ChangeLog 3244 RMD160 b555b237c1737b5e272207438400394b5d8c17a3 SHA1 8fd30fdbd191fc55b83a5807084447922e93c231 SHA256 4ef26014caa13a5a2cbf341dc5ddbf4108fea3db5e762788a7ee7374a8873627
-MISC metadata.xml 251 RMD160 b51dbdd722927410f6ddea140ac6eebb8980b94e SHA1 2294d43232148e83653e27ee326c4c84389e4123 SHA256 4ba83a5bcb7a3c1cb108e970efc076f21e52493f59d52d271867588fe330d16b
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.9 (GNU/Linux)
-
-iQEcBAEBAgAGBQJIqtUAAAoJEDvRww8BFPxFtRAH/0Mekc/Ccjk+v9DRHqe0R2lL
-GcPDQGFao/6vMhzQII/8UrPoTUXSiS/8soxlDgcSXYePLKgqMjbyMZPIj1AayPU8
-qXBQv3iucfoT4kL+jqa/6Bfokks/mDsSKwFvaEEGQZ9FKP1d9k3/glyJMwbLmMRU
-5wqyu5DYYncHqeHu21GdQWS4oLhtg9SSdjPRQIFB6wqgp51vEgitkIUyEa7Kt5ad
-4UuvaxjT9JfoROMSKIS8dsYy1FFYBMo6kFz/fhmgn5kGEZbLxfvRn7d+2eHPjrBQ
-IWrlQQNd6BaDSDlTCF/jSuuIsWuLg1HqODlS2qYi3b2zVOCJqAxlxCd5PB8T3Qg=
-=I+u4
------END PGP SIGNATURE-----
+EBUILD smokeping-2.4.2.ebuild 5080 RMD160 ad26806cae2fb92d6f918ac235b7b504b4b1d802 SHA1 3c2b53e14de23e3b4baa6a0269a2c0842ffd94ab SHA256 86c401072ebbbbdc7866d53f065dbc825ae00c3201485630b2b76b96fc6ba1d1
+MISC ChangeLog 3578 RMD160 49569fbfa8f1b8780094dd12892beaf2c2af4773 SHA1 195d9db69b07d9b411fba70be64b4e67642d247c SHA256 197882a8f7edd84d009e2308660fe2597c5afa20c5841eccb2fb0fe3b50f4aed
+MISC metadata.xml 452 RMD160 38e8f683801dab1b5a2c515d421fd280a1946fb7 SHA1 49aeb83669efcb1d9716b287fda5c9700293f5ed SHA256 b5c4334e0c1ecd07e5a873f3a098e54ac44319b70559e48104defdb0a6fb78f8
diff --git a/net-analyzer/smokeping/files/79_smokeping.conf b/net-analyzer/smokeping/files/79_smokeping.conf
new file mode 100644
index 000000000000..1e9361ba501a
--- /dev/null
+++ b/net-analyzer/smokeping/files/79_smokeping.conf
@@ -0,0 +1,15 @@
+###
+### Setup the smokeping image cache and perl cgi script
+###
+<IfModule mod_alias.c>
+ Alias "/.simg/" "/var/lib/smokeping/.simg/"
+ <IfModule mod_perl.c>
+ <Directory "/var/lib/smokeping/.simg/">
+ Options -Indexes MultiViews
+ AllowOverride None
+ Order deny,allow
+ Deny from all
+ Allow from 127.0.0.1
+ </Directory>
+ </IfModule>
+</IfModule>
diff --git a/net-analyzer/smokeping/files/smokeping.init.1 b/net-analyzer/smokeping/files/smokeping.init.1
new file mode 100644
index 000000000000..118348fb0605
--- /dev/null
+++ b/net-analyzer/smokeping/files/smokeping.init.1
@@ -0,0 +1,67 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+opts="${opts} dump restore"
+
+depend() {
+ need net
+ use dns
+}
+
+checkconfig() {
+ if [ ! -f "/etc/smokeping/config" ] ; then
+ eerror "You need /etc/smokeping to run smokeping!"
+ return 1
+ fi
+ einfo "Please do not forget to configure smokeping at /etc/smokeping/config!"
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting smokeping"
+ LC_ALL=C \
+ start-stop-daemon --start --name smokeping \
+ --pidfile /var/run/smokeping/smokeping.pid \
+ --exec /usr/bin/smokeping \
+ --chuid smokeping:smokeping
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping smokeping"
+ start-stop-daemon --stop \
+ --pidfile /var/run/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
index a55343406081..df8a3d5d07e6 100644
--- a/net-analyzer/smokeping/metadata.xml
+++ b/net-analyzer/smokeping/metadata.xml
@@ -3,7 +3,15 @@
<pkgmetadata>
<herd>no-herd</herd>
<maintainer>
+ <email>pva@gentoo.org</email>
+ <name>Peter Volkov</name>
+</maintainer>
+<maintainer>
<email>chtekk@gentoo.org</email>
<name>Luca Longinotti</name>
</maintainer>
+<use>
+ <flag name='speedy'>Use <pkg>dev-perl/SpeedyCGI</pkg> instead of perl to
+ speed up cgi scripts</flag>
+</use>
</pkgmetadata>
diff --git a/net-analyzer/smokeping/smokeping-2.4.2.ebuild b/net-analyzer/smokeping/smokeping-2.4.2.ebuild
new file mode 100644
index 000000000000..5ef2cca74744
--- /dev/null
+++ b/net-analyzer/smokeping/smokeping-2.4.2.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/smokeping/smokeping-2.4.2.ebuild,v 1.1 2009/02/10 15:51:42 pva Exp $
+
+EAPI="2"
+
+inherit perl-module 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"
+KEYWORDS="~amd64 ~x86"
+IUSE="apache2 speedy"
+
+DEPEND="dev-lang/perl
+ virtual/perl-libnet
+ >=net-analyzer/rrdtool-1.2[perl]
+ >=net-analyzer/fping-2.4_beta2-r2
+ dev-perl/Digest-HMAC
+ dev-perl/libwww-perl
+ dev-perl/Socket6
+ dev-perl/Net-DNS
+ speedy? ( dev-perl/SpeedyCGI )
+ !apache2? ( virtual/httpd-cgi )
+ apache2? ( >=www-apache/mod_perl-2.0.1 )"
+
+RDEPEND="${DEPEND}"
+
+pkg_preinst() {
+ enewgroup smokeping
+ enewuser smokeping -1 -1 /var/lib/smokeping smokeping
+}
+
+src_unpack() {
+ # perl-mod.eclass does not support EAPI=2.
+ unpack ${A}
+}
+
+src_prepare() {
+ # we depend on dev-perl/Digest-HMAC. No need for bundled version.
+ rm -rf lib/Digest
+ rm qooxdoo/qooxdoolink
+}
+
+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 -r lib/*
+
+ # Install the CGI webserver scripts
+ sed 's:^use lib:#use lib:g' -i htdocs/*.cgi.dist
+ if use speedy; then
+ sed '1{s:/usr/[^ ]*:/usr/bin/speedy:}' -i htdocs/*.cgi.dist
+ else
+ sed '1{s:/usr/[^ ]*:/usr/bin/perl:}' -i htdocs/*.cgi.dist
+ fi
+ sed 's:/home/oetiker.*/config.dist:/etc/smokeping/config:' \
+ -i htdocs/*.cgi.dist
+ exeinto /var/www/localhost/perl/
+ newexe htdocs/smokeping.cgi.dist smokeping.pl || die
+ exeinto /var/www/localhost/smokeping
+ newexe htdocs/tr.cgi.dist tr.cgi || die
+ rm htdocs/{tr,smokeping}.cgi.dist
+
+ # Install AJAX scripts
+ insinto /var/www/localhost/smokeping
+ doins -r htdocs/* || die
+
+ # Create the smokeping binaries
+ for bin in ${PN} tSmoke; do
+ newbin bin/${bin}.dist ${bin}
+ dosed 's:^use lib:#use lib:g' /usr/bin/${bin}
+ dosed 's:etc/config.dist:/etc/smokeping/config:' /usr/bin/${bin}
+ done
+
+ # Create the config files
+ insinto /etc/${PN}
+ for file in etc/*; do
+ config=${file/.dist}
+ newins ${file} ${config#*/}
+ done
+ 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"
+ fperms 700 /etc/${PN}/smokeping_secrets
+
+ newinitd "${FILESDIR}/${PN}.init.1" ${PN} || die
+
+ if use apache2 ; then
+ insinto /etc/apache2/modules.d
+ doins "${FILESDIR}/79_${PN}.conf" || die
+ fi
+
+ # 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
+ else
+ fowners smokeping:smokeping /var/lib/${PN}/.simg
+ fi
+ fperms 775 /var/lib/${PN} /var/lib/${PN}/.simg
+ keepdir /var/run/${PN} # for pid files
+ fowners smokeping:smokeping /var/run/${PN}
+
+ # Install documentation.
+ insinto "/usr/share/doc/${PF}"
+ doins -r doc/examples
+ dodoc CHANGES CONTRIBUTORS README TODO || die
+ doman doc/{smokeping{.1,.cgi.1,_config.5},Smokeping.3,smokeping_examples.7} \
+ doc/{smokeping_{extend,install,master_slave,upgrade}.7,smoketrace.7} \
+ doc/{tSmoke.1,Smokeping/Smokeping::{Examples,RRDtools}.3} || die
+}
+
+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
+}