Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Jan 2015 16:04:10 +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: r376834 - in head/net-mgmt: monitoring-plugins nagios-plugins
Message-ID:  <201501121604.t0CG4Awg086124@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mat
Date: Mon Jan 12 16:04:09 2015
New Revision: 376834
URL: https://svnweb.freebsd.org/changeset/ports/376834
QAT: https://qat.redports.org/buildarchive/r376834/

Log:
  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

Modified:
  head/net-mgmt/monitoring-plugins/Makefile
  head/net-mgmt/monitoring-plugins/pkg-help
  head/net-mgmt/monitoring-plugins/pkg-plist
  head/net-mgmt/nagios-plugins/Makefile
  head/net-mgmt/nagios-plugins/pkg-help
  head/net-mgmt/nagios-plugins/pkg-plist

Modified: head/net-mgmt/monitoring-plugins/Makefile
==============================================================================
--- head/net-mgmt/monitoring-plugins/Makefile	Mon Jan 12 15:40:32 2015	(r376833)
+++ head/net-mgmt/monitoring-plugins/Makefile	Mon Jan 12 16:04:09 2015	(r376834)
@@ -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_radiu
 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=${NAGIOSCG
 
 # 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.s
 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-co
 
 .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>

Modified: head/net-mgmt/monitoring-plugins/pkg-help
==============================================================================
--- head/net-mgmt/monitoring-plugins/pkg-help	Mon Jan 12 15:40:32 2015	(r376833)
+++ head/net-mgmt/monitoring-plugins/pkg-help	Mon Jan 12 16:04:09 2015	(r376834)
@@ -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

Modified: head/net-mgmt/monitoring-plugins/pkg-plist
==============================================================================
--- head/net-mgmt/monitoring-plugins/pkg-plist	Mon Jan 12 15:40:32 2015	(r376833)
+++ head/net-mgmt/monitoring-plugins/pkg-plist	Mon Jan 12 16:04:09 2015	(r376834)
@@ -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

Modified: head/net-mgmt/nagios-plugins/Makefile
==============================================================================
--- head/net-mgmt/nagios-plugins/Makefile	Mon Jan 12 15:40:32 2015	(r376833)
+++ head/net-mgmt/nagios-plugins/Makefile	Mon Jan 12 16:04:09 2015	(r376834)
@@ -3,7 +3,7 @@
 
 PORTNAME=	nagios-plugins
 PORTVERSION=	2.0.3
-PORTREVISION=	4
+PORTREVISION=	5
 PORTEPOCH=	1
 CATEGORIES=	net-mgmt
 MASTER_SITES=	https://www.nagios-plugins.org/download/ \
@@ -20,7 +20,7 @@ CONFLICTS_INSTALL=	monitoring-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
@@ -33,7 +33,6 @@ RADIUS_DESC=	Radius support (check_radiu
 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)
@@ -57,9 +56,6 @@ NAGIOSWWWDIR?=	www/nagios
 NAGIOSHTMURL?=	/nagios
 NAGIOSCGIURL?=	${NAGIOSHTMURL}/cgi-bin
 
-NAGIOSPOLLIP?=	127.0.0.1
-NAGIOSPOLLIP6?=	::1
-
 CONFIGURE_ARGS+=--with-nagios-user=${NAGIOSUSER} \
 		--with-nagios-group=${NAGIOSGROUP} \
 		--with-cgiurl=${NAGIOSCGIURL} \
@@ -68,13 +64,18 @@ CONFIGURE_ARGS+=--with-nagios-user=${NAG
 		--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+=--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
 
-CONFIGURE_ENV=	PERL=${PERL}
 CPPFLAGS+=	-I${LOCALBASE}/include
 LIBS+=		-L${LOCALBASE}/lib
 
@@ -101,12 +102,10 @@ RADIUS_LIB_DEPENDS=	libradiusclient-ng.s
 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
@@ -135,7 +134,8 @@ SSH_PORTABLE_CONFIGURE_ON=	--with-ssh-co
 
 .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}
@@ -161,9 +161,5 @@ post-patch:
 	@${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
-.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>

Modified: head/net-mgmt/nagios-plugins/pkg-help
==============================================================================
--- head/net-mgmt/nagios-plugins/pkg-help	Mon Jan 12 15:40:32 2015	(r376833)
+++ head/net-mgmt/nagios-plugins/pkg-help	Mon Jan 12 16:04:09 2015	(r376834)
@@ -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

Modified: head/net-mgmt/nagios-plugins/pkg-plist
==============================================================================
--- head/net-mgmt/nagios-plugins/pkg-plist	Mon Jan 12 15:40:32 2015	(r376833)
+++ head/net-mgmt/nagios-plugins/pkg-plist	Mon Jan 12 16:04:09 2015	(r376834)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501121604.t0CG4Awg086124>