Skip to content

Conversation

kienanstewart
Copy link

Debian Bullseye uses PHP 7.4 by default. Without adding it in params.pp, PHP 7.2 is used and will fail to install.

@kienanstewart kienanstewart requested a review from a team as a code owner August 23, 2021 19:02
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@puppet-community-rangefinder
Copy link

apache::params is a class

Breaking changes to this file WILL impact these 16 modules (exact match):
Breaking changes to this file MAY impact these 11 modules (near match):

This module is declared in 175 of 578 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

@ekohl
Copy link
Collaborator

ekohl commented Aug 23, 2021

There is already support for Bullseye in the latest git commit. See #2180. However, it's unreleased right now so please use a git version until there is a release. If you do have issues with that commit included, please let us know.

@ekohl ekohl closed this Aug 23, 2021
bastelfreak added a commit to bastelfreak/puppetlabs-apache that referenced this pull request Sep 1, 2021
tl;dr `$::operatingsystemrelease` is different from
`$::operatingsystemmajrelease`. `$::operatingsystemmajrelease` returns
'11.0' on Debian 11, whereas `$::operatingsystemmajrelease` is `11`.
In addition `versioncmp()` says that `'11.0'` is greater than `11`.

Without this change, the module sets the default PHP version on Debian
11 to 7.2, but the actual default in Debian is 7.4:
* https://packages.debian.org/bullseye/php

The 7.2 currently comes from the default entry in the selector
statement:
* https://github.com/puppetlabs/puppetlabs-apache/blob/main/manifests/params.pp#L401

To test:

```puppet
notify { "operatingsystemrelease compared to 11: ${versioncmp($::operatingsystemrelease, '11')}":}
notify { "operatingsystemmajrelease compared to 11: ${versioncmp($::operatingsystemmajrelease, '11')}":}
notify { "operatingsystemrelease: ${::operatingsystemrelease}":}
notify { "operatingsystemmajrelease: ${::operatingsystemmajrelease}":}
```

which produces:

```terminal
puppet apply test.pp
Notice: Compiled catalog for blal in environment production in 0.02 seconds
Notice: operatingsystemrelease compared to 11: 1
Notice: /Stage[main]/Main/Notify[operatingsystemrelease compared to 11: 1]/message: defined 'message' as 'operatingsystemrelease compared to 11: 1'
Notice: operatingsystemmajrelease compared to 11: 0
Notice: /Stage[main]/Main/Notify[operatingsystemmajrelease compared to 11: 0]/message: defined 'message' as 'operatingsystemmajrelease compared to 11: 0'
Notice: operatingsystemrelease: 11.0
Notice: /Stage[main]/Main/Notify[operatingsystemrelease: 11.0]/message: defined 'message' as 'operatingsystemrelease: 11.0'
Notice: operatingsystemmajrelease: 11.0
Notice: /Stage[main]/Main/Notify[operatingsystemmajrelease: 11.0]/message: defined 'message' as 'operatingsystemmajrelease: 11'
Notice: Applied catalog in 0.01 seconds
```

```terminal
:~> facter operatingsystemmajrelease
11
:~> facter operatingsystemrelease
11.0
```

The spec tests are copied from
puppetlabs#2181
Co-authored-by: Kienan Stewart <kienan.stewart@burntworld.ca>
ekohl pushed a commit that referenced this pull request Sep 1, 2021
tl;dr `$::operatingsystemrelease` is different from
`$::operatingsystemmajrelease`. `$::operatingsystemmajrelease` returns
'11.0' on Debian 11, whereas `$::operatingsystemmajrelease` is `11`.
In addition `versioncmp()` says that `'11.0'` is greater than `11`.

Without this change, the module sets the default PHP version on Debian
11 to 7.2, but the actual default in Debian is 7.4:
* https://packages.debian.org/bullseye/php

The 7.2 currently comes from the default entry in the selector
statement:
* https://github.com/puppetlabs/puppetlabs-apache/blob/main/manifests/params.pp#L401

To test:

```puppet
notify { "operatingsystemrelease compared to 11: ${versioncmp($::operatingsystemrelease, '11')}":}
notify { "operatingsystemmajrelease compared to 11: ${versioncmp($::operatingsystemmajrelease, '11')}":}
notify { "operatingsystemrelease: ${::operatingsystemrelease}":}
notify { "operatingsystemmajrelease: ${::operatingsystemmajrelease}":}
```

which produces:

```terminal
puppet apply test.pp
Notice: Compiled catalog for blal in environment production in 0.02 seconds
Notice: operatingsystemrelease compared to 11: 1
Notice: /Stage[main]/Main/Notify[operatingsystemrelease compared to 11: 1]/message: defined 'message' as 'operatingsystemrelease compared to 11: 1'
Notice: operatingsystemmajrelease compared to 11: 0
Notice: /Stage[main]/Main/Notify[operatingsystemmajrelease compared to 11: 0]/message: defined 'message' as 'operatingsystemmajrelease compared to 11: 0'
Notice: operatingsystemrelease: 11.0
Notice: /Stage[main]/Main/Notify[operatingsystemrelease: 11.0]/message: defined 'message' as 'operatingsystemrelease: 11.0'
Notice: operatingsystemmajrelease: 11.0
Notice: /Stage[main]/Main/Notify[operatingsystemmajrelease: 11.0]/message: defined 'message' as 'operatingsystemmajrelease: 11'
Notice: Applied catalog in 0.01 seconds
```

```terminal
:~> facter operatingsystemmajrelease
11
:~> facter operatingsystemrelease
11.0
```

The spec tests are copied from
#2181
Co-authored-by: Kienan Stewart <kienan.stewart@burntworld.ca>
daveseff pushed a commit to daveseff/puppetlabs-apache that referenced this pull request Jul 19, 2022
tl;dr `$::operatingsystemrelease` is different from
`$::operatingsystemmajrelease`. `$::operatingsystemmajrelease` returns
'11.0' on Debian 11, whereas `$::operatingsystemmajrelease` is `11`.
In addition `versioncmp()` says that `'11.0'` is greater than `11`.

Without this change, the module sets the default PHP version on Debian
11 to 7.2, but the actual default in Debian is 7.4:
* https://packages.debian.org/bullseye/php

The 7.2 currently comes from the default entry in the selector
statement:
* https://github.com/puppetlabs/puppetlabs-apache/blob/main/manifests/params.pp#L401

To test:

```puppet
notify { "operatingsystemrelease compared to 11: ${versioncmp($::operatingsystemrelease, '11')}":}
notify { "operatingsystemmajrelease compared to 11: ${versioncmp($::operatingsystemmajrelease, '11')}":}
notify { "operatingsystemrelease: ${::operatingsystemrelease}":}
notify { "operatingsystemmajrelease: ${::operatingsystemmajrelease}":}
```

which produces:

```terminal
puppet apply test.pp
Notice: Compiled catalog for blal in environment production in 0.02 seconds
Notice: operatingsystemrelease compared to 11: 1
Notice: /Stage[main]/Main/Notify[operatingsystemrelease compared to 11: 1]/message: defined 'message' as 'operatingsystemrelease compared to 11: 1'
Notice: operatingsystemmajrelease compared to 11: 0
Notice: /Stage[main]/Main/Notify[operatingsystemmajrelease compared to 11: 0]/message: defined 'message' as 'operatingsystemmajrelease compared to 11: 0'
Notice: operatingsystemrelease: 11.0
Notice: /Stage[main]/Main/Notify[operatingsystemrelease: 11.0]/message: defined 'message' as 'operatingsystemrelease: 11.0'
Notice: operatingsystemmajrelease: 11.0
Notice: /Stage[main]/Main/Notify[operatingsystemmajrelease: 11.0]/message: defined 'message' as 'operatingsystemmajrelease: 11'
Notice: Applied catalog in 0.01 seconds
```

```terminal
:~> facter operatingsystemmajrelease
11
:~> facter operatingsystemrelease
11.0
```

The spec tests are copied from
puppetlabs#2181
Co-authored-by: Kienan Stewart <kienan.stewart@burntworld.ca>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants