Bug 292357 - net-mgmt/nagios4: Update to 4.5.11
Summary: net-mgmt/nagios4: Update to 4.5.11
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Vladimir Druzenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-11 10:23 UTC by hard.egg0918
Modified: 2026-02-04 21:04 UTC (History)
3 users (show)

See Also:
vvd: merge-quarterly+


Attachments
nagios4-4.5.10,1.patch (7.38 KB, patch)
2026-01-11 10:23 UTC, hard.egg0918
no flags Details | Diff
nagios4-4.5.10,1.log (86.84 KB, text/plain)
2026-01-11 10:23 UTC, hard.egg0918
no flags Details
nagios4-4.5.10,1-with-updated-MAINTAINER.patch (7.62 KB, patch)
2026-01-12 07:38 UTC, hard.egg0918
no flags Details | Diff
nagios4-4.5.10,1-with-updated-MAINTAINER.log (84.84 KB, text/plain)
2026-01-12 07:38 UTC, hard.egg0918
no flags Details
nagios4-4.5.11,1.log (84.89 KB, text/plain)
2026-01-19 10:03 UTC, hard.egg0918
no flags Details
nagios4-4.5.11,1.patch (8.75 KB, patch)
2026-01-19 10:04 UTC, hard.egg0918
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description hard.egg0918 2026-01-11 10:23:06 UTC
Created attachment 267033 [details]
nagios4-4.5.10,1.patch

Patch attached to update the net-mgmt/nagios4 port to version 4.5.10 (released Oct 2025). Have also attached a local exp run showing successful build against current ports tree plus patch.

4.5.10 - 2025-10-28
 Update quickstart and documentation links (Aaron Cieslicki)
 Remove null coalescing operators and fix some php errors (Dylan Anderson and Robert Högberg)
 Replace sys/poll.h with poll.h (Michael Orlitzky)
 Fix musl 64bit time_t on 32bit arm (Doug Nazar)
 Removed Ubuntu 20 From Testing (Doug Nazar)
 Changed ‘which’ to ‘command -v’ in autoconf scripts (Michael Orlitzsky)
 Fixed NULL Pointer dereference in Update Chack API response parsing (Ankur Patel)
 Fixed missing image (J. Winters-Brown)

4.5.9 - 2024-12-19
 Fix unreachable notifications (Dylan Anderson)
 Add light option in new exfoliation theme (Dylan Anderson)
 Fix authentication in trends.cgi (Dylan Anderson)

4.5.8 - 2024-11-19
 Improve new exfoliation theme and add back in PID information (Dylan Anderson)
 Fix issues with downtimes that are both flexible and triggered and improve downtime additions in general (#595) (Dylan Anderson)

4.5.7 - 2024-10-24
 Expand the custom variable macros to an empty string, if the custom variable does not exist (Andre Klärner)
 Fix notification logic to not send a notification if a host and services parents are down (#873) (Dylan Anderson)
 Update Exfoliation theme (Dylan Anderson)

4.5.6 - 2024-10-08
 Send a recovery notification if the object recovered while flapping (#847) (Dylan Anderson)
 Fix for separate build directory & a couple small cleanups (Doug Nazar)
 Update tutorial links in Readme (Igor Udot)

4.5.5 - 2024-09-17
 Update configure scripts using newer versions of autotools (Dylan Anderson)
 Disable maintainer mode for TAP testing and add Github Actions (Dylan Anderson)

4.5.4 - 2024-08-14
 Fix inconsistent links for ‘View {Trends,Alert Histogram} For This {Host,Service}’ (Mauricio Faria de Oliveira)
 Fix broken links from removing AngularJS pages in 4.5.3 (Dylan Anderson)

4.5.3 - 2024-06-11
 Update jQuery (#960) (Dylan Anderson)
 Remove pages using outdated AngularJS framework (#960) (Dylan Anderson)
 Fix html encoding of some ascii characters (#813) (Dylan Anderson)
 Updated several page links to use ‘nofollow’ (#965) – (Griffin Westerman)

4.5.2 - 2024-04-30
 Fix handling of timeperiods w/ downtime availability calculations in the Availability CGI report (Sebastian Wolf)
 Fix build when compiling against musl libc (#952) (Sebastian Wolf)
 Fix downtime comment using current time instead of the downtime’s entry time (#910) (Dylan Anderson)
Comment 1 hard.egg0918 2026-01-11 10:23:28 UTC
Created attachment 267034 [details]
nagios4-4.5.10,1.log
Comment 2 Simon Wollwage freebsd_triage 2026-01-11 11:31:55 UTC
Thank you for the patch. This port seems to currently have no maintainer. Do you want to take ownership of it?
Comment 3 hard.egg0918 2026-01-11 19:18:32 UTC
Hi Simon, can do.
Comment 4 Simon Wollwage freebsd_triage 2026-01-12 03:20:28 UTC
(In reply to hard.egg0918 from comment #3)

Cool. In that case, please go ahead and update the MAINTAINER field in the Makefile with your email address and upload the new version of the patch.
Comment 5 hard.egg0918 2026-01-12 07:38:24 UTC
Created attachment 267053 [details]
nagios4-4.5.10,1-with-updated-MAINTAINER.patch
Comment 6 hard.egg0918 2026-01-12 07:38:52 UTC
Created attachment 267054 [details]
nagios4-4.5.10,1-with-updated-MAINTAINER.log
Comment 7 hard.egg0918 2026-01-12 07:42:41 UTC
(In reply to Simon Wollwage from comment #4)
Updated patch and exp run log attached with updated MAINTAINER, obsoleting originals.

Jarrod.
Comment 8 hard.egg0918 2026-01-17 21:58:37 UTC
Hi Simon. Nagios Core 4.5.11 has now been released - am working on a patch for that already and will raise a separate bug for that update once the patch for Nagios Core 4.5.10 has been committed. Thanks, Jarrod.
Comment 9 Fabian Wenk 2026-01-18 19:12:02 UTC
I did apply the patch on FreeBSD 13.5-RELEASE-p6 and build and install Nagios 4.5.10. Technically it is running so far (with php 8.4.16). But I have some minor things in GUI which do not work or look any more as they did with 4.5.1. I did dig into it and found this "solutions":

1) The default page does not go to "Tactical Overview" (/cgi-bin/tac.cgi) any more and loads the main.php. As far as I see, this part of the code did not change in index.php.
-> I was able to do a workaround with below line change in index.php from:
$url = 'main.php';
to:
$url = 'cgi-bin/tac.cgi';
But of course this will be broken again after next update.

2) Dark theme seems only to work for the menu on the left side and main.php, but not for all the other (cgi) pages. Setting '$cfg['theme']='light';' in config.inc.php does help to at least make everything show in light theme again.
More info in https://github.com/NagiosEnterprises/nagioscore/issues/1001

3) The really cool dynamic "Force Map" (default_statusmap_layout=10 in cgi.cfg, based on https://library.nagios.com/docs/nagios-core/configuration/Nagios-Core-Status-Map-Customization) is not available any more. As far as I have figured out this is gone with the removal of the AngularJS framework (https://github.com/NagiosEnterprises/nagioscore/issues/960) in 4.5.3. So I have switched back to default_statusmap_layout=6.
More info in https://github.com/NagiosEnterprises/nagioscore/issues/1000


Best regards,
Fabian
Comment 10 hard.egg0918 2026-01-19 09:30:05 UTC
Hi Fabian. Thanks for the feedback.

1) As far as I can tell in comparing 4.5.1, 4.5.10, and now 4.5.11, the behaviour as to where the right frame is sourced from has not changed. The content of main.php has definitely changed. Do you have the COREWINDOW option enabled or disabled? ..though looking at the code, that does not seem to have much effect here as corewindow still needs to be passed as a query parameter, like:

http://nagios.local/nagios/?corewindow=nagios/cgi-bin/tac.cgi

I have not been able to replicate what you are seeing yet.

2) The exfoliation theme has been used for some time however there was a change to contrib/exfoliation/stylesheets/common.css in 4.5.9 which is likely the cause. These stylesheets are installed unaltered from their upstream sources.

3) This is unfortunate. The release notes for 4.5.3 list the reason as being due to that framework being outdated (it was version 1.3.9, released Jan 2015).

I will attach the patch and log for 4.5.11 shortly though I do not expect it to correct your first dot point.
Comment 11 hard.egg0918 2026-01-19 10:03:50 UTC
Created attachment 267292 [details]
nagios4-4.5.11,1.log
Comment 12 hard.egg0918 2026-01-19 10:04:21 UTC
Created attachment 267293 [details]
nagios4-4.5.11,1.patch
Comment 13 hard.egg0918 2026-01-19 10:05:52 UTC
Patch attached to update the net-mgmt/nagios4 port to version 4.5.11 (released Jan 2026). Have also attached a local exp run showing successful build against current ports tree plus patch.

From https://www.nagios.org/projects/nagios-core/4x/:

4.5.11 - 2026-01-15
 Fix order of Event Queue Initialization (Bryan Heden)
 Fix double-negatives in template-processing related error messages (Vanush Paturyan)

4.5.10 - 2025-10-28
 Update quickstart and documentation links (Aaron Cieslicki)
 Remove null coalescing operators and fix some php errors (Dylan Anderson and Robert Högberg)
 Replace sys/poll.h with poll.h (Michael Orlitzky)
 Fix musl 64bit time_t on 32bit arm (Doug Nazar)
 Removed Ubuntu 20 From Testing (Doug Nazar)
 Changed ‘which’ to ‘command -v’ in autoconf scripts (Michael Orlitzsky)
 Fixed NULL Pointer dereference in Update Chack API response parsing (Ankur Patel)
 Fixed missing image (J. Winters-Brown)

4.5.9 - 2024-12-19
 Fix unreachable notifications (Dylan Anderson)
 Add light option in new exfoliation theme (Dylan Anderson)
 Fix authentication in trends.cgi (Dylan Anderson)

4.5.8 - 2024-11-19
 Improve new exfoliation theme and add back in PID information (Dylan Anderson)
 Fix issues with downtimes that are both flexible and triggered and improve downtime additions in general (#595) (Dylan Anderson)

4.5.7 - 2024-10-24
 Expand the custom variable macros to an empty string, if the custom variable does not exist (Andre Klärner)
 Fix notification logic to not send a notification if a host and services parents are down (#873) (Dylan Anderson)
 Update Exfoliation theme (Dylan Anderson)

4.5.6 - 2024-10-08
 Send a recovery notification if the object recovered while flapping (#847) (Dylan Anderson)
 Fix for separate build directory & a couple small cleanups (Doug Nazar)
 Update tutorial links in Readme (Igor Udot)

4.5.5 - 2024-09-17
 Update configure scripts using newer versions of autotools (Dylan Anderson)
 Disable maintainer mode for TAP testing and add Github Actions (Dylan Anderson)

4.5.4 - 2024-08-14
 Fix inconsistent links for ‘View {Trends,Alert Histogram} For This {Host,Service}’ (Mauricio Faria de Oliveira)
 Fix broken links from removing AngularJS pages in 4.5.3 (Dylan Anderson)

4.5.3 - 2024-06-11
 Update jQuery (#960) (Dylan Anderson)
 Remove pages using outdated AngularJS framework (#960) (Dylan Anderson)
 Fix html encoding of some ascii characters (#813) (Dylan Anderson)
 Updated several page links to use ‘nofollow’ (#965) – (Griffin Westerman)

4.5.2 - 2024-04-30
 Fix handling of timeperiods w/ downtime availability calculations in the Availability CGI report (Sebastian Wolf)
 Fix build when compiling against musl libc (#952) (Sebastian Wolf)
 Fix downtime comment using current time instead of the downtime’s entry time (#910) (Dylan Anderson)
Comment 14 Fabian Wenk 2026-01-19 20:44:20 UTC
(In reply to hard.egg0918 from comment #10)
Hello Jarrod

You're welcome.

1) I have no 'corewindow' option set in config anywhere. Maybe there is a difference in parsing the code with the recent update from php82 to php84 I did. I checked Nagios site after that, but unfortunately can not remember if it did display the main or tac page. 

2) I did suspect that maybe some browser side caching of .css may have caused an issue, but even a restart of Apache httpd, forced page reload or trying in a private browser window did not solve it.

Not sure if that may have an impact or not, but I am running the site as https://nagios.example.org/ without any sub directory for nagios itself. So in cgi.conf I have set 'url_html_path=/'.

I did also update to Nagios 4.5.11, which is working as well. But nothing has changed regarding to 1) or 2). I am using Firefox 147.0.1 (and also tried with DuckDuckGo, Google Chrome and Safari browser) on macOS.

My config.inc.php looks like this (yes, I did try without the 'theme' line and also with $cfg['theme']='dark'; as well):

<?php
//

$cfg['cgi_config_file']='/usr/local/etc/nagios/cgi.cfg';
$cfg['cgi_base_url']='/cgi-bin';
$cfg['theme']='light';

// FILE LOCATION DEFAULTS
$cfg['main_config_file']='/usr/local/etc/nagios/nagios.cfg';
$cfg['status_file']='/var/spool/nagios/status.dat';
$cfg['state_retention_file']='/var/spool/nagios/retention.dat';

// utilities
require_once(dirname(__FILE__).'/includes/utils.inc.php');

?>

I will leave it with light theme and adjusted index.php for now, may try again sometimes.


Best regards,
Fabian
Comment 15 Vladimir Druzenko freebsd_committer freebsd_triage 2026-02-01 22:13:07 UTC
Is patch ready fro commit?
Comment 16 Fabian Wenk 2026-02-02 08:20:14 UTC
(In reply to Vladimir Druzenko from comment #15)
I don't know who would decide this, but from my point of view it is working.

The more cosmetic issues I see in my environment are small and can be manually adjusted after installation, as mention in my comments.
Comment 17 Vladimir Druzenko freebsd_committer freebsd_triage 2026-02-04 19:09:14 UTC
(In reply to Fabian Wenk from comment #16)
I'm asking because I don't have the opportunity to study the long correspondence with technical details of using the software itself.
I can only apply the patch, evaluate the quality of the port, suggest improvements, check the build in poudriere mode, and commit.
But I won’t be able to check whether the software works correctly…
Comment 18 Fabian Wenk 2026-02-04 19:35:29 UTC
(In reply to Vladimir Druzenko from comment #17)
The software works correctly, so the patch is ready for commit.
Comment 19 Vladimir Druzenko freebsd_committer freebsd_triage 2026-02-04 20:49:10 UTC
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.
Comment 20 commit-hook freebsd_committer freebsd_triage 2026-02-04 20:58:45 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2a8608cad2d3f0d8f971c5d314141c902d573bf9

commit 2a8608cad2d3f0d8f971c5d314141c902d573bf9
Author:     hard.egg0918 <hard.egg0918@fastmail.com>
AuthorDate: 2026-02-04 20:52:08 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2026-02-04 20:57:47 +0000

    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>

 net-mgmt/nagios4/Makefile                      | 80 +++++++++++++-------------
 net-mgmt/nagios4/distinfo                      |  6 +-
 net-mgmt/nagios4/files/patch-configure         | 10 ++--
 net-mgmt/nagios4/files/patch-html_Makefile.in  |  6 +-
 net-mgmt/nagios4/files/patch-html_index.php.in | 14 ++---
 net-mgmt/nagios4/files/patch-html_main.php     | 29 +++++-----
 net-mgmt/nagios4/pkg-plist                     | 52 +++++------------
 7 files changed, 82 insertions(+), 115 deletions(-)
Comment 21 commit-hook freebsd_committer freebsd_triage 2026-02-04 21:01:46 UTC
A commit in branch 2026Q1 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b74c69274b28cf00fe9aab52edd66138507e1705

commit b74c69274b28cf00fe9aab52edd66138507e1705
Author:     hard.egg0918 <hard.egg0918@fastmail.com>
AuthorDate: 2026-02-04 20:52:08 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2026-02-04 21:01:09 +0000

    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)

 net-mgmt/nagios4/Makefile                      | 80 +++++++++++++-------------
 net-mgmt/nagios4/distinfo                      |  6 +-
 net-mgmt/nagios4/files/patch-configure         | 10 ++--
 net-mgmt/nagios4/files/patch-html_Makefile.in  |  6 +-
 net-mgmt/nagios4/files/patch-html_index.php.in | 14 ++---
 net-mgmt/nagios4/files/patch-html_main.php     | 29 +++++-----
 net-mgmt/nagios4/pkg-plist                     | 52 +++++------------
 7 files changed, 82 insertions(+), 115 deletions(-)
Comment 22 Vladimir Druzenko freebsd_committer freebsd_triage 2026-02-04 21:04:59 UTC
Thanks.