Created attachment 232293 [details] Patch to support PHP8.0 Superseds https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262022
Created attachment 232294 [details] Poudriere Log
Created attachment 232307 [details] Patch to support PHP8.0
Created attachment 232308 [details] Poudriere Log
Hi, is anything missing, can I support somehow? Thank you!
(In reply to Helmut Ritter from comment #4) There is nothing missing but time for me to complete it. I got started, then had to stop because of other pending non-project issues. Sorry. Let's see if I can do it today.
What about users of net-mgmt/nagios? This patch seems to leave them behind.
What is the intended purpose of: IGNORE_WITH_PHP=74 81
It looks like this patch entirely removes support for existing PHP versions: [pkg01 dan ~/ports/head/net-mgmt/nagiosql] % sudo make patch 17:20:31 ===> nagiosql-3.4.1 cannot be installed: doesn't work with lang/php74 port (doesn't support PHP 7.4 81). *** Error code 1 Stop. make: stopped in /usr/home/dan/ports/head/net-mgmt/nagiosql
A side note, and this isn't the biggest issue, the patches should be created using 'make makepatch'. portlint indicates: WARN: /usr/home/dan/ports/head/net-mgmt/nagiosql/files/patch-admin_dir.diff: patch was not generated using ``make makepatch''. It is recommended to use ``make makepatch'' when you need to [re-]generate a patch to ensure proper patch format. WARN: /usr/home/dan/ports/head/net-mgmt/nagiosql/files/patch-functions_dir.diff: patch was not generated using ``make makepatch''. It is recommended to use ``make makepatch'' when you need to [re-]generate a patch to ensure proper patch format. WARN: /usr/home/dan/ports/head/net-mgmt/nagiosql/files/patch-libraries_dir.diff: patch was not generated using ``make makepatch''. It is recommended to use ``make makepatch'' when you need to [re-]generate a patch to ensure proper patch format. Don't worry about that issue. Concentrate on the others. They are vital to not blocking existing users from this port.
Hi, > There is nothing missing but time for me to complete it Thanks for you efforts! > What about users of net-mgmt/nagios? This patch seems to leave them behind. Nagios3 requires PHP7 which will deprecate soon. I for sure can add a FLAVOR but not sure if it is worth if for 5 months. > IGNORE_WITH_PHP=74 81 and > nagiosql-3.4.1 cannot be installed: doesn't work with lang/php74 port Does not work with PHP74 (which will deprecate in 09/2022 afaik) and is not tested with PHP8.1. PHP8.0 is required for now. > the patches should be created using 'make makepatch'. portlint indicates: OK, next time. I tried hard to get a patch created at all.
Please add flavors. We can't block out Nagios 3 users - that's not fair to me (me included in that). This will need flavors I think. 5 months is a long time, and will affect 2022Q3, which means it will be in place until at least 1 Oct (6 months from now). For the patches, if you need help, let me know. In short: * with your current patch in place: make patch * then, make makepatch * this will take the .orig files and create new patch files in the files/ directory. The new files might not have the same names/exact same content, but they should be correct
I tried what you suggested and it fails with: ===> License GPLv2 accepted by the user ===> nagiosql-3.4.1 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by nagiosql-3.4.1 for building ===> Extracting for nagiosql-3.4.1 => SHA256 Checksum OK for wizonet-nagiosql-365d4e0b5edc623b12ea96e8002e8ac66aad6aac_GL0.tar.gz. ===> Patching for nagiosql-3.4.1 ===> Applying FreeBSD patches for nagiosql-3.4.1 from /var/jails/poudriere/ports/default/net-mgmt/nagiosql/files Ignoring previously applied (or reversed) patch. 5 out of 5 hunks ignored--saving rejects to functions/prepend_content.php.rej ===> FAILED Applying FreeBSD patch-functions_prepend__content.php.diff ===> Cleanly applied FreeBSD patch(es) patch-admin_dir.diff patch-functions_dir.diff ===> FAILED to apply cleanly FreeBSD patch(es) patch-functions_prepend__content.php.diff *** Error code 1 Sorry, that's all too complicated for me, I'm no porter or FreeBSD expert. Here is the diff for the Makefile to support Nagios3. Feel free to use it or not: --- /var/jails/poudriere/ports/test/net-mgmt/nagiosql/Makefile 2022-03-07 11:37:11.053905000 +0100 +++ ./Makefile 2022-04-07 09:19:20.489384000 +0200 @@ -10,7 +10,9 @@ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE -RUN_DEPENDS= nagios:net-mgmt/nagios \ +#IGNORE_WITH_PHP=74 81 + +RUN_DEPENDS= nagios:net-mgmt/nagios4 \ ${PEARDIR}/HTML/Template/IT.php:devel/pear-HTML_Template_IT@${PHP_FLAVOR} USES= cpe gettext mysql php:web tar:bzip2 @@ -32,12 +34,15 @@ PEARDIR?= ${LOCALBASE}/share/pear -OPTIONS_DEFINE= CURL FTP +OPTIONS_DEFINE= CURL FTP NAGIOS3 CURL_DESC= Configure with cURL support FTP_DESC= Configure with FTP support +NAGIOS3_DESC= Use Nagios3 (default: Nagios4) CURL_USE= PHP=curl FTP_USE= PHP=ftp +NAGIOS3_USE= RUN_DEPENDS=nagios:net-mgmt/nagios3 \ + ${PEARDIR}/HTML/Template/IT.php:devel/pear-HTML_Template_IT@${PHP_FLAVOR} post-patch: ${REINPLACE_CMD} -e "s|'/etc/nagiosql/|'${ETCDIR}/|g" \ I tested it briefly along with "Patch to support PHP8.0" (which I'm also using actively since I opened the report) with Poudriere and it works for me but as I neiter have PHP7 anymore nor more time to dig into this I have to leave you with this alone.
This is the correct patch for Makefile: --- /var/jails/poudriere/ports/test/net-mgmt/nagiosql/Makefile 2022-03-07 11:37:11.053905000 +0100 +++ ./Makefile 2022-04-07 14:02:07.274774000 +0200 @@ -10,7 +10,9 @@ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE -RUN_DEPENDS= nagios:net-mgmt/nagios \ +#IGNORE_WITH_PHP=74 81 + +RUN_DEPENDS= nagios:net-mgmt/nagios4 \ ${PEARDIR}/HTML/Template/IT.php:devel/pear-HTML_Template_IT@${PHP_FLAVOR} USES= cpe gettext mysql php:web tar:bzip2 @@ -32,12 +34,15 @@ PEARDIR?= ${LOCALBASE}/share/pear -OPTIONS_DEFINE= CURL FTP +OPTIONS_DEFINE= CURL FTP NAGIOS3 CURL_DESC= Configure with cURL support FTP_DESC= Configure with FTP support +NAGIOS3_DESC= Use Nagios3 (default: Nagios4) CURL_USE= PHP=curl FTP_USE= PHP=ftp +NAGIOS3_RUN_DEPENDS= nagios:net-mgmt/nagios \ + ${PEARDIR}/HTML/Template/IT.php:devel/pear-HTML_Template_IT@${PHP_FLAVOR} post-patch: ${REINPLACE_CMD} -e "s|'/etc/nagiosql/|'${ETCDIR}/|g" \
I can help you with the patches Can you attach the Makefile diff as a patch please? Copy/paste often messes with tabs etc. Thank you.
Created attachment 233027 [details] Makefile.diff
Created attachment 233044 [details] Patch to support PHP8.0 Generated with "make makepatch"
Created attachment 233096 [details] This patch adds nagios3/nagios4 flavors. This patch adds nagios3/nagios4 flavors.
While reviewing the patches, have those code changes been sent upstream?
I ask this question because it doesn't seem right to be maintaining the code via patches.
(In reply to Dan Langille from comment #18) I did so but the project seems...dead. https://gitlab.com/wizonet/nagiosql/-/issues/35
(In reply to Helmut Ritter from comment #20) How do you feel about forking the project?
(In reply to Dan Langille from comment #21) I'm no developer :)