aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/smokeping
diff options
context:
space:
mode:
authorRodrigo Osorio <rodrigo@FreeBSD.org>2015-02-22 19:37:33 +0000
committerRodrigo Osorio <rodrigo@FreeBSD.org>2015-02-22 19:37:33 +0000
commitd2fa29f954f4a2187194d11654154c13b9de0e24 (patch)
tree8c62d10f56f47d7b55fc8e1b394edb50d974ba56 /net-mgmt/smokeping
parentc00ba1643134470196d38b9062a070d9b8984a04 (diff)
downloadports-d2fa29f954f4a2187194d11654154c13b9de0e24.tar.gz
ports-d2fa29f954f4a2187194d11654154c13b9de0e24.zip
Upgrade smokeping to 2.6.11
PR: 197579 Submitted by: pi
Notes
Notes: svn path=/head/; revision=379624
Diffstat (limited to 'net-mgmt/smokeping')
-rw-r--r--net-mgmt/smokeping/Makefile24
-rw-r--r--net-mgmt/smokeping/distinfo4
-rw-r--r--net-mgmt/smokeping/files/patch-htdocs-Makefile.in8
-rw-r--r--net-mgmt/smokeping/files/patch-lib__Smokeping.pm66
-rw-r--r--net-mgmt/smokeping/files/patch-lib__Smokeping__probes__AnotherDNS.pm8
-rw-r--r--net-mgmt/smokeping/files/smokeping.in47
-rw-r--r--net-mgmt/smokeping/pkg-plist21
7 files changed, 124 insertions, 54 deletions
diff --git a/net-mgmt/smokeping/Makefile b/net-mgmt/smokeping/Makefile
index 1dd973ff3b2e..d5f4c96c566c 100644
--- a/net-mgmt/smokeping/Makefile
+++ b/net-mgmt/smokeping/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= smokeping
-PORTVERSION= 2.6.9
-PORTREVISION= 4
+PORTVERSION= 2.6.11
CATEGORIES= net-mgmt www
MASTER_SITES= http://oss.oetiker.ch/smokeping/pub/ \
http://smokeping.cs.pu.edu.tw/pub/
@@ -16,12 +15,19 @@ LICENSE= GPLv2
LIB_DEPENDS= librrd.so:${PORTSDIR}/databases/rrdtool
BUILD_DEPENDS= p5-CGI-Session>=0:${PORTSDIR}/www/p5-CGI-Session \
p5-Digest-HMAC>=0:${PORTSDIR}/security/p5-Digest-HMAC \
+ p5-Net-SNMP>=0:${PORTSDIR}/net-mgmt/p5-Net-SNMP \
+ p5-Net-DNS>=0:${PORTSDIR}/dns/p5-Net-DNS \
+ p5-IO-Pty-Easy>=0:${PORTSDIR}/devel/p5-IO-Pty-Easy \
p5-SNMP_Session>=0:${PORTSDIR}/net-mgmt/p5-SNMP_Session \
p5-libwww>=0:${PORTSDIR}/www/p5-libwww \
p5-CGI.pm>=0:${PORTSDIR}/www/p5-CGI.pm \
p5-FCGI>=0:${PORTSDIR}/www/p5-FCGI \
p5-Config-Grammar>=0:${PORTSDIR}/devel/p5-Config-Grammar \
- p5-Socket6>=0:${PORTSDIR}/net/p5-Socket6
+ p5-Socket6>=0:${PORTSDIR}/net/p5-Socket6 \
+ p5-IO-Socket-SSL>=0:${PORTSDIR}/security/p5-IO-Socket-SSL \
+ p5-Net-Telnet>=0:${PORTSDIR}/net/p5-Net-Telnet \
+ p5-Net-OpenSSH>=0:${PORTSDIR}/net/p5-Net-OpenSSH \
+ p5-perl-ldap>=0:${PORTSDIR}/net/p5-perl-ldap
RUN_DEPENDS:= ${BUILD_DEPENDS}
USES= gmake perl5
@@ -47,13 +53,11 @@ SUB_LIST= USERS=${USERS} \
FPING_DESC= Support for fping probes
ECHOPING_DESC= Support for EchoPing probes
CURL_DESC= Support for Curl probes
-LDAP_DESC= Support for LDAP probes
-LDAPSSL_DESC= Support for SSL-enabled LDAP probes
RADIUS_DESC= Support for Radius probes
TELNET_DESC= Support for TelnetIOSPing probes
DNS_DESC= Support for AnotherDNS probes
-OPTIONS_DEFINE= ECHOPING CURL RADIUS TELNET DNS FPING LDAP LDAPSSL
+OPTIONS_DEFINE= ECHOPING CURL RADIUS TELNET DNS FPING
OPTIONS_DEFAULT= FPING
.include <bsd.port.options.mk>
@@ -70,18 +74,10 @@ RUN_DEPENDS+= ${LOCALBASE}/bin/echoping:${PORTSDIR}/net/echoping
RUN_DEPENDS+= ${LOCALBASE}/bin/curl:${PORTSDIR}/ftp/curl
.endif
-.if ${PORT_OPTIONS:MLDAP} || ${PORT_OPTIONS:MLDAPSSL}
-RUN_DEPENDS+= p5-perl-ldap>=0:${PORTSDIR}/net/p5-perl-ldap
-.endif
-
.if ${PORT_OPTIONS:MRADIUS}
RUN_DEPENDS+= p5-Authen-Radius>=0:${PORTSDIR}/security/p5-Authen-Radius
.endif
-.if ${PORT_OPTIONS:MLDAPSSL}
-RUN_DEPENDS+= p5-IO-Socket-SSL>=0:${PORTSDIR}/security/p5-IO-Socket-SSL
-.endif
-
.if ${PORT_OPTIONS:MTELNET}
RUN_DEPENDS+= p5-Net-Telnet>=0:${PORTSDIR}/net/p5-Net-Telnet
.endif
diff --git a/net-mgmt/smokeping/distinfo b/net-mgmt/smokeping/distinfo
index fb77eb33b37b..089e441e34c4 100644
--- a/net-mgmt/smokeping/distinfo
+++ b/net-mgmt/smokeping/distinfo
@@ -1,2 +1,2 @@
-SHA256 (smokeping-2.6.9.tar.gz) = cd551d4384d8b19879d128ea0566bd680c19bb4ad8664a3c5a304604746f8863
-SIZE (smokeping-2.6.9.tar.gz) = 427185
+SHA256 (smokeping-2.6.11.tar.gz) = f2b3c386e95a74af2b1e7aec6410d0a58852339f00e9963f3c770cfd85ba30dd
+SIZE (smokeping-2.6.11.tar.gz) = 417338
diff --git a/net-mgmt/smokeping/files/patch-htdocs-Makefile.in b/net-mgmt/smokeping/files/patch-htdocs-Makefile.in
index a7b826211c56..7e2abf300be9 100644
--- a/net-mgmt/smokeping/files/patch-htdocs-Makefile.in
+++ b/net-mgmt/smokeping/files/patch-htdocs-Makefile.in
@@ -1,11 +1,11 @@
---- htdocs/Makefile.in.orig 2013-03-04 13:07:55.000000000 +0000
-+++ htdocs/Makefile.in 2014-07-19 10:42:00.470292529 +0000
-@@ -432,9 +432,9 @@
+--- htdocs/Makefile.in.orig 2014-11-04 23:50:59.000000000 +0100
++++ htdocs/Makefile.in 2015-02-12 19:30:27.000000000 +0100
+@@ -466,9 +466,9 @@
install-data-local:
$(MKDIR) -p $(DESTDIR)$(HTDOCSDIR)
- $(ECHO) "#!/bin/sh" > $(DESTDIR)$(HTDOCSDIR)/smokeping.fcgi.dist
-- $(ECHO) "exec $(prefix)/bin/smokeping_cgi $(prefix)/etc/config" >> $(DESTDIR)$(HTDOCSDIR)/smokeping.fcgi.dist
+- $(ECHO) "exec $(bindir)/smokeping_cgi $(sysconfdir)/config" >> $(DESTDIR)$(HTDOCSDIR)/smokeping.fcgi.dist
- chmod +x $(DESTDIR)$(HTDOCSDIR)/smokeping.fcgi.dist
+ $(ECHO) "#!/bin/sh" > $(DESTDIR)$(HTDOCSDIR)/smokeping.fcgi.sample
+ $(ECHO) "exec $(prefix)/bin/smokeping_cgi $(sysconfdir)/config" >> $(DESTDIR)$(HTDOCSDIR)/smokeping.fcgi.sample
diff --git a/net-mgmt/smokeping/files/patch-lib__Smokeping.pm b/net-mgmt/smokeping/files/patch-lib__Smokeping.pm
index 3ca727872281..cdc0f2fef8f0 100644
--- a/net-mgmt/smokeping/files/patch-lib__Smokeping.pm
+++ b/net-mgmt/smokeping/files/patch-lib__Smokeping.pm
@@ -1,11 +1,57 @@
---- ./lib/Smokeping.pm.orig 2014-09-20 00:55:47.498042436 +0400
-+++ ./lib/Smokeping.pm 2014-09-20 00:56:31.929038660 +0400
-@@ -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.
+--- lib/Smokeping.pm.orig 2015-02-12 19:31:21.000000000 +0100
++++ lib/Smokeping.pm 2015-02-12 19:34:23.000000000 +0100
+@@ -2632,12 +2632,14 @@
+ {
+ %$DIRCHECK_SUB,
+ _doc => <<DOC,
+-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
++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 masterE<sol>slave mode|smokeping_master_slave>.
+
+-If this variable is not specified, the value of C<datadir> will be used instead.
++If this variable is not specified, the value of C<datadir> will be
++used instead.
DOC
+ },
+ piddir =>
+@@ -4214,7 +4216,7 @@
+ if(defined $opt{'check'}) { verify_cfg($cfgfile); exit 0; }
+ if($opt{reload}) {
+ load_cfg $cfgfile, 'noinit'; # we need just the piddir
+- kill_smoke $cfg->{General}{piddir}."/smokeping.pid", SIGHUP;
++ kill_smoke $cfg->{General}{piddir}."/pid", SIGHUP;
+ print "HUP signal sent to the running SmokePing process, exiting.\n";
+ exit 0;
+ };
+@@ -4223,7 +4225,7 @@
+ if(defined $opt{'static-pages'}) { makestaticpages $cfg, $opt{'static-pages'}; exit 0 };
+ if($opt{email}) { enable_dynamic $cfg, $cfg->{Targets},"",""; exit 0 };
+ }
+- if($opt{restart}) { kill_smoke $cfg->{General}{piddir}."/smokeping.pid", SIGINT;};
++ if($opt{restart}) { kill_smoke $cfg->{General}{piddir}."/pid", SIGINT;};
+
+ if($opt{logfile}) { initialize_filelog($opt{logfile}) };
+
+@@ -4236,7 +4238,7 @@
+ initialize_syslog($cfg->{General}{syslogfacility},
+ $cfg->{General}{syslogpriority});
+ }
+- daemonize_me $cfg->{General}{piddir}."/smokeping.pid";
++ daemonize_me $cfg->{General}{piddir}."/pid";
+ }
+ do_log "Smokeping version $VERSION successfully launched.";
+
+@@ -4413,7 +4415,7 @@
+ my $new_conf = Smokeping::Slave::submit_results $slave_cfg,$cfg,$myprobe,$probes;
+ if ($new_conf && !$gothup){
+ do_log('server has new config for me ... HUPing the parent');
+- kill_smoke $cfg->{General}{piddir}."/smokeping.pid", SIGHUP;
++ kill_smoke $cfg->{General}{piddir}."/pid", SIGHUP;
+ # wait until the parent signals back if it didn't already
+ sleep if (!$gothup);
+ if (!$gothup) {
diff --git a/net-mgmt/smokeping/files/patch-lib__Smokeping__probes__AnotherDNS.pm b/net-mgmt/smokeping/files/patch-lib__Smokeping__probes__AnotherDNS.pm
index ebe95b71a470..9498e1a93afb 100644
--- a/net-mgmt/smokeping/files/patch-lib__Smokeping__probes__AnotherDNS.pm
+++ b/net-mgmt/smokeping/files/patch-lib__Smokeping__probes__AnotherDNS.pm
@@ -1,5 +1,5 @@
---- lib/Smokeping/probes/AnotherDNS.pm.orig 2012-07-09 09:45:46.000000000 +0000
-+++ lib/Smokeping/probes/AnotherDNS.pm 2014-07-22 23:07:45.626343897 +0000
+--- lib/Smokeping/probes/AnotherDNS.pm.orig 2014-10-29 09:03:10.000000000 +0100
++++ lib/Smokeping/probes/AnotherDNS.pm 2015-02-12 19:43:50.000000000 +0100
@@ -25,6 +25,8 @@
use IO::Select;
use Net::DNS;
@@ -9,11 +9,11 @@
sub pod_hash {
return {
name => <<DOC,
-@@ -95,7 +97,7 @@
+@@ -108,7 +110,7 @@
$elapsed = tv_interval( $t0, $t1 );
if ( defined $ready ) {
my $buf = '';
-- $ready->recv( $buf, &Net::DNS::PACKETSZ );
+- $ready->recv( $buf, 512 );
+ $ready->recv( $buf, PACKETSZ );
my ($recvPacket, $err) = Net::DNS::Packet->new(\$buf);
if (defined $recvPacket) {
diff --git a/net-mgmt/smokeping/files/smokeping.in b/net-mgmt/smokeping/files/smokeping.in
index 9bc303fbe42c..d23c8fa64be5 100644
--- a/net-mgmt/smokeping/files/smokeping.in
+++ b/net-mgmt/smokeping/files/smokeping.in
@@ -20,13 +20,18 @@
. /etc/rc.subr
name=smokeping
-
rcvar=smokeping_enable
-load_rc_config $name
+extra_commands="status configtest reload"
+
+status_cmd="smokeping_status"
+configtest_cmd="smokeping_configtest"
+reload_cmd="smokeping_reload"
+stop_cmd="smokeping_stop"
: ${smokeping_enable:=NO}
-: ${smokeping_pidfile="%%PREFIX%%/var/smokeping/smokeping.pid"}
+# pidfile is hardcoded in Smokeping.pm, not configurable
+smokeping_pidfile="%%PREFIX%%/var/smokeping/pid"
: ${smokeping_logfile=/var/log/smokeping.log}
: ${smokeping_user="%%USERS%%"}
: ${smokeping_group="%%GROUPS%%"}
@@ -36,9 +41,6 @@ command_args="--logfile=${smokeping_logfile}"
pidfile="${smokeping_pidfile}"
command_interpreter="%%PREFIX%%/bin/perl"
-extra_commands=reload
-reload_cmd="${command} --reload"
-
smokeping_startprecmd()
{
if [ ! -e ${smokeping_logfile} ];
@@ -47,4 +49,37 @@ smokeping_startprecmd()
fi
}
+smokeping_status()
+{
+ rc_pid=$(check_pidfile $pidfile $command)
+ if [ -z "$rc_pid" ]; then
+ _run_rc_notrunning
+ else
+ echo "${name} is running as pid $rc_pid"
+ fi
+}
+
+smokeping_configtest()
+{
+ /usr/local/bin/smokeping --check
+}
+
+smokeping_reload()
+{
+ /usr/local/bin/smokeping --reload
+}
+
+smokeping_stop()
+{
+ rc_pid=$(check_pidfile $pidfile $command)
+ if [ -z "$rc_pid" ]; then
+ _run_rc_notrunning
+ else
+ echo "Stopping ${name} (pid $rc_pid)."
+ kill -15 $rc_pid
+ fi
+}
+
+load_rc_config $name
+
run_rc_command "$1"
diff --git a/net-mgmt/smokeping/pkg-plist b/net-mgmt/smokeping/pkg-plist
index b6cb28c068c3..a866923be060 100644
--- a/net-mgmt/smokeping/pkg-plist
+++ b/net-mgmt/smokeping/pkg-plist
@@ -74,7 +74,9 @@ smokeping/lib/Smokeping/probes/FTPtransfer.pm
smokeping/lib/Smokeping/probes/IOSPing.pm
smokeping/lib/Smokeping/probes/LDAP.pm
smokeping/lib/Smokeping/probes/NFSping.pm
+smokeping/lib/Smokeping/probes/OpenSSHEOSPing.pm
smokeping/lib/Smokeping/probes/OpenSSHJunOSPing.pm
+smokeping/lib/Smokeping/probes/Qstat.pm
smokeping/lib/Smokeping/probes/Radius.pm
smokeping/lib/Smokeping/probes/RemoteFPing.pm
smokeping/lib/Smokeping/probes/SSH.pm
@@ -130,7 +132,9 @@ man/man3/Smokeping_probes_FTPtransfer.3.gz
man/man3/Smokeping_probes_IOSPing.3.gz
man/man3/Smokeping_probes_LDAP.3.gz
man/man3/Smokeping_probes_NFSping.3.gz
+man/man3/Smokeping_probes_OpenSSHEOSPing.3.gz
man/man3/Smokeping_probes_OpenSSHJunOSPing.3.gz
+man/man3/Smokeping_probes_Qstat.3.gz
man/man3/Smokeping_probes_Radius.3.gz
man/man3/Smokeping_probes_RemoteFPing.3.gz
man/man3/Smokeping_probes_SSH.3.gz
@@ -157,19 +161,8 @@ man/man7/smokeping_extend.7.gz
man/man7/smokeping_install.7.gz
man/man7/smokeping_master_slave.7.gz
man/man7/smokeping_upgrade.7.gz
-@dirrm etc/smokeping
-@dirrm var/smokeping
-@dirrm var
-@dirrm smokeping/lib/Smokeping/sorters
-@dirrm smokeping/lib/Smokeping/probes
-@dirrm smokeping/lib/Smokeping/matchers
-@dirrm smokeping/lib/Smokeping
-@dirrm smokeping/lib
-@dirrm smokeping/htdocs/img
-@dirrm smokeping/htdocs/cropper/lib
-@dirrm smokeping/htdocs/cropper
-@dirrm smokeping/htdocs
-@dirrm smokeping
-%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
+@dir smokeping/htdocs/img
+@dir var/smokeping
+%%PORTEXAMPLES%%@dir %%EXAMPLESDIR%%
@exec mkdir -p %D/smokeping/htdocs/img; chown www:www %D/smokeping/htdocs/img
@exec mkdir -p %D/var/smokeping; chown smokeping:smokeping %D/var/smokeping