ports/153616: [maintainer-update] net-mgmt/nagios-devel: Update to 3.2.3 (20101122)

Jarrod Sayers jarrod at downtools.com.au
Sun Jan 2 04:10:12 UTC 2011


>Number:         153616
>Category:       ports
>Synopsis:       [maintainer-update] net-mgmt/nagios-devel: Update to 3.2.3 (20101122)
>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 02 04:10:11 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Jarrod Sayers
>Release:        FreeBSD 8.1-RELEASE-p2 i386
>Organization:
>Environment:
System: FreeBSD burbank.downtools.com.au 8.1-RELEASE-p2 FreeBSD 8.1-RELEASE-p2 #7: Sat Dec 18 19:18:08 CST 2010 root at burbank.downtools.com.au:/usr/obj/usr/src/sys/BURBANK i386
>Description:
Update to the current development snapshot [1] after a sync with the production
port, net-mgmt/nagios.  As the original source filename is not dated or numbered
(though internally referenced as 3.2.3), a local copy has been taken to maintain
port integrity when the snapshot is next updated.  This local copy has simply
been renamed and its MD5 checksum can be computed and matches the one published
by the developer.

[1] http://nagios.sourceforge.net/download/cvs/
>How-To-Repeat:
>Fix:
The diff can be downloaded from:
http://www.downtools.com.au/~jarrod/FreeBSD/net-mgmt-nagios-devel-3.2.3-20101122.diff
  
--- net-mgmt-nagios-devel-3.2.3-20101122.diff begins here ---
diff -ruN ports/net-mgmt/nagios-devel.orig/Makefile ports/net-mgmt/nagios-devel/Makefile
--- ports/net-mgmt/nagios-devel.orig/Makefile	2010-12-31 04:16:30.000000000 +1030
+++ ports/net-mgmt/nagios-devel/Makefile	2011-01-02 13:53:03.000000000 +1030
@@ -6,15 +6,18 @@
 #
 
 PORTNAME=	nagios
-PORTVERSION=	3.1.2
-PORTREVISION=	3
-CATEGORIES=	net-mgmt
-MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}-3.x/${PORTNAME}-${PORTVERSION}
+PORTVERSION=	3.2.3
 PKGNAMESUFFIX=	-devel
+DISTVERSION=	20101122
+DISTVERSIONPREFIX=	HEAD-
+CATEGORIES=	net-mgmt
+MASTER_SITES=	http://www.downtools.com.au/~jarrod/nagios/
 
 MAINTAINER=	jarrod at downtools.com.au
 COMMENT=	Extremely powerful network monitoring system
 
+MASTER_SITE_FREEBSD=	yes
+
 LIB_DEPENDS=	gd.4:${PORTSDIR}/graphics/gd
 RUN_DEPENDS=	${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net-mgmt/nagios-plugins
 
@@ -22,12 +25,13 @@
 
 USE_ICONV=	yes
 USE_PERL5_BUILD=	yes
-USE_PHP=	yes
 USE_AUTOTOOLS=	autoconf libltdl
 USE_RC_SUBR=	nagios.sh
 
 CONFLICTS=	nagios-[123].*
 
+WRKSRC=		${WRKDIR}/${PORTNAME}-${DISTVERSIONPREFIX:C/-$//}
+
 OPTIONS=	EMBEDDED_PERL "Enable embedded Perl [requires Perl 5.8.0+]" off \
 		NANOSLEEP "Use nanosleep in event timing" off \
 		EVENT_BROKER "Enable event broker functionality" off \
@@ -95,6 +99,8 @@
 SUB_LIST=	PREFIX=${PREFIX} \
 		${PLIST_SUB}
 
+USE_PHP=	yes
+
 .if defined(WITH_EMBEDDED_PERL)
 USE_PERL5=	5.8.0+
 CONFIGURE_ARGS+=	--enable-embedded-perl \
@@ -120,7 +126,7 @@
 		-e 's#;hostprops=42\"#;hostprops=10\"#g' ${WRKSRC}/html/side.php
 .endif
 
-pre-install:
+pre-su-install:
 	@${SH} ${PKGINSTALL} ${DISTNAME} PRE-INSTALL
 
 post-install:
diff -ruN ports/net-mgmt/nagios-devel.orig/distinfo ports/net-mgmt/nagios-devel/distinfo
--- ports/net-mgmt/nagios-devel.orig/distinfo	2010-12-31 04:16:30.000000000 +1030
+++ ports/net-mgmt/nagios-devel/distinfo	2011-01-02 13:11:02.000000000 +1030
@@ -1,2 +1,2 @@
-SHA256 (nagios-3.1.2.tar.gz) = 216800ea2ad1f8b1adccc2dccfa6bbdf63223ffe5109d18bea71ffb9a126b846
-SIZE (nagios-3.1.2.tar.gz) = 3172982
+SHA256 (nagios-HEAD-20101122.tar.gz) = 49dc5911c1cf1bcf8d527744b31c9ef04d38cc025788fcaae6dd4bb6f7dbda53
+SIZE (nagios-HEAD-20101122.tar.gz) = 3300415
diff -ruN ports/net-mgmt/nagios-devel.orig/files/nagios.sh.in ports/net-mgmt/nagios-devel/files/nagios.sh.in
--- ports/net-mgmt/nagios-devel.orig/files/nagios.sh.in	2010-03-27 10:44:22.000000000 +1030
+++ ports/net-mgmt/nagios-devel/files/nagios.sh.in	2011-01-02 13:11:02.000000000 +1030
@@ -12,6 +12,8 @@
 # Add the following lines to /etc/rc.conf to enable nagios:
 # nagios_enable (bool):    Set to "NO" by default.
 #                          Set it to "YES" to enable nagios.
+# nagios_precache (bool):  Set to "NO" by default.
+#                          Set it to "YES" to enable pre-caching.
 # nagios_flags (str):      Set to "" by default.
 # nagios_configfile (str): Set to "%%PREFIX%%/etc/nagios/nagios.cfg" by default.
 #
@@ -30,17 +32,35 @@
 start_precmd="start_precmd"
 stop_postcmd="stop_postcmd"
 restart_precmd="nagios_checkconfig"
-reload_precmd="nagios_checkconfig"
+reload_precmd="reload_precmd"
 sig_reload=HUP
 
 [ -z "${nagios_enable}" ] && nagios_enable="NO"
 [ -z "${nagios_configfile}" ] && nagios_configfile="%%PREFIX%%/etc/nagios/nagios.cfg"
+[ -z "${nagios_precache}" ] && nagios_precache="NO"
 
 load_rc_config "${name}"
 
 required_files="${nagios_configfile}"
 command_args="${command_args} ${nagios_configfile}"
 
+nagios_cacheconfig() {
+  if ! checkyesno nagios_precache; then
+    return 0
+  fi
+
+  echo -n "Pre-Caching nagios configuration: "
+  ${command} -pv ${nagios_configfile} 2>&1 >/dev/null
+  if [ $? != 0 ]; then
+    echo "FAILED"
+    ${command} -v ${nagios_configfile}
+    return 1
+  else
+    command_args="-u -x ${command_args}"
+    echo "OK"
+  fi
+}
+
 nagios_checkconfig() {
   echo -n "Performing sanity check of nagios configuration: "
   ${command} -v ${nagios_configfile} 2>&1 >/dev/null
@@ -53,11 +73,25 @@
   fi
 }
 
+reload_precmd() {
+  if ! nagios_checkconfig; then
+    return 1
+  fi
+
+  if ! nagios_cacheconfig; then
+    return 1
+  fi
+}
+
 start_precmd() {
   if ! nagios_checkconfig; then
     return 1
   fi
 
+  if ! nagios_cacheconfig; then
+    return 1
+  fi
+
   su -m "${nagios_user}" -c "touch \"%%NAGIOSDIR%%/nagios.log\" \"%%NAGIOSDIR%%/status.sav\""
   rm -f "%%NAGIOSDIR%%/rw/nagios.cmd"
 }
diff -ruN ports/net-mgmt/nagios-devel.orig/files/patch-configure.in ports/net-mgmt/nagios-devel/files/patch-configure.in
--- ports/net-mgmt/nagios-devel.orig/files/patch-configure.in	2009-07-14 00:18:38.000000000 +0930
+++ ports/net-mgmt/nagios-devel/files/patch-configure.in	2011-01-02 13:11:02.000000000 +1030
@@ -1,14 +1,14 @@
---- configure.in.orig	2007-12-18 04:21:51.000000000 +1030
-+++ configure.in	2008-01-02 12:15:05.000000000 +1030
+--- configure.in.orig	2010-10-23 20:26:29.000000000 +1030
++++ configure.in	2011-01-01 11:28:35.000000000 +1030
 @@ -6,7 +6,6 @@
  
  AC_INIT(base/nagios.c)
- AC_CONFIG_HEADER(include/config.h include/snprintf.h include/cgiutils.h)
+ AC_CONFIG_HEADER(include/config.h include/snprintf.h)
 -AC_PREFIX_DEFAULT(/usr/local/nagios)
  
  PKG_NAME=nagios
- PKG_VERSION="3.0rc1"
-@@ -119,7 +118,15 @@
+ PKG_VERSION="3.2.3"
+@@ -125,7 +124,15 @@
  dnl Test for pthreads support - taken from ICU FreeBSD Port configure script
  THREADLIBS=""
  have_pthreads="no"
@@ -23,8 +23,8 @@
 +else
  dnl FreeBSD: Try ports/linuxthreads first - Mammad Zadeh <mammad at yahoo-inc.com>
  dnl FreeBSD -pthread check - Jonathan McDowell <noodles at earth.li>
- AC_DEFUN(AC_PTHREAD_FREEBSD,[
-@@ -180,6 +187,7 @@
+ AC_DEFUN([AC_PTHREAD_FREEBSD],[
+@@ -186,6 +193,7 @@
  if test $have_pthreads = "no"; then
  	AC_PTHREAD_FREEBSD
  fi
@@ -32,18 +32,18 @@
  
  AC_SUBST(THREADLIBS)
  
-@@ -196,7 +204,7 @@
+@@ -201,7 +209,7 @@
  AC_SUBST(nagios_grp)
- AC_DEFINE_UNQUOTED(DEFAULT_NAGIOS_USER,"$nagios_user")
- AC_DEFINE_UNQUOTED(DEFAULT_NAGIOS_GROUP,"$nagios_grp")
+ AC_DEFINE_UNQUOTED(DEFAULT_NAGIOS_USER,"$nagios_user",[user name to run nagios])
+ AC_DEFINE_UNQUOTED(DEFAULT_NAGIOS_GROUP,"$nagios_grp",[group name to run nagios])
 -INSTALL_OPTS="-o $nagios_user -g $nagios_grp"
 +INSTALL_OPTS="-o root -g wheel"
  AC_SUBST(INSTALL_OPTS)
  
- AC_ARG_WITH(command_user,--with-command-user=<user> sets user name for command access,command_user=$withval,command_user=$nagios_user)
-@@ -667,6 +675,9 @@
+ AC_ARG_WITH(command_user,AC_HELP_STRING([--with-command-user=<user>],[sets user name for command access]),command_user=$withval,command_user=$nagios_user)
+@@ -668,6 +676,9 @@
  
- 	AC_DEFINE_UNQUOTED(EMBEDDEDPERL)
+ 	AC_DEFINE_UNQUOTED(EMBEDDEDPERL,,[Is embedded Perl being compiled in?])
  	PERLLIBS="`perl -MExtUtils::Embed -e ldopts`" 
 +	if test x$have_thr = xyes; then
 +		PERLLIBS="`echo $PERLLIBS | sed 's#pthread #lthr #'`"
diff -ruN ports/net-mgmt/nagios-devel.orig/files/patch-contrib__Makefile.in ports/net-mgmt/nagios-devel/files/patch-contrib__Makefile.in
--- ports/net-mgmt/nagios-devel.orig/files/patch-contrib__Makefile.in	2007-08-31 00:24:59.000000000 +0930
+++ ports/net-mgmt/nagios-devel/files/patch-contrib__Makefile.in	2011-01-02 13:11:02.000000000 +1030
@@ -1,5 +1,5 @@
 --- contrib/Makefile.in.orig	Tue Nov 15 12:19:36 2005
-+++ contrib/Makefile.in	Fri Jul 20 13:35:47 2007
++++ contrib/Makefile.in	Wed Dec 28 17:49:25 2005
 @@ -46,10 +46,10 @@
  devclean: distclean
  
diff -ruN ports/net-mgmt/nagios-devel.orig/files/patch-html__docs__configcgi.html ports/net-mgmt/nagios-devel/files/patch-html__docs__configcgi.html
--- ports/net-mgmt/nagios-devel.orig/files/patch-html__docs__configcgi.html	2009-07-14 00:18:38.000000000 +0930
+++ ports/net-mgmt/nagios-devel/files/patch-html__docs__configcgi.html	2011-01-02 13:11:02.000000000 +1030
@@ -1,11 +1,11 @@
---- html/docs/configcgi.html.orig	2009-06-18 00:43:52.000000000 +0930
-+++ html/docs/configcgi.html	2009-07-06 19:33:10.000000000 +0930
+--- html/docs/configcgi.html.orig	2009-06-17 17:13:52.000000000 +0200
++++ html/docs/configcgi.html	2009-11-27 23:16:02.000000000 +0100
 @@ -1250,7 +1250,7 @@
  
  <td valign=top>Example:</td>
  
 -<td><font color="red"><strong>ping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$</strong></font></td>
-+<td><font color="red"><strong>ping_syntax=/sbin/ping -n -c 5 $HOSTADDRESS$</strong></font></td>
++<td><font color="red"><strong>ping_syntax=/sbin/ping -n -U -c 5 $HOSTADDRESS$</strong></font></td>
  
  </tr>
  
diff -ruN ports/net-mgmt/nagios-devel.orig/files/patch-sample-config__nagios.cfg.in ports/net-mgmt/nagios-devel/files/patch-sample-config__nagios.cfg.in
--- ports/net-mgmt/nagios-devel.orig/files/patch-sample-config__nagios.cfg.in	2007-08-31 00:24:59.000000000 +0930
+++ ports/net-mgmt/nagios-devel/files/patch-sample-config__nagios.cfg.in	2011-01-02 13:11:02.000000000 +1030
@@ -1,5 +1,5 @@
---- sample-config/nagios.cfg.in.orig	Tue Jun 19 02:26:33 2007
-+++ sample-config/nagios.cfg.in	Fri Jul 20 13:45:09 2007
+--- sample-config/nagios.cfg.in.orig	2008-11-03 05:21:30.000000000 +1030
++++ sample-config/nagios.cfg.in	2008-11-05 15:17:25.000000000 +1030
 @@ -32,7 +32,7 @@
  cfg_file=@sysconfdir@/objects/timeperiods.cfg
  cfg_file=@sysconfdir@/objects/templates.cfg
diff -ruN ports/net-mgmt/nagios-devel.orig/files/pkg-message.in ports/net-mgmt/nagios-devel/files/pkg-message.in
--- ports/net-mgmt/nagios-devel.orig/files/pkg-message.in	2009-02-26 10:27:03.000000000 +1030
+++ ports/net-mgmt/nagios-devel/files/pkg-message.in	2011-01-02 13:11:02.000000000 +1030
@@ -19,7 +19,7 @@
      Deny from all
      Allow from 127.0.0.1
      php_flag engine on
-     php_admin_value open_basedir %%PREFIX%%/%%NAGIOSWWWDIR%%/ %%NAGIOSDIR%%/
+     php_admin_value open_basedir %%PREFIX%%/%%NAGIOSWWWDIR%%/:%%NAGIOSDIR%%/
    </Directory>
 
    <Directory %%PREFIX%%/%%NAGIOSWWWDIR%%/cgi-bin>
diff -ruN ports/net-mgmt/nagios-devel.orig/pkg-plist ports/net-mgmt/nagios-devel/pkg-plist
--- ports/net-mgmt/nagios-devel.orig/pkg-plist	2009-07-14 00:18:38.000000000 +0930
+++ ports/net-mgmt/nagios-devel/pkg-plist	2011-01-02 13:11:02.000000000 +1030
@@ -128,6 +128,7 @@
 %%NAGIOSWWWDIR%%/docs/freshness.html
 %%NAGIOSWWWDIR%%/docs/funstuff.html
 %%NAGIOSWWWDIR%%/docs/hostchecks.html
+%%NAGIOSWWWDIR%%/docs/knownissues.html
 %%NAGIOSWWWDIR%%/docs/images/activechecks.png
 %%NAGIOSWWWDIR%%/docs/images/cachedcheckgraphs.png
 %%NAGIOSWWWDIR%%/docs/images/cachedchecks.png
@@ -323,6 +324,7 @@
 %%NAGIOSWWWDIR%%/images/right.gif
 %%NAGIOSWWWDIR%%/images/sblogo.png
 %%NAGIOSWWWDIR%%/images/serviceevent.gif
+%%NAGIOSWWWDIR%%/images/sflogo.png
 %%NAGIOSWWWDIR%%/images/splunk1.gif
 %%NAGIOSWWWDIR%%/images/splunk2.gif
 %%NAGIOSWWWDIR%%/images/start.gif
--- net-mgmt-nagios-devel-3.2.3-20101122.diff ends here ---


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



More information about the freebsd-ports-bugs mailing list