Skip to content

Purge only the PHP Apache module when removing ondrej packages - #2096

Merged
fog-workflows[bot] merged 1 commit into
dev-branchfrom
fix/updatefog-purges-apache-modules
Nov 13, 2026
Merged

fog-workflows[bot] merged 1 commit into
dev-branchfrom
fix/updatefog-purges-apache-modules

Conversation

@mastacontrola

Copy link
Copy Markdown
Member

Fixes #2095.

Problem

On Ubuntu 18.04 and later, the installer cleans up any deb.sury.org (ondrej) package it finds. That cleanup runs apt-get purge 'libapache*'. The glob matches every Apache module. An update therefore removed libapache2-mod-wsgi-py3 and libapache2-mod-xsendfile, which another vhost used. Apache then failed to restart with Invalid command 'WSGIScriptAlias'.

Change

The glob is now 'libapache2-mod-php*', the one package the purge exists to remove before ppa-purge downgrades PHP.

Evidence

apt-get -s purge in an ubuntu:26.04 container with apache2, mod-php, mod-wsgi-py3 and mod-xsendfile installed:

== old glob
Purg libapache2-mod-php [2:8.5+99ubuntu1]
Purg libapache2-mod-php8.5 [8.5.4-0ubuntu1.5]
Purg libapache2-mod-wsgi-py3 [5.0.2-1build2]
Purg libapache2-mod-xsendfile [0.12+git20120509.f181be5+dfsg-1build1]
== new glob
Purg libapache2-mod-php [2:8.5+99ubuntu1]
Purg libapache2-mod-php8.5 [8.5.4-0ubuntu1.5]

The path runs only when dpkg -l lists a deb.sury.org package, so the CI install legs do not exercise it.

🤖 Generated with Claude Code

The deb.sury.org cleanup in installfog/updatefog ran
apt-get purge 'libapache*'. That glob matches every Apache module,
so an update removed mod-wsgi and mod-xsendfile that other vhosts
used, and Apache failed to restart. Limit the glob to
'libapache2-mod-php*', the package the purge exists to remove.

Fixes #2095

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fog-workflows
fog-workflows Bot enabled auto-merge November 13, 2026 11:00
@fog-workflows
fog-workflows Bot added this pull request to the merge queue Nov 13, 2026
Merged via the queue into dev-branch with commit f3ff4f9 Nov 13, 2026
12 checks passed
@fog-workflows
fog-workflows Bot deleted the fix/updatefog-purges-apache-modules branch November 13, 2026 11:08
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