summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2010-03-29 15:05:48 +0000
committerPeter Volkov <pva@gentoo.org>2010-03-29 15:05:48 +0000
commitbd248ab42d64327f7fb2510845c723cc289aaf8f (patch)
tree0fea02319c784523224b8fd6189dc014637c6546 /net-analyzer/smokeping
parentFix debug usage (diff)
downloadhistorical-bd248ab42d64327f7fb2510845c723cc289aaf8f.tar.gz
historical-bd248ab42d64327f7fb2510845c723cc289aaf8f.tar.bz2
historical-bd248ab42d64327f7fb2510845c723cc289aaf8f.zip
Drop bundled libs and use in-tree perl modules where possible, bug #260170, thank all who helped there. Add reload option to init script, bug #259370, thank Arturas for suggestion.
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64
Diffstat (limited to 'net-analyzer/smokeping')
-rw-r--r--net-analyzer/smokeping/ChangeLog12
-rw-r--r--net-analyzer/smokeping/Manifest5
-rw-r--r--net-analyzer/smokeping/files/smokeping.init.18
-rw-r--r--net-analyzer/smokeping/smokeping-2.4.2-r1.ebuild158
4 files changed, 178 insertions, 5 deletions
diff --git a/net-analyzer/smokeping/ChangeLog b/net-analyzer/smokeping/ChangeLog
index 87fc07ccd058..aae51454af7f 100644
--- a/net-analyzer/smokeping/ChangeLog
+++ b/net-analyzer/smokeping/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-analyzer/smokeping
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/smokeping/ChangeLog,v 1.26 2009/03/07 12:57:43 armin76 Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/smokeping/ChangeLog,v 1.27 2010/03/29 15:05:48 pva Exp $
+
+*smokeping-2.4.2-r1 (29 Mar 2010)
+
+ 29 Mar 2010; Peter Volkov <pva@gentoo.org> +smokeping-2.4.2-r1.ebuild,
+ files/smokeping.init.1:
+ Drop bundled libs and use in-tree perl modules where possible, bug
+ #260170, thank all who helped there. Add reload option to init script, bug
+ #259370, thank Arturas for suggestion.
07 Mar 2009; Raúl Porcel <armin76@gentoo.org> smokeping-2.4.2.ebuild:
Re-add ~sparc wrt #258458
diff --git a/net-analyzer/smokeping/Manifest b/net-analyzer/smokeping/Manifest
index 3e02141b4a71..fcd623d9f789 100644
--- a/net-analyzer/smokeping/Manifest
+++ b/net-analyzer/smokeping/Manifest
@@ -2,12 +2,13 @@ AUX 78_smokeping.conf 376 RMD160 6a5ab3e4d5d94e6b410f52dfdbf99fe3e8ef32ab SHA1 1
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
+AUX smokeping.init.1 1700 RMD160 f15885579b4068b11bd591514ebfdf38df66cfce SHA1 b658a72fd6169b148746478adaa38dc2b2b5d270 SHA256 680b472a245a0cd20ac6066d03669f8bccdb42dfa8cab02ea881aae2e35eadba
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
+EBUILD smokeping-2.4.2-r1.ebuild 5322 RMD160 d12834f2e8733f8108ca3abfd1789abf9db570d1 SHA1 2833618404558950620fbeea7ec19c7508c18687 SHA256 f895af705f31c59baa3a202c2897fe994ecbec285feb8a8adc5bd0bd076e0a60
EBUILD smokeping-2.4.2.ebuild 5097 RMD160 e6b74e1db20e2e117622f5afc2a2305ca151b585 SHA1 07aec92f40a5eb9ef8d31738ae4a48ea4b3506e6 SHA256 e84805ba267d4386bcb77db060678900a8387142e1f1f4c9c3fdc53129e076fa
-MISC ChangeLog 3786 RMD160 cf80d9299788769ebe846632e5a00ec89cec50a5 SHA1 cfef072ef7be53281cd8242fc9a8a31989d955d5 SHA256 2d5b76a61263ad04e07869dedb41c8e65ec57080c62d172202f0f3ecbacae0e7
+MISC ChangeLog 4104 RMD160 13e29f88899f70c5ca81c6edd9a959b2e102f7b5 SHA1 e6e233471949605cb0e150aed417f8535b108819 SHA256 edf5ef90cfdce4270bf2afc95b2c0dd848cbbaaf96a190961575b1f678f05236
MISC metadata.xml 452 RMD160 38e8f683801dab1b5a2c515d421fd280a1946fb7 SHA1 49aeb83669efcb1d9716b287fda5c9700293f5ed SHA256 b5c4334e0c1ecd07e5a873f3a098e54ac44319b70559e48104defdb0a6fb78f8
diff --git a/net-analyzer/smokeping/files/smokeping.init.1 b/net-analyzer/smokeping/files/smokeping.init.1
index 118348fb0605..0222964c6ee9 100644
--- a/net-analyzer/smokeping/files/smokeping.init.1
+++ b/net-analyzer/smokeping/files/smokeping.init.1
@@ -2,7 +2,7 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-opts="${opts} dump restore"
+opts="${opts} dump reload restore"
depend() {
need net
@@ -36,6 +36,12 @@ stop() {
eend $?
}
+reload() {
+ ebegin "Reloading smokeping"
+ /usr/bin/smokeping --reload 1>/dev/null 2>&1
+ eend $?
+}
+
dump() {
ebegin "Dumping smokeping rrd files to XML for backup or upgrade use"
if service_started "${myservice}" ; then
diff --git a/net-analyzer/smokeping/smokeping-2.4.2-r1.ebuild b/net-analyzer/smokeping/smokeping-2.4.2-r1.ebuild
new file mode 100644
index 000000000000..ae581178e1c1
--- /dev/null
+++ b/net-analyzer/smokeping/smokeping-2.4.2-r1.ebuild
@@ -0,0 +1,158 @@
+# Copyright 1999-2010 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-r1.ebuild,v 1.1 2010/03/29 15:05:48 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 ~sparc ~x86"
+IUSE="apache2 speedy"
+
+# dev-perl/JSON-1.x is bundled and is incompatible with version 2.x wich is in
+# the tree. See http://bugs.gentoo.org/show_bug.cgi?id=260170#c2
+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/CGI-Session
+ >=dev-perl/SNMP_Session-1.13
+ dev-perl/Socket6
+ dev-perl/Net-DNS
+ speedy? ( dev-perl/SpeedyCGI )
+ !apache2? ( virtual/httpd-cgi )
+ apache2? ( >=www-apache/mod_perl-2.0.1 )
+ !dev-perl/JSON"
+
+RDEPEND="${DEPEND}"
+
+pkg_preinst() {
+ enewgroup smokeping
+ enewuser smokeping -1 -1 /var/lib/smokeping smokeping
+}
+
+src_prepare() {
+ rm -rf lib/Digest # provided by dev-perl/Digest-HMAC
+ rm -rf lib/CGI # provided by dev-perl/CGI-Session
+ rm -r lib/{BER.pm,SNMP_Session.pm,SNMP_util.pm} # dev-perl/SNMP_Session
+ 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
+}