-
Notifications
You must be signed in to change notification settings - Fork 1.1k
(MODULES-10899) Handle PHP8 MOD package naming convention changes #2121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(MODULES-10899) Handle PHP8 MOD package naming convention changes #2121
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2121 +/- ##
=======================================
Coverage 56.36% 56.36%
=======================================
Files 12 12
Lines 220 220
=======================================
Hits 124 124
Misses 96 96 Continue to review full report at Codecov.
|
55a3e5f to
ca2cd64
Compare
ca2cd64 to
a7b20b9
Compare
4f50735 to
721878a
Compare
gguillotte
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sanfrancrisko LGTM
|
I've tried out this branch with debian10 and libapache2-mod-php8.0 and the module name in
overriding the |
|
Worth looking into. Notably for reproduction purposes, those php8 packages are only in sid/unstable at the moment. |
|
Re: https://php.watch/versions/8.0/mod_php-rename, the version number is removed from - LoadModule php7_module "/usr/lib/apache2/modules/libphp7.4.so"
+ LoadModule php_module "/usr/lib/apache2/modules/libphp8.0.so"So for: puppetlabs-apache/manifests/mod/php.pp Lines 73 to 97 in 721878a
L93 may need to use instead of |
|
Thanks for highlighting @beatchristen and the feedback and suggestions @gguillotte . @beatchristen I did a quick test with the module, as it is right now and it appears as though the same problem exists - can you confirm? @gguillotte L93, that you highlighted, should only be hit in cases where For reference, this was the result when using
I'm not sure what Debian are going to do when PHP 8 moves from unstable -> stable in terms of package naming convention. The original issue reports that this was affecting CentOS 7 and Debian 10 - I was going to suggest we raise this as a separate issue to fix on Debian 10 (using Sid) but if the customer in the original issue is using Debian 10 perhaps we need to address it now @gguillotte ? |
|
@sanfrancrisko not sure what problem you specifically encountered. IMHO, the module up until 7.x works as expected on Debian10. I've added two tests and fixes for the problems reported on Debian 10 here:
There's probably no reason for Debian 11 to change anything about the structure within the file, as it was initiated further upstream with the PHP team itself. |
|
@beatchristen I was referring to the issue of trying to install PHP 8.0 using the sid repo on Debian 10 affecting the module as-is on the Forge right now (i.e. without this change merged). There's a bit of time pressure on this fix for MODULES-10899 so I was going to get PR merged and then we could continue investigating the issues with PHP 8.0 on Debian 10 on a separate PR. And yes, to clarify, I can also confirm the module is working fine up to PHP 7.x with Debian 10 👍 Thanks for putting up #2124 - looks good but just had one comment. I'll likely try to land this PR today, as mentioned, to address MODULES-10899 - as far as I can see it will not cause any breaking changes for the module so far, but by all means scream if I'm missing something 😄 |
PHP8 dropped the conventions of including the major versions in apache modules. This fix makes it so that moving forward the module will no longer add the major in the relevant places. before change: /etc/httpd/conf.modules.d/php8.conf /etc/httpd/conf.modules.d/php8.load ^---Content---^ LoadModule php8_module modules/libphp8.so Apache won't load After change: /etc/httpd/conf.modules.d/php.conf /etc/httpd/conf.modules.d/php.load ^---Content---^ LoadModule php_module modules/libphp.so
Also remove restriction on tests so they execute on SLES platforms
On SLES >= 15 it appears as though the `apache2-mod_php5` package is no longer available in the default repo. This commit ensures that the default value for the $php_version parameter is 7 on SLES >= 15 and the appropriate `apache2-mod_php7` package is used. The spec test expectations have also been updated based on the changes.
This commit introduces the `$_module_id` variable which will be populated with the correct module ID based on the version specified. This makes things a bit more explicit and easier to follow. Also, two spec tests added for the following scenario: - Debian 10 (out of the box) using PHP 7.3 - Debian 10 (experimental) using PHP 8.0
721878a to
bc3f35c
Compare
This PR incorporates the changes from #2119 and #2124 along with a few other additions:
versioncmpto< 8to reduce churn in previous conventions for7.xPHP versions