Date: Tue, 15 Apr 2014 09:57:47 +0000 (UTC) From: Mathieu Arnold <mat@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r351319 - in head/net-mgmt/nagios-plugins: . files Message-ID: <201404150957.s3F9vlea057278@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mat Date: Tue Apr 15 09:57:46 2014 New Revision: 351319 URL: http://svnweb.freebsd.org/changeset/ports/351319 QAT: https://qat.redports.org/buildarchive/r351319/ Log: Go back one step and one to the right. Shipping dig and nslookup was a bad idea, I can't guess what dependencies they need (like libidnkit) so back to the first option, allowing people to choose what they want to do. Add five new options, use DNS from base, which means that >= 10, check_dns won't be there and check_dig will use drill, or allow choosing between bind-tools, bind98, bind99 and bind910. Sponsored by: Absolight Added: head/net-mgmt/nagios-plugins/files/extra-patch-dig-to-drill.diff - copied, changed from r351261, head/net-mgmt/nagios-plugins/files/extra-patch-dig-to-drill.diff Modified: head/net-mgmt/nagios-plugins/Makefile head/net-mgmt/nagios-plugins/pkg-help head/net-mgmt/nagios-plugins/pkg-plist Modified: head/net-mgmt/nagios-plugins/Makefile ============================================================================== --- head/net-mgmt/nagios-plugins/Makefile Tue Apr 15 09:22:55 2014 (r351318) +++ head/net-mgmt/nagios-plugins/Makefile Tue Apr 15 09:57:46 2014 (r351319) @@ -3,6 +3,7 @@ PORTNAME= nagios-plugins PORTVERSION= 2.0 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= net-mgmt MASTER_SITES= https://www.nagios-plugins.org/download/ @@ -18,7 +19,9 @@ ACLOCAL_ARGS= -I m4 -I gl/m4 AUTOMAKE_ARGS= --add-missing OPTIONS_DEFINE= QSTAT FPING NETSNMP RADIUS MYSQL PGSQL LDAP IPV6 JAIL NLS DBI EXTRAOPTS -OPTIONS_DEFAULT=IPV6 EXTRAOPTS +OPTIONS_SINGLE= DNS +OPTIONS_SINGLE_DNS= DNS_BASE DNS_BINDTOOLS DNS_BIND98 DNS_BIND99 DNS_BIND910 +OPTIONS_DEFAULT=IPV6 EXTRAOPTS DNS_BASE OPTIONS_SUB= yes QSTAT_DESC= Game server query support (check_game) @@ -32,6 +35,14 @@ JAIL_DESC= Compilation within jail(8) (s DBI_DESC= Check database using DBI EXTRAOPTS_DESC= Parsing of plugins ini config files for extra options +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_BIND98_DESC= Use dig and nslookup from dns/bind98 +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 @@ -47,13 +58,11 @@ NAGIOSCGIURL?= ${NAGIOSHTMURL}/cgi-bin NAGIOSPOLLIP?= 127.0.0.1 NAGIOSPOLLIP6?= ::1 -PLUGINS_DIR= ${PREFIX}/libexec/nagios - CONFIGURE_ARGS+=--with-nagios-user=${NAGIOSUSER} \ --with-nagios-group=${NAGIOSGROUP} \ --with-cgiurl=${NAGIOSCGIURL} \ --sbindir=${PREFIX}/${NAGIOSWWWDIR}/cgi-bin \ - --libexecdir=${PLUGINS_DIR} \ + --libexecdir=${PREFIX}/libexec/nagios \ --datadir=${PREFIX}/share \ --sysconfdir=${PREFIX}/etc/nagios \ --localstatedir=${NAGIOSDIR} \ @@ -100,15 +109,31 @@ 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=/usr/local/bin/dig \ + --with-nslookup-command=/usr/local/bin/nslookup +DNS_BIND98_BUILD_DEPENDS= ${LOCALBASE}/bin/dig:${PORTSDIR}/dns/bind98 +DNS_BIND98_CONFIGURE_ON= --with-dig-command=/usr/local/bin/dig \ + --with-nslookup-command=/usr/local/bin/nslookup +DNS_BIND99_BUILD_DEPENDS= ${LOCALBASE}/bin/dig:${PORTSDIR}/dns/bind99 +DNS_BIND99_CONFIGURE_ON= --with-dig-command=/usr/local/bin/dig \ + --with-nslookup-command=/usr/local/bin/nslookup +DNS_BIND910_BUILD_DEPENDS= ${LOCALBASE}/bin/dig:${PORTSDIR}/dns/bind910 +DNS_BIND910_CONFIGURE_ON= --with-dig-command=/usr/local/bin/dig \ + --with-nslookup-command=/usr/local/bin/nslookup + .include <bsd.port.options.mk> -.if ${OSVERSION} > 1000055 -BUILD_DEPENDS+= ${LOCALBASE}/bin/dig:${PORTSDIR}/dns/bind-tools -CONFIGURE_ARGS+= --with-dig-command=${PLUGINS_DIR}/nagios-dig \ - --with-nslookup-command=${PLUGINS_DIR}/nagios-nslookup -PLIST_SUB+= BIND="" +.if ${OSVERSION} > 1000055 && ${PORT_OPTIONS:MDNS_BASE} +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-dig-to-drill.diff +CONFIGURE_ARGS+=--with-dig-command=/usr/bin/drill +PLIST_SUB+= CHECK_DNS="@comment " .else -PLIST_SUB+= BIND="@comment " +. 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) @@ -130,11 +155,4 @@ post-patch: @${REINPLACE_CMD} -e 's# ::1 # ${NAGIOSPOLLIP6} #g' ${WRKSRC}/configure.ac .endif -.if ${OSVERSION} > 1000055 -post-install: -.for f in dig nslookup - ${INSTALL_PROGRAM} ${LOCALBASE}/bin/${f} ${STAGEDIR}${PLUGINS_DIR}/nagios-${f} -.endfor -.endif - .include <bsd.port.mk> Copied and modified: head/net-mgmt/nagios-plugins/files/extra-patch-dig-to-drill.diff (from r351261, head/net-mgmt/nagios-plugins/files/extra-patch-dig-to-drill.diff) ============================================================================== --- head/net-mgmt/nagios-plugins/files/extra-patch-dig-to-drill.diff Mon Apr 14 15:20:45 2014 (r351261, copy source) +++ head/net-mgmt/nagios-plugins/files/extra-patch-dig-to-drill.diff Tue Apr 15 09:57:46 2014 (r351319) @@ -1,11 +1,13 @@ ---- plugins/check_dig.c.orig 2013-10-02 19:22:21.000000000 +0400 -+++ plugins/check_dig.c 2013-12-15 16:55:26.000000000 +0400 -@@ -88,7 +88,7 @@ main (int argc, char **argv) - usage_va(_("Could not parse arguments")); +--- ./plugins/check_dig.c.orig 2014-03-04 20:21:36.000000000 +0100 ++++ ./plugins/check_dig.c 2014-04-15 11:42:41.000000000 +0200 +@@ -94,8 +94,8 @@ + 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", -+ xasprintf (&command_line, "%s @%s -z -p %d %s %s %s %s", - PATH_TO_DIG, dns_server, server_port, query_address, record_type, dig_args, query_transport); +- 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 -z -p %d %s %s %s", ++ PATH_TO_DIG, dig_args, dns_server, server_port, query_address, record_type, query_transport); alarm (timeout_interval); + gettimeofday (&tv, NULL); Modified: head/net-mgmt/nagios-plugins/pkg-help ============================================================================== --- head/net-mgmt/nagios-plugins/pkg-help Tue Apr 15 09:22:55 2014 (r351318) +++ head/net-mgmt/nagios-plugins/pkg-help Tue Apr 15 09:57:46 2014 (r351319) @@ -5,3 +5,19 @@ doesn't have 127.0.0.1 and ::1, and you be built, you have to set NAGIOSPOLLIP and NAGIOSPOLLIP6 to an IPV4 and an IPV6 address that can be pinged from the jail. + + ** DNS ** +Starting from FreeBSD 10.0, BIND has been replaced in base +by unbound. This means that there are no dig and nslookup +utilities for check_dig and check_dns to use. If you choose +DNS_BASE, check_dig will be built using drill instead of +dig, if you use -A the dig options will generally not work, +check drill(1) for the correct ones, also, timeout and retry +will be ignored, and check_dns won't be installed. If you +check any other option, the installed dig and nslookup will +be used. + +If you run FreeBSD < 10, you can still use the DNS_BIND* +options to have check_dig and check_dns use the newer dig +and nslookup utilities. + Modified: head/net-mgmt/nagios-plugins/pkg-plist ============================================================================== --- head/net-mgmt/nagios-plugins/pkg-plist Tue Apr 15 09:22:55 2014 (r351318) +++ head/net-mgmt/nagios-plugins/pkg-plist Tue Apr 15 09:57:46 2014 (r351319) @@ -8,7 +8,7 @@ libexec/nagios/check_dhcp libexec/nagios/check_dig libexec/nagios/check_disk libexec/nagios/check_disk_smb -libexec/nagios/check_dns +%%CHECK_DNS%%libexec/nagios/check_dns libexec/nagios/check_dummy libexec/nagios/check_file_age libexec/nagios/check_flexlm @@ -64,8 +64,6 @@ libexec/nagios/check_ups libexec/nagios/check_users libexec/nagios/check_wave libexec/nagios/negate -%%BIND%%libexec/nagios/nagios-dig -%%BIND%%libexec/nagios/nagios-nslookup libexec/nagios/urlize libexec/nagios/utils.pm libexec/nagios/utils.sh
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404150957.s3F9vlea057278>