update to smokeping v2.0.8; from bernd ahlers

This commit is contained in:
jakob 2006-06-14 08:58:22 +00:00
parent 8fda7b75bd
commit 85e6f71f21
6 changed files with 209 additions and 104 deletions

View File

@ -1,15 +1,13 @@
# $OpenBSD: Makefile,v 1.4 2004/06/19 21:18:59 jakob Exp $
# $OpenBSD: Makefile,v 1.5 2006/06/14 08:58:22 jakob Exp $
COMMENT= "latency logging and graphing system"
VERSION= 1.30
DISTNAME= smokeping-${VERSION}
DISTNAME= smokeping-2.0.8
CATEGORIES= net
MASTER_SITES= http://people.ee.ethz.ch/~oetiker/webtools/smokeping/pub/ \
http://ftp.heanet.ie/mirrors/people.ee.ethz.ch/~oetiker/webtools/smokeping/pub/
MASTER_SITES= http://people.ee.ethz.ch/~oetiker/webtools/smokeping/pub/
HOMEPAGE= http://people.ee.ethz.ch/~oetiker/webtools/smokeping/
HOMEPAGE= http://oss.oetiker.ch/smokeping/
MAINTAINER= Jakob Schlyter <jakob@openbsd.org>
@ -19,36 +17,55 @@ PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
RUN_DEPENDS= ::net/rrdtool \
RUN_DEPENDS= ::devel/p5-Config-Grammar \
::net/rrdtool \
::net/p5-SNMP_Session \
::net/fping
::net/fping \
::www/p5-CGI-SpeedyCGI
NO_REGRESS= Yes
NO_BUILD= Yes
PKG_ARCH= *
LIBDIR= lib/smokeping
PMDIR= libdata/perl5/site_perl
WEBDIR= /var/www/smokeping
SUBST_VARS= PMDIR
ETCFILES= basepage.html config-echoping config smokemail
ETCFILES= basepage.html config smokemail tmail
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/bin/smokeping.dist \
${PREFIX}/bin/smokeping
${INSTALL_DATA_DIR} ${PREFIX}/${LIBDIR}
${INSTALL_SCRIPT} ${WRKSRC}/htdocs/smokeping.cgi.dist \
${PREFIX}/${LIBDIR}/smokeping.cgi
@perl -pi -e "s|%%WEBDIR%%|${WEBDIR}|g; \
s|%%SYSCONFDIR%%|${SYSCONFDIR}|g;" \
${WRKSRC}/etc/config.dist
@perl -pi -e "s|%%SYSCONFDIR%%|${SYSCONFDIR}|g" \
< ${WRKSRC}/bin/smokeping.dist > ${WRKSRC}/bin/smokeping
${INSTALL_SCRIPT} ${WRKSRC}/bin/smokeping ${PREFIX}/bin/smokeping
@perl -pi -e "s|%%SYSCONFDIR%%|${SYSCONFDIR}|g" \
< ${WRKSRC}/htdocs/smokeping.cgi.dist \
> ${WRKSRC}/htdocs/smokeping.cgi
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/smokeping
${INSTALL_SCRIPT} ${WRKSRC}/htdocs/smokeping.cgi \
${PREFIX}/share/examples/smokeping/smokeping.cgi
${INSTALL_DATA_DIR} ${PREFIX}/${PMDIR}
${INSTALL_DATA} ${WRKSRC}/lib/Smokeping.pm ${PREFIX}/${PMDIR}
${INSTALL_DATA_DIR} ${PREFIX}/${PMDIR}/ISG
${INSTALL_DATA} ${WRKSRC}/lib/ISG/*.pm ${PREFIX}/${PMDIR}/ISG
${INSTALL_DATA_DIR} ${PREFIX}/${PMDIR}/probes
${INSTALL_DATA} ${WRKSRC}/lib/probes/*.pm ${PREFIX}/${PMDIR}/probes
${INSTALL_DATA_DIR} ${PREFIX}/${PMDIR}/Smokeping
${INSTALL_DATA} ${WRKSRC}/lib/Smokeping/*.pm \
${PREFIX}/${PMDIR}/Smokeping
${INSTALL_DATA_DIR} ${PREFIX}/${PMDIR}/Smokeping/matchers
${INSTALL_DATA} ${WRKSRC}/lib/Smokeping/matchers/*.pm \
${PREFIX}/${PMDIR}/Smokeping/matchers
${INSTALL_DATA_DIR} ${PREFIX}/${PMDIR}/Smokeping/probes
${INSTALL_DATA} ${WRKSRC}/lib/Smokeping/probes/*.pm \
${PREFIX}/${PMDIR}/Smokeping/probes
${INSTALL_MAN} ${WRKSRC}/doc/smokeping*.1 ${PREFIX}/man/man1
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/smokeping
${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${PREFIX}/share/doc/smokeping
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/smokeping
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/smokeping/matchers
${INSTALL_DATA} ${WRKSRC}/doc/Smokeping/matchers/*.txt \
${PREFIX}/share/doc/smokeping/matchers
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/smokeping/probes
${INSTALL_DATA} ${WRKSRC}/doc/Smokeping/probes/*.txt \
${PREFIX}/share/doc/smokeping/probes
.for file in ${ETCFILES}
${INSTALL_DATA} ${WRKSRC}/etc/${file}.dist \
${PREFIX}/share/examples/smokeping/${file}

View File

@ -1,4 +1,4 @@
MD5 (smokeping-1.30.tar.gz) = b7e909fb4d851995edc05afffb1a1e4b
RMD160 (smokeping-1.30.tar.gz) = 854bac7ab1c77f74b9c50835c94e3f4116f0ed4c
SHA1 (smokeping-1.30.tar.gz) = 8161ed558b357be69da1c20b7738fd166e8f90e2
SIZE (smokeping-1.30.tar.gz) = 191865
MD5 (smokeping-2.0.8.tar.gz) = ad983643ddf04c50eb967a7aac50bf76
RMD160 (smokeping-2.0.8.tar.gz) = 5f2c969dd7b92c7507d2bb0c73579e175491671e
SHA1 (smokeping-2.0.8.tar.gz) = 1c96f7c5ee9be1107ec146b5e02021afdec2f5bd
SIZE (smokeping-2.0.8.tar.gz) = 382530

View File

@ -1,20 +1,24 @@
$OpenBSD: patch-bin_smokeping_dist,v 1.4 2004/07/08 17:10:56 jakob Exp $
--- bin/smokeping.dist.orig 2004-05-13 00:00:32.000000000 +0200
+++ bin/smokeping.dist 2004-07-08 19:09:20.000000000 +0200
@@ -1,14 +1,9 @@
-#!/usr/sepp/bin/perl -w
$OpenBSD: patch-bin_smokeping_dist,v 1.5 2006/06/14 08:58:22 jakob Exp $
--- bin/smokeping.dist.orig Fri Apr 14 12:38:39 2006
+++ bin/smokeping.dist Tue May 23 15:01:36 2006
@@ -1,12 +1,17 @@
-#!/usr/sepp/bin/perl-5.8.4 -w
+#!/usr/bin/perl -w
# -*-perl-*-
-use lib qw(/home/oetiker/data/projects/AABN-rrdtool/perl-shared/blib/lib);
-use lib qw(/home/oetiker/data/projects/AABN-rrdtool/perl-shared/blib/arch);
-use lib qw(/usr/pack/rrdtool-1.0.40-ds/lib/perl/5.8.0);
-use lib qw(/home/oetiker/data/projects/AADJ-smokeping/dist/lib);
-
use Smokeping 1.30;
-use lib qw(/usr/pack/rrdtool-1.0.49-to/lib/perl);
use lib qw(lib);
use Smokeping 2.000008;
+use POSIX qw(setuid setgid getpwnam);
+
+print "Dropping privileges to _smokeping ...\n";
+my (undef, undef, $uid, $gid) = POSIX::getpwnam("_smokeping");
+POSIX::setgid($uid) or die "setgid() to $gid failed, abort\n";
+POSIX::setuid($uid) or die "setuid() to $uid failed, abort\n";
-Smokeping::main("etc/config.dist");
+Smokeping::main("/var/smokeping/config");
+Smokeping::main("%%SYSCONFDIR%%/smokeping/config");
=head1 NAME

View File

@ -0,0 +1,43 @@
$OpenBSD: patch-etc_config_dist,v 1.1 2006/06/14 08:58:22 jakob Exp $
--- etc/config.dist.orig Tue May 23 13:31:29 2006
+++ etc/config.dist Tue May 23 13:41:27 2006
@@ -7,14 +7,14 @@
owner = Joe Random
contact = joe@some.place.xyz
mailhost = smtp.mailhost.abc
-sendmail = /usr/lib/sendmail
-imgcache = /home/oetiker/public_html/.simg
-imgurl = ../.simg
-datadir = /home/oetiker/data/projects/AADJ-smokeping/dist/var
-piddir = /home/oetiker/data/projects/AADJ-smokeping/dist/var
+sendmail = /usr/sbin/sendmail
+imgcache = %%WEBDIR%%/img
+imgurl = /img
+datadir = /var/spool/smokeping
+piddir = /var/run/smokeping
cgiurl = http://people.ee.ethz.ch/~oetiker/smokeping/smokeping.cgi
-smokemail = /home/oetiker/data/projects/AADJ-smokeping/dist/etc/smokemail.dist
-tmail = /home/oetiker/data/projects/AADJ-smokeping/dist/etc/tmail.dist
+smokemail = %%SYSCONFDIR%%/smokeping/smokemail
+tmail = %%SYSCONFDIR%%/smokeping/tmail
# specify this to get syslog logging
syslogfacility = local0
# each probe is now run in its own process
@@ -66,7 +66,7 @@ AVERAGE 0.5 144 720
*** Presentation ***
-template = /home/oetiker/data/projects/AADJ-smokeping/dist/etc/basepage.html.dist
+template = %%SYSCONFDIR%%/smokeping/basepage.html
+ overview
@@ -89,7 +89,7 @@ unison_tolerance = 2
+ FPing
-binary = /usr/sepp/bin/fping
+binary = /usr/local/sbin/fping
*** Targets ***

View File

@ -1,18 +1,19 @@
$OpenBSD: patch-htdocs_smokeping_cgi_dist,v 1.4 2004/07/08 17:10:56 jakob Exp $
--- htdocs/smokeping.cgi.dist.orig 2004-05-13 00:00:32.000000000 +0200
+++ htdocs/smokeping.cgi.dist 2004-07-08 19:09:32.000000000 +0200
@@ -1,12 +1,9 @@
$OpenBSD: patch-htdocs_smokeping_cgi_dist,v 1.5 2006/06/14 08:58:22 jakob Exp $
--- htdocs/smokeping.cgi.dist.orig Fri Apr 14 12:38:39 2006
+++ htdocs/smokeping.cgi.dist Tue May 23 14:30:19 2006
@@ -1,13 +1,11 @@
-#!/usr/sepp/bin/speedy -w
+#!/usr/bin/speedy -w
+#!/usr/local/bin/speedy -w
# -*-perl-*-
-use lib qw(/usr/pack/rrdtool-1.0.33-to/lib/perl);
-use lib qw(/home/oetiker/data/projects/AADJ-smokeping/dist/lib);
-
use Smokeping 1.30;
use CGI::Carp qw(fatalsToBrowser);
use Smokeping 2.000008;
-Smokeping::cgi("/home/oetiker/data/projects/AADJ-smokeping/dist/etc/config");
+Smokeping::cgi("/var/smokeping/config");
+Smokeping::cgi("%%SYSCONFDIR%%/smokeping/config");
=head1 NAME
BEGIN {

View File

@ -1,70 +1,110 @@
@comment $OpenBSD: PLIST,v 1.4 2004/09/15 18:17:46 espie Exp $
@comment $OpenBSD: PLIST,v 1.5 2006/06/14 08:58:22 jakob Exp $
@newgroup _smokeping:562
@newuser _smokeping:562:562:daemon:Smokeping account:/var/empty:/sbin/nologin
bin/smokeping
lib/smokeping/
lib/smokeping/smokeping.cgi
libdata/perl5/site_perl/ISG/
libdata/perl5/site_perl/ISG/ParseConfig.pm
libdata/perl5/site_perl/Smokeping.pm
libdata/perl5/site_perl/probes/
libdata/perl5/site_perl/probes/CiscoRTTMonDNS.pm
libdata/perl5/site_perl/probes/CiscoRTTMonEchoICMP.pm
libdata/perl5/site_perl/probes/CiscoRTTMonTcpConnect.pm
libdata/perl5/site_perl/probes/Curl.pm
libdata/perl5/site_perl/probes/DNS.pm
libdata/perl5/site_perl/probes/EchoPing.pm
libdata/perl5/site_perl/probes/EchoPingChargen.pm
libdata/perl5/site_perl/probes/EchoPingDiscard.pm
libdata/perl5/site_perl/probes/EchoPingHttp.pm
libdata/perl5/site_perl/probes/EchoPingHttps.pm
libdata/perl5/site_perl/probes/EchoPingIcp.pm
libdata/perl5/site_perl/probes/EchoPingSmtp.pm
libdata/perl5/site_perl/probes/FPing.pm
libdata/perl5/site_perl/probes/FPing6.pm
libdata/perl5/site_perl/probes/IOSPing.pm
libdata/perl5/site_perl/probes/LDAP.pm
libdata/perl5/site_perl/probes/Radius.pm
libdata/perl5/site_perl/probes/RemoteFPing.pm
libdata/perl5/site_perl/probes/base.pm
libdata/perl5/site_perl/probes/basefork.pm
libdata/perl5/site_perl/probes/basevars.pm
libdata/perl5/site_perl/probes/passwordchecker.pm
libdata/perl5/site_perl/probes/telnetIOSPing.pm
${PMDIR}/Smokeping/
${PMDIR}/Smokeping.pm
${PMDIR}/Smokeping/Examples.pm
${PMDIR}/Smokeping/RRDtools.pm
${PMDIR}/Smokeping/ciscoRttMonMIB.pm
${PMDIR}/Smokeping/matchers/
${PMDIR}/Smokeping/matchers/Avgratio.pm
${PMDIR}/Smokeping/matchers/Median.pm
${PMDIR}/Smokeping/matchers/base.pm
${PMDIR}/Smokeping/probes/
${PMDIR}/Smokeping/probes/AnotherDNS.pm
${PMDIR}/Smokeping/probes/AnotherSSH.pm
${PMDIR}/Smokeping/probes/CiscoRTTMonDNS.pm
${PMDIR}/Smokeping/probes/CiscoRTTMonEchoICMP.pm
${PMDIR}/Smokeping/probes/CiscoRTTMonTcpConnect.pm
${PMDIR}/Smokeping/probes/Curl.pm
${PMDIR}/Smokeping/probes/DNS.pm
${PMDIR}/Smokeping/probes/EchoPing.pm
${PMDIR}/Smokeping/probes/EchoPingChargen.pm
${PMDIR}/Smokeping/probes/EchoPingDiscard.pm
${PMDIR}/Smokeping/probes/EchoPingHttp.pm
${PMDIR}/Smokeping/probes/EchoPingHttps.pm
${PMDIR}/Smokeping/probes/EchoPingIcp.pm
${PMDIR}/Smokeping/probes/EchoPingSmtp.pm
${PMDIR}/Smokeping/probes/FPing.pm
${PMDIR}/Smokeping/probes/FPing6.pm
${PMDIR}/Smokeping/probes/IOSPing.pm
${PMDIR}/Smokeping/probes/LDAP.pm
${PMDIR}/Smokeping/probes/Radius.pm
${PMDIR}/Smokeping/probes/RemoteFPing.pm
${PMDIR}/Smokeping/probes/SSH.pm
${PMDIR}/Smokeping/probes/TelnetIOSPing.pm
${PMDIR}/Smokeping/probes/base.pm
${PMDIR}/Smokeping/probes/basefork.pm
${PMDIR}/Smokeping/probes/basevars.pm
${PMDIR}/Smokeping/probes/passwordchecker.pm
${PMDIR}/Smokeping/probes/skel.pm
@man man/man1/smokeping.1
@man man/man1/smokeping.cgi.1
@man man/man1/smokeping_config.1
@man man/man1/smokeping_install.1
share/doc/smokeping/
share/doc/smokeping/CiscoRTTMonDNS.pm.txt
share/doc/smokeping/CiscoRTTMonEchoICMP.pm.txt
share/doc/smokeping/CiscoRTTMonTcpConnect.pm.txt
share/doc/smokeping/Curl.pm.txt
share/doc/smokeping/DNS.pm.txt
share/doc/smokeping/EchoPing.pm.txt
share/doc/smokeping/EchoPingChargen.pm.txt
share/doc/smokeping/EchoPingDiscard.pm.txt
share/doc/smokeping/EchoPingHttp.pm.txt
share/doc/smokeping/EchoPingHttps.pm.txt
share/doc/smokeping/EchoPingIcp.pm.txt
share/doc/smokeping/EchoPingSmtp.pm.txt
share/doc/smokeping/FPing.pm.txt
share/doc/smokeping/FPing6.pm.txt
share/doc/smokeping/IOSPing.pm.txt
share/doc/smokeping/LDAP.pm.txt
share/doc/smokeping/ParseConfig.pm.txt
share/doc/smokeping/Radius.pm.txt
share/doc/smokeping/RemoteFPing.pm.txt
share/doc/smokeping/Smokeping.pm.txt
share/doc/smokeping/base.pm.txt
share/doc/smokeping/basefork.pm.txt
share/doc/smokeping/basevars.pm.txt
share/doc/smokeping/passwordchecker.pm.txt
share/doc/smokeping/Smokeping.txt
share/doc/smokeping/matchers/
share/doc/smokeping/matchers/Avgratio.txt
share/doc/smokeping/matchers/Median.txt
share/doc/smokeping/matchers/base.txt
share/doc/smokeping/probes/
share/doc/smokeping/probes/AnotherDNS.txt
share/doc/smokeping/probes/AnotherSSH.txt
share/doc/smokeping/probes/CiscoRTTMonDNS.txt
share/doc/smokeping/probes/CiscoRTTMonEchoICMP.txt
share/doc/smokeping/probes/CiscoRTTMonTcpConnect.txt
share/doc/smokeping/probes/Curl.txt
share/doc/smokeping/probes/DNS.txt
share/doc/smokeping/probes/EchoPing.txt
share/doc/smokeping/probes/EchoPingChargen.txt
share/doc/smokeping/probes/EchoPingDiscard.txt
share/doc/smokeping/probes/EchoPingHttp.txt
share/doc/smokeping/probes/EchoPingHttps.txt
share/doc/smokeping/probes/EchoPingIcp.txt
share/doc/smokeping/probes/EchoPingSmtp.txt
share/doc/smokeping/probes/FPing.txt
share/doc/smokeping/probes/FPing6.txt
share/doc/smokeping/probes/IOSPing.txt
share/doc/smokeping/probes/LDAP.txt
share/doc/smokeping/probes/Radius.txt
share/doc/smokeping/probes/RemoteFPing.txt
share/doc/smokeping/probes/SSH.txt
share/doc/smokeping/probes/TelnetIOSPing.txt
share/doc/smokeping/probes/base.txt
share/doc/smokeping/probes/basefork.txt
share/doc/smokeping/probes/basevars.txt
share/doc/smokeping/probes/passwordchecker.txt
share/doc/smokeping/probes/skel.txt
share/doc/smokeping/smokeping.cgi.txt
share/doc/smokeping/smokeping.txt
share/doc/smokeping/smokeping_config.txt
share/doc/smokeping/smokeping_examples.txt
share/doc/smokeping/smokeping_extend.txt
share/doc/smokeping/smokeping_install.txt
share/doc/smokeping/telnetIOSPing.pm.txt
share/doc/smokeping/smokeping_upgrade.txt
share/doc/smokeping/tSmoke.txt
share/examples/smokeping/
@sample ${SYSCONFDIR}/smokeping/
@sample /var/www/smokeping/
@sample /var/www/smokeping/cgi-bin/
share/examples/smokeping/basepage.html
@sample ${SYSCONFDIR}/smokeping/basepage.html
share/examples/smokeping/config
share/examples/smokeping/config-echoping
@sample ${SYSCONFDIR}/smokeping/config
share/examples/smokeping/smokemail
@sample ${SYSCONFDIR}/smokeping/smokemail
share/examples/smokeping/smokeping.cgi
@mode 0755
@sample /var/www/smokeping/cgi-bin/smokeping.cgi
@mode
share/examples/smokeping/tmail
@sample ${SYSCONFDIR}/smokeping/tmail
@mode 0755
@owner _smokeping
@group _smokeping
@sample /var/run/smokeping/
@sample /var/spool/smokeping/
@mode 0755
@owner www
@group
@sample /var/www/smokeping/img/