diff -r -u -N net-mgmt/smokeping/Makefile /usr/home/pi/myp/net-mgmt/smokeping/Makefile --- net-mgmt/smokeping/Makefile 2015-01-05 21:25:09.000000000 +0100 +++ /usr/home/pi/myp/net-mgmt/smokeping/Makefile 2015-02-12 20:00:02.000000000 +0100 @@ -2,8 +2,7 @@ # $FreeBSD: head/net-mgmt/smokeping/Makefile 376298 2015-01-05 13:18:58Z marino $ 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 @@ 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 @@ 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 @@ -70,18 +74,10 @@ 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 -r -u -N net-mgmt/smokeping/distinfo /usr/home/pi/myp/net-mgmt/smokeping/distinfo --- net-mgmt/smokeping/distinfo 2013-10-01 21:14:33.000000000 +0200 +++ /usr/home/pi/myp/net-mgmt/smokeping/distinfo 2015-02-12 19:26:24.000000000 +0100 @@ -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 -r -u -N net-mgmt/smokeping/files/patch-htdocs-Makefile.in /usr/home/pi/myp/net-mgmt/smokeping/files/patch-htdocs-Makefile.in --- net-mgmt/smokeping/files/patch-htdocs-Makefile.in 2014-07-21 07:39:29.000000000 +0200 +++ /usr/home/pi/myp/net-mgmt/smokeping/files/patch-htdocs-Makefile.in 2015-02-12 19:30:46.000000000 +0100 @@ -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 -r -u -N net-mgmt/smokeping/files/patch-lib__Smokeping.pm /usr/home/pi/myp/net-mgmt/smokeping/files/patch-lib__Smokeping.pm --- net-mgmt/smokeping/files/patch-lib__Smokeping.pm 2014-09-20 21:25:08.000000000 +0200 +++ /usr/home/pi/myp/net-mgmt/smokeping/files/patch-lib__Smokeping.pm 2015-02-12 19:35:01.000000000 +0100 @@ -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. -+Lslave mode|smokeping_master_slave>. +--- 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 => <slave mode|smokeping_master_slave>. - If this variable is not specified, the value of C will be used instead. +-If this variable is not specified, the value of C will be used instead. ++If this variable is not specified, the value of C 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 -r -u -N net-mgmt/smokeping/files/patch-lib__Smokeping__probes__AnotherDNS.pm /usr/home/pi/myp/net-mgmt/smokeping/files/patch-lib__Smokeping__probes__AnotherDNS.pm --- net-mgmt/smokeping/files/patch-lib__Smokeping__probes__AnotherDNS.pm 2014-07-23 16:37:06.000000000 +0200 +++ /usr/home/pi/myp/net-mgmt/smokeping/files/patch-lib__Smokeping__probes__AnotherDNS.pm 2015-02-12 19:44:27.000000000 +0100 @@ -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 => <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 -r -u -N net-mgmt/smokeping/files/smokeping.in /usr/home/pi/myp/net-mgmt/smokeping/files/smokeping.in --- net-mgmt/smokeping/files/smokeping.in 2015-01-05 21:25:09.000000000 +0100 +++ /usr/home/pi/myp/net-mgmt/smokeping/files/smokeping.in 2015-02-12 19:40:00.000000000 +0100 @@ -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 @@ 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 @@ 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 -r -u -N net-mgmt/smokeping/pkg-plist /usr/home/pi/myp/net-mgmt/smokeping/pkg-plist --- net-mgmt/smokeping/pkg-plist 2014-07-14 22:24:45.000000000 +0200 +++ /usr/home/pi/myp/net-mgmt/smokeping/pkg-plist 2015-02-12 19:52:48.000000000 +0100 @@ -74,7 +74,9 @@ 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_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,19 @@ 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 etc/smokeping +@dir var/smokeping +@dir var +@dir smokeping/lib/Smokeping/sorters +@dir smokeping/lib/Smokeping/probes +@dir smokeping/lib/Smokeping/matchers +@dir smokeping/lib/Smokeping +@dir smokeping/lib +@dir smokeping/htdocs/img +@dir smokeping/htdocs/cropper/lib +@dir smokeping/htdocs/cropper +@dir smokeping/htdocs +@dir 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