diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-analyzer/smokeping | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-analyzer/smokeping')
-rw-r--r-- | net-analyzer/smokeping/Manifest | 3 | ||||
-rw-r--r-- | net-analyzer/smokeping/files/79_smokeping.conf | 15 | ||||
-rw-r--r-- | net-analyzer/smokeping/files/smokeping-2.6.9-pod.patch | 11 | ||||
-rw-r--r-- | net-analyzer/smokeping/files/smokeping.conf | 1 | ||||
-rwxr-xr-x | net-analyzer/smokeping/files/smokeping.init.3 | 77 | ||||
-rw-r--r-- | net-analyzer/smokeping/files/smokeping.init.4 | 75 | ||||
-rw-r--r-- | net-analyzer/smokeping/files/smokeping.service | 10 | ||||
-rw-r--r-- | net-analyzer/smokeping/metadata.xml | 11 | ||||
-rw-r--r-- | net-analyzer/smokeping/smokeping-2.6.10.ebuild | 140 | ||||
-rw-r--r-- | net-analyzer/smokeping/smokeping-2.6.11.ebuild | 142 | ||||
-rw-r--r-- | net-analyzer/smokeping/smokeping-2.6.9.ebuild | 145 |
11 files changed, 630 insertions, 0 deletions
diff --git a/net-analyzer/smokeping/Manifest b/net-analyzer/smokeping/Manifest new file mode 100644 index 000000000000..41ca85d91642 --- /dev/null +++ b/net-analyzer/smokeping/Manifest @@ -0,0 +1,3 @@ +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 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-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<the master/slave mode|smokeping_master_slave>. ++L<the masterE<sol>slave mode|smokeping_master_slave>. + + If this variable is not specified, the value of C<datadir> 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 100755 index 000000000000..4a477ac4947f --- /dev/null +++ b/net-analyzer/smokeping/files/smokeping.init.3 @@ -0,0 +1,77 @@ +#!/sbin/runscript +# 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..255e9960eee1 --- /dev/null +++ b/net-analyzer/smokeping/files/smokeping.init.4 @@ -0,0 +1,75 @@ +#!/sbin/runscript +# 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..71b3ad2d71e7 --- /dev/null +++ b/net-analyzer/smokeping/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>netmon</herd> +<use> +<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='telnet'>Install <pkg>dev-perl/Net-Telnet</pkg> for telnet functionality</flag> +<flag name='ssh'>Install ssh functionality</flag> +</use> +</pkgmetadata> 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..eb887b5c84d7 --- /dev/null +++ b/net-analyzer/smokeping/smokeping-2.6.10.ebuild @@ -0,0 +1,140 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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 ~hppa ~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-perl/CGI-4 ) + >=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 '/^<script/{s:cropper/:/cropper/:}' \ + "${D}/etc/${PN}/basepage.html" || die + + sed -i \ + -e 's/$FindBin::Bin\/..\/etc\/config/\/etc\/smokeping\/config/g' \ + "${D}/usr/bin/smokeping" "${D}/usr/bin/smokeping_cgi" || die + + sed -i \ + -e 's:etc/config.dist:/etc/smokeping/config:' \ + "${D}/usr/bin/tSmoke" || die + + sed -i \ + -e 's:/usr/etc/config:/etc/smokeping/config:' \ + "${D}/var/www/localhost/smokeping/smokeping.fcgi.dist" || die + + 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" + 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 + 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}" +} diff --git a/net-analyzer/smokeping/smokeping-2.6.11.ebuild b/net-analyzer/smokeping/smokeping-2.6.11.ebuild new file mode 100644 index 000000000000..945ad246e8ed --- /dev/null +++ b/net-analyzer/smokeping/smokeping-2.6.11.ebuild @@ -0,0 +1,142 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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 ~hppa ~x86" + +# removing fcgi useflag as the configure script can't avoid it without patching +IUSE="apache2 curl dig echoping ipv6 radius" + +DEPEND=" + >=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/IO-Tty + dev-perl/Net-DNS + dev-perl/Net-OpenSSH + dev-perl/Net-SNMP + dev-perl/Net-Telnet + dev-perl/libwww-perl + dev-perl/perl-ldap + virtual/perl-libnet + || ( dev-perl/CGI-Fast <dev-perl/CGI-4 ) + !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 ) + radius? ( dev-perl/RadiusPerl ) +" + +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 '/^<script/{s:cropper/:/cropper/:}' \ + "${D}/etc/${PN}/basepage.html" || die + + sed -i \ + -e 's/$FindBin::Bin\/..\/etc\/config/\/etc\/smokeping\/config/g' \ + "${D}/usr/bin/smokeping" "${D}/usr/bin/smokeping_cgi" || die + + sed -i \ + -e 's:etc/config.dist:/etc/smokeping/config:' \ + "${D}/usr/bin/tSmoke" || die + + sed -i \ + -e 's:/usr/etc/config:/etc/smokeping/config:' \ + "${D}/var/www/localhost/smokeping/smokeping.fcgi.dist" || die + + 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" + 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 + 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}" +} diff --git a/net-analyzer/smokeping/smokeping-2.6.9.ebuild b/net-analyzer/smokeping/smokeping-2.6.9.ebuild new file mode 100644 index 000000000000..2bb250bdd98a --- /dev/null +++ b/net-analyzer/smokeping/smokeping-2.6.9.ebuild @@ -0,0 +1,145 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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 ~hppa 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-perl/CGI-4 ) + >=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 + + epatch "${FILESDIR}"/${P}-pod.patch +} + +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.3" ${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 '/^<script/{s:cropper/:/cropper/:}' \ + "${D}/etc/${PN}/basepage.html" || die + + sed -i \ + -e 's/$FindBin::Bin\/..\/etc\/config/\/etc\/smokeping\/config/g' \ + "${D}/usr/bin/smokeping" "${D}/usr/bin/smokeping_cgi" || die + + sed -i \ + -e 's:etc/config.dist:/etc/smokeping/config:' \ + "${D}/usr/bin/tSmoke" || die + + sed -i \ + -e 's:/usr/etc/config:/etc/smokeping/config:' \ + "${D}/var/www/localhost/smokeping/smokeping.fcgi.dist" || die + + 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" + 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}" +} |