Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Dec 2013 20:37:44 +0100 (CET)
From:      Niclas Zeising <zeising@daemonic.se>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/184644: [PATCH] update net-mgmt/nagios-plugins to 1.5
Message-ID:  <201312091937.rB9Jbirl019814@vivi.daemonic.se>
Resent-Message-ID: <201312091940.rB9Je4Lj089916@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         184644
>Category:       ports
>Synopsis:       [PATCH] update net-mgmt/nagios-plugins to 1.5
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 09 19:40:03 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Niclas Zeising
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
System: FreeBSD vivi.daemonic.se 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r252979M: Sun Jul 7 21:07:39 CEST 2013 root@vivi.daemonic.se:/usr/obj/usr/src/sys/VIVI amd64


	
>Description:
	Attached patch updates net-mgmt/nagios-plugins to 1.5 and makes the port work with staging.
>How-To-Repeat:
	
>Fix:

	

--- ports.nagios-plugin.1.5.update.diff begins here ---
Index: net-mgmt/nagios-plugins/Makefile
===================================================================
--- net-mgmt/nagios-plugins/Makefile	(revision 335879)
+++ net-mgmt/nagios-plugins/Makefile	(working copy)
@@ -2,11 +2,10 @@
 # $FreeBSD$
 
 PORTNAME=	nagios-plugins
-PORTVERSION=	1.4.16
-PORTREVISION=	3
+PORTVERSION=	1.5
 PORTEPOCH=	1
 CATEGORIES=	net-mgmt
-MASTER_SITES=	SF/nagiosplug/nagiosplug/${PORTVERSION}
+MASTER_SITES=	https://www.nagios-plugins.org/download/
 
 MAINTAINER=	demon@FreeBSD.org
 COMMENT=	Plugins for Nagios
@@ -18,8 +17,8 @@
 ACLOCAL_ARGS=	-I m4 -I gl/m4
 AUTOMAKE_ARGS=	--add-missing
 
-OPTIONS_DEFINE=	QSTAT FPING NETSNMP RADIUS MYSQL PGSQL LDAP IPV6 JAIL NLS
-OPTIONS_DEFAULT=IPV6
+OPTIONS_DEFINE=	QSTAT FPING NETSNMP RADIUS MYSQL PGSQL LDAP IPV6 JAIL NLS DBI
+OPTIONS_DEFAULT=QSTAT FPING NETSNMP RADIUS MYSQL PGSQL LDAP IPV6 NLS DBI
 
 QSTAT_DESC=	Game server query support (check_game)
 FPING_DESC=	Support for non-flooding fast ping (check_fping)
@@ -29,6 +28,7 @@
 PGSQL_DESC=	PostgreSQL support (check_pgsql)
 LDAP_DESC=	OpenLDAP support (check_ldap)
 JAIL_DESC=	Compilation within jail(8) (see Makefile)
+DBI_DESC=	Check database using DBI
 
 GNU_CONFIGURE=	yes
 
@@ -43,7 +43,6 @@
 NAGIOSPOLLIP?=	127.0.0.1
 NAGIOSPOLLIP6?=	::1
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
 CONFIGURE_ARGS=	--with-nagios-user=${NAGIOSUSER} \
@@ -98,9 +97,9 @@
 
 .if ${PORT_OPTIONS:MRADIUS}
 LIB_DEPENDS+=	radiusclient-ng:${PORTSDIR}/net/radiusclient
-CONFIGURE_ARGS+=	--enable-radius
 PLIST_SUB+=	SUB_RADIUS=""
 .else
+CONFIGURE_ARGS+=	--without-radius
 PLIST_SUB+=	SUB_RADIUS="@comment "
 .endif
 
@@ -124,9 +123,9 @@
 
 .if ${PORT_OPTIONS:MLDAP}
 USE_OPENLDAP=	YES
-CONFIGURE_ARGS+=	--enable-ldap
 PLIST_SUB+=	SUB_LDAP=""
 .else
+CONFIGURE_ARGS+=	--without-ldap
 PLIST_SUB+=	SUB_LDAP="@comment "
 .endif
 
@@ -138,6 +137,13 @@
 PLIST_SUB+=	NLS="@comment "
 .endif
 
+.if ${PORT_OPTIONS:MDBI}
+PLIST_SUB+=	SUB_DBI=""
+LIB_DEPENDS+=	libdbi.so:${PORTSDIR}/databases/libdbi
+.else
+CONFIGURE_ARGS+=	--without-dbi
+PLIST_SUB+=	SUB_DBI="@comment "
+.endif
 # Restore check_users from 1.4.15 for hosts without getutxent(3)
 .if ${OSVERSION} < 900007
 EXTRA_PATCHES+=	${FILESDIR}/extra-patch-plugins__check_users.c
Index: net-mgmt/nagios-plugins/distinfo
===================================================================
--- net-mgmt/nagios-plugins/distinfo	(revision 335879)
+++ net-mgmt/nagios-plugins/distinfo	(working copy)
@@ -1,2 +1,2 @@
-SHA256 (nagios-plugins-1.4.16.tar.gz) = b0caf07e0084e9b7f10fdd71cbd3ebabcd85ad78df64da360b51233b0e73b2bd
-SIZE (nagios-plugins-1.4.16.tar.gz) = 2087089
+SHA256 (nagios-plugins-1.5.tar.gz) = fcc55e23bbf1c70bcf1a90749d30249955d4668a9b776b2521da023c5c2f2170
+SIZE (nagios-plugins-1.5.tar.gz) = 2428258
Index: net-mgmt/nagios-plugins/files/patch-configure.in
===================================================================
--- net-mgmt/nagios-plugins/files/patch-configure.in	(revision 335879)
+++ net-mgmt/nagios-plugins/files/patch-configure.in	(working copy)
@@ -1,6 +1,6 @@
---- configure.in.orig	2009-09-16 10:20:34.000000000 +0200
-+++ configure.in	2009-12-17 15:42:34.486203026 +0100
-@@ -11,8 +11,6 @@
+--- configure.in.orig	2013-10-02 17:22:21.000000000 +0200
++++ configure.in	2013-12-09 16:12:25.845469460 +0100
+@@ -12,8 +12,6 @@
  RELEASE=1
  AC_SUBST(RELEASE)
  
@@ -9,7 +9,7 @@
  dnl Deprecated configure options
  
  
-@@ -43,6 +41,7 @@
+@@ -44,6 +42,7 @@
  gl_EARLY
  AC_PROG_GCC_TRADITIONAL
  AC_PROG_LIBTOOL
@@ -17,7 +17,7 @@
  
  AM_PROG_CC_C_O
  
-@@ -200,11 +199,12 @@
+@@ -211,11 +210,12 @@
  	ACX_HELP_STRING([--with-pgsql=DIR],
  		[sets path to pgsql installation]),
  	PGSQL=$withval,)
@@ -32,71 +32,60 @@
    fi
    AC_CHECK_LIB(pq,PQsetdbLogin,,,-lcrypt)
    if test "$ac_cv_lib_pq_PQsetdbLogin" = "yes"; then
-@@ -241,37 +241,42 @@
-   AC_MSG_WARN([Skipping PostgreSQL plugin (check_pgsql)])
-   AC_MSG_WARN([install lib crypt and PostgreSQL libs to compile this plugin (see REQUIREMENTS).])
- fi
-+else
-+  AC_MSG_WARN([Skipping PostgreSQL plugin (check_pgsql)])
-+  AC_MSG_WARN([PostgreSQL directory has not been found])
-+fi
- LIBS="$_SAVEDLIBS"
- CPPFLAGS="$_SAVEDCPPFLAGS"
- 
-+AC_ARG_ENABLE(radius,--enable-radius compile check_radius)
-+if test x$enable_radius = xyes; then
+@@ -259,10 +259,10 @@
+ dnl Check for DBI libraries
+ AS_IF([test "x$with_dbi" != "xno"], [
+   _SAVEDLIBS="$LIBS"
+-  AC_CHECK_LIB(dbi,dbi_initialize)
++  AC_CHECK_LIB(dbi,dbi_initialize,,,-L${LOCALBASE}/lib)
+   if test "$ac_cv_lib_dbi_dbi_initialize" = "yes"; then
+     EXTRAS="$EXTRAS check_dbi"
+-  	DBILIBS="-ldbi"
++  	DBILIBS="-L${LOCALBASE}/lib -ldbi"
+     AC_SUBST(DBILIBS)
+   else
+     AC_MSG_WARN([Skipping dbi plugin])
+@@ -276,17 +276,13 @@
  dnl Check for radius libraries
- _SAVEDLIBS="$LIBS"
--AC_CHECK_LIB(radiusclient,rc_read_config)
--if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then
--  EXTRAS="$EXTRAS check_radius"
--	RADIUSLIBS="-lradiusclient"
--  AC_SUBST(RADIUSLIBS)
--else
--  AC_CHECK_LIB(radiusclient-ng,rc_read_config)
-+  AC_CHECK_LIB(radiusclient-ng,rc_read_config,,,-L${LOCALBASE}/lib)
-   if test "$ac_cv_lib_radiusclient_ng_rc_read_config" = "yes"; then
-     EXTRAS="$EXTRAS check_radius"
--  	  RADIUSLIBS="-lradiusclient-ng"
-+    RADIUSLIBS="-L${LOCALBASE}/lib -lradiusclient-ng"\
-+    RADIUSINCLUDE="-I${LOCALBASE}/include"
-     AC_SUBST(RADIUSLIBS)
-+    AC_SUBST(RADIUSINCLUDE)
-   else
-     AC_MSG_WARN([Skipping radius plugin])
-     AC_MSG_WARN([install radius libs to compile this plugin (see REQUIREMENTS).])
-   fi
--fi
- LIBS="$_SAVEDLIBS"
-+fi
- 
-+AC_ARG_ENABLE(ldap,--enable-ldap compile check_ldap)
-+if test x$enable_ldap = xyes; then
+ AS_IF([test "x$with_radius" != "xno"], [
+   _SAVEDLIBS="$LIBS"
+-  AC_CHECK_LIB(radiusclient,rc_read_config)
+-  if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then
+-    EXTRAS="$EXTRAS check_radius"
+-  	RADIUSLIBS="-lradiusclient"
+-    AC_SUBST(RADIUSLIBS)
+-  else
+-    AC_CHECK_LIB(radiusclient-ng,rc_read_config)
++    AC_CHECK_LIB(radiusclient-ng,rc_read_config,,,-L${LOCALBASE}/lib)
+     if test "$ac_cv_lib_radiusclient_ng_rc_read_config" = "yes"; then
+       EXTRAS="$EXTRAS check_radius"
+-    	  RADIUSLIBS="-lradiusclient-ng"
++      RADIUSLIBS="-L${LOCALBASE}/lib -lradiusclient-ng"
++      RADIUSINCLUDE="-I${LOCALBSE}/include"
+       AC_SUBST(RADIUSLIBS)
++      AC_SUBST(RADIUSINCLUDE)
+     else
+       AC_MSG_WARN([Skipping radius plugin])
+       AC_MSG_WARN([install radius libs to compile this plugin (see REQUIREMENTS).])
+@@ -300,12 +296,13 @@
  dnl Check for LDAP libraries
- _SAVEDLIBS="$LIBS"
--AC_CHECK_LIB(ldap,main,,,-llber)
--if test "$ac_cv_lib_ldap_main" = "yes"; then
--  LDAPLIBS="-lldap -llber"\
--  LDAPINCLUDE="-I/usr/include/ldap"
-+AC_CHECK_LIB(ldap,ldap_simple_bind,,,-L${LOCALBASE}/lib -llber)
-+if test "$ac_cv_lib_ldap_ldap_simple_bind" = "yes"; then
-+  LDAPLIBS="-L${LOCALBASE}/lib -lldap -llber"\
-+  LDAPINCLUDE="-I${LOCALBASE}/include"
-   AC_SUBST(LDAPLIBS)
-   AC_SUBST(LDAPINCLUDE)
-+  LIBS="-L${LOCALBASE}/lib $LIBS"
-   AC_CHECK_FUNCS(ldap_set_option)
-   EXTRAS="$EXTRAS check_ldap"
- 	AC_CHECK_FUNCS(ldap_init ldap_set_option ldap_get_option ldap_start_tls_s)
-@@ -280,6 +285,7 @@
-   AC_MSG_WARN([install LDAP libs to compile this plugin (see REQUIREMENTS).])
- fi
- LIBS="$_SAVEDLIBS"
-+fi
- 
- dnl Check for headers used by check_ide_smart
- AC_CHECK_HEADER(linux/hdreg.h, FOUNDINCLUDE=yes, FOUNDINCLUDE=no)
-@@ -597,22 +603,10 @@
+ AS_IF([test "x$with_ldap" != "xno"], [
+   _SAVEDLIBS="$LIBS"
+-  AC_CHECK_LIB(ldap,main,,,-llber)
+-  if test "$ac_cv_lib_ldap_main" = "yes"; then
+-    LDAPLIBS="-lldap -llber"\
+-    LDAPINCLUDE="-I/usr/include/ldap"
++  AC_CHECK_LIB(ldap,ldap_simple_bind,,,-L${LOCALBASE}/lib -llber)
++  if test "$ac_cv_lib_ldap_ldap_simple_bind" = "yes"; then
++    LDAPLIBS="-L${LOCALBSE}/lib -lldap -llber"
++    LDAPINCLUDE="-I${LOCALBASE}/include"
+     AC_SUBST(LDAPLIBS)
+     AC_SUBST(LDAPINCLUDE)
++    LIBS="-L${LOCALBASE}/lib $LIBS"
+     AC_CHECK_FUNCS(ldap_set_option)
+     EXTRAS="$EXTRAS check_ldap"
+   	AC_CHECK_FUNCS(ldap_init ldap_set_option ldap_get_option ldap_start_tls_s)
+@@ -729,22 +726,10 @@
  dnl 	ac_cv_ps_cols=8
  dnl 	AC_MSG_RESULT([$ac_cv_ps_command])
  
@@ -122,7 +111,7 @@
  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'"
-@@ -620,9 +614,8 @@
+@@ -752,9 +737,8 @@
  	ac_cv_ps_cols=9
  	AC_MSG_RESULT([$ac_cv_ps_command])
  
@@ -134,7 +123,7 @@
  elif ps -axwo 'stat uid pid ppid vsz rss pcpu ucomm command' 2>/dev/null | \
  	egrep -i ["^ *STAT +UID +PID +PPID +VSZ +RSS +%CPU +UCOMM +COMMAND"] > /dev/null
  then
-@@ -632,209 +625,6 @@
+@@ -764,209 +748,6 @@
  	ac_cv_ps_cols=9
  	AC_MSG_RESULT([$ac_cv_ps_command])
  
@@ -344,9 +333,9 @@
  else
  	AC_MSG_WARN([unable to find usable ps syntax - check_procs and check_nagios will not be compiled])
  fi
-@@ -1212,6 +1002,8 @@
- AC_DEFINE_UNQUOTED(WHO_COMMAND,"$ac_cv_path_to_who",
- 	[path and arguments for invoking 'who'])
+@@ -1354,6 +1135,8 @@
+ 	AC_MSG_WARN([Get smbclient from Samba.org to monitor SMB shares])
+ fi
  
 +AC_ARG_ENABLE(snmp,--enable-snmp compile check_hpjd and check_snmp)
 +if test x$enable_snmp = xyes; then
@@ -353,7 +342,7 @@
  AC_PATH_PROG(PATH_TO_SNMPGET,snmpget)
  AC_ARG_WITH(snmpget_command,
              ACX_HELP_STRING([--with-snmpget-command=PATH],
-@@ -1242,7 +1034,10 @@
+@@ -1384,7 +1167,10 @@
  else
  	AC_MSG_WARN([Tried $PERL - install Net::SNMP perl module if you want to use the perl snmp plugins])
  fi
@@ -364,7 +353,7 @@
  AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat)
  AC_PATH_PROG(PATH_TO_QSTAT,qstat)
  AC_ARG_WITH(qstat_command,
-@@ -1267,7 +1062,10 @@
+@@ -1409,7 +1195,10 @@
  	AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$ac_cv_path_to_qstat",
  		[path to qstat/quakestat])
  fi
@@ -373,9 +362,9 @@
 +AC_ARG_ENABLE(fping,--enable-fping compile check_fping)
 +if test x$enable_fping = xyes; then
  AC_PATH_PROG(PATH_TO_FPING,fping)
- AC_ARG_WITH(fping_command,
-             ACX_HELP_STRING([--with-fping-command=PATH],
-@@ -1279,6 +1077,7 @@
+ AC_PATH_PROG(PATH_TO_FPING6,fping6)
+ 
+@@ -1430,6 +1219,7 @@
  else
  	AC_MSG_WARN([Get fping from http://www.fping.com in order to make check_fping plugin])
  fi
@@ -383,7 +372,7 @@
  
  AC_PATH_PROG(PATH_TO_SSH,ssh)
  AC_ARG_WITH(ssh_command,
-@@ -1346,32 +1145,12 @@
+@@ -1497,32 +1287,12 @@
  dnl end if for PATH_TO_SWAP
  fi
  
Index: net-mgmt/nagios-plugins/pkg-plist
===================================================================
--- net-mgmt/nagios-plugins/pkg-plist	(revision 335879)
+++ net-mgmt/nagios-plugins/pkg-plist	(working copy)
@@ -3,6 +3,7 @@
 libexec/nagios/check_by_ssh
 libexec/nagios/check_clamd
 libexec/nagios/check_cluster
+%%SUB_DBI%%libexec/nagios/check_dbi
 libexec/nagios/check_dhcp
 libexec/nagios/check_dig
 libexec/nagios/check_disk
--- ports.nagios-plugin.1.5.update.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



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