Skip to content

Fix removal of legacy ondrej/php PPA sources - #1696

Merged
retlehs merged 2 commits into
masterfrom
fix-php-ppa-removal
Oct 21, 2026
Merged

retlehs merged 2 commits into
masterfrom
fix-php-ppa-removal

Conversation

@retlehs

@retlehs retlehs commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #1680.

Problem

#1680 removes /etc/apt/sources.list.d/ondrej-ubuntu-php-<release>.list, which is the filename add-apt-repository creates. Trellis added the PPA with Ansible's apt_repository module, which names the file ppa_ondrej_php_<release>.list. On existing servers the PPA stays configured alongside packages.sury.org after upgrading to v1.32.0.

Found on a noble server provisioned with Trellis:

$ grep -rl ondrej /etc/apt/sources.list.d/
/etc/apt/sources.list.d/ppa_ondrej_php_noble.list

With the PPA overloaded during today's PHP security release, its fetches failed, so the "Add Sury PHP repository" task's cache update kept failing and retrying, and provisioning appeared stuck for minutes.

Fix

Loop over every known filename for the PPA source:

  • ppa_ondrej_php_<release>.list (Ansible apt_repository)
  • ondrej-ubuntu-php-<release>.list (add-apt-repository)
  • ondrej-ubuntu-php-<release>.sources (deb822, newer add-apt-repository)

The legacy PPA signing key can also live in /etc/apt/trusted.gpg rather than trusted.gpg.d, which this doesn't address. It's harmless once the source is removed.

CI

Also pins the template test job to Python 3.14. 3.x now resolves to Python 3.15.0, where ansible-core 2.21 fails to import (module 'dataclasses' has no attribute '_is_type'). The integration workflow already pins 3.14.

🤖 Generated with Claude Code

retlehs and others added 2 commits October 21, 2026 11:49
#1680 removes `ondrej-ubuntu-php-<release>.list`, which is the filename
`add-apt-repository` creates. Trellis added the PPA with Ansible's
`apt_repository` module, which names the file
`ppa_ondrej_php_<release>.list`, so the PPA stayed configured on existing
servers alongside packages.sury.org.

Remove all known filenames for the PPA source, including the deb822
`.sources` file newer `add-apt-repository` versions create.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ansible-core 2.21 fails to import on Python 3.15 (`module 'dataclasses'
has no attribute '_is_type'`), and `3.x` now resolves to 3.15.0. Match
the integration workflow, which already pins 3.14.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@retlehs
retlehs merged commit 68d2381 into master Oct 21, 2026
2 checks passed
@retlehs
retlehs deleted the fix-php-ppa-removal branch October 21, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant