Index: head/net-mgmt/nagios-plugins/Makefile =================================================================== --- head/net-mgmt/nagios-plugins/Makefile (revision 395931) +++ head/net-mgmt/nagios-plugins/Makefile (revision 395932) @@ -1,166 +1,168 @@ # Created by: Blaz Zupan # $FreeBSD$ PORTNAME= nagios-plugins -PORTVERSION= 2.0.3 -PORTREVISION= 9 +PORTVERSION= 2.1.1 +PORTREVISION= 0 PORTEPOCH= 1 CATEGORIES= net-mgmt MASTER_SITES= https://www.nagios-plugins.org/download/ \ LOCAL/mat/${PORTNAME} MAINTAINER= mat@FreeBSD.org COMMENT= Plugins for Nagios LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/COPYING CONFLICTS_INSTALL= monitoring-plugins-* USES= charsetfix gmake perl5 libtool USE_OPENSSL= yes USE_SUBMAKE= yes OPTIONS_DEFINE= QSTAT FPING NETSNMP RADIUS MYSQL PGSQL LDAP IPV6 NLS DBI EXTRAOPTS SSH_PORTABLE OPTIONS_SINGLE= DNS OPTIONS_SINGLE_DNS= DNS_BASE DNS_BINDTOOLS DNS_BIND99 DNS_BIND910 OPTIONS_DEFAULT=IPV6 EXTRAOPTS DNS_BASE OPTIONS_SUB= yes QSTAT_DESC= Game server query support (check_game) FPING_DESC= Support for non-flooding fast ping (check_fping) NETSNMP_DESC= SNMP support (check_snmp) RADIUS_DESC= Radius support (check_radius) MYSQL_DESC= MySQL support (check_mysql) PGSQL_DESC= PostgreSQL support (check_pgsql) LDAP_DESC= OpenLDAP support (check_ldap) DBI_DESC= Check database using DBI EXTRAOPTS_DESC= Parsing of plugins ini config files for extra options SSH_PORTABLE_DESC= Build check_ssh with ports openssh (instead of base) DNS_DESC= Configuration of check_dig and check_dns (see help) DNS_BASE_DESC= >= 10 means drill for check_dig and no check_dns DNS_BINDTOOLS_DESC= Use dig and nslookup from dns/bind-tools DNS_BIND99_DESC= Use dig and nslookup from dns/bind99 DNS_BIND910_DESC= Use dig and nslookup from dns/bind910 EXTRAOPTS_CONFIGURE_ENABLE= extra-opts GNU_CONFIGURE= yes NAGIOSUSER?= nagios NAGIOSGROUP?= nagios NAGIOSDIR?= /var/spool/nagios NAGIOSWWWDIR?= www/nagios NAGIOSHTMURL?= /nagios NAGIOSCGIURL?= ${NAGIOSHTMURL}/cgi-bin CONFIGURE_ARGS+=--with-nagios-user=${NAGIOSUSER} \ --with-nagios-group=${NAGIOSGROUP} \ --with-cgiurl=${NAGIOSCGIURL} \ --sbindir=${PREFIX}/${NAGIOSWWWDIR}/cgi-bin \ --libexecdir=${PREFIX}/libexec/nagios \ --datadir=${PREFIX}/share \ --sysconfdir=${PREFIX}/etc/nagios \ --localstatedir=${NAGIOSDIR} \ --with-perl=${PERL} \ --prefix=${PREFIX} # Also, force some commands with their expected paths so that they don't get # disabled. CONFIGURE_ARGS+=ac_cv_path_PATH_TO_QMAIL_QSTAT=/var/qmail/bin/qmail-qstat \ ac_cv_path_PATH_TO_PING=/sbin/ping \ ac_cv_path_PATH_TO_PING6=/sbin/ping6 \ --with-ping-command="/sbin/ping -n -c %d %s" \ --with-ping6-command="/sbin/ping6 -n -c %d %s" \ ac_cv_path_PATH_TO_SMBCLIENT=${LOCALBASE}/bin/smbclient CPPFLAGS+= -I${LOCALBASE}/include LIBS+= -L${LOCALBASE}/lib QSTAT_BUILD_DEPENDS= qstat:${PORTSDIR}/games/qstat QSTAT_RUN_DEPENDS= qstat:${PORTSDIR}/games/qstat QSTAT_CONFIGURE_OFF= ac_cv_path_PATH_TO_QUAKESTAT= \ ac_cv_path_PATH_TO_QSTAT= IPV6_CONFIGURE_WITH= ipv6 FPING_BUILD_DEPENDS= fping:${PORTSDIR}/net/fping FPING_RUN_DEPENDS= fping:${PORTSDIR}/net/fping FPING_CONFIGURE_OFF= ac_cv_path_PATH_TO_FPING= \ ac_cv_path_PATH_TO_FPING6= NETSNMP_BUILD_DEPENDS= snmpcheck:${PORTSDIR}/net-mgmt/net-snmp \ p5-Net-SNMP>=0:${PORTSDIR}/net-mgmt/p5-Net-SNMP NETSNMP_RUN_DEPENDS= snmpcheck:${PORTSDIR}/net-mgmt/net-snmp \ p5-Net-SNMP>=0:${PORTSDIR}/net-mgmt/p5-Net-SNMP NETSNMP_CONFIGURE_OFF= ac_cv_path_PATH_TO_SNMPGET= \ ac_cv_path_PATH_TO_SNMPGETNEXT= RADIUS_LIB_DEPENDS= libradiusclient-ng.so:${PORTSDIR}/net/radiusclient RADIUS_CONFIGURE_WITH= radius MYSQL_USE= mysql=yes MYSQL_CONFIGURE_WITH= mysql=${LOCALBASE} PGSQL_USES= pgsql PGSQL_CONFIGURE_WITH= pgsql=${LOCALBASE} LDAP_USE= openldap=yes LDAP_CONFIGURE_WITH= ldap NLS_USES= gettext NLS_CONFIGURE_ENABLE= nls DBI_LIB_DEPENDS= libdbi.so:${PORTSDIR}/databases/libdbi DBI_CONFIGURE_WITH= dbi DNS_BINDTOOLS_BUILD_DEPENDS= ${LOCALBASE}/bin/dig:${PORTSDIR}/dns/bind-tools DNS_BINDTOOLS_CONFIGURE_ON= --with-dig-command=${LOCALBASE}/bin/dig \ --with-nslookup-command=${LOCALBASE}/bin/nslookup DNS_BIND99_BUILD_DEPENDS= ${LOCALBASE}/bin/dig:${PORTSDIR}/dns/bind99 DNS_BIND99_CONFIGURE_ON= --with-dig-command=${LOCALBASE}/bin/dig \ --with-nslookup-command=${LOCALBASE}/bin/nslookup DNS_BIND910_BUILD_DEPENDS= ${LOCALBASE}/bin/dig:${PORTSDIR}/dns/bind910 DNS_BIND910_CONFIGURE_ON= --with-dig-command=${LOCALBASE}/bin/dig \ --with-nslookup-command=${LOCALBASE}/bin/nslookup SSH_PORTABLE_BUILD_DEPENDS= ${LOCALBASE}/bin/ssh:${PORTSDIR}/security/openssh-portable SSH_PORTABLE_RUN_DEPENDS:= ${SSH_PORTABLE_BUILD_DEPENDS} SSH_PORTABLE_CONFIGURE_ON= --with-ssh-command=${LOCALBASE}/bin/ssh .include .if ${OSVERSION} > 1000055 && ${PORT_OPTIONS:MDNS_BASE} EXTRA_PATCHES+= ${FILESDIR}/extra-patch-dig-to-drill.diff CONFIGURE_ARGS+=--with-dig-command=/usr/bin/drill \ ac_cv_path_PATH_TO_NSLOOKUP= PLIST_SUB+= CHECK_DNS="@comment " .else . if ${PORT_OPTIONS:MDNS_BASE} CONFIGURE_ARGS+= --with-dig-command=/usr/bin/dig \ --with-nslookup-command=/usr/bin/nslookup . endif PLIST_SUB+= CHECK_DNS="" .endif .if !exists(/usr/bin/ssh) && empty(PORT_OPTIONS:MSSH_PORTABLE) PLIST_SUB+= SSH="@comment " .else PLIST_SUB+= SSH="" .endif post-patch: .for file in check_by_ssh.c check_disk.c check_http.c check_mrtgtraf.c \ check_nagios.c check_ntp.c check_ntp_peer.c check_ntp_time.c \ check_pgsql.c check_snmp.c check_ssh.c check_swap.c check_time.c \ check_users.c @${REINPLACE_CMD} -e 's|setlocale (LC_ALL, "");|setlocale (LC_ALL, ""); setlocale(LC_NUMERIC, "C");|g' ${WRKSRC}/plugins/${file} .endfor @${REINPLACE_CMD} -e 's|chown root|${TRUE}|g' ${WRKSRC}/plugins-root/Makefile.in # add a fake PATH so that it gets set to a correct value during build. - @${REINPLACE_CMD} -e "s|$$ENV{'PATH'}=''|$$ENV{'PATH'}='foo'|" ${WRKSRC}/plugins-scripts/*.pl + @${REINPLACE_CMD} -e "s|$$ENV{'PATH'}=''|$$ENV{'PATH'}='foo'|; \ + s|/usr/bin/|${LOCALBASE}/bin/|g" \ + ${WRKSRC}/plugins-scripts/*.pl .include Index: head/net-mgmt/nagios-plugins/distinfo =================================================================== --- head/net-mgmt/nagios-plugins/distinfo (revision 395931) +++ head/net-mgmt/nagios-plugins/distinfo (revision 395932) @@ -1,2 +1,2 @@ -SHA256 (nagios-plugins-2.0.3.tar.gz) = 8f0021442dce0138f0285ca22960b870662e28ae8973d49d439463588aada04a -SIZE (nagios-plugins-2.0.3.tar.gz) = 2659772 +SHA256 (nagios-plugins-2.1.1.tar.gz) = c7daf95ecbf6909724258e55a319057b78dcca23b2a6cc0a640b90c90d4feae3 +SIZE (nagios-plugins-2.1.1.tar.gz) = 2677352 Index: head/net-mgmt/nagios-plugins/files/patch-plugins-scripts__subst.in =================================================================== --- head/net-mgmt/nagios-plugins/files/patch-plugins-scripts__subst.in (revision 395931) +++ head/net-mgmt/nagios-plugins/files/patch-plugins-scripts__subst.in (nonexistent) @@ -1,29 +0,0 @@ ---- plugins-scripts/subst.in.orig 2014-03-04 21:41:57 UTC -+++ plugins-scripts/subst.in -@@ -1,7 +1,7 @@ - #!/usr/bin/awk - - function which(c,path) { -- cmd = "test -x " c; -+ cmd = "[ " c " = @libexecdir@ ] || test -x " c; - - if (system(cmd)==0) { - return c; -@@ -53,7 +53,7 @@ - # FIXME: Prepend executables with a substitution keyword instead. - # - /^[^#]/ && /(\/.*)?\/(bin|sbin|lib|libexec)\// { -- match($0,/(\/.*)?\/(bin|sbin|lib|libexec)\/[-_a-zA-Z0-9]+/); -+ match($0,/(\/[^ ]*)?\/(bin|sbin|lib|libexec)\/[-_a-zA-Z0-9]+/); - c=substr($0,RSTART,RLENGTH); - sub(c,which(c,path)); - } -@@ -65,7 +65,7 @@ - # Trusted path mechanism (deprecated) - - /^[ \t]*\$ENV[ \t]*\{[ \t'"]*PATH[ \t"']*\}[ \t]*=/ { -- sub(/\=[ \t]*['"][^"']+["']/,"='@with_trusted_path@' # autoconf-derived"); -+ sub(/\=[ \t]*['"][^"']+["'];/,"='@with_trusted_path@'; # autoconf-derived"); - } - - /^[\t ]*(export[\t ]*)?PATH[\t ]*=['"]+.+["']$/ { Property changes on: head/net-mgmt/nagios-plugins/files/patch-plugins-scripts__subst.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/net-mgmt/nagios-plugins/files/extra-patch-dig-to-drill.diff =================================================================== --- head/net-mgmt/nagios-plugins/files/extra-patch-dig-to-drill.diff (revision 395931) +++ head/net-mgmt/nagios-plugins/files/extra-patch-dig-to-drill.diff (revision 395932) @@ -1,13 +1,13 @@ ---- plugins/check_dig.c.orig 2014-03-04 21:41:57 UTC +--- plugins/check_dig.c.orig 2015-07-30 21:40:06 UTC +++ plugins/check_dig.c @@ -94,8 +94,8 @@ main (int argc, char **argv) timeout_interval_dig = ceil((double) timeout_interval / (double) number_tries); /* get the command to run */ -- xasprintf (&command_line, "%s @%s -p %d %s -t %s %s %s +tries=%d +time=%d", -- PATH_TO_DIG, dns_server, server_port, query_address, record_type, dig_args, query_transport, number_tries, timeout_interval_dig); +- xasprintf (&command_line, "%s %s %s -p %d @%s %s %s +tries=%d +time=%d", +- PATH_TO_DIG, dig_args, query_transport, server_port, dns_server, query_address, record_type, number_tries, timeout_interval_dig); + xasprintf (&command_line, "%s %s @%s -z -p %d %s %s %s", + PATH_TO_DIG, dig_args, dns_server, server_port, query_transport, query_address, record_type); alarm (timeout_interval); gettimeofday (&tv, NULL); Index: head/net-mgmt/nagios-plugins/files/patch-configure =================================================================== --- head/net-mgmt/nagios-plugins/files/patch-configure (revision 395931) +++ head/net-mgmt/nagios-plugins/files/patch-configure (revision 395932) @@ -1,11 +1,11 @@ ---- configure.orig 2014-06-26 16:17:37 UTC +--- configure.orig 2015-07-31 17:47:20 UTC +++ configure -@@ -21787,7 +21787,7 @@ then +@@ -22224,7 +22224,7 @@ then $as_echo "$ac_cv_ps_command" >&6; } elif ps -axwo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \ - egrep -i "^ *STAT +[UCOMAND]+ +VSZ +RSS +USER +UID +PID +PPID +COMMAND" > /dev/null + egrep -i "^ *STAT +COMMAND +VSZ +RSS +USER +UID +PID +PPID +COMMAND" > /dev/null then ac_cv_ps_varlist="procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos" ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid pid ppid vsz rss pcpu comm args'" Index: head/net-mgmt/nagios-plugins/files/patch-plugins-root_check__dhcp.c =================================================================== --- head/net-mgmt/nagios-plugins/files/patch-plugins-root_check__dhcp.c (revision 395931) +++ head/net-mgmt/nagios-plugins/files/patch-plugins-root_check__dhcp.c (revision 395932) @@ -1,21 +1,21 @@ ---- plugins-root/check_dhcp.c.orig 2014-06-26 16:17:12 UTC +--- plugins-root/check_dhcp.c.orig 2015-07-30 21:40:06 UTC +++ plugins-root/check_dhcp.c @@ -326,7 +326,8 @@ int get_hardware_address(int sock,char * #elif defined(__bsd__) /* King 2004 see ACKNOWLEDGEMENTS */ - int mib[6], len; + int mib[6]; + size_t len; char *buf; unsigned char *ptr; struct if_msghdr *ifm; -@@ -1185,7 +1186,7 @@ int call_getopt(int argc, char **argv){ +@@ -1194,7 +1195,7 @@ int call_getopt(int argc, char **argv){ } } - return i; + return i+1; } Index: head/net-mgmt/nagios-plugins/files/patch-plugins-scripts__check_ircd.pl =================================================================== --- head/net-mgmt/nagios-plugins/files/patch-plugins-scripts__check_ircd.pl (revision 395931) +++ head/net-mgmt/nagios-plugins/files/patch-plugins-scripts__check_ircd.pl (revision 395932) @@ -1,19 +1,19 @@ ---- plugins-scripts/check_ircd.pl.orig 2014-03-04 21:41:57 UTC +--- plugins-scripts/check_ircd.pl.orig 2015-07-30 21:40:06 UTC +++ plugins-scripts/check_ircd.pl -@@ -66,6 +66,7 @@ - $ENV{PATH} = ""; - $ENV{ENV} = ""; - $ENV{BASH_ENV} = ""; -+$ENV{CDPATH} = ""; +@@ -67,6 +67,7 @@ sub bindRemote ($$); + $ENV{'PATH'}='@TRUSTED_PATH@'; + $ENV{'BASH_ENV'}=''; + $ENV{'ENV'}=''; ++$ENV{'CDPATH'} = ""; # -----------------------------------------------------------------[ Global ]-- -@@ -153,7 +154,7 @@ +@@ -154,7 +155,7 @@ sub bindRemote ($$) print "IRCD UNKNOWN: Could not start socket ($!)\n"; exit $ERRORS{"UNKNOWN"}; } - $sockaddr = 'S n a4 x8'; + $sockaddr = 'x C n a4 x8'; $that = pack($sockaddr, AF_INET, $in_remoteport, $thataddr); if (!connect(ClientSocket, $that)) { print "IRCD UNKNOWN: Could not connect socket ($!)\n"; Index: head/net-mgmt/nagios-plugins/files/patch-plugins-scripts__check_ntp.pl =================================================================== --- head/net-mgmt/nagios-plugins/files/patch-plugins-scripts__check_ntp.pl (revision 395931) +++ head/net-mgmt/nagios-plugins/files/patch-plugins-scripts__check_ntp.pl (revision 395932) @@ -1,19 +1,19 @@ ---- plugins-scripts/check_ntp.pl.orig 2014-03-04 21:41:57 UTC +--- plugins-scripts/check_ntp.pl.orig 2015-07-30 21:40:06 UTC +++ plugins-scripts/check_ntp.pl -@@ -313,7 +313,6 @@ +@@ -313,7 +313,6 @@ if ($have_ntpq) { } } else { print "No match!\n" if $verbose; - $jitter = '(not parsed)'; } } -@@ -427,7 +426,7 @@ +@@ -427,7 +426,7 @@ if ($ntpdate_error != $ERRORS{'OK'}) { foreach my $key (keys %ERRORS) { if ($state==$ERRORS{$key}) { # print ("NTP $key: $answer"); - print ("NTP $key: $answer|offset=$offset, jitter=" . $jitter/1000 . ",peer_stratum=$stratum\n"); + print ("NTP $key: $answer|offset=$offset, jitter=" . ($jitter || 0)/1000 . ",peer_stratum=$stratum\n"); last; } } Index: head/net-mgmt/nagios-plugins/files/patch-plugins__check_pgsql.c =================================================================== --- head/net-mgmt/nagios-plugins/files/patch-plugins__check_pgsql.c (revision 395931) +++ head/net-mgmt/nagios-plugins/files/patch-plugins__check_pgsql.c (revision 395932) @@ -1,10 +1,10 @@ ---- plugins/check_pgsql.c.orig 2014-04-15 22:19:03 UTC +--- plugins/check_pgsql.c.orig 2015-07-30 21:40:06 UTC +++ plugins/check_pgsql.c -@@ -36,6 +36,7 @@ +@@ -36,6 +36,7 @@ const char *email = "devel@nagios-plugin #include "utils.h" #include "netutils.h" +#include "pg_config_manual.h" #include #include Index: head/net-mgmt/nagios-plugins/files/patch-plugins__check_ssh.c =================================================================== --- head/net-mgmt/nagios-plugins/files/patch-plugins__check_ssh.c (revision 395931) +++ head/net-mgmt/nagios-plugins/files/patch-plugins__check_ssh.c (revision 395932) @@ -1,18 +1,18 @@ ---- plugins/check_ssh.c.orig 2014-03-04 21:41:57 UTC +--- plugins/check_ssh.c.orig 2015-07-30 21:40:06 UTC +++ plugins/check_ssh.c -@@ -255,6 +255,7 @@ +@@ -252,6 +252,7 @@ ssh_connect (char *haddr, int hport, cha printf - (_("SSH WARNING - %s (protocol %s) version mismatch, expected '%s'\n"), + (_("SSH CRITICAL - %s (protocol %s) version mismatch, expected '%s'\n"), ssh_server, ssh_proto, remote_version); + recv (sd, output, BUFF_SZ, 0); close(sd); - exit (STATE_WARNING); + exit (STATE_CRITICAL); } -@@ -273,6 +274,7 @@ +@@ -270,6 +271,7 @@ ssh_connect (char *haddr, int hport, cha (_("SSH OK - %s (protocol %s) | %s\n"), ssh_server, ssh_proto, fperfdata("time", elapsed_time, "s", - FALSE, 0, FALSE, 0, TRUE, 0, TRUE, (int)socket_timeout)); + FALSE, 0, FALSE, 0, TRUE, 0, TRUE, (int)timeout_interval)); + recv (sd, output, BUFF_SZ, 0); close(sd); exit (STATE_OK); }