Fix PHP_EXTRA_VERSION setting
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
php |
Unknown
|
Unknown
|
|||
php7.4 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Athos Ribeiro | ||
php8.1 (Ubuntu) |
Fix Released
|
Undecided
|
Athos Ribeiro | ||
Jammy |
Fix Released
|
Undecided
|
Athos Ribeiro | ||
Kinetic |
Fix Released
|
Undecided
|
Athos Ribeiro | ||
php8.2 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[ Impact ]
Until bionic, the PHP_VERSION variable and the `php --version` command output included the deb version as a suffix of the release (e.g., 7.2.20-1ubuntu2).
From focal and on, a change in the upstream configure.ac file was not accounted for in d/rules, introducing a regression.
Now, users can no longer tell if a specific php release contains a certain fix from within PHP just by parsing the internal version defined in PHP_VERSION.
[ Test Plan ]
There is a autopkgtest being proposed with this change that covers the testing for this SRU (debian/
The idea is to compare the full deb package version string with the one in the "php --version" output. A fixed patch should show the same for both. The following script extracted from d/t/version should cover it (for focal, substitute the php version when checking/using the cli package):
#!/bin/sh
PKGVERSION=
PHPVERSION=$(php8.1 --version | head -1 | cut -d ' ' -f2)
if [ "${PKGVERSION}" != "${PHPVERSION}" ]; then
echo "package version '${PKGVERSION}' does not match php CLI version '${PHPVERSION}'"
exit 1
fi
[ Where problems could occur ]
This changes the output of "php --version" and the value set for the PHP_VERSION variable. This means that any program parsing the php version, either internally through php, or by parsing the output of `php --version`, and not accounting for possible string contents in the debian version part of the package version (e.g., -1ubuntu3 or -1ubuntu3~
[ Other Info ]
This is already fixed in kinetic.
While the jammy SRU will be useful to identify the previous SRU, which is specially valuable for the drupal community, the focal SRU has lower priority and therefore we should stage it (block in proposed).
[ Original message ]
The PHP_EXTRA_VERSION constant is configured in debian/rules, but the sed substitution performed in such line no longer applies since PHP 7.4 (focal).
It currently looks for
PHP_EXTRA_
which was available at:
https:/
Now, when we look at
https:/
we see
PHP_EXTRA_
Which is why the following sed command, present in d/rules, no longer applies:
$(SED) -i -e 's/EXTRA_
The fix here seems to be straightforward and should provide means for third party software to detect whether a specific Ubuntu PHP version carries certain features or fixes. ATM, this will be specially useful for Drupal to detect if PHP8.1 < 8.1.6 (i.e., jammy's PHP) carries an OPCache fix, introduced in LP: #1983205
Related branches
- Matthew Ruffell (community): Approve
- git-ubuntu bot: Approve
- Bryce Harrington (community): Approve
- Heitor Alves de Siqueira: Pending requested
- Canonical Server Reporter: Pending requested
-
Diff: 217 lines (+149/-2)8 files modifieddebian/changelog (+15/-0)
debian/patches/lp-1999598-Fix-bug-79447.patch (+99/-0)
debian/patches/series (+1/-0)
debian/rules (+2/-2)
debian/tests.in/control (+3/-0)
debian/tests.in/version (+13/-0)
debian/tests/control (+3/-0)
debian/tests/version (+13/-0)
- git-ubuntu bot: Approve
- Bryce Harrington (community): Approve
- Canonical Server Reporter: Pending requested
-
Diff: 95 lines (+41/-2)6 files modifieddebian/changelog (+7/-0)
debian/rules (+2/-2)
debian/tests.in/control (+3/-0)
debian/tests.in/version (+13/-0)
debian/tests/control (+3/-0)
debian/tests/version (+13/-0)
- git-ubuntu bot: Approve
- Bryce Harrington (community): Approve
- Canonical Server Reporter: Pending requested
-
Diff: 95 lines (+41/-2)6 files modifieddebian/changelog (+7/-0)
debian/rules (+2/-2)
debian/tests.in/control (+3/-0)
debian/tests.in/version (+13/-0)
debian/tests/control (+3/-0)
debian/tests/version (+13/-0)
- git-ubuntu bot: Approve
- Bryce Harrington (community): Approve
- Canonical Server Reporter: Pending requested
-
Diff: 95 lines (+41/-2)6 files modifieddebian/changelog (+7/-0)
debian/rules (+2/-2)
debian/tests.in/control (+3/-0)
debian/tests.in/version (+13/-0)
debian/tests/control (+3/-0)
debian/tests/version (+13/-0)
- git-ubuntu bot: Approve
- Bryce Harrington (community): Approve
- Canonical Server Reporter: Pending requested
-
Diff: 95 lines (+41/-2)6 files modifieddebian/changelog (+7/-0)
debian/rules (+2/-2)
debian/tests.in/control (+3/-0)
debian/tests.in/version (+13/-0)
debian/tests/control (+3/-0)
debian/tests/version (+13/-0)
no longer affects: | php7.4 (Ubuntu Jammy) |
no longer affects: | php7.4 (Ubuntu Kinetic) |
no longer affects: | php8.1 (Ubuntu Focal) |
Changed in php7.4 (Ubuntu): | |
status: | New → Invalid |
Changed in php8.1 (Ubuntu Kinetic): | |
assignee: | nobody → Athos Ribeiro (athos-ribeiro) |
Changed in php8.1 (Ubuntu Jammy): | |
assignee: | nobody → Athos Ribeiro (athos-ribeiro) |
Changed in php7.4 (Ubuntu Focal): | |
assignee: | nobody → Athos Ribeiro (athos-ribeiro) |
tags: | added: server-todo |
Changed in php8.1 (Ubuntu Kinetic): | |
status: | New → In Progress |
description: | updated |
description: | updated |
Changed in php8.1 (Ubuntu Jammy): | |
status: | New → In Progress |
Changed in php7.4 (Ubuntu Focal): | |
status: | New → In Progress |
tags: |
added: block-proposed-focal removed: server-todo |
Changed in php7.4 (Ubuntu Focal): | |
status: | Triaged → In Progress |
tags: |
added: verification-needed verification-needed-focal removed: verification-done verification-done-focal |
Changed in php8.2 (Ubuntu): | |
assignee: | nobody → Athos Ribeiro (athos-ribeiro) |
status: | New → In Progress |
tags: | added: server-todo |
Changed in php8.2 (Ubuntu): | |
status: | In Progress → Triaged |
assignee: | Athos Ribeiro (athos-ribeiro) → nobody |
Changed in php8.2 (Ubuntu): | |
status: | Triaged → Fix Committed |
Changed in php8.2 (Ubuntu): | |
status: | Fix Committed → Fix Released |
Forwarded to Debian in https:/ /salsa. debian. org/php- team/php/ -/merge_ requests/ 14