Skip site navigation (1)Skip section navigation (2)

ports/139210: [maintainer-update] net-mgmt/nagios: Update to 3.2.0

From:Jarrod Sayers <jarrod@netleader.com.au>
Date:Mon, 28 Sep 2009 20:55:03 +0930 (CST)
Subject:[maintainer-update] net-mgmt/nagios: Update to 3.2.0
Send-pr version:3.113

Number:139210
Category:ports
Synopsis:[maintainer-update] net-mgmt/nagios: Update to 3.2.0
Severity:non-critical
Priority:low
Responsible:miwi@FreeBSD.org
State:open
Class:maintainer-update
Arrival-Date:Mon Sep 28 11:30:01 UTC 2009
Closed-Date:
Last-Modified:Mon Sep 28 12:23:19 UTC 2009
Originator:Jarrod Sayers
Release:FreeBSD 7.2-RELEASE-p2 i386

Organization:
 
Environment:
System: FreeBSD manhattan.netleader.com.au 7.2-RELEASE-p2 FreeBSD 7.2-RELEASE-p2 #17: Sun Jun 28 13:45:03 CST 2009 root@manhattan.netleader.com.au:/usr/obj/usr/src/sys/MANHATTAN i386
 
Description:
Update to Nagios 3.2.0.

Sync port to net-mgmt/nagios-devel, update to 3.2.0 and add PHP_DEPEND knob to
include dependancy with PHP interpreter and Apache web server. Knob defaulted
to off to retain existing expectation of installation, plus remove situations
where alternate interpreter and/or web server installs exist.

Files modified:
- ports/net-mgmt/nagios/Makefile
- ports/net-mgmt/nagios/distinfo
- ports/net-mgmt/nagios/files/patch-configure.in
- ports/net-mgmt/nagios/files/patch-html-Makefile.in
- ports/net-mgmt/nagios/files/patch-html-docs-configcgi.html
- ports/net-mgmt/nagios/files/pkg-message.in
- ports/net-mgmt/nagios/pkg-plist

Files removed:
- ports/net-mgmt/nagios/files/patch-base-utils.c
- ports/net-mgmt/nagios/files/patch-cgi-statuswml.c
 
How-To-Repeat:
 
Fix:
Downloadable diff from:
http://www.netleader.com.au/~jarrod/FreeBSD/net-mgmt-nagios-3.2.0.diff
Download net-mgmt-nagios-3.2.0.diff
diff -ruN ports/net-mgmt/nagios.orig/Makefile ports/net-mgmt/nagios/Makefile
--- ports/net-mgmt/nagios.orig/Makefile  2009-08-22 10:01:59.000000000 +0930
+++ ports/net-mgmt/nagios/Makefile       2009-09-28 20:11:17.000000000 +0930
@@ -6,8 +6,7 @@
 #
 PORTNAME=       nagios
-PORTVERSION=    3.0.6
-PORTREVISION=   3
+PORTVERSION=    3.2.0
 CATEGORIES=     net-mgmt
 MASTER_SITES=   SF/${PORTNAME}/${PORTNAME}-3.x/${PORTNAME}-${PORTVERSION}
@@ -27,7 +26,8 @@
 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 \
-                UNHANDLED_HACK "Display passive checks in unhandled queries" off
+                UNHANDLED_HACK "Display passive checks in unhandled queries" off \
+                PHP_DEPEND "Enable dependancy with PHP interpreter" off
 GNU_CONFIGURE=  yes
@@ -55,11 +55,13 @@
                 --with-cgiurl=${NAGIOSCGIURL} \
                 --sbindir=${PREFIX}/${NAGIOSWWWDIR}/cgi-bin \
                 --libexecdir=${PREFIX}/libexec/nagios \
+                --datarootdir=${PREFIX}/${NAGIOSWWWDIR} \
                 --datadir=${PREFIX}/${NAGIOSWWWDIR} \
                 --sysconfdir=${PREFIX}/etc/nagios \
                 --localstatedir=${NAGIOSDIR} \
                 --with-httpd-conf=${PREFIX}/etc \
-                --with-checkresult-dir=${NAGIOSDIR}/checkresults
+                --with-checkresult-dir=${NAGIOSDIR}/checkresults \
+                --disable-statuswrl
 CONFIGURE_ENV=  CPPFLAGS="${CPPFLAGS}" \
                 CFLAGS="${CFLAGS}" \
@@ -85,10 +87,14 @@
                 pkg-deinstall \
                 pkg-message
-### XXX: Subtle bug with removing PREFIX from here
+# XXX: Don't remove PREFIX from SUB_LIST here.
 SUB_LIST=       PREFIX=${PREFIX} \
                 ${PLIST_SUB}
+.if defined(WITH_PHP_DEPEND)
+USE_PHP=        yes
+.endif
+
 .if defined(WITH_EMBEDDED_PERL)
 USE_PERL5=      5.8.0+
 CONFIGURE_ARGS+=        --enable-embedded-perl \
@@ -110,8 +116,8 @@
 post-patch:
 .if defined(WITH_UNHANDLED_HACK)
-        @${REINPLACE_CMD} -e 's#\&serviceprops=42\&#\&serviceprops=10\&#g' \
-                -e 's#\&hostprops=42\"#\&hostprops=10\"#g' ${WRKSRC}/html/side.html.in
+        @${REINPLACE_CMD} -e 's#;serviceprops=42\&#;serviceprops=10\&#g' \
+                -e 's#;hostprops=42\"#;hostprops=10\"#g' ${WRKSRC}/html/side.php
 .endif
 pre-install:
diff -ruN ports/net-mgmt/nagios.orig/distinfo ports/net-mgmt/nagios/distinfo
--- ports/net-mgmt/nagios.orig/distinfo  2008-12-10 11:01:50.000000000 +1030
+++ ports/net-mgmt/nagios/distinfo       2009-09-28 19:43:30.000000000 +0930
@@ -1,3 +1,3 @@
-MD5 (nagios-3.0.6.tar.gz) = 900e3f4164f4b2a18485420eeaefe812
-SHA256 (nagios-3.0.6.tar.gz) = bedeb2c1ffbf7525ec19ac84a66bad60a19d2b0544cbf050a53bfc363c09bb22
-SIZE (nagios-3.0.6.tar.gz) = 2735504
+MD5 (nagios-3.2.0.tar.gz) = 3566167cc60ddeaad34e7d2e26ed4a58
+SHA256 (nagios-3.2.0.tar.gz) = 7cbf35ba0319f24fa085982c038437c4515003b27863c4897dc86b197a50a5e7
+SIZE (nagios-3.2.0.tar.gz) = 3170967
diff -ruN ports/net-mgmt/nagios.orig/files/patch-base-utils.c ports/net-mgmt/nagios/files/patch-base-utils.c
--- ports/net-mgmt/nagios.orig/files/patch-base-utils.c  2009-05-05 01:06:05.000000000 +0930
+++ ports/net-mgmt/nagios/files/patch-base-utils.c       1970-01-01 09:30:00.000000000 +0930
@@ -1,38 +0,0 @@
---- base/utils.c.orig   2008-12-01 03:52:58.000000000 +1030
-+++ base/utils.c        2009-05-03 11:51:19.000000000 +0930
-@@ -3597,7 +3597,7 @@
- /* initializes embedded perl interpreter */
- int init_embedded_perl(char **env){
- #ifdef EMBEDDEDPERL
--       char *embedding[]={ "", "" };
-+       char **embedding = NULL;
-        int exitstatus=0;
-        char *temp_buffer=NULL;
-        int argc=2;
-@@ -3613,6 +3613,17 @@
-
-        else{
-
-+         embedding = malloc(argc * sizeof(char *));
-+         if (embedding == NULL) {
-+           use_embedded_perl = FALSE;
-+           logit(NSLOG_RUNTIME_ERROR, TRUE, "Error: Unable to allocate memory for embedded Perl interpreter! (see ports/131993)\n");
-+         } else {
-+           embedding[0] = malloc(sizeof(char));
-+           if (embedding[0] == NULL) {
-+             use_embedded_perl = FALSE;
-+             logit(NSLOG_RUNTIME_ERROR, TRUE, "Error: Unable to allocate memory for embedded Perl interpreter! (see ports/131993)\n");
-+           } else {
-+               *embedding[0] = '\0';
-                embedding[1]=p1_file;
-
-                use_embedded_perl=TRUE;
-@@ -3624,6 +3635,8 @@
-                        logit(NSLOG_RUNTIME_ERROR,TRUE,"Error: Could not allocate memory for embedded Perl interpreter!\n");
-                        }
-                }
-+           }
-+         }
-
-        /* a fatal error occurred... */
-        if(use_embedded_perl==FALSE){
diff -ruN ports/net-mgmt/nagios.orig/files/patch-cgi-statuswml.c ports/net-mgmt/nagios/files/patch-cgi-statuswml.c
--- ports/net-mgmt/nagios.orig/files/patch-cgi-statuswml.c       2009-07-14 22:24:20.000000000 +0930
+++ ports/net-mgmt/nagios/files/patch-cgi-statuswml.c    1970-01-01 09:30:00.000000000 +0930
@@ -1,51 +0,0 @@
---- cgi/statuswml.c.orig        2008-12-01 04:43:11.000000000 +1030
-+++ cgi/statuswml.c     2009-07-09 18:35:02.000000000 +0930
-@@ -67,6 +67,8 @@
- void document_header(void);
- void document_footer(void);
- int process_cgivars(void);
-+int validate_arguments(void);
-+int is_valid_hostip(char *hostip);
-
- int display_type=DISPLAY_INDEX;
- int hostgroup_style=DISPLAY_HOSTGROUP_SUMMARY;
-@@ -108,6 +110,13 @@
-
-        document_header();
-
-+       /* validate arguments in URL */
-+       result=validate_arguments();
-+       if(result==ERROR){
-+               document_footer();
-+               return ERROR;
-+               }
-+
-        /* read the CGI configuration file */
-        result=read_cgi_config_file(get_cgi_config_location());
-        if(result==ERROR){
-@@ -334,7 +343,25 @@
-        return error;
-         }
-
-+int validate_arguments(void){
-+       int result=OK;
-+       if((strcmp(ping_address,"")) && !is_valid_hostip(ping_address)) {
-+               printf("<p>Invalid host name/ip</p>\n");
-+               result=ERROR;
-+               }
-+       if(strcmp(traceroute_address,"") && !is_valid_hostip(traceroute_address)){
-+               printf("<p>Invalid host name/ip</p>\n");
-+               result=ERROR;
-+               }
-+       return result;
-+       }
-
-+int is_valid_hostip(char *hostip) {
-+       char *valid_domain_chars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-";
-+       if(strcmp(hostip,"") && strlen(hostip)==strspn(hostip,valid_domain_chars) && hostip[0] != '-' && hostip[strlen(hostip)-1] != '-')
-+               return TRUE;
-+       return FALSE;
-+       }
-
- /* main intro screen */
- void display_index(void){
diff -ruN ports/net-mgmt/nagios.orig/files/patch-configure.in ports/net-mgmt/nagios/files/patch-configure.in
--- ports/net-mgmt/nagios.orig/files/patch-configure.in  2008-09-03 10:00:55.000000000 +0930
+++ ports/net-mgmt/nagios/files/patch-configure.in       2009-09-28 19:52:48.000000000 +0930
@@ -41,18 +41,6 @@
  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)
-@@ -520,9 +528,9 @@
- fi
-
- dnl Try and locate glib
--GLIB_INCLUDE=`pkg-config --cflags glib-2.0`
-+GLIB_INCLUDE=""
- AC_SUBST(GLIB_INCLUDE)
--GLIB_LIBS=`pkg-config --libs glib-2.0`
-+GLIB_LIBS=""
- AC_SUBST(GLIB_LIBS)
- if test x$GLIB_LIBS != x; then
-        AC_DEFINE_UNQUOTED(HAVE_GLIB)
 @@ -667,6 +675,9 @@
         AC_DEFINE_UNQUOTED(EMBEDDEDPERL)
diff -ruN ports/net-mgmt/nagios.orig/files/patch-html-Makefile.in ports/net-mgmt/nagios/files/patch-html-Makefile.in
--- ports/net-mgmt/nagios.orig/files/patch-html-Makefile.in      2008-11-09 06:38:24.000000000 +1030
+++ ports/net-mgmt/nagios/files/patch-html-Makefile.in   2009-09-28 19:53:25.000000000 +0930
@@ -1,6 +1,6 @@
---- html/Makefile.in.orig       2008-11-03 04:02:03.000000000 +1030
-+++ html/Makefile.in    2008-11-05 15:11:08.000000000 +1030
-@@ -33,39 +33,39 @@
+--- html/Makefile.in.orig       2009-06-17 13:27:21.000000000 +0930
++++ html/Makefile.in    2009-07-06 19:27:38.000000000 +0930
+@@ -33,46 +33,46 @@
  devclean: distclean
  install:
@@ -12,6 +12,7 @@
 -       $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/docs/images
 -       $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/images
 -       $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/images/logos
+-       $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/includes
 -       $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/ssi
 -       $(INSTALL) -m 664 $(INSTALL_OPTS) robots.txt $(DESTDIR)$(HTMLDIR)
 -       $(INSTALL) -m 664 $(INSTALL_OPTS) docs/robots.txt $(DESTDIR)$(HTMLDIR)/docs
@@ -23,10 +24,15 @@
 +       $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/docs/images
 +       $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/images
 +       $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/images/logos
++       $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/includes
 +       $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/ssi
 +       $(INSTALL) -m 644 $(INSTALL_OPTS) robots.txt $(DESTDIR)$(HTMLDIR)
 +       $(INSTALL) -m 644 $(INSTALL_OPTS) docs/robots.txt $(DESTDIR)$(HTMLDIR)/docs
-        for file in *.html; \
+ # Remove old HTML files (PHP files are used now)
+        rm -f $(DESTDIR)$(HTMLDIR)/index.html
+        rm -f $(DESTDIR)$(HTMLDIR)/main.html
+        rm -f $(DESTDIR)$(HTMLDIR)/side.html
+        for file in *.php; \
 -       do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR); done
 +       do $(INSTALL) -m 644 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR); done
  #      for file in media/*.wav; \
@@ -59,6 +65,9 @@
         for file in images/logos/*.*; \
 -       do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images/logos; done
 +       do $(INSTALL) -m 644 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images/logos; done
+        for file in includes/*.*; \
+-       do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/includes; done
++       do $(INSTALL) -m 644 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/includes; done
  install-unstripped:
         $(MAKE) install
diff -ruN ports/net-mgmt/nagios.orig/files/patch-html-docs-configcgi.html ports/net-mgmt/nagios/files/patch-html-docs-configcgi.html
--- ports/net-mgmt/nagios.orig/files/patch-html-docs-configcgi.html      2008-11-09 06:38:24.000000000 +1030
+++ ports/net-mgmt/nagios/files/patch-html-docs-configcgi.html   2009-09-28 19:53:44.000000000 +0930
@@ -1,11 +1,11 @@
---- html/docs/configcgi.html.orig       2008-11-08 17:49:55.000000000 +0100
-+++ html/docs/configcgi.html    2008-11-08 17:50:33.000000000 +0100
-@@ -616,7 +616,7 @@
- </tr>
- <tr>
- <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>
- </tr>
- </table>
-
+--- 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
+@@ -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>
+
+ </tr>
+
diff -ruN ports/net-mgmt/nagios.orig/files/pkg-message.in ports/net-mgmt/nagios/files/pkg-message.in
--- ports/net-mgmt/nagios.orig/files/pkg-message.in      2007-12-13 00:27:53.000000000 +1030
+++ ports/net-mgmt/nagios/files/pkg-message.in   2009-09-28 19:55:28.000000000 +0930
@@ -18,6 +18,8 @@
      Order deny,allow
      Deny from all
      Allow from 127.0.0.1
+     php_flag engine on
+     php_admin_value open_basedir %%PREFIX%%/%%NAGIOSWWWDIR%%/ %%NAGIOSDIR%%/
    </Directory>
    <Directory %%PREFIX%%/%%NAGIOSWWWDIR%%/cgi-bin>
diff -ruN ports/net-mgmt/nagios.orig/pkg-plist ports/net-mgmt/nagios/pkg-plist
--- ports/net-mgmt/nagios.orig/pkg-plist 2008-11-09 06:38:24.000000000 +1030
+++ ports/net-mgmt/nagios/pkg-plist      2009-09-28 19:48:13.000000000 +0930
@@ -30,10 +30,10 @@
 %%NAGIOSWWWDIR%%/cgi-bin/status.cgi
 %%NAGIOSWWWDIR%%/cgi-bin/statusmap.cgi
 %%NAGIOSWWWDIR%%/cgi-bin/statuswml.cgi
-%%NAGIOSWWWDIR%%/cgi-bin/statuswrl.cgi
 %%NAGIOSWWWDIR%%/cgi-bin/summary.cgi
 %%NAGIOSWWWDIR%%/cgi-bin/tac.cgi
 %%NAGIOSWWWDIR%%/cgi-bin/trends.cgi
+%%NAGIOSWWWDIR%%/config.inc.php
 %%NAGIOSWWWDIR%%/contexthelp/A1.html
 %%NAGIOSWWWDIR%%/contexthelp/A2.html
 %%NAGIOSWWWDIR%%/contexthelp/A3.html
@@ -192,6 +192,8 @@
 %%NAGIOSWWWDIR%%/docs/images/multiple-templates1.png
 %%NAGIOSWWWDIR%%/docs/images/multiple-templates2.png
 %%NAGIOSWWWDIR%%/docs/images/nagios.jpg
+%%NAGIOSWWWDIR%%/docs/images/nagiosexchange.png
+%%NAGIOSWWWDIR%%/docs/images/nagiossupport.png
 %%NAGIOSWWWDIR%%/docs/images/ndoutils.png
 %%NAGIOSWWWDIR%%/docs/images/network-outage1.png
 %%NAGIOSWWWDIR%%/docs/images/network-outage2.png
@@ -319,7 +321,7 @@
 %%NAGIOSWWWDIR%%/images/redundancy.png
 %%NAGIOSWWWDIR%%/images/restart.gif
 %%NAGIOSWWWDIR%%/images/right.gif
-%%NAGIOSWWWDIR%%/images/sblogo.jpg
+%%NAGIOSWWWDIR%%/images/sblogo.png
 %%NAGIOSWWWDIR%%/images/serviceevent.gif
 %%NAGIOSWWWDIR%%/images/splunk1.gif
 %%NAGIOSWWWDIR%%/images/splunk2.gif
@@ -345,10 +347,11 @@
 %%NAGIOSWWWDIR%%/images/weblogo1.png
 %%NAGIOSWWWDIR%%/images/zoom1.gif
 %%NAGIOSWWWDIR%%/images/zoom2.gif
-%%NAGIOSWWWDIR%%/index.html
-%%NAGIOSWWWDIR%%/main.html
+%%NAGIOSWWWDIR%%/includes/utils.inc.php
+%%NAGIOSWWWDIR%%/index.php
+%%NAGIOSWWWDIR%%/main.php
 %%NAGIOSWWWDIR%%/robots.txt
-%%NAGIOSWWWDIR%%/side.html
+%%NAGIOSWWWDIR%%/side.php
 %%NAGIOSWWWDIR%%/stylesheets/avail.css
 %%NAGIOSWWWDIR%%/stylesheets/checksanity.css
 %%NAGIOSWWWDIR%%/stylesheets/cmd.css
@@ -374,6 +377,7 @@
 @dirrm %%NAGIOSWWWDIR%%/docs
 @dirrm %%NAGIOSWWWDIR%%/images/logos
 @dirrm %%NAGIOSWWWDIR%%/images
+@dirrm %%NAGIOSWWWDIR%%/includes
 @dirrm %%NAGIOSWWWDIR%%/media
 @dirrm %%NAGIOSWWWDIR%%/ssi
 @dirrm %%NAGIOSWWWDIR%%/stylesheets


Release-Note:
 
Audit-Trail:
Responsible Changed
From-To:freebsd-ports-bugs->miwi
By:miwi
When:Mon Sep 28 12:23:19 UTC 2009
Why:I'll take it.

Unformatted:
 
Submit Followup | Raw PR | Find another PR