Page MenuHomePhabricator

apt.wikimedia.org packages php and php7.2 point to different versions of PHP 7.2
Closed, DeclinedPublic

Description

vagrant@vagrant:~$ apt policy php
php:
  Installed: 2:7.2+69+0~20190215163918.14+stretch~1.gbpfa617b+wmf1
  Candidate: 2:7.2+69+0~20190215163918.14+stretch~1.gbpfa617b+wmf1
  Version table:
 *** 2:7.2+69+0~20190215163918.14+stretch~1.gbpfa617b+wmf1 1001
       1001 http://apt.wikimedia.org/wikimedia stretch-wikimedia/component/php72 amd64 Packages
        100 /var/lib/dpkg/status
     1:7.0+49 500
        500 http://deb.debian.org/debian stretch/main amd64 Packages
vagrant@vagrant:~$ apt policy php7.2
php7.2:
  Installed: 7.2.31-1+0~20200514.41+debian9~1.gbpe2a56b+wmf1
  Candidate: 7.2.31-1+0~20200514.41+debian9~1.gbpe2a56b+wmf1
  Version table:
 *** 7.2.31-1+0~20200514.41+debian9~1.gbpe2a56b+wmf1 1001
       1001 http://apt.wikimedia.org/wikimedia stretch-wikimedia/component/php72 amd64 Packages
        100 /var/lib/dpkg/status

The first of those is PHP 7.2.16 which doesn't even work with current versions of MediaWiki (which require 7.2.22+). Not sure if it's intentional, but it's pretty confusing.

Seen on vagrant, which pins apt.wikimedia.org:

/etc/apt/preferences.d/wikimedia.pref
Package: *
Pin: release o=Wikimedia
Pin-Priority: 1001
/etc/apt/sources.list.d/wikimedia-php.list
deb http://apt.wikimedia.org/wikimedia stretch-wikimedia component/php72
deb-src http://apt.wikimedia.org/wikimedia stretch-wikimedia component/php72

(Note that my understanding of APT is very superficial so I might have made some rookie mistake here like not disabling some cache. But the two apt policy commands give different results on the same vagrant box, right after an apt update, which AFAICS shouldn't happen.)

Event Timeline

Legoktm subscribed.

The php package is just a meta package that depends on php7.2, so its specific version shouldn't matter. When I ran apt install php on a stretch container with the php72 component enabled, it installed the correct PHP 7.2.31. How did you get 7.2.16?

Also note that serviceops hasn't been updating the stretch packages anymore, they're already a bit out of date for what we run in production.

I could reproduce this on two different vagrant boxes; both are old enough that presumably at some point in their lifetime 7.2.16 was the up-to-date version. (One of them updated automatically to the new version, the other didn't, and I found this issue while debugging that.)

Vagrant is still using stretch (T256822 is the relevant task); not ideal but it works, while MediaWiki refuses to start with 7.2.16.

I'm not sure this issue causes any actual problems on vagrant; it was just confusing and a major distraction while debugging. Feel free to close if it's non-actionable or outside scope.

With T256822: [EPIC] Upgrade MediaWiki-Vagrant to Debian Buster this is not an issue for Vagrant anymore. Feel free to reopen if you want to investigate, although quite possibly it is just me not understanding how apt works.