Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Jan 2005 14:01:47 +0100 (CET)
From:      Blaz Zupan <blaz@si.FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/76854: MAINTAINER UPDATE: net-mgmt/nagios-plugins to 1.4.0.beta1 
Message-ID:  <20050130130147.3DF2455482@titanic.medinet.si>
Resent-Message-ID: <200501301310.j0UDACNB073081@freefall.freebsd.org>

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

>Number:         76854
>Category:       ports
>Synopsis:       MAINTAINER UPDATE: net-mgmt/nagios-plugins to 1.4.0.beta1
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 30 13:10:12 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Blaz Zupan
>Release:        FreeBSD 4.10-RELEASE i386
>Organization:
>Environment:
System: FreeBSD titanic.medinet.si 4.10-RELEASE FreeBSD 4.10-RELEASE #1: Sun Jun 27 16:39:26 CEST 2004 root@bigbrother.amis.net:/usr/obj/usr/src/sys/TITANIC i386


	
>Description:

Upgrade port to 1.4.0.beta1.
Some of the plugins (most specifically check_ping) won't work with
some locales (for example de_DE.ISO8859-1), because the locale changes
the behaviour of scanf(). Temporary fix by hardcoding LC_NUMERIC to
"C" in all plugins which use scanf().

>How-To-Repeat:
	
>Fix:

diff -urN nagios-plugins.old/Makefile nagios-plugins/Makefile
--- nagios-plugins.old/Makefile	Sun Dec 26 19:31:43 2004
+++ nagios-plugins/Makefile	Sun Jan 30 13:58:50 2005
@@ -6,12 +6,11 @@
 #
 
 PORTNAME=	nagios-plugins
-PORTVERSION=	1.4.0.a3
-PORTREVISION=	1
+PORTVERSION=	1.4.0.b1
 CATEGORIES=	net-mgmt
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE_EXTENDED}
 MASTER_SITE_SUBDIR=	nagiosplug
-DISTNAME=	nagios-plugins-1.4.0-alpha3
+DISTNAME=	nagios-plugins-1.4-beta1
 
 MAINTAINER=	blaz@si.FreeBSD.org
 COMMENT=	Plugins for nagios
@@ -102,6 +101,15 @@
 USE_AUTOCONF_VER=	259
 USE_GMAKE=	yes
 USE_PERL5=	yes
+USE_REINPLACE=	yes
+
+post-patch:
+.for file in check_by_ssh.c check_disk.c check_http.c check_load.c \
+	check_mrtgtraf.c check_nagios.c check_pgsql.c check_ping.c \
+	check_procs.c check_snmp.c check_ssh.c check_swap.c check_time.c \
+	check_users.c utils.c
+	@${REINPLACE_CMD} -e 's|setlocale (LC_ALL, "");|setlocale (LC_ALL, ""); setlocale(LC_NUMERIC, "C");|g' ${WRKSRC}/plugins/${file}
+.endfor
 
 pre-configure:
 	@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOMAKE_ENV} ${ACLOCAL} \
diff -urN nagios-plugins.old/distinfo nagios-plugins/distinfo
--- nagios-plugins.old/distinfo	Wed Dec 22 09:50:07 2004
+++ nagios-plugins/distinfo	Sun Jan 30 13:12:37 2005
@@ -1,2 +1,2 @@
-MD5 (nagios-plugins-1.4.0-alpha3.tar.gz) = 5e5eddaafc9a94164fcd71a5922bbcd3
-SIZE (nagios-plugins-1.4.0-alpha3.tar.gz) = 911373
+MD5 (nagios-plugins-1.4-beta1.tar.gz) = 5364baf80b580d2e4fb2da524ffe390c
+SIZE (nagios-plugins-1.4-beta1.tar.gz) = 942359
diff -urN nagios-plugins.old/files/patch-check_nagios.c nagios-plugins/files/patch-check_nagios.c
--- nagios-plugins.old/files/patch-check_nagios.c	Sat Dec  4 18:23:31 2004
+++ nagios-plugins/files/patch-check_nagios.c	Thu Jan  1 01:00:00 1970
@@ -1,11 +0,0 @@
---- plugins/check_nagios.c.orig	Thu Mar 11 16:17:08 2004
-+++ plugins/check_nagios.c	Fri Dec  3 22:28:53 2004
-@@ -132,7 +132,7 @@
-                         }
- 
- 			/* May get empty procargs */
--			if (!strstr(procargs, argv[0]) && strstr(procprog, process_string) && strcmp(procargs,"")) {
-+			if (!strstr(procargs, argv[0]) && strcmp(procargs,"") && strstr(procargs, process_string)) {
- 				proc_entries++;
- 				if (verbose >= 2) {
- 					printf (_("Found process: %s %s\n"), procprog, procargs);
diff -urN nagios-plugins.old/files/patch-configure.in nagios-plugins/files/patch-configure.in
--- nagios-plugins.old/files/patch-configure.in	Wed Dec 22 09:50:07 2004
+++ nagios-plugins/files/patch-configure.in	Sun Jan 30 13:16:54 2005
@@ -1,5 +1,5 @@
---- configure.in.orig	Wed Dec 15 21:54:37 2004
-+++ configure.in	Fri Dec 17 12:31:43 2004
+--- configure.in.orig	Thu Dec 30 15:19:37 2004
++++ configure.in	Sun Jan 30 13:16:43 2005
 @@ -10,7 +10,7 @@
  RELEASE=1
  AC_SUBST(RELEASE)
@@ -68,15 +68,16 @@
  
  
  dnl Check for mysql libraries
-@@ -644,221 +651,11 @@
+@@ -581,234 +588,11 @@
  
  AC_PATH_PROG(PATH_TO_PS,ps)
  
 -AC_MSG_CHECKING(for ps syntax)
 -dnl For OpenBSD 3.2 & 3.3. Must come before ps -weo
+-dnl Should also work for FreeBSD 5.2.1 and 5.3
 -dnl  STAT UCOMM              VSZ   RSS USER      PPID COMMAND
 -if ps -axwo 'stat comm vsz rss user uid ppid args' 2>/dev/null | \
--	egrep -i ["^ *STAT +UCOMM +VSZ +RSS +USER +UID +PPID +COMMAND"] > /dev/null
+-	egrep -i ["^ *STAT +[UCOMAND]+ +VSZ +RSS +USER +UID +PPID +COMMAND"] > /dev/null
 -then
 -	ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
 -	ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid ppid vsz rss pcpu comm args'"
@@ -84,6 +85,18 @@
 -	ac_cv_ps_cols=8
 -	AC_MSG_RESULT([$ac_cv_ps_command])
 -
+-dnl Some *BSDs have different format for ps. This is mainly to catch FreeBSD 4. 
+-dnl Limitation: Only first 16 chars returned for ucomm field
+-dnl Must come before ps -weo
+-elif ps -axwo 'stat uid ppid vsz rss pcpu ucomm command' 2>/dev/null | \
+-	egrep -i ["^ *STAT +UID +PPID +VSZ +RSS +%CPU +UCOMM +COMMAND"] > /dev/null
+-then
+-	ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
+-	ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid ppid vsz rss pcpu ucomm command'"
+-	ac_cv_ps_format="%s %d %d %d %d %f %s %n"
+-	ac_cv_ps_cols=8
+-	AC_MSG_RESULT([$ac_cv_ps_command])
+-
 -dnl  STAT UCOMM              VSZ   RSS USER       UID  PPID COMMAND
 -elif ps -weo 'stat comm vsz rss user uid ppid etime args' 2>/dev/null | \
 -	egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[ELAPSD]+ +[RGSCOMDNA]+"] >/dev/null
@@ -295,7 +308,7 @@
  
  if test -n "$ac_cv_ps_varlist" ; then
  	AC_DEFINE_UNQUOTED(PS_VARLIST,$ac_cv_ps_varlist,
-@@ -1211,6 +1008,8 @@
+@@ -1161,6 +945,8 @@
  AC_DEFINE_UNQUOTED(WHO_COMMAND,"$ac_cv_path_to_who",
  	[path and arguments for invoking 'who'])
  
@@ -304,7 +317,7 @@
  AC_PATH_PROG(PATH_TO_SNMPGET,snmpget)
  if test -x "$PATH_TO_SNMPGET"
  then
-@@ -1233,7 +1032,10 @@
+@@ -1183,7 +969,10 @@
  else
  	AC_MSG_WARN([Tried $PERL - install Net::SNMP perl module if you want to use the perl snmp plugins])
  fi
@@ -315,7 +328,7 @@
  AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat)
  AC_PATH_PROG(PATH_TO_QSTAT,qstat)
  
-@@ -1255,7 +1057,10 @@
+@@ -1205,7 +994,10 @@
  	AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$ac_cv_path_to_qstat",
  		[path to qstat/quakestat])
  fi
@@ -326,7 +339,7 @@
  AC_PATH_PROG(PATH_TO_FPING,fping)
  if test -x "$PATH_TO_FPING"
  then
-@@ -1263,6 +1068,7 @@
+@@ -1213,6 +1005,7 @@
  	EXTRAS="$EXTRAS check_fping"
  else
  	AC_MSG_WARN([Get fping from http://www.fping.com in order to make check_fping plugin])
>Release-Note:
>Audit-Trail:
>Unformatted:



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