diff options
author | mat <mat@FreeBSD.org> | 2014-05-07 20:56:30 +0800 |
---|---|---|
committer | mat <mat@FreeBSD.org> | 2014-05-07 20:56:30 +0800 |
commit | 9fb94267bb70be44ed986e6a7a22f19eaf8a3323 (patch) | |
tree | b3db1df9586af9b37fd4fc421444c8b9f9e23087 /net-mgmt | |
parent | 94b2fe6a1c35e5d7d9a1ab652e4624556623364c (diff) | |
download | freebsd-ports-gnome-9fb94267bb70be44ed986e6a7a22f19eaf8a3323.tar.gz freebsd-ports-gnome-9fb94267bb70be44ed986e6a7a22f19eaf8a3323.tar.zst freebsd-ports-gnome-9fb94267bb70be44ed986e6a7a22f19eaf8a3323.zip |
Update to 4.0.6
Pet portlint and rclint, cleanup SUB_LIST/PLIST_SUB.
Changelog: http://www.nagios.org/projects/nagioscore/history/nagios-4-version-history
Sponsored by: Absolight
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/nagios4/Makefile | 18 | ||||
-rw-r--r-- | net-mgmt/nagios4/distinfo | 4 | ||||
-rw-r--r-- | net-mgmt/nagios4/files/nagios.in | 50 | ||||
-rw-r--r-- | net-mgmt/nagios4/files/patch-configure.in | 6 | ||||
-rw-r--r-- | net-mgmt/nagios4/files/patch-html__Makefile.in | 10 | ||||
-rw-r--r-- | net-mgmt/nagios4/files/patch-html__main.php | 53 | ||||
-rw-r--r-- | net-mgmt/nagios4/files/pkg-message.in | 14 | ||||
-rw-r--r-- | net-mgmt/nagios4/pkg-plist | 37 |
8 files changed, 96 insertions, 96 deletions
diff --git a/net-mgmt/nagios4/Makefile b/net-mgmt/nagios4/Makefile index 6a53776d62c2..ebf1e0d2fd03 100644 --- a/net-mgmt/nagios4/Makefile +++ b/net-mgmt/nagios4/Makefile @@ -2,10 +2,10 @@ # $FreeBSD$ PORTNAME= nagios -PORTVERSION= 4.0.5 -PKGNAMESUFFIX= 4 +PORTVERSION= 4.0.6 CATEGORIES= net-mgmt MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-4.x/${PORTNAME}-${PORTVERSION} +PKGNAMESUFFIX= 4 MAINTAINER= mat@FreeBSD.org COMMENT= Powerful network monitoring system @@ -20,7 +20,7 @@ USE_AUTOTOOLS= autoconf libltdl USE_PHP= xml USE_RC_SUBR= nagios -CONFLICTS= nagios-[12].* nagios-devel-* +CONFLICTS= nagios-[123].* nagios-devel-* GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-command-user=${NAGIOSUSER} \ @@ -50,16 +50,16 @@ PLIST_SUB= NAGIOSDIR=${NAGIOSDIR} \ NAGIOSWWWDIR=${NAGIOSWWWDIR} \ NAGIOSUSER=${NAGIOSUSER} \ NAGIOSGROUP=${NAGIOSGROUP} \ - NAGIOSHTMURL=${NAGIOSHTMURL} \ - NAGIOSCGIURL=${NAGIOSCGIURL} \ WWWGRP=${WWWGRP} +SUB_LIST= NAGIOSDIR=${NAGIOSDIR} \ + NAGIOSWWWDIR=${PREFIX}/${NAGIOSWWWDIR} \ + NAGIOSUSER=${NAGIOSUSER} \ + NAGIOSGROUP=${NAGIOSGROUP} \ + NAGIOSHTMURL=${NAGIOSHTMURL} \ + NAGIOSCGIURL=${NAGIOSCGIURL} SUB_FILES= pkg-message -# XXX: Don't remove PREFIX from SUB_LIST here. -SUB_LIST= PREFIX=${PREFIX} \ - ${PLIST_SUB} - NAGIOSUSER?= nagios NAGIOSGROUP?= nagios NAGIOSDIR?= /var/spool/nagios diff --git a/net-mgmt/nagios4/distinfo b/net-mgmt/nagios4/distinfo index c0117b1a33bf..31b51147ac05 100644 --- a/net-mgmt/nagios4/distinfo +++ b/net-mgmt/nagios4/distinfo @@ -1,2 +1,2 @@ -SHA256 (nagios-4.0.5.tar.gz) = ad790bebadda8cc04daf639d1866864081849305fdf92dc0243b6d6246d3da3c -SIZE (nagios-4.0.5.tar.gz) = 1793038 +SHA256 (nagios-4.0.6.tar.gz) = d400190c771eb90e0ba16351f6358fa7e22e42a7be986f2066db63518a14397b +SIZE (nagios-4.0.6.tar.gz) = 1796012 diff --git a/net-mgmt/nagios4/files/nagios.in b/net-mgmt/nagios4/files/nagios.in index 229f9d8d86fd..4ca39c2a1fe3 100644 --- a/net-mgmt/nagios4/files/nagios.in +++ b/net-mgmt/nagios4/files/nagios.in @@ -14,37 +14,37 @@ # 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. +# nagios_configfile (str): Set to "%%ETCDIR%%/nagios.cfg" by default. # . /etc/rc.subr -name="nagios" +name=nagios rcvar=nagios_enable -command="%%PREFIX%%/bin/nagios" -command_args="-d" -extra_commands="reload configtest" -pidfile="%%NAGIOSDIR%%/nagios.lock" -nagios_user="%%NAGIOSUSER%%" - -start_precmd="start_precmd" -stop_postcmd="stop_postcmd" -restart_precmd="nagios_checkconfig" -reload_precmd="reload_precmd" -configtest_cmd="nagios_checkconfig" -sig_reload=HUP - load_rc_config "${name}" -[ -z "${nagios_enable}" ] && nagios_enable="NO" -[ -z "${nagios_configfile}" ] && nagios_configfile="%%PREFIX%%/etc/nagios/nagios.cfg" -[ -z "${nagios_precache}" ] && nagios_precache="NO" +start_precmd=start_precmd +stop_postcmd=stop_postcmd +restart_precmd=nagios_checkconfig +reload_precmd=reload_precmd +configtest_cmd=nagios_checkconfig +sig_reload=HUP + +nagios_program=${nagios_program:-"%%PREFIX%%/bin/nagios"} # Path to named, if you want a different one. +command_args=${command_args:-"-d"} +extra_commands=${extra_commands:-"reload configtest"} +pidfile=${pidfile:-"%%NAGIOSDIR%%/nagios.lock"} +nagios_user=${nagios_user:-"%%NAGIOSUSER%%"} +nagios_group=${nagios_group:-"%%NAGIOSGROUP%%"} +nagios_configfile=${nagios_configfile:-"%%ETCDIR%%/nagios.cfg"} +nagios_precache=${nagios_precache:-"NO"} required_files="${nagios_configfile}" command_args="${command_args} ${nagios_configfile}" -nagios_cacheconfig() { +nagios_cacheconfig() +{ if ! checkyesno nagios_precache; then return 0 fi @@ -61,7 +61,8 @@ nagios_cacheconfig() { fi } -nagios_checkconfig() { +nagios_checkconfig() +{ echo -n "Performing sanity check of nagios configuration: " ${command} -v ${nagios_configfile} 2>&1 >/dev/null if [ $? != 0 ]; then @@ -73,7 +74,8 @@ nagios_checkconfig() { fi } -reload_precmd() { +reload_precmd() +{ if ! nagios_checkconfig; then return 1 fi @@ -83,7 +85,8 @@ reload_precmd() { fi } -start_precmd() { +start_precmd() +{ if ! nagios_checkconfig; then return 1 fi @@ -96,7 +99,8 @@ start_precmd() { rm -f "%%NAGIOSDIR%%/rw/nagios.cmd" } -stop_postcmd() { +stop_postcmd() +{ rm -f "%%NAGIOSDIR%%/nagios.tmp" "%%NAGIOSDIR%%/rw/nagios.cmd" } diff --git a/net-mgmt/nagios4/files/patch-configure.in b/net-mgmt/nagios4/files/patch-configure.in index e5c68e6705bf..566d193dd725 100644 --- a/net-mgmt/nagios4/files/patch-configure.in +++ b/net-mgmt/nagios4/files/patch-configure.in @@ -1,5 +1,5 @@ ---- ./configure.in.orig 2014-04-11 20:37:42.000000000 +0200 -+++ ./configure.in 2014-04-15 15:19:42.000000000 +0200 +--- ./configure.in.orig 2014-04-29 17:55:49.000000000 +0200 ++++ ./configure.in 2014-05-06 15:38:27.000000000 +0200 @@ -6,7 +6,6 @@ AC_INIT(base/nagios.c) @@ -7,7 +7,7 @@ -AC_PREFIX_DEFAULT(/usr/local/nagios) PKG_NAME=nagios - PKG_VERSION="4.0.5" + PKG_VERSION="4.0.6" @@ -134,14 +133,14 @@ AC_SUBST(nagios_grp) AC_DEFINE_UNQUOTED(DEFAULT_NAGIOS_USER,"$nagios_user",[user name to run nagios]) diff --git a/net-mgmt/nagios4/files/patch-html__Makefile.in b/net-mgmt/nagios4/files/patch-html__Makefile.in index eda256bb6c0f..d4f9b4b0302a 100644 --- a/net-mgmt/nagios4/files/patch-html__Makefile.in +++ b/net-mgmt/nagios4/files/patch-html__Makefile.in @@ -1,6 +1,6 @@ ---- ./html/Makefile.in.orig 2014-03-14 18:24:57.000000000 +0100 -+++ ./html/Makefile.in 2014-03-15 20:44:57.000000000 +0100 -@@ -35,56 +35,56 @@ +--- ./html/Makefile.in.orig 2014-04-29 17:55:49.000000000 +0200 ++++ ./html/Makefile.in 2014-05-06 15:38:27.000000000 +0200 +@@ -35,58 +35,58 @@ devclean: distclean install: @@ -39,7 +39,11 @@ rm -f $(DESTDIR)$(HTMLDIR)/main.html rm -f $(DESTDIR)$(HTMLDIR)/side.html - $(INSTALL) -m 664 $(INSTALL_OPTS) jsonquery.html $(DESTDIR)$(HTMLDIR) +- $(INSTALL) -m 664 $(INSTALL_OPTS) rss-corefeed.html $(DESTDIR)$(HTMLDIR) +- $(INSTALL) -m 664 $(INSTALL_OPTS) rss-newsfeed.html $(DESTDIR)$(HTMLDIR) + $(INSTALL) -m 644 $(INSTALL_OPTS) jsonquery.html $(DESTDIR)$(HTMLDIR) ++ $(INSTALL) -m 644 $(INSTALL_OPTS) rss-corefeed.html $(DESTDIR)$(HTMLDIR) ++ $(INSTALL) -m 644 $(INSTALL_OPTS) rss-newsfeed.html $(DESTDIR)$(HTMLDIR) for file in *.php; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR); done + do $(INSTALL) -m 644 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR); done diff --git a/net-mgmt/nagios4/files/patch-html__main.php b/net-mgmt/nagios4/files/patch-html__main.php index 847dd893a1e8..589842ab75ff 100644 --- a/net-mgmt/nagios4/files/patch-html__main.php +++ b/net-mgmt/nagios4/files/patch-html__main.php @@ -1,41 +1,34 @@ ---- ./html/main.php.orig 2014-04-11 20:37:42.000000000 +0200 -+++ ./html/main.php 2014-04-15 15:20:13.000000000 +0200 -@@ -40,38 +40,10 @@ - <div class="product">Nagios<sup><span style="font-size: small;">®</span></sup> Core<sup><span style="font-size: small;">™</span></sup></div> - <div class="version">Version 4.0.5</div> - <div class="releasedate">April 11, 2014</div> --<div class="checkforupdates"><a href="http://www.nagios.org/checkforupdates/?version=4.0.5&product=nagioscore" target="_blank">Check for updates</a></div> - <!--<div class="whatsnew"><a href="http://go.nagios.com/nagioscore/whatsnew">Read what's new in Nagios Core 3</a></div>--> - </div> - - +--- ./html/main.php.orig 2014-04-29 17:55:49.000000000 +0200 ++++ ./html/main.php 2014-05-06 15:39:05.000000000 +0200 +@@ -130,31 +130,6 @@ + <div class="product">Nagios<sup><span style="font-size: small;">®</span></sup> Core<sup><span style="font-size: small;">™</span></sup></div> + <div class="version">Version 4.0.6</div> + <div class="releasedate">April 29, 2014</div> +- <div class="checkforupdates"><a href="http://www.nagios.org/checkforupdates/?version=4.0.6&product=nagioscore" target="_blank">Check for updates</a></div> +-</div> +- +- -<div id="updateversioninfo"> -<?php -- $updateinfo=get_update_information(); -- //print_r($updateinfo); -- //$updateinfo['update_checks_enabled']=false; -- //$updateinfo['update_available']=true; -- if($updateinfo['update_checks_enabled']==false){ +- $updateinfo = get_update_information(); +- if (!$updateinfo['update_checks_enabled']) { -?> - <div class="updatechecksdisabled"> -- <div class="warningmessage">Warning: Automatic Update Checks are Disabled!</div> -- <div class="submessage">Disabling update checks presents a possible security risk. Visit <a href="http://www.nagios.org/" target="_blank">nagios.org</a> to check for updates manually or enable update checks in your Nagios config file.</a></div> +- <div class="warningmessage">Warning: Automatic Update Checks are Disabled!</div> +- <div class="submessage">Disabling update checks presents a possible security risk. Visit <a href="http://www.nagios.org/" target="_blank">nagios.org</a> to check for updates manually or enable update checks in your Nagios config file.</a></div> - </div> -<?php -- } -- else if($updateinfo['update_available']==true && $this_version!=$updateinfo['update_version']){ +- } else if ( +- $updateinfo['update_available'] && $this_version < $updateinfo['update_version'] +- ) { -?> - <div class="updateavailable"> -- <div class="updatemessage">A new version of Nagios Core is available!</div> -- <div class="submessage">Visit <a href="http://www.nagios.org/download/" target="_blank">nagios.org</a> to download Nagios <?php echo $updateinfo['update_version'];?>.</div> +- <div class="updatemessage">A new version of Nagios Core is available!</div> +- <div class="submessage">Visit <a href="http://www.nagios.org/download/" target="_blank">nagios.org</a> to download Nagios <?php echo $updateinfo['update_version'];?>.</div> - </div> -<?php -- } +- } -?> --</div> -- -- -- - <div id="splashboxes"> - <div id='topsplashbox'> - <div id="splashbox1" class="splashbox"> + </div> + + diff --git a/net-mgmt/nagios4/files/pkg-message.in b/net-mgmt/nagios4/files/pkg-message.in index b3c5257d37e9..3f38f9e457e1 100644 --- a/net-mgmt/nagios4/files/pkg-message.in +++ b/net-mgmt/nagios4/files/pkg-message.in @@ -4,29 +4,29 @@ nagios_enable="YES" - Configuration templates are available in %%PREFIX%%/etc/nagios as + Configuration templates are available in %%ETCDIR%% as *.cfg-sample files. Copy them to *.cfg files where required and edit to suit your needs. Documentation is available in HTML form - in %%PREFIX%%/%%NAGIOSWWWDIR%%/docs. + in %%NAGIOSWWWDIR%%/docs. If you don't already have a web server running, you will need to install and configure one to finish off your Nagios installation. When used with Apache, the following should be sufficient to publish the web component of Nagios (modify the allow list to suit): - <Directory %%PREFIX%%/%%NAGIOSWWWDIR%%> + <Directory %%NAGIOSWWWDIR%%> Order deny,allow 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 %%NAGIOSWWWDIR%%/:%%NAGIOSDIR%%/ </Directory> - <Directory %%PREFIX%%/%%NAGIOSWWWDIR%%/cgi-bin> + <Directory %%NAGIOSWWWDIR%%/cgi-bin> Options ExecCGI </Directory> - ScriptAlias %%NAGIOSCGIURL%%/ %%PREFIX%%/%%NAGIOSWWWDIR%%/cgi-bin/ - Alias %%NAGIOSHTMURL%%/ %%PREFIX%%/%%NAGIOSWWWDIR%%/ + ScriptAlias %%NAGIOSCGIURL%%/ %%NAGIOSWWWDIR%%/cgi-bin/ + Alias %%NAGIOSHTMURL%%/ %%NAGIOSWWWDIR%%/ ********************************************************************** diff --git a/net-mgmt/nagios4/pkg-plist b/net-mgmt/nagios4/pkg-plist index 598fed3843f6..e55565a87e9d 100644 --- a/net-mgmt/nagios4/pkg-plist +++ b/net-mgmt/nagios4/pkg-plist @@ -1,22 +1,18 @@ -@exec mkdir -p %D/%%NAGIOSWWWDIR%%/ssi -@exec mkdir -p %%NAGIOSDIR%%/archives -@exec mkdir -p %%NAGIOSDIR%%/checkresults -@exec mkdir -p %%NAGIOSDIR%%/rw -@exec chmod 775 %%NAGIOSDIR%% %%NAGIOSDIR%%/archives %%NAGIOSDIR%%/checkresults %%NAGIOSDIR%%/rw -@exec chown %%NAGIOSUSER%%:%%NAGIOSGROUP%% %%NAGIOSDIR%% %%NAGIOSDIR%%/archives %%NAGIOSDIR%%/checkresults -@exec chown %%NAGIOSUSER%%:%%WWWGRP%% %%NAGIOSDIR%%/rw +@exec install -d %D/%%NAGIOSWWWDIR%%/ssi +@exec install -d -m 775 -o %%NAGIOSUSER%% -g %%NAGIOSGROUP%% %%NAGIOSDIR%% %%NAGIOSDIR%%/archives %%NAGIOSDIR%%/checkresults +@exec install -d -m 775 -o %%NAGIOSUSER%% -g %%WWWGRP%% %%NAGIOSDIR%%/rw bin/nagios bin/nagiostats -etc/nagios/cgi.cfg-sample -etc/nagios/nagios.cfg-sample -etc/nagios/objects/commands.cfg-sample -etc/nagios/objects/contacts.cfg-sample -etc/nagios/objects/localhost.cfg-sample -etc/nagios/objects/printer.cfg-sample -etc/nagios/objects/switch.cfg-sample -etc/nagios/objects/templates.cfg-sample -etc/nagios/objects/timeperiods.cfg-sample -etc/nagios/resource.cfg-sample +%%ETCDIR%%/cgi.cfg-sample +%%ETCDIR%%/nagios.cfg-sample +%%ETCDIR%%/objects/commands.cfg-sample +%%ETCDIR%%/objects/contacts.cfg-sample +%%ETCDIR%%/objects/localhost.cfg-sample +%%ETCDIR%%/objects/printer.cfg-sample +%%ETCDIR%%/objects/switch.cfg-sample +%%ETCDIR%%/objects/templates.cfg-sample +%%ETCDIR%%/objects/timeperiods.cfg-sample +%%ETCDIR%%/resource.cfg-sample %%NAGIOSWWWDIR%%/cgi-bin/archivejson.cgi %%NAGIOSWWWDIR%%/cgi-bin/avail.cgi %%NAGIOSWWWDIR%%/cgi-bin/cmd.cgi @@ -364,7 +360,10 @@ etc/nagios/resource.cfg-sample %%NAGIOSWWWDIR%%/jsonquery.html %%NAGIOSWWWDIR%%/main.php %%NAGIOSWWWDIR%%/robots.txt +%%NAGIOSWWWDIR%%/rss-corebanner.php +%%NAGIOSWWWDIR%%/rss-corefeed.html %%NAGIOSWWWDIR%%/rss-corefeed.php +%%NAGIOSWWWDIR%%/rss-newsfeed.html %%NAGIOSWWWDIR%%/rss-newsfeed.php %%NAGIOSWWWDIR%%/side.php %%NAGIOSWWWDIR%%/stylesheets/avail.css @@ -385,9 +384,9 @@ etc/nagios/resource.cfg-sample %%NAGIOSWWWDIR%%/stylesheets/summary.css %%NAGIOSWWWDIR%%/stylesheets/tac.css %%NAGIOSWWWDIR%%/stylesheets/trends.css +@dirrmtry %%ETCDIR%%/objects +@dirrmtry %%ETCDIR%% @dirrmtry libexec/nagios -@dirrmtry etc/nagios/objects -@dirrmtry etc/nagios @dirrm %%NAGIOSWWWDIR%%/cgi-bin @dirrm %%NAGIOSWWWDIR%%/contexthelp @dirrm %%NAGIOSWWWDIR%%/docs/images |