aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/monitoring-plugins
diff options
context:
space:
mode:
authormat <mat@FreeBSD.org>2015-01-13 00:04:09 +0800
committermat <mat@FreeBSD.org>2015-01-13 00:04:09 +0800
commit08b5771c291de1fcfe0d70122809cf7c9fe17b27 (patch)
tree4633a01341d7a7e2b9ec3795d4946cc5c915bd40 /net-mgmt/monitoring-plugins
parent4267c37e46e0747a7ef9ecb0ff2694d06665c84e (diff)
downloadfreebsd-ports-gnome-08b5771c291de1fcfe0d70122809cf7c9fe17b27.tar.gz
freebsd-ports-gnome-08b5771c291de1fcfe0d70122809cf7c9fe17b27.tar.zst
freebsd-ports-gnome-08b5771c291de1fcfe0d70122809cf7c9fe17b27.zip
Remove the JAIL option.
Force the full path to a few binaries. Make sure the checks that need to be suid are suid. Differential Revision: https://reviews.freebsd.org/D1502 Tested by: dvl Sponsored by: Absolight
Diffstat (limited to 'net-mgmt/monitoring-plugins')
-rw-r--r--net-mgmt/monitoring-plugins/Makefile28
-rw-r--r--net-mgmt/monitoring-plugins/pkg-help9
-rw-r--r--net-mgmt/monitoring-plugins/pkg-plist4
3 files changed, 14 insertions, 27 deletions
diff --git a/net-mgmt/monitoring-plugins/Makefile b/net-mgmt/monitoring-plugins/Makefile
index 954b35cf72b0..d58356a91492 100644
--- a/net-mgmt/monitoring-plugins/Makefile
+++ b/net-mgmt/monitoring-plugins/Makefile
@@ -3,7 +3,7 @@
PORTNAME= monitoring-plugins
PORTVERSION= 2.0
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= net-mgmt
MASTER_SITES= https://www.monitoring-plugins.org/download/ LOCAL/mat/${PORTNAME}
@@ -18,7 +18,7 @@ CONFLICTS_INSTALL= nagios-plugins-*
USES= charsetfix gmake perl5 libtool
USE_SUBMAKE= yes
-OPTIONS_DEFINE= QSTAT FPING NETSNMP RADIUS MYSQL PGSQL LDAP IPV6 JAIL NLS DBI EXTRAOPTS SSH_PORTABLE
+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
@@ -31,7 +31,6 @@ RADIUS_DESC= Radius support (check_radius)
MYSQL_DESC= MySQL support (check_mysql)
PGSQL_DESC= PostgreSQL support (check_pgsql)
LDAP_DESC= OpenLDAP support (check_ldap)
-JAIL_DESC= Compilation within jail(8) (see help)
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)
@@ -53,9 +52,6 @@ NAGIOSWWWDIR?= www/nagios
NAGIOSHTMURL?= /nagios
NAGIOSCGIURL?= ${NAGIOSHTMURL}/cgi-bin
-NAGIOSPOLLIP?= 127.0.0.1
-NAGIOSPOLLIP6?= ::1
-
CONFIGURE_ARGS+=--with-cgiurl=${NAGIOSCGIURL} \
--sbindir=${PREFIX}/${NAGIOSWWWDIR}/cgi-bin \
--libexecdir=${PREFIX}/libexec/nagios \
@@ -67,7 +63,12 @@ CONFIGURE_ARGS+=--with-cgiurl=${NAGIOSCGIURL} \
# Also, force some commands with their expected paths so that they don't get
# disabled.
-CONFIGURE_ARGS+=--with-qmail-qstat-command=/var/qmail/bin/qmail-qstat
+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
@@ -95,12 +96,10 @@ RADIUS_LIB_DEPENDS= libradiusclient-ng.so:${PORTSDIR}/net/radiusclient
RADIUS_CONFIGURE_WITH= radius
MYSQL_USE= mysql=yes
-MYSQL_CONFIGURE_ON= --with-mysql=${LOCALBASE}
-MYSQL_CONFIGURE_OFF= --without-mysql
+MYSQL_CONFIGURE_WITH= mysql=${LOCALBASE}
PGSQL_USES= pgsql
-PGSQL_CONFIGURE_ON= --with-pgsql=${LOCALBASE}
-PGSQL_CONFIGURE_OFF= --without-pgsql
+PGSQL_CONFIGURE_WITH= pgsql=${LOCALBASE}
LDAP_USE= openldap=yes
LDAP_CONFIGURE_WITH= ldap
@@ -129,7 +128,8 @@ SSH_PORTABLE_CONFIGURE_ON= --with-ssh-command=${LOCALBASE}/bin/ssh
.if ${OSVERSION} > 1000055 && ${PORT_OPTIONS:MDNS_BASE}
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-dig-to-drill.diff
-CONFIGURE_ARGS+=--with-dig-command=/usr/bin/drill
+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}
@@ -153,9 +153,5 @@ post-patch:
@${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
-.if ${PORT_OPTIONS:MJAIL}
- @${REINPLACE_CMD} -e 's# 127\.0\.0\.1 # ${NAGIOSPOLLIP} #g' ${WRKSRC}/configure
- @${REINPLACE_CMD} -e 's# ::1 # ${NAGIOSPOLLIP6} #g' ${WRKSRC}/configure
-.endif
.include <bsd.port.mk>
diff --git a/net-mgmt/monitoring-plugins/pkg-help b/net-mgmt/monitoring-plugins/pkg-help
index 5359c7dfb64d..af2e754682a1 100644
--- a/net-mgmt/monitoring-plugins/pkg-help
+++ b/net-mgmt/monitoring-plugins/pkg-help
@@ -1,13 +1,4 @@
- ** JAIL **
-If you are building nagios-plugins from within a jail that
-doesn't have 127.0.0.1 and ::1, and you want check_ping to
-be built, you have to set NAGIOSPOLLIP and NAGIOSPOLLIP6 to
-an IPV4 and an IPV6 address that can be pinged from the jail.
-
-As a few people seem to be doing it and complaining it does not
-work, you do NOT want to use this when building with poudriere.
-
** DNS **
Starting from FreeBSD 10.0, BIND has been replaced in base
by unbound. This means that there are no dig and nslookup
diff --git a/net-mgmt/monitoring-plugins/pkg-plist b/net-mgmt/monitoring-plugins/pkg-plist
index 8100575d1249..0b4808583673 100644
--- a/net-mgmt/monitoring-plugins/pkg-plist
+++ b/net-mgmt/monitoring-plugins/pkg-plist
@@ -4,7 +4,7 @@ libexec/nagios/check_breeze
libexec/nagios/check_clamd
libexec/nagios/check_cluster
%%DBI%%libexec/nagios/check_dbi
-libexec/nagios/check_dhcp
+@(,,04555) libexec/nagios/check_dhcp
libexec/nagios/check_dig
libexec/nagios/check_disk
libexec/nagios/check_disk_smb
@@ -17,7 +17,7 @@ libexec/nagios/check_ftp
%%QSTAT%%libexec/nagios/check_game
%%NETSNMP%%libexec/nagios/check_hpjd
libexec/nagios/check_http
-libexec/nagios/check_icmp
+@(,,04555) libexec/nagios/check_icmp
libexec/nagios/check_ifoperstatus
libexec/nagios/check_ifstatus
libexec/nagios/check_imap