From blaz@titanic.medinet.si  Sun Jan 30 13:01:49 2005
Return-Path: <blaz@titanic.medinet.si>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A6A2A16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 30 Jan 2005 13:01:49 +0000 (GMT)
Received: from titanic.medinet.si (titanic.medinet.si [212.18.42.5])
	by mx1.FreeBSD.org (Postfix) with ESMTP id C204B43D39
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 30 Jan 2005 13:01:48 +0000 (GMT)
	(envelope-from blaz@titanic.medinet.si)
Received: by titanic.medinet.si (Postfix, from userid 1000)
	id 3DF2455482; Sun, 30 Jan 2005 14:01:47 +0100 (CET)
Message-Id: <20050130130147.3DF2455482@titanic.medinet.si>
Date: Sun, 30 Jan 2005 14:01:47 +0100 (CET)
From: Blaz Zupan <blaz@si.FreeBSD.org>
Reply-To: Blaz Zupan <blaz@si.FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: MAINTAINER UPDATE: net-mgmt/nagios-plugins to 1.4.0.beta1 
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>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:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 30 13:10:12 GMT 2005
>Closed-Date:    Fri Feb 11 21:24:57 GMT 2005
>Last-Modified:  Fri Feb 11 21:24:57 GMT 2005
>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:

From: Sergey Matveychuk <sem@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org, blaz@si.FreeBSD.org
Cc:  
Subject: Re: ports/76854: MAINTAINER UPDATE: net-mgmt/nagios-plugins to 1.4.0.beta1
Date: Sun, 30 Jan 2005 19:50:11 +0300

 Extra files left after deinstall:
 lib/charset.alias
 share/nagios/locale/locale.alias
 
 -- 
 Sem.

From: Blaz Zupan <blaz@si.FreeBSD.org>
To: Sergey Matveychuk <sem@FreeBSD.org>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: ports/76854: MAINTAINER UPDATE: net-mgmt/nagios-plugins to
 1.4.0.beta1
Date: Sun, 30 Jan 2005 18:29:31 +0100 (CET)

 > Extra files left after deinstall:
 > lib/charset.alias
 > share/nagios/locale/locale.alias
 
 Huh? Those files don't even exist on my box after installation of 
 nagios-plugins, how could they exist after deinstalation?

From: Sergey Matveychuk <sem@FreeBSD.org>
To: Blaz Zupan <blaz@si.FreeBSD.org>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: ports/76854: MAINTAINER UPDATE: net-mgmt/nagios-plugins to 1.4.0.beta1
Date: Sun, 30 Jan 2005 21:09:24 +0300

 Blaz Zupan wrote:
 
 >> Extra files left after deinstall:
 >> lib/charset.alias
 >> share/nagios/locale/locale.alias
 > 
 > 
 > Huh? Those files don't even exist on my box after installation of 
 > nagios-plugins, how could they exist after deinstalation?
 
 ok. i'll try again.
 
 -- 
 Sem.

From: Sergey Matveychuk <sem@FreeBSD.org>
To: Blaz Zupan <blaz@si.FreeBSD.org>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: ports/76854: MAINTAINER UPDATE: net-mgmt/nagios-plugins to 1.4.0.beta1
Date: Sun, 30 Jan 2005 21:12:45 +0300

 Blaz Zupan wrote:
 
 >> Extra files left after deinstall:
 >> lib/charset.alias
 >> share/nagios/locale/locale.alias
 > 
 > 
 > Huh? Those files don't even exist on my box after installation of 
 > nagios-plugins, how could they exist after deinstalation?
 
 I've repeated. The same thing. I've tested on 5.3 box.
 
 -- 
 Sem.

From: Blaz Zupan <blaz@si.FreeBSD.org>
To: Sergey Matveychuk <sem@FreeBSD.org>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: ports/76854: MAINTAINER UPDATE: net-mgmt/nagios-plugins to
 1.4.0.beta1
Date: Sun, 30 Jan 2005 20:20:54 +0100 (CET)

 > I've repeated. The same thing. I've tested on 5.3 box.
 
 I have just retried on a 5.3 box and still can not reproduce it. The only 
 possible difference is that I'm using the 4.11 ports and not current, but I 
 don't see any relevant changes in /usr/ports/Mk that could cause something 
 like this. Is there anything special about your environment?

From: Blaz Zupan <blaz@si.FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/76854: MAINTAINER UPDATE: net-mgmt/nagios-plugins to
 1.4.0.beta1
Date: Fri, 4 Feb 2005 12:55:35 +0100 (CET)

 nagios-plugins 1.4 has been released. Here is an updated patch that upgrades 
 the port to 1.4.
 
 diff -urN nagios-plugins.old/Makefile nagios-plugins/Makefile
 --- nagios-plugins.old/Makefile	Mon Jan 31 01:35:51 2005
 +++ nagios-plugins/Makefile	Fri Feb  4 12:53:21 2005
 @@ -2,16 +2,15 @@
   # Date created:				14 Jul 2002
   # Whom:					Blaz Zupan <blaz@si.FreeBSD.org>
   #
 -# $FreeBSD: ports/net-mgmt/nagios-plugins/Makefile,v 1.39 2005/01/31 00:35:51 girgen Exp $
 +# $FreeBSD: ports/net-mgmt/nagios-plugins/Makefile,v 1.38 2004/12/26 18:31:43 krion Exp $
   #
 
   PORTNAME=	nagios-plugins
 -PORTVERSION=	1.4.0.a3
 -PORTREVISION=	1
 +PORTVERSION=	1.4
 +PORTEPOCH=	1
   CATEGORIES=	net-mgmt
   MASTER_SITES=	${MASTER_SITE_SOURCEFORGE_EXTENDED}
   MASTER_SITE_SUBDIR=	nagiosplug
 -DISTNAME=	nagios-plugins-1.4.0-alpha3
 
   MAINTAINER=	blaz@si.FreeBSD.org
   COMMENT=	Plugins for nagios
 @@ -101,6 +100,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	Fri Feb  4 09:36:08 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.tar.gz) = 9b21b92acc4b2b0dbb2d12bca6b27582
 +SIZE (nagios-plugins-1.4.tar.gz) = 972810
 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])
State-Changed-From-To: open->closed 
State-Changed-By: sem 
State-Changed-When: Fri Feb 11 21:24:50 GMT 2005 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=76854 
>Unformatted:
