Bug 269804 - net-mgmt/nagiosql: Update to 3.5.0
Summary: net-mgmt/nagiosql: Update to 3.5.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dan Langille
URL: https://gitlab.com/wizonet/nagiosql
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-24 15:37 UTC by Helmut Ritter
Modified: 2023-02-25 18:51 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (dvl)


Attachments
Update to 3.5.0 (22.53 KB, patch)
2023-02-24 15:37 UTC, Helmut Ritter
no flags Details | Diff
Poudriere Log (34.98 KB, text/plain)
2023-02-24 15:38 UTC, Helmut Ritter
no flags Details
Revised patch to 3.5.0 (23.88 KB, patch)
2023-02-24 20:32 UTC, Helmut Ritter
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Helmut Ritter 2023-02-24 15:37:23 UTC
Update to 3.5.0
Comment 1 Helmut Ritter 2023-02-24 15:37:37 UTC
Created attachment 240380 [details]
Update to 3.5.0

update to 3.5.0
Comment 2 Helmut Ritter 2023-02-24 15:38:06 UTC
Created attachment 240381 [details]
Poudriere Log

Poudriere Log
Comment 3 Dan Langille freebsd_committer freebsd_triage 2023-02-24 15:48:46 UTC
This patch removes the dependencies on net-mgmt/nagios

Could you elaborate upon that please?
Comment 4 Helmut Ritter 2023-02-24 15:57:20 UTC
(In reply to Dan Langille from comment #3)

No, it let's you chose if you want to use nagios (3) or nagios4:

+OPTIONS_DEFINE=	CURL FTP NAGIOS4
+NAGIOS4_DESC=	Configure with Nagios 4
 
 CURL_USE=	PHP=curl
 FTP_USE=	PHP=ftp
 
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MNAGIOS4}
+RUN_DEPENDS=    nagios:net-mgmt/nagios4 \
+		${PEARDIR}/HTML/Template/IT.php:devel/pear-HTML_Template_IT@${PHP_FLAVOR}
+.else
+RUN_DEPENDS=	nagios:net-mgmt/nagios \
+		${PEARDIR}/HTML/Template/IT.php:devel/pear-HTML_Template_IT@${PHP_FLAVOR}
+.endif
Comment 5 Dan Langille freebsd_committer freebsd_triage 2023-02-24 16:25:17 UTC
I build this and installed it on my host:

[Fri Feb 24 16:21:16.902201 2023] [php:error] [pid 42841] [client 10.8.1.150:50876] PHP Fatal error:  Array and string offset access syntax with curly braces is no longer supported in /usr/local/www/nagiosql/libraries/pear/HTML/Template/IT.php on line 1077

                if ($filename{0} == '/' && substr($this->fileRoot, -1) == '/') {


I think that's the reason I stopped using nagiosql a while back.
Comment 6 Dan Langille freebsd_committer freebsd_triage 2023-02-24 16:26:10 UTC
(In reply to Helmut Ritter from comment #4)
Thanks, I didn't read all the way through the patch.  However, see the run-time issue, which was also present in 3.4.1
Comment 7 Helmut Ritter 2023-02-24 20:32:15 UTC
Created attachment 240389 [details]
Revised patch to 3.5.0
Comment 8 Helmut Ritter 2023-02-24 20:35:13 UTC
(In reply to Dan Langille from comment #6)

Github is a black hole for me so I screwed the patch. Please try the newest one. Works for me. Make sure you have pear in your include_path:

include_path = ".:/usr/local/share/pear/"
Comment 9 Dan Langille freebsd_committer freebsd_triage 2023-02-24 21:59:51 UTC
(In reply to Helmut Ritter from comment #8)
This took me a while to figure out. The patch would not apply.

It's because it's filled with ^M - they can be seen in vi

Running does2unix on it would fix it. I used this old gem: https://www.freebsddiary.org/control-m.php

No need to fix the patch. I'm still testing.
Comment 10 Dan Langille freebsd_committer freebsd_triage 2023-02-24 22:05:20 UTC
(In reply to Helmut Ritter from comment #8)
That patch builds and runs here. I'm still configuring.
Comment 11 commit-hook freebsd_committer freebsd_triage 2023-02-25 18:51:25 UTC
A commit in branch main references this bug:

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

commit 30c034ff424e9ef7ddfb40bea190294ebef59589
Author:     Dan Langille <dvl@FreeBSD.org>
AuthorDate: 2023-02-25 18:48:30 +0000
Commit:     Dan Langille <dvl@FreeBSD.org>
CommitDate: 2023-02-25 18:50:53 +0000

    net-mgmt/nagiosql: Update to 3.5.0

    PR:             269804

 net-mgmt/nagiosql/Makefile         |  35 +++-
 net-mgmt/nagiosql/distinfo         |   6 +-
 net-mgmt/nagiosql/pkg-plist (gone) | 399 -------------------------------------
 3 files changed, 30 insertions(+), 410 deletions(-)
Comment 12 Dan Langille freebsd_committer freebsd_triage 2023-02-25 18:51:53 UTC
I installed this on my host at home. It works. First time it's worked for me in a long time. Thank you.