From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- net-analyzer/smokeping/Manifest | 15 +++ net-analyzer/smokeping/files/79_smokeping.conf | 15 +++ .../smokeping/files/smokeping-2.6.9-pod.patch | 11 ++ net-analyzer/smokeping/files/smokeping.conf | 1 + net-analyzer/smokeping/files/smokeping.init.3 | 77 +++++++++++ net-analyzer/smokeping/files/smokeping.init.4 | 75 +++++++++++ net-analyzer/smokeping/files/smokeping.service | 10 ++ net-analyzer/smokeping/metadata.xml | 14 ++ net-analyzer/smokeping/smokeping-2.6.10.ebuild | 139 ++++++++++++++++++++ net-analyzer/smokeping/smokeping-2.6.11.ebuild | 141 ++++++++++++++++++++ net-analyzer/smokeping/smokeping-2.6.9.ebuild | 144 +++++++++++++++++++++ 11 files changed, 642 insertions(+) create mode 100644 net-analyzer/smokeping/Manifest create mode 100644 net-analyzer/smokeping/files/79_smokeping.conf create mode 100644 net-analyzer/smokeping/files/smokeping-2.6.9-pod.patch create mode 100644 net-analyzer/smokeping/files/smokeping.conf create mode 100644 net-analyzer/smokeping/files/smokeping.init.3 create mode 100644 net-analyzer/smokeping/files/smokeping.init.4 create mode 100644 net-analyzer/smokeping/files/smokeping.service create mode 100644 net-analyzer/smokeping/metadata.xml create mode 100644 net-analyzer/smokeping/smokeping-2.6.10.ebuild create mode 100644 net-analyzer/smokeping/smokeping-2.6.11.ebuild create mode 100644 net-analyzer/smokeping/smokeping-2.6.9.ebuild (limited to 'net-analyzer/smokeping') diff --git a/net-analyzer/smokeping/Manifest b/net-analyzer/smokeping/Manifest new file mode 100644 index 000000000000..3692d8afee53 --- /dev/null +++ b/net-analyzer/smokeping/Manifest @@ -0,0 +1,15 @@ +AUX 79_smokeping.conf 351 SHA256 fa4c48387598f8c6e60b7642e4284bb64196dcd233cea9f18ff37009b212ff77 SHA512 d53abdf29e8f6bad67a654b17088c3f8dee7908ff82b0b911599e2ac6a11be84b8fa2c30b1f0b6142803ff9a5058f586946eafa112dfd26ca4f8f8664d19cfc6 WHIRLPOOL 907eff72a390aa36c7be80fb39f2204238ec8daa13f07d9b189401374cf4cc2cdf6df2842f8d0e9096bcd87670190b673d1bfa05adcca5ad0266b99d1bd79586 +AUX smokeping-2.6.9-pod.patch 482 SHA256 e7570295fa67403acf48b11c9e993bd667db6c6ed2d1a0c6af8e0217470fba56 SHA512 3744f97a8f817c7b9d5da4fe130377658d74ac1be78a00dbc39b501716fc2d6b9fb2188f9ff3c57da5c36b6761e9099d0ef85a7600174de8fda01a8898274b71 WHIRLPOOL ebf22388c29c84cbb90f2b97705c78a89a4dc5041a2f3663083347717047621767e04fdd78164dbefe05e8ee85f258025a85f2a7455df4fc704a81c3c0258e08 +AUX smokeping.conf 32 SHA256 aa672ff60f18cfa311ee3303fb824d390dc44ffd4b309e34235242b4c3de7ac7 SHA512 75863f16f8b57ca9ae7c7d65076acaf28aac66fa2d52ed78bce2bb3a4938dc75a1e8ed54236c52c3965b170a8348145780dd5c0f3d0fc8c95f4b88085252a4ef WHIRLPOOL 233839d651258edbd74377e39d87c238e4e6e8aabfe60b7edb4ad6bb746f57bec7f6fce1e1123119e0349a27d584e7991765fc4f5a9c5376ef54bbce41cac2e8 +AUX smokeping.init.3 1737 SHA256 244cd53c0a6b828c4eb89a4239de9c2efda237ff2494eaada78afee68e3c950d SHA512 87386971b42bf842c6cf59f641576cfcfd7439fe9f10139730b0c73acea610945d634d3effc3a5db793a71e2e625b49184a02813cbf34473dd94ac4a3931ed67 WHIRLPOOL 502279ee1823a6c4a3badf3c1ae16b95f60bc822528e35ddc53e7e78cdea5a726a142ee38443d796781754a4e3ead5e341d6e309fd40c95b5d10355831b5e9ea +AUX smokeping.init.4 1757 SHA256 0ada5910f77ac86e8eb126a1bb1f163fa67a9bd4638d6d1d44936575793d133c SHA512 5e32a248899d79ea112595591bd9457c073c8276d8bb124b4f765bc9654bd5dac36866344c8c444c98ba4cde32829d7092067e73db5bd3c38ca75f7679a875f1 WHIRLPOOL b014b82f6fcf59f246e107a074a059116e139978303086258b42786e0b8224838c2e4d42f4783be41c5426ec38a09659ce9ab7d9a04a2174d754264571135578 +AUX smokeping.service 200 SHA256 976a0bc33a30a3524cbf2b2de0641a28e53d0546695c41b5f323f8d96899dcaa SHA512 2f8824143b8283ad02274107c5ed0e84f0c1465fc089823e36ef44a42fec68564d8cc4ff5fb0ad6dc0443e21fac5a8cbcbb0a9bea151b57efaff2a082d15f344 WHIRLPOOL f3899165b71854dc96f5ea6b5f8c17c86ab9dd06faa8ed01abb052a6e647886855102f1d56d47698c7579f22b89fd8948a2684bb23ea4963e4ab99ca4735fee0 +DIST smokeping-2.6.10.tar.gz 415383 SHA256 0121672951f47bd45575898c3e4d767e22cc692dd272d723b422515fd3cc641c SHA512 e91ac80ceafccb945ec48cc80020b8cbf2afe29b5f422dc5aaf7c52387eafc498180c293cf82dccc4fdec88ec56f80fb1bd08ebcb2ae9aea563475a069b91f13 WHIRLPOOL dc2b75b694ffb93d777f4a97e6f3f26c898741eb67f19d9b6ebb3dcb1d3688422cb4756c2f969e858ad89e98d4278c2995abc39927b2615a249efd1f02b733aa +DIST smokeping-2.6.11.tar.gz 417338 SHA256 f2b3c386e95a74af2b1e7aec6410d0a58852339f00e9963f3c770cfd85ba30dd SHA512 928722832d6e01ffbb7b74542678f7b9d5fc22819c0feae164ce58b8d8a5595800f617c8a672e07cae4b2c4ccbfa4883a11438ba2a172fc2887abc2933388422 WHIRLPOOL e7c0dc3fd5fe1e66b9a8f70584bb2973a807990ad2e7cec50951294e794f67e60e88b39ec52adfe0e92e80e9d11e899fcb5b0bef7fc67d5e271f10c5ba44dc56 +DIST smokeping-2.6.9.tar.gz 427185 SHA256 cd551d4384d8b19879d128ea0566bd680c19bb4ad8664a3c5a304604746f8863 SHA512 ab3cec15fd9f90510f902da7ce5bac5915558cac198cc88f0ce193a53a0158c9055e28c8c6671cc6653ac42ab51346e1eb19e537f1ab5c234fd498c6b777499d WHIRLPOOL e3a47ed5222798f69f5b957cea5a0404fc1f58675678bd82f93d39085f5a029de2b71974ad245e4de0454d7f689a199f2a2134abbc1ac6ed8e042835c14d3f57 +EBUILD smokeping-2.6.10.ebuild 4097 SHA256 871f37417c865f8ff8e12da4636002b9fa4324c3ea3eebbf3c17a8a9faa6f859 SHA512 558151d2d8df9aa4b7c6a6d9f808d161980d79f821dda20c5c8b712af0a1b4e19bd42222a728f96a2b8bf09f00dd47bbc6b03036a39d86df886c58d4a3b71293 WHIRLPOOL 879cad0fe5125ef6ec83287abb59528375be68efc91404c169063c02deb49c0bc7ca146e42bb92a23b0c646e7e04616dbe1ee6fcb19949e57029774d840af110 +EBUILD smokeping-2.6.11.ebuild 4083 SHA256 a0cfae5fac369abb43d110f5401e58d3308d0062257e567661f2d0ba642dbdb7 SHA512 b4273d70038f29fc2bd6b9a6a15b94d5662dd5b2a541748077ddbd61672efe1fc27de72ad9c60f2529ba0eb7fb1c6ff43679e5513a205a8e0e1569140ad84a1d WHIRLPOOL ee06ad0676ec98fa1fe71caeca6b061d56b96b69d4ee45d1b98a5a0acdaaacf296f76f62fa7a6e44810bbdde6182e3d92a53f3ef7756b188431d8cee977cd148 +EBUILD smokeping-2.6.9.ebuild 4192 SHA256 e4aedb666282e80a618a5b07f040e55f0e2fa3563c68ce069105af46b18b616b SHA512 a001ba30d3eeaed299f28b139573fa4eff0a170500beedb0782a94e5bd970b5421162ed7476ceec407b3e19ce7210e3d8af0d01dff2a98cd1f02c59e8ce7b402 WHIRLPOOL a74d7af6c269b36e3f8fce4e7fcd784983ca8e8924dcc5bf9a4991af11e769f43d5cd93ed0a477dcfa7e5701da8bcba58b9d9d633d88373ed9e148ed5c3a9b2e +MISC ChangeLog 3395 SHA256 d839b2df807159880e73c03721ac78d0d8269affad9db3b076374aab93415da0 SHA512 4098f9d531d0c4c3156bf8530bc24a09c8f48266c13d826ee269de3f5fcf793223140c5f7389bbe015d597cb416450ba22358997dadff4311c95afe9887e71e4 WHIRLPOOL ab3e57d3a0b99d66b8edac698b32f314bf48582c97be28ab5a4d3262bdba88bb748ac7cecd8754ab757e55e2ff3cec1016229ccc615fe9c3f5466caf41eae009 +MISC ChangeLog-2015 9410 SHA256 7775a4d1aeab57a878a48a53af964fdd7ebd32e931b325adf6520de3be6211ac SHA512 8cfc0d6d64a1ca5d6b2c81faa71060ad56184dbd1c42ed9328755995d88e3bbcdc5f72fa36c253ecd87e068f0b27010e226fe559ee4b227c037dffa4aaa31039 WHIRLPOOL a48a8dda2412976964fe309347129ef77e9736e194548426584cfe0f92284de4e12c99608eb7279339e19b5fd9c666ee42fc3f3f8e022af25b992513f2e8145a +MISC metadata.xml 609 SHA256 c966750061e8af4130d313cd311cd048a627739f57318c8bb70958d30832d9e5 SHA512 cd5bbbf1af0cadf236c3385628a1392c2e5379958e4f002d71230ed9e7627989cfdee7e0a9fd584f94c4c29bb1756f9ade81df0888f4668f9b3a8ab9e31bf727 WHIRLPOOL 095bab49308cf85c9d204302d09ea4da71c2cd553cee2146de10a1835d0c42774ef958973e9cc87537e9b0eade80514ff4e21313919c50c8a06ccb2c763bb191 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 +### + + Alias "/.simg/" "/var/lib/smokeping/.simg/" + + + Options -Indexes MultiViews + AllowOverride None + Order deny,allow + Deny from all + Allow from 127.0.0.1 + + + diff --git a/net-analyzer/smokeping/files/smokeping-2.6.9-pod.patch b/net-analyzer/smokeping/files/smokeping-2.6.9-pod.patch new file mode 100644 index 000000000000..81a1e053b4f8 --- /dev/null +++ b/net-analyzer/smokeping/files/smokeping-2.6.9-pod.patch @@ -0,0 +1,11 @@ +--- a/lib/Smokeping.pm ++++ b/lib/Smokeping.pm +@@ -2631,7 +2631,7 @@ + The base directory where SmokePing keeps the files related to the DYNAMIC function. + This directory must be writeable by the WWW server. It is also used for temporary + storage of slave polling results by the master in +-L. ++Lslave mode|smokeping_master_slave>. + + If this variable is not specified, the value of C will be used instead. + DOC diff --git a/net-analyzer/smokeping/files/smokeping.conf b/net-analyzer/smokeping/files/smokeping.conf new file mode 100644 index 000000000000..729726316fbd --- /dev/null +++ b/net-analyzer/smokeping/files/smokeping.conf @@ -0,0 +1 @@ +d /run/smokeping 0755 root root diff --git a/net-analyzer/smokeping/files/smokeping.init.3 b/net-analyzer/smokeping/files/smokeping.init.3 new file mode 100644 index 000000000000..2e5e35795b91 --- /dev/null +++ b/net-analyzer/smokeping/files/smokeping.init.3 @@ -0,0 +1,77 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="${opts} dump reload restore" + +depend() { + need net + use dns +} + +checkconfig() { + if [ ! -f "/etc/smokeping/config" ] ; then + eerror "You need /etc/smokeping/config to run smokeping!" + return 1 + fi +} + +start() { + checkconfig || return 1 + + if [ ! -d /run/smokeping/ ]; then + mkdir /run/smokeping/ + fi + chown smokeping:smokeping /run/smokeping/ + + ebegin "Starting smokeping" + LC_ALL=C \ + start-stop-daemon --start --name smokeping \ + --pidfile /run/smokeping/smokeping.pid \ + --exec /usr/bin/smokeping \ + --user smokeping:smokeping + eend $? +} + +stop() { + ebegin "Stopping smokeping" + start-stop-daemon --stop \ + --pidfile /run/smokeping/smokeping.pid + 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 + 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/files/smokeping.init.4 b/net-analyzer/smokeping/files/smokeping.init.4 new file mode 100644 index 000000000000..2e38a60ed636 --- /dev/null +++ b/net-analyzer/smokeping/files/smokeping.init.4 @@ -0,0 +1,75 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="${opts} dump reload restore" + +depend() { + need net + use dns +} + +checkconfig() { + if [ ! -f "/etc/smokeping/config" ] ; then + eerror "You need /etc/smokeping/config to run smokeping!" + return 1 + fi +} + +start() { + checkconfig || return 1 + + checkpath -d -m 0755 -o smokeping:smokeping /run/smokeping + checkpath -d -m 0755 -o smokeping:smokeping /var/cache/smokeping + + ebegin "Starting smokeping" + LC_ALL=C \ + start-stop-daemon --start --name smokeping \ + --pidfile /run/smokeping/smokeping.pid \ + --exec /usr/bin/smokeping \ + --user smokeping:smokeping + eend $? +} + +stop() { + ebegin "Stopping smokeping" + start-stop-daemon --stop \ + --pidfile /run/smokeping/smokeping.pid + 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 + 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/files/smokeping.service b/net-analyzer/smokeping/files/smokeping.service new file mode 100644 index 000000000000..2130aca23627 --- /dev/null +++ b/net-analyzer/smokeping/files/smokeping.service @@ -0,0 +1,10 @@ +[Unit] +Description=Latency Logging and Graphing System +After=network.target + +[Service] +ExecStart=/usr/bin/smokeping --nodaemon +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/net-analyzer/smokeping/metadata.xml b/net-analyzer/smokeping/metadata.xml new file mode 100644 index 000000000000..e445720edf9f --- /dev/null +++ b/net-analyzer/smokeping/metadata.xml @@ -0,0 +1,14 @@ + + + + +netmon@gentoo.org +Gentoo network monitoring and analysis project + + +Install net-dns/bind-tools for dig functionality +Install net-analyzer/echoping for echoping functionality +Install dev-perl/Net-Telnet for telnet functionality +Install ssh functionality + + diff --git a/net-analyzer/smokeping/smokeping-2.6.10.ebuild b/net-analyzer/smokeping/smokeping-2.6.10.ebuild new file mode 100644 index 000000000000..cc533d1bb997 --- /dev/null +++ b/net-analyzer/smokeping/smokeping-2.6.10.ebuild @@ -0,0 +1,139 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils user systemd + +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="~amd64 ~x86" + +# removing fcgi useflag as the configure script can't avoid it without patching +IUSE="apache2 curl dig echoping ipv6 ldap radius ssh telnet" + +DEPEND=" + !apache2? ( virtual/httpd-cgi ) + apache2? ( + >=www-apache/mod_perl-2.0.1 + www-apache/mod_fcgid + ) + curl? ( >=net-misc/curl-7.21.4 ) + dig? ( net-dns/bind-tools ) + echoping? ( >=net-analyzer/echoping-6.0.2 ) + ipv6? ( >=dev-perl/Socket6-0.20 ) + ldap? ( dev-perl/perl-ldap ) + radius? ( dev-perl/RadiusPerl ) + ssh? ( dev-perl/Net-OpenSSH ) + telnet? ( dev-perl/Net-Telnet ) + || ( dev-perl/CGI-Fast =dev-lang/perl-5.8.8-r8 + >=dev-perl/SNMP_Session-1.13 + >=net-analyzer/fping-2.4_beta2-r2[suid] + >=net-analyzer/rrdtool-1.2[graph,perl] + dev-perl/CGI-Session + dev-perl/Config-Grammar + dev-perl/Digest-HMAC + dev-perl/FCGI + dev-perl/IO-Socket-SSL + dev-perl/Net-DNS + dev-perl/libwww-perl + 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 +} + +src_configure() { + econf \ + --sysconfdir=/etc/smokeping \ + --with-htdocs-dir=/var/www/localhost/smokeping +} + +src_compile() { + LC_ALL=C emake +} + +src_install() { + default + + newinitd "${FILESDIR}"/${PN}.init.4 ${PN} + systemd_dotmpfilesd "${FILESDIR}"/"${PN}".conf + systemd_dounit "${FILESDIR}"/"${PN}".service + + 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 -i \ + -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 /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:}' \ + "${D}/etc/${PN}/config" || die + + sed -i \ + -e '/^