We need to prepare our own rebuilds of PHP 8.1 and required extension packages - in essence, mirroring what's available via packages.sury.org and maintained upstream at https://salsa.debian.org/php-team.
After digging around quite a bit, I believe we would need to:
- Identify required extension packages, starting from what currently exists in component/php74 for bullseye-wikimedia (while we currently use component/icu67 for buster-wikimedia in production, these should be the same).
- Create component/php81 for bullseye-wikimedia.
- Configure a pbuilder hook for component/php81 [0].
- Incrementally fork [1], build, and upload the packages in dependency order (e.g., php, php-defaults, dh-php, ... various PECL packages ...).
I've tested out the process for #4 locally using a hack similar to our APT_USE_BUILT trick [2], and indeed it "works on my machine" (minus packages that are no longer relevant on 8.1, which AFAICT is limited to the php-geoip extension).
Before proceeding, I need to do a bit more research to make sure I'm not "doing it wrong" in a way that makes future maintenance difficult (e.g., security patches).
For example, the process I have working is mainly from first principles and [1], whereas the debian/changelog files for our existing packages in component/php74 look like they started from .dsc imports (not forking from the upstream git repository).
[1] Using a modified version of https://wikitech.wikimedia.org/wiki/PHP_packaging.
- Build packages and provide in registry
- Use in CI
- CI: Build basic images using these
- CI: Switch basic jobs to images using these
- CI: Build Quibble images using these
- CI: Switch Quibble jobs to images using these
- Use in Production images โ T372602