Created attachment 251877 [details] fbring rc script in-line with the rest of the ports collection Hi, The attached patch fixes some issues with the rc script. A generic discussion about the rc scripts in the ports collection which contains a lot more background information about the "why" of this patch is at https://lists.freebsd.org/archives/freebsd-ports/2024-July/006342.html Short: - the filename shall be the same as the content of the name variable inside the script - PROVIDE shall be the same as the content of the name variable inside the script - this fixes the use of the script with service jails Additionally to what is discussed there and fixed in the patch, I made the following additional changes: - fix the variable names in the comments to comply to the reality inside the script - lang/php82: contains also the service jails options variable you have already committed to lang/php8[13] (simply because I have it in my poudriere tree I generated this patch from) - add an UPATING entry (date needs to be adapted) You may want to run the following before applying the patch: git mv lang/php81/files/php-fpm.in lang/php81/files/php_fpm.in git mv lang/php82/files/php-fpm.in lang/php82/files/php_fpm.in git mv lang/php83/files/php-fpm.in lang/php83/files/php_fpm.in This is tested with lang/php83 in multiple places with service jails. Bye, Alexander.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=0f438952da055c26e2b55288f2e406bc5b5e474a commit 0f438952da055c26e2b55288f2e406bc5b5e474a Author: Muhammad Moinur Rahman <bofh@FreeBSD.org> AuthorDate: 2024-07-27 12:13:00 +0000 Commit: Muhammad Moinur Rahman <bofh@FreeBSD.org> CommitDate: 2024-07-27 13:06:58 +0000 lang/php81: Fix build with libxml 2.12 and newer - Rename rc script to comply to the rc scripting recommendations [1] PR: 280153, 280134 [1] Co-authored-by: Alexander Leidinger <netchild@FreeBSD.org> Co-authored-by: Daniel Engberg <diizzy@FreeBSD.org> UPDATING | 15 +++++++++++++++ lang/php81/Makefile | 8 ++++++-- lang/php81/distinfo | 6 +++++- lang/php81/files/{php-fpm.in => php_fpm.in} | 6 +++--- 4 files changed, 29 insertions(+), 6 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=55272c38747e54876219ffcb73050514bfd21d0d commit 55272c38747e54876219ffcb73050514bfd21d0d Author: Muhammad Moinur Rahman <bofh@FreeBSD.org> AuthorDate: 2024-07-28 00:19:11 +0000 Commit: Muhammad Moinur Rahman <bofh@FreeBSD.org> CommitDate: 2024-07-28 13:15:15 +0000 lang/php83: Update version 8.3.8=>8.3.9 - Rename rc script to comply to the rc scripting recommendations [1] Changelog: https://www.php.net/ChangeLog-8.php#PHP_8_3 PR: 280134 [1] Co-authored-by: Alexander Leidinger <netchild@FreeBSD.org> UPDATING | 2 +- lang/php83/Makefile | 4 ++-- lang/php83/distinfo | 6 +++--- lang/php83/files/{php-fpm.in => php_fpm.in} | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-)
On php82 this will be done sometimes next month when a new release is available.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=442de7e4088a04a775d6948eac90d968775d748a commit 442de7e4088a04a775d6948eac90d968775d748a Author: Muhammad Moinur Rahman <bofh@FreeBSD.org> AuthorDate: 2024-08-30 08:16:37 +0000 Commit: Muhammad Moinur Rahman <bofh@FreeBSD.org> CommitDate: 2024-08-30 08:18:53 +0000 lang/php82: Update version 8.2.22=>8.2.23 - Rename rc script to comply to the rc scripting recommendations [1] Changelog: https://www.php.net/ChangeLog-8.php#8.2.23 PR: 280134 [1] Co-authored-by: Alexander Leidinger <netchild@FreeBSD.org> UPDATING | 2 +- lang/php82/Makefile | 4 ++-- lang/php82/distinfo | 6 +++--- lang/php82/files/{php-fpm.in => php_fpm.in} | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-)
FYI this breaks a lot of automations that expect "service php-fpm" to work. Perhaps some kind of compatibility is needed for changes like this.
(In reply to Bryan Drewery from comment #5) I put this on my systems and moved on https://people.freebsd.org/~bdrewery/patches/usr.sbin-service-hyphen-compat.patch
(In reply to Bryan Drewery from comment #5) It was a bug in the first place to have it with a hyphen. The language in the corresponding docs didn't spell it out directly (fixed recently), but having the filename different from rc variable name was not intended. So this is basically fixing a bug. So far I have added UPDATING entries every time I committed a fix myself, and suggested to do so at every PR.
(In reply to Bryan Drewery from comment #6) I understand your interest in this patch, it surely is an easy way forward (depending on how much places have this, is surely is even the least work intensive). On the other hand I'm not sure if it is a good idea to have something like your patch in the base system. The number of ports violating the naming scheme is small compared to the total number of rc scripts in the ports collection.
The commits on Jul-Aug 2024 breaks rc script for profile support. diff --git a/lang/php81/files/php_fpm.in b/lang/php81/files/php_fpm.in index 12253b537b2e..a43173247844 100644 --- a/lang/php81/files/php_fpm.in +++ b/lang/php81/files/php_fpm.in @@ -53,7 +53,7 @@ else if [ "x${php_fpm_profiles}" != "x" -a "x$1" != "x" ]; then for profile in ${php_fpm_profiles}; do echo "===> php_fpm profile: ${profile}" - /usr/local/etc/rc.d/php-fpm $1 ${profile} + /usr/local/etc/rc.d/php_fpm $1 ${profile} retcode="$?" if [ "0${retcode}" -ne 0 ]; then failed="${profile} (${retcode}) ${failed:-}"