Apt-get - packages.sury.org/php label change issues prevents system update

Just opening and closing an issue so that those who need the help can find it easily:

apt update (or apt-get update) fails with a PPA error:

root@mailhost
0 ~ # apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:4 http://archive.ubuntu.com/ubuntu jammy-security InRelease
Hit:5 https://ppa.launchpadcontent.net/duplicity-team/duplicity-release-git/ubuntu jammy InRelease
Get:6 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy InRelease [24.6 kB]
Reading package lists... Done

vvvvv
E: Repository 'https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy InRelease' changed its 'Label' value from 'PPA for PHP' to 'Use packages.sury.org/php instead'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
^^^^^

The package maintainer confirms this is a legit name change (and not some kind of PPA supply chain attack (see https://codeberg.org/oerdnj/deb.sury.org/issues/91)

so it is safe to update the ppa description as follows by running apt update manually, and accepting the change:

root@mailhost
0 ~ # apt update
Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:4 http://archive.ubuntu.com/ubuntu jammy-security InRelease
Hit:5 https://ppa.launchpadcontent.net/duplicity-team/duplicity-release-git/ubuntu jammy InRelease
Get:6 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy InRelease [24.6 kB]
E: Repository 'https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy InRelease' changed its 'Label' value from 'PPA for PHP' to 'Use packages.sury.org/php instead'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.

vvvvvvvv
Do you want to accept these changes and continue updating from this repository? [y/N] 

Y  <--  INPUT 'Y' HERE

^^^^^^^
Get:7 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main amd64 Packages [150 kB]
Get:8 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main Translation-en [46.8 kB]
Fetched 228 kB in 6s (37.3 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
26 packages can be upgraded. Run 'apt list --upgradable' to see them.

From there you are good to go…

3 Likes

On the “accept and continue updating” prompt, I chose “N” to wait and figure out what the label change meant, and do the update later.

It is not repeating the prompt in subsequent updates.

I tried the “apt-get --allow-releaseinfo-change update” method, but the label in /var/lib/apt/lists/ppa…InRelease didn’t change.

I also tried add-apt-repository --remove and add-apt-repository to remove and reinstall the ppa in a mailinabox vagrant, but the InRelease file is no different afterward.

Looking into the ppa via web (https://ppa.launchpadcontent.net/ondrej/php/ubuntu/dists/jammy/InRelease), the InRelease file has the previous label, “PPA for PHP”, not the “Use packages…” message, so I don’t know where that message is coming from.

This label change looks to communicate moving the installation source for php to sury.org. If we didn’t accept this label change, maybe waiting until a subsequent update is acceptable?

There’s lots of documentation on dealing with the explicit label change prompt to get updates back to automatic, but none on the rest of the life cycle, how to make the change after having first refused it. Anyone else?