diff options
| author | hard.egg0918 <hard.egg0918@fastmail.com> | 2026-02-04 20:52:08 +0000 |
|---|---|---|
| committer | Vladimir Druzenko <vvd@FreeBSD.org> | 2026-02-04 21:01:09 +0000 |
| commit | b74c69274b28cf00fe9aab52edd66138507e1705 (patch) | |
| tree | 6652ce3584696f395a0065481fcce260d3ff28f6 | |
| parent | 17655c3eda33b90b4b30db7af860facf7408ba63 (diff) | |
net-mgmt/nagios4: Update 4.5.1 => 4.5.11, take maintainership
Changelog:
https://www.nagios.org/projects/nagios-core/4x/
Improve port:
- Replace PORTVERSION with DISTVERSION.
- Parametrize nagios with ${PORTNAME}.
- Replace CFLAGS, CPPFLAGS and LIBS with USES+=localbase.
- Update CONFLICTS.
- Use ${ETCDIR} instead of ${PREFIX}/etc/nagios.
- Fix warnings from portclippy.
- Fix install with non-default NAGIOSUSER/NAGIOSGROUP.
- Split long line in post-patch.
- Improve indents.
- Regenerate patches with changed line numbers.
PR: 292357
Tested by: Fabian Wenk <fabian@wenks.ch>
MFH: 2026Q1
Co-authored-by: Vladimir Druzenko <vvd@FreeBSD.org>
(cherry picked from commit 2a8608cad2d3f0d8f971c5d314141c902d573bf9)
| -rw-r--r-- | net-mgmt/nagios4/Makefile | 80 | ||||
| -rw-r--r-- | net-mgmt/nagios4/distinfo | 6 | ||||
| -rw-r--r-- | net-mgmt/nagios4/files/patch-configure | 10 | ||||
| -rw-r--r-- | net-mgmt/nagios4/files/patch-html_Makefile.in | 6 | ||||
| -rw-r--r-- | net-mgmt/nagios4/files/patch-html_index.php.in | 14 | ||||
| -rw-r--r-- | net-mgmt/nagios4/files/patch-html_main.php | 29 | ||||
| -rw-r--r-- | net-mgmt/nagios4/pkg-plist | 52 |
7 files changed, 82 insertions, 115 deletions
diff --git a/net-mgmt/nagios4/Makefile b/net-mgmt/nagios4/Makefile index ca0fb26857f5..496c13700b31 100644 --- a/net-mgmt/nagios4/Makefile +++ b/net-mgmt/nagios4/Makefile @@ -1,13 +1,12 @@ PORTNAME= nagios -PORTVERSION= 4.5.1 -PORTREVISION= 0 +DISTVERSION= 4.5.11 PORTEPOCH= 1 CATEGORIES= net-mgmt MASTER_SITES= https://assets.nagios.com/downloads/nagioscore/releases/ \ - SF/${PORTNAME}/${PORTNAME}-4.x/${PORTNAME}-${PORTVERSION} + SF/${PORTNAME}/${PORTNAME}-4.x/${PORTNAME}-${DISTVERSION} PKGNAMESUFFIX= 4 -MAINTAINER= ports@FreeBSD.org +MAINTAINER= hard.egg0918@fastmail.com COMMENT= Powerful network monitoring system WWW= https://www.nagios.org/ @@ -17,12 +16,16 @@ LIB_DEPENDS= libltdl.so:devel/libltdl \ libpng.so:graphics/png \ libgd.so:graphics/gd -USES= cpe gmake jpeg perl5 php +USES= cpe dos2unix gmake jpeg localbase perl5 php ssl +DOS2UNIX_FILES= contrib/exfoliation/stylesheets/common.css USE_PERL5= build -USE_PHP= xml filter -USE_RC_SUBR= nagios +USE_RC_SUBR= ${PORTNAME} -CONFLICTS= nagios-[123].* nagios-devel +NAGIOSUSER?= ${PORTNAME} +NAGIOSGROUP?= ${PORTNAME} +NAGIOSDIR?= /var/spool/${PORTNAME} +NAGIOSHTMURL?= /${PORTNAME} +NAGIOSCGIURL?= ${NAGIOSHTMURL}/cgi-bin GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-command-user=${NAGIOSUSER} \ @@ -31,11 +34,11 @@ CONFIGURE_ARGS= --with-command-user=${NAGIOSUSER} \ --with-nagios-group=${NAGIOSGROUP} \ --with-htmurl=${NAGIOSHTMURL} \ --with-cgiurl=${NAGIOSCGIURL} \ - --with-lockfile=${NAGIOSDIR}/nagios.lock \ + --with-lockfile=${NAGIOSDIR}/${PORTNAME}.lock \ --with-cgibindir=${WWWDIR}/cgi-bin \ - --libexecdir=${PREFIX}/libexec/nagios \ + --libexecdir=${PREFIX}/libexec/${PORTNAME} \ --datadir=${WWWDIR} \ - --sysconfdir=${PREFIX}/etc/nagios \ + --sysconfdir=${ETCDIR} \ --localstatedir=${NAGIOSDIR} \ --with-httpd-conf=${PREFIX}/etc \ --with-checkresult-dir=${NAGIOSDIR}/checkresults \ @@ -44,63 +47,58 @@ CONFIGURE_ARGS= --with-command-user=${NAGIOSUSER} \ ac_cv_lib_iconv_main=no CONFIGURE_ENV= PERL=${PERL} -CPPFLAGS+= -I${LOCALBASE}/include -CFLAGS+= ${CPPFLAGS} -LIBS+= -L${LOCALBASE}/lib - INSTALL_TARGET= install install-commandmode install-config -PLIST_SUB= NAGIOSDIR=${NAGIOSDIR} \ - NAGIOSUSER=${NAGIOSUSER} \ - NAGIOSGROUP=${NAGIOSGROUP} \ - WWWGRP=${WWWGRP} -SUB_LIST= NAGIOSDIR=${NAGIOSDIR} \ - NAGIOSUSER=${NAGIOSUSER} \ - NAGIOSGROUP=${NAGIOSGROUP} \ - NAGIOSHTMURL=${NAGIOSHTMURL} \ - NAGIOSCGIURL=${NAGIOSCGIURL} - -SUB_FILES= pkg-message -NAGIOSUSER?= nagios -NAGIOSGROUP?= nagios -NAGIOSDIR?= /var/spool/nagios +CONFLICTS= ${PORTNAME} .if defined(NAGIOSWWWDIR) WWWDIR= ${PREFIX}/${NAGIOSWWWDIR} .endif -NAGIOSHTMURL?= /nagios -NAGIOSCGIURL?= ${NAGIOSHTMURL}/cgi-bin +SUB_FILES= pkg-message +SUB_LIST= NAGIOSDIR=${NAGIOSDIR} \ + NAGIOSUSER=${NAGIOSUSER} \ + NAGIOSGROUP=${NAGIOSGROUP} \ + NAGIOSHTMURL=${NAGIOSHTMURL} \ + NAGIOSCGIURL=${NAGIOSCGIURL} +.if ${NAGIOSUSER} == ${PORTNAME} USERS= ${NAGIOSUSER} +.endif +.if ${NAGIOSGROUP} == ${PORTNAME} GROUPS= ${NAGIOSGROUP} +.endif -OPTIONS_DEFINE= NANOSLEEP UNHANDLED_HACK COREWINDOW +PLIST_SUB= NAGIOSDIR=${NAGIOSDIR} \ + NAGIOSUSER=${NAGIOSUSER} \ + NAGIOSGROUP=${NAGIOSGROUP} \ + WWWGRP=${WWWGRP} + +OPTIONS_DEFINE= NANOSLEEP UNHANDLED_HACK COREWINDOW +OPTIONS_DEFAULT= NAGPLUGINS OPTIONS_RADIO= PLUGINS OPTIONS_RADIO_PLUGINS= MONPLUGINS NAGPLUGINS -OPTIONS_DEFAULT= NAGPLUGINS + +COREWINDOW_DESC= Enable the corewindow parameter NANOSLEEP_DESC= Use nanosleep in event timing UNHANDLED_HACK_DESC= Display passive checks in unhandled queries -COREWINDOW_DESC= Enable the corewindow parameter -MONPLUGINS_RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:net-mgmt/monitoring-plugins -NAGPLUGINS_RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:net-mgmt/nagios-plugins COREWINDOW_CONFIGURE_ENABLE= corewindow - -OPTIONS_SUB= - +MONPLUGINS_RUN_DEPENDS= ${LOCALBASE}/libexec/${PORTNAME}/check_nagios:net-mgmt/monitoring-plugins +NAGPLUGINS_RUN_DEPENDS= ${LOCALBASE}/libexec/${PORTNAME}/check_nagios:net-mgmt/nagios-plugins NANOSLEEP_CONFIGURE_ENABLE= nanosleep post-patch: ${REINPLACE_CMD} -e 's/\<77\([0-7]\)\>/75\1/g; s/\<66\([0-7]\)\>/64\1/; /chmod/d; \ /\.cfg$$/s/$$/-sample/' \ - ${WRKSRC}/Makefile.in ${WRKSRC}/base/Makefile.in ${WRKSRC}/cgi/Makefile.in ${WRKSRC}/contrib/Makefile.in ${WRKSRC}/html/Makefile.in + ${WRKSRC}/Makefile.in ${WRKSRC}/base/Makefile.in ${WRKSRC}/cgi/Makefile.in \ + ${WRKSRC}/contrib/Makefile.in ${WRKSRC}/html/Makefile.in post-patch-UNHANDLED_HACK-on: ${REINPLACE_CMD} -e 's#;serviceprops=42\&#;serviceprops=10\&#g' -e \ 's#;hostprops=42\"#;hostprops=10\"#g' ${WRKSRC}/html/side.php post-install: - @${RMDIR} ${STAGEDIR}${PREFIX}/libexec/nagios + @${RMDIR} ${STAGEDIR}${PREFIX}/libexec/${PORTNAME} @${MV} ${STAGEDIR}${WWWDIR}/config.inc.php ${STAGEDIR}${WWWDIR}/config.inc.php.sample .include <bsd.port.mk> diff --git a/net-mgmt/nagios4/distinfo b/net-mgmt/nagios4/distinfo index 7d6997ce2252..ad19e87bec1b 100644 --- a/net-mgmt/nagios4/distinfo +++ b/net-mgmt/nagios4/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1710581441 -SHA256 (nagios-4.5.1.tar.gz) = 171fc577e026e32079d17057cd49a9730bb86e44169c4735d9b66fa0b43e045a -SIZE (nagios-4.5.1.tar.gz) = 11540195 +TIMESTAMP = 1768688393 +SHA256 (nagios-4.5.11.tar.gz) = 1bf85d6704a75e6b89a09844836f68b1cfc61ab1ef005574041e36e73fdb797a +SIZE (nagios-4.5.11.tar.gz) = 2589034 diff --git a/net-mgmt/nagios4/files/patch-configure b/net-mgmt/nagios4/files/patch-configure index e1794e421b1a..3b563f3a12ed 100644 --- a/net-mgmt/nagios4/files/patch-configure +++ b/net-mgmt/nagios4/files/patch-configure @@ -1,14 +1,14 @@ ---- configure.orig 2018-06-25 21:25:22 UTC +--- configure.orig 2026-01-14 16:37:00 UTC +++ configure -@@ -6240,7 +6240,6 @@ cat >>confdefs.h <<_ACEOF - #define DEFAULT_NAGIOS_GROUP "$nagios_grp" - _ACEOF +@@ -7379,7 +7379,6 @@ printf "%s\n" "#define DEFAULT_NAGIOS_GROUP \"$nagios_ + + printf "%s\n" "#define DEFAULT_NAGIOS_GROUP \"$nagios_grp\"" >>confdefs.h -INSTALL_OPTS="-o $nagios_user -g $nagios_grp" -@@ -6267,7 +6266,6 @@ fi +@@ -7410,7 +7409,6 @@ fi diff --git a/net-mgmt/nagios4/files/patch-html_Makefile.in b/net-mgmt/nagios4/files/patch-html_Makefile.in index abe2ff161657..067121657d42 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 2023-06-04 10:23:17.547480000 +0200 -+++ html/Makefile.in 2023-06-04 10:23:35.365789000 +0200 -@@ -45,11 +45,8 @@ install: +--- html/Makefile.in.orig 2026-01-14 16:37:00 UTC ++++ html/Makefile.in +@@ -36,11 +36,8 @@ install: install: $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR) diff --git a/net-mgmt/nagios4/files/patch-html_index.php.in b/net-mgmt/nagios4/files/patch-html_index.php.in index b8cfe2514a32..99eb2f8bcf05 100644 --- a/net-mgmt/nagios4/files/patch-html_index.php.in +++ b/net-mgmt/nagios4/files/patch-html_index.php.in @@ -1,12 +1,6 @@ ---- html/index.php.in.orig 2024-02-17 08:44:48.310422000 +0100 -+++ html/index.php.in 2024-02-17 09:00:54.496033000 +0100 -@@ -1,4 +1,5 @@ - <?php -+include_once(dirname(__FILE__).'/includes/utils.inc.php'); - // Allow specifying main window URL for permalinks, etc. - $url = 'main.php'; - -@@ -23,7 +24,7 @@ if ("@COREWINDOW@" == "yes" && isset($_GET['corewindow +--- html/index.php.in.orig 2026-01-14 16:37:00 UTC ++++ html/index.php.in +@@ -25,7 +25,7 @@ if ("@COREWINDOW@" == "yes" && isset($_GET['corewindow } } if (preg_match("/^http:\/\/|^https:\/\/|^\//", $url) != 1) @@ -14,4 +8,4 @@ + $url = $cfg['cgi_base_url'].'/tac.cgi'; } - $this_year = '2023'; + $this_year = '2026'; diff --git a/net-mgmt/nagios4/files/patch-html_main.php b/net-mgmt/nagios4/files/patch-html_main.php index a820104e48fa..e6bcb2c19347 100644 --- a/net-mgmt/nagios4/files/patch-html_main.php +++ b/net-mgmt/nagios4/files/patch-html_main.php @@ -1,14 +1,16 @@ ---- html/main.php.orig 2024-03-16 10:46:27.911029000 +0100 -+++ html/main.php 2024-03-16 10:48:12.929841000 +0100 -@@ -142,38 +142,6 @@ $this_year = '2024'; - </div> +--- html/main.php.orig 2026-01-14 16:37:00 UTC ++++ html/main.php +@@ -69,37 +69,6 @@ if ($theme != 'dark' && $theme != 'light') { + <body id="splashpage"> -<div id="currentversioninfo"> -- <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 <?php echo $this_version; ?></div> -- <div class="releasedate">February 28, 2024</div> -- <div class="checkforupdates"><a href="https://www.nagios.org/checkforupdates/?version=<?php echo $this_version; ?>&product=nagioscore" target="_blank">Check for updates</a></div> +- <div> +- <div class="version">Version <b><?php echo $this_version; ?></b></div> +- <div class="releasedate">January 14, 2026</div> +- </div> +- <div><span id="core-status"></span></div> +- <a class="checkforupdates" href="https://www.nagios.org/checkforupdates/?version=<?php echo $this_version; ?>&product=nagioscore" target="_blank">Check for updates</a> -</div> - - @@ -22,9 +24,7 @@ - <div class="submessage">Disabling update checks presents a possible security risk. Visit <a href="https://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'] && $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> @@ -35,7 +35,6 @@ -?> -</div> - -- - <div id='splashrow0'> - <div id="splashbox0" class="splashbox-media"><!-- info banner feed --> - <div id="splashbox0-contents"></div> + <div id="mainsplash"> + <a href="https://www.nagios.org/?utm_campaign=csp&utm_source=nagioscore&utm_medium=splash_thumbnail&utm_content=<?php echo $this_version; ?>" target="_blank"><img src="images/csp-dashboard.avif" /></a> + <div id="splashtext"> diff --git a/net-mgmt/nagios4/pkg-plist b/net-mgmt/nagios4/pkg-plist index ff5f39231f62..beda51549423 100644 --- a/net-mgmt/nagios4/pkg-plist +++ b/net-mgmt/nagios4/pkg-plist @@ -11,12 +11,6 @@ @(,%%NAGIOSGROUP%%,) %%ETCDIR%%/objects/timeperiods.cfg-sample @(,%%NAGIOSGROUP%%,) %%ETCDIR%%/objects/windows.cfg-sample @(,%%NAGIOSGROUP%%,) %%ETCDIR%%/resource.cfg-sample -%%WWWDIR%%/angularjs/angular-1.3.9/angular.min.js -%%WWWDIR%%/angularjs/angular-1.3.9/angular.min.js.map -%%WWWDIR%%/angularjs/ui-bootstrap-tpls-0.14.3.min.js -%%WWWDIR%%/angularjs/ui-utils-0.2.3/ui-utils.js -%%WWWDIR%%/bootstrap-3.3.7/css/bootstrap-theme.min.css -%%WWWDIR%%/bootstrap-3.3.7/css/bootstrap.min.css %%WWWDIR%%/cgi-bin/archivejson.cgi %%WWWDIR%%/cgi-bin/avail.cgi %%WWWDIR%%/cgi-bin/cmd.cgi @@ -99,12 +93,16 @@ %%WWWDIR%%/contexthelp/N5.html %%WWWDIR%%/contexthelp/N6.html %%WWWDIR%%/contexthelp/N7.html -%%WWWDIR%%/d3/d3.min.js -%%WWWDIR%%/graph-header.html -%%WWWDIR%%/histogram-form.html -%%WWWDIR%%/histogram-graph.html -%%WWWDIR%%/histogram-links.html -%%WWWDIR%%/histogram.html +%%WWWDIR%%/fonts/Geist-Black.woff2 +%%WWWDIR%%/fonts/Geist-Bold.woff2 +%%WWWDIR%%/fonts/Geist-ExtraBold.woff2 +%%WWWDIR%%/fonts/Geist-ExtraLight.woff2 +%%WWWDIR%%/fonts/Geist-Light.woff2 +%%WWWDIR%%/fonts/Geist-Medium.woff2 +%%WWWDIR%%/fonts/Geist-Regular.woff2 +%%WWWDIR%%/fonts/Geist-SemiBold.woff2 +%%WWWDIR%%/fonts/Geist-Thin.woff2 +%%WWWDIR%%/fonts/Geist[wght].woff2 %%WWWDIR%%/images/Nagios-clearbg.png %%WWWDIR%%/images/NagiosEnterprises-whitebg-112x46.png %%WWWDIR%%/images/ack.gif @@ -121,6 +119,7 @@ %%WWWDIR%%/images/contexthelp1.gif %%WWWDIR%%/images/contexthelp2.gif %%WWWDIR%%/images/critical.png +%%WWWDIR%%/images/csp-dashboard.avif %%WWWDIR%%/images/delay.gif %%WWWDIR%%/images/delete.gif %%WWWDIR%%/images/detail.gif @@ -184,6 +183,7 @@ %%WWWDIR%%/images/logos/freebsd40.png %%WWWDIR%%/images/logos/globe.png %%WWWDIR%%/images/logos/graph.gif +%%WWWDIR%%/images/logos/horizontal-nagios-full-logo.svg %%WWWDIR%%/images/logos/hp-printer40.gd2 %%WWWDIR%%/images/logos/hp-printer40.gif %%WWWDIR%%/images/logos/hp-printer40.jpg @@ -219,6 +219,7 @@ %%WWWDIR%%/images/logos/mandrake.jpg %%WWWDIR%%/images/logos/mandrake.png %%WWWDIR%%/images/logos/monitor.png +%%WWWDIR%%/images/logos/nagios-n-logo.svg %%WWWDIR%%/images/logos/nagios.gd2 %%WWWDIR%%/images/logos/nagios.gif %%WWWDIR%%/images/logos/nagiosvrml.png @@ -366,32 +367,13 @@ %%WWWDIR%%/images/zoom2.gif %%WWWDIR%%/includes/utils.inc.php %%WWWDIR%%/index.php -%%WWWDIR%%/infobox.html -%%WWWDIR%%/js/histogram-events.js -%%WWWDIR%%/js/histogram-form.js -%%WWWDIR%%/js/histogram-graph.js -%%WWWDIR%%/js/histogram.js -%%WWWDIR%%/js/jquery-1.12.4.min.js +%%WWWDIR%%/js/jquery-3.7.1.min.js %%WWWDIR%%/js/jsonquery.js -%%WWWDIR%%/js/map-directive.js -%%WWWDIR%%/js/map-form.js -%%WWWDIR%%/js/map.js %%WWWDIR%%/js/nag_funcs.js -%%WWWDIR%%/js/nagios-decorations.js -%%WWWDIR%%/js/nagios-time.js -%%WWWDIR%%/js/trends-form.js -%%WWWDIR%%/js/trends-graph.js -%%WWWDIR%%/js/trends.js %%WWWDIR%%/jsonquery.html %%WWWDIR%%/main.php -%%WWWDIR%%/map-directive.html -%%WWWDIR%%/map-form.html -%%WWWDIR%%/map-links.html -%%WWWDIR%%/map-popup.html -%%WWWDIR%%/map.php %%WWWDIR%%/robots.txt %%WWWDIR%%/side.php -%%WWWDIR%%/spin/spin.min.js %%WWWDIR%%/stylesheets/avail.css %%WWWDIR%%/stylesheets/checksanity.css %%WWWDIR%%/stylesheets/cmd.css @@ -415,12 +397,6 @@ %%WWWDIR%%/stylesheets/tac.css %%WWWDIR%%/stylesheets/trends.css %%WWWDIR%%/stylesheets/trendsgraph.css -%%WWWDIR%%/trends-form.html -%%WWWDIR%%/trends-graph.html -%%WWWDIR%%/trends-host-yaxis.html -%%WWWDIR%%/trends-links.html -%%WWWDIR%%/trends-service-yaxis.html -%%WWWDIR%%/trends.html @dir %%WWWDIR%%/ssi @dir(%%NAGIOSUSER%%,%%NAGIOSGROUP%%,775) %%NAGIOSDIR%%/archives @dir(%%NAGIOSUSER%%,%%NAGIOSGROUP%%,2775) %%NAGIOSDIR%%/checkresults |
