Page MenuHomePhabricator

Package php 7.4 for wikimedia production
Closed, ResolvedPublic

Description

We need to package php 7.4 and all the extensions we use for production (including luasandbox and wikidiff2) and upload it to reprepro, to its own component I guess for php 7.4.

It would be great if we managed to build the packages so that php 7.2 and php 7.4 can coexist on the same application server, like debian tries to do.

  • php7.4
  • dh-php (just for build dependencies)
  • php-defaults (just for build dependencies)
  • php-apcu
  • php-excimer
  • php-geoip
  • php-igbinary
  • php-luasandbox
  • php-memcached
  • php-msgpack
  • php-redis
  • php-tideways
  • php-wikidiff2
  • php-wmerrors
  • php-xdebug

Skipping:

  • php-mongodb was previously packaged for 7.2, but we don't need it anymore.
  • php-mailparse is only packaged for Phabricator
  • php-apcu-bc provides compat apc_* functions

Related Objects

StatusSubtypeAssignedTask
ResolvedNone
ResolvedJdforrester-WMF
ResolvedJdforrester-WMF
ResolvedJdforrester-WMF
ResolvedJdforrester-WMF
Resolved toan
ResolvedLucas_Werkmeister_WMDE
ResolvedJoe
ResolvedJdforrester-WMF
ResolvedLadsgroup
InvalidNone
ResolvedReedy
OpenNone
Resolvedtstarling
ResolvedJdforrester-WMF
ResolvedPRODUCTION ERRORLegoktm
Resolvedtstarling
ResolvedJoe
ResolvedJdforrester-WMF
ResolvedJdforrester-WMF
ResolvedLegoktm
ResolvedJdforrester-WMF
ResolvedDaimona
ResolvedDaimona
ResolvedJdforrester-WMF

Event Timeline

Joe triaged this task as Medium priority.Oct 15 2021, 9:08 AM
Joe created this task.

Change 732096 had a related patch set uploaded (by Legoktm; author: Legoktm):

[operations/puppet@production] aptrepo: Add component/php74

https://gerrit.wikimedia.org/r/732096

Change 732097 had a related patch set uploaded (by Legoktm; author: Legoktm):

[operations/puppet@production] package_builder: Add hook for building PHP 7.4 packages

https://gerrit.wikimedia.org/r/732097

Change 732096 merged by Legoktm:

[operations/puppet@production] aptrepo: Add component/php74

https://gerrit.wikimedia.org/r/732096

Change 732097 merged by Legoktm:

[operations/puppet@production] package_builder: Add hook for building PHP 7.4 packages

https://gerrit.wikimedia.org/r/732097

Are we still installing php-mongodb? I can't see it obviously in puppet... If it is/was still in use, I'm guessing it was potentially xhgui stuff from Performance-Team.

php-tidy probably can be answered by the Parsing people, but I don't think we're still installing it (at least, explicitly) either based on puppet

Are we still installing php-mongodb? I can't see it obviously in puppet... If it is/was still in use, I'm guessing it was potentially xhgui stuff from Performance-Team.

No, not anymore. Removed in https://gerrit.wikimedia.org/r/c/operations/puppet/+/620729 https://gerrit.wikimedia.org/r/c/operations/puppet/+/654923

https://debmonitor.wikimedia.org/search?q=php-mongodb

php-tidy probably can be answered by the Parsing people, but I don't think we're still installing it (at least, explicitly) either based on puppet

T216490 , https://gerrit.wikimedia.org/r/c/mediawiki/vagrant/+/491998/

I copied the list out of what is currently packaged in the php72 component: https://apt-browser.toolforge.org/buster-wikimedia/component/php72/

Are we still installing php-mongodb? I can't see it obviously in puppet... If it is/was still in use, I'm guessing it was potentially xhgui stuff from Performance-Team.

No, looks like it was removed in T180761 / rOPUPabc9e7d757c0: mediawiki: remove mongodb PHP extension from appservers. debmonitor finds nothing as well.

php-tidy probably can be answered by the Parsing people, but I don't think we're still installing it (at least, explicitly) either based on puppet

It's installed in a bunch of CI images:

Screenshot 2021-10-20 at 11-29-41 php7 2-tidy - DebMonitor.png (1×1 px, 291 KB)

Also...I misread, tidy is part of the main PHP package, so it's going to be built regardless, will remove it from the list.

Mentioned in SAL (#wikimedia-operations) [2021-10-20T20:25:52Z] <legoktm> uploaded php7.4 on buster to apt.wm.o (T293449)

It would be great if we managed to build the packages so that php 7.2 and php 7.4 can coexist on the same application server, like debian tries to do.

For PHP itself and the core extensions, this is taken care of. For out of tree extensions, this is trickier. The way Ondřej does it is having php7.2 and php7.4 in the same component, and each php-foo extension contains both the 7.2 and 7.4 .so and .ini files. The downside of this is that the php7.2 packages are now partially dependent upon 7.4.

The other idea I had is to rename the binary packages to php7.4-foo. This will require patching dh-php since it doesn't expect that naming scheme but that seems rather trivial. I intend to pursue this strategy until I hit something that makes it impractical.

All packages listed have been uploaded, I ran core's parser tests and PHPUnit tests against the new PHP 7.4 packages and all passed. Note that for everything, you need to explicitly install php7.4-{name}. Installing php-{name} might (it depends) get you the wrong thing.

We needed ast and imagick for CI, so I've uploaded php7.4- versions of those too.

The tricks I used to build these differently named PHP 7.4 packages is now documented at https://wikitech.wikimedia.org/wiki/PHP_packaging