Index: head/net-mgmt/smokeping/Makefile =================================================================== --- head/net-mgmt/smokeping/Makefile (revision 563788) +++ head/net-mgmt/smokeping/Makefile (revision 563789) @@ -1,102 +1,102 @@ # Created by: Lars Thegler # $FreeBSD$ PORTNAME= smokeping PORTVERSION= 2.7.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net-mgmt www MAINTAINER= rodrigo@FreeBSD.org COMMENT= Latency logging and graphing system LICENSE= GPLv2 LIB_DEPENDS= librrd.so:databases/rrdtool BUILD_DEPENDS= p5-CGI-Fast>=0:www/p5-CGI-Fast \ p5-CGI-Session>=0:www/p5-CGI-Session \ p5-Digest-HMAC>=0:security/p5-Digest-HMAC \ p5-Net-SNMP>=0:net-mgmt/p5-Net-SNMP \ p5-Net-DNS>=0:dns/p5-Net-DNS \ p5-IO-Pty-Easy>=0:devel/p5-IO-Pty-Easy \ p5-SNMP_Session>=0:net-mgmt/p5-SNMP_Session \ p5-libwww>=0:www/p5-libwww \ p5-LWP-Protocol-https>=0:www/p5-LWP-Protocol-https \ p5-CGI>=0:www/p5-CGI \ p5-FCGI>=0:www/p5-FCGI \ p5-Config-Grammar>=0:devel/p5-Config-Grammar \ p5-Socket6>=0:net/p5-Socket6 \ p5-IO-Socket-SSL>=0:security/p5-IO-Socket-SSL \ p5-Net-Telnet>=0:net/p5-Net-Telnet \ p5-Net-OpenSSH>=0:net/p5-Net-OpenSSH \ p5-perl-ldap>=0:net/p5-perl-ldap \ p5-OrePAN2>=0:devel/p5-OrePAN2 \ curl>=0:ftp/curl RUN_DEPENDS:= ${BUILD_DEPENDS} USES= gmake perl5 autoreconf CONFLICTS_INSTALL= nfsping SUB_FILES= pkg-deinstall pkg-message SUB_LIST= USERS=${USERS} \ GROUPS=${GROUPS} NO_ARCH= yes GNU_CONFIGURE= yes CONFIGURE_ENV+= PERL=${PERL} PERL5LIB=${PREFIX}/smokeping/lib CONFIGURE_ARGS+= \ --sysconfdir=${ETCDIR} \ --localstatedir="${PREFIX}/var" \ --with-htdocs-dir=${PREFIX}/smokeping/htdocs \ --libdir=${PREFIX}/smokeping/lib HTDOCSDIR= ${PREFIX}/smokeping/htdocs USE_RC_SUBR= smokeping PKGDEINSTALL= ${WRKDIR}/pkg-deinstall USERS= smokeping GROUPS= smokeping OPTIONS_DEFINE= ECHOPING RADIUS TELNET DNS FPING EXAMPLES OPTIONS_DEFAULT= FPING FPING_DESC= Support for fping probes FPING_RUN_DEPENDS= ${LOCALBASE}/sbin/fping:net/fping ECHOPING_DESC= Support for EchoPing probes ECHOPING_RUN_DEPENDS= ${LOCALBASE}/bin/echoping:net/echoping RADIUS_DESC= Support for Radius probes RADIUS_RUN_DEPENDS= p5-Authen-Radius>=0:security/p5-Authen-Radius TELNET_DESC= Support for TelnetIOSPing probes TELNET_RUN_DEPENDS= p5-Net-Telnet>=0:net/p5-Net-Telnet DNS_DESC= Support for AnotherDNS probes DNS_RUN_DEPENDS= p5-Net-DNS>=0:dns/p5-Net-DNS USE_GITHUB= yes GH_ACCOUNT= oetiker GH_PROJECT= SmokePing # We will take these from CPAN instead post-extract: cd ${WRKSRC}/lib ; ${RM} BER.pm SNMP_util.pm SNMP_Session.pm post-patch: ${REINPLACE_CMD} ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ ${WRKSRC}/doc/Makefile.am \ ${WRKSRC}/bin/smokeping \ ${WRKSRC}/bin/smokeping_cgi \ ${WRKSRC}/bin/tSmoke @for a in ${WRKSRC}/etc/*.dist; do \ ${MV} $$a $${a%.dist}.sample; \ done ${MV} ${WRKSRC}/etc/config.dist.in ${WRKSRC}/etc/config.sample.in post-install: ${MKDIR} ${STAGEDIR}/${PREFIX}/smokeping/htdocs/img ${MKDIR} ${STAGEDIR}/${PREFIX}/var/smokeping .include Index: head/net-mgmt/smokeping/files/patch-lib_Smokeping.pm =================================================================== --- head/net-mgmt/smokeping/files/patch-lib_Smokeping.pm (revision 563788) +++ head/net-mgmt/smokeping/files/patch-lib_Smokeping.pm (revision 563789) @@ -1,38 +1,47 @@ ---- lib/Smokeping.pm.orig 2018-02-02 21:14:55 UTC +--- lib/Smokeping.pm.orig 2021-02-01 12:05:21 UTC +++ lib/Smokeping.pm +@@ -1889,7 +1889,7 @@ sub check_alerts { + $gotalert = $match unless $gotalert; + my $edgetrigger = $alert->{edgetrigger} eq 'yes'; + my $what; +- if ($edgetrigger and $prevmatch != $match) { ++ if ($edgetrigger and ($prevmatch ? 0 : 1 ) != ($match ? 0 : 1)) { + $what = ($prevmatch == 0 ? "was raised" : "was cleared"); + } + if (not $edgetrigger and $match) { @@ -4306,7 +4306,7 @@ sub main (;$) { 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; }; @@ -4315,7 +4315,7 @@ sub main (;$) { 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}) }; @@ -4328,7 +4328,7 @@ sub main (;$) { 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."; @@ -4514,7 +4514,7 @@ KID: 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) {