-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support for mod_php on Ubuntu 22.04 #2278
Support for mod_php on Ubuntu 22.04 #2278
Conversation
|
Relevant previous effort: #2163
This would be a great acceptance test. In fact, there already is https://github.com/puppetlabs/puppetlabs-apache/blob/main/spec/acceptance/mod_php_spec.rb but that doesn't run anything like curl to see if it actually renders. |
@xchotard-talentsoft If you could add Ubuntu 22.04 to the metadata that should activate the tests against it to double-check this change. |
Done, but I haven't tested any of the other apache modules. |
@@ -349,7 +349,9 @@ | |||
$php_version = $facts['os']['release']['major'] ? { | |||
'9' => '7.0', # Debian Stretch | |||
'10' => '7.3', # Debian Buster | |||
'16.04' => '7.0', # Ubuntu Xenial Xerus |
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.
Ubuntu 16.04 is EOL and unsupported. Please keep it out.
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.
Do you mind if I remove this commit and do a force push ?
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.
Not at all. In fact, that's what I do all the time.
'20.04' => '7.4', # Ubuntu Foccal Fossal | ||
'22.04' => '8.1', # Ubuntu Jellyfish |
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.
I'd imagine 22.04 is closer to Debian Bullseye. It's mostly about the mod_packages
list. So I'd suggest to change line 348 with a versioncmp. Possibly Ubuntu 20.04 is also more like Debian Bullseye than this list.
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.
I admit I don't know exactly what the versioncmp()
does here. I would use the following block code instead (from L348 to L355:
if ($facts['os']['family'] == 'Debian') {
$php_version = $facts['os']['release']['major'] ? {
'9' => '7.0', # Debian Stretch
'10' => '7.3', # Debian Buster
'11' => '7.4', # Debian Bullseye
'18.04' => '7.2', # Ubuntu Bionic
'20.04' => '7.4', # Ubuntu Focal
'22.04' => '8.1', # Ubuntu Jammy
default => '7.4', # Debian Bullseye, Ubuntu Focal
}
...
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.
I agree the $php_version
part should be pulled out of the versioncmp
and I swear I considered the exact same thing but failed to write it down. However, the list of modules can use a versioncmp. It's still not entirely correct, like #2281 should clean things up further.
@xchotard-talentsoft Hope there's no offense taken, just need to get this done so I can move onto my next task. |
@xchotard-talentsoft Closing this as the need has bee filled by another PR. Thank you for all your work |
Summary
Fixes #2259
Changes
$php_version
mapping inparams.pp
.mod/php.pp
added conditions for Red Hat family that has a specific behavior with PHP 8.x modules name convention.Tests
Tested with the following Puppet code:
To validate that PHP works:
Then open http://<sandbox_ip>/phpinfo.php
Works on:
I could not test SLES because it's not free. I tried openSuse Leap 15.4 but the module does not seems to work for other reasons.