Skip to content

[TASK] Remove unused legacy distribution templates - #598

Merged
Kanti merged 7 commits into
webdevops:masterfrom
andersundsehr:chore/remove-legacy-templates
Nov 8, 2026
Merged

Kanti merged 7 commits into
webdevops:masterfrom
andersundsehr:chore/remove-legacy-templates

Conversation

@Kanti

@Kanti Kanti commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Removes templates, symlinks, provisioning, tests and config that no image uses anymore, and documents three older problems in the images. Replaces #595 without the PHP 8.6 preview (#594) and fixes the bug that made #595's CI red.

Please merge with squash: the first commit on its own renders broken Dockerfiles.

Changes

  • From [TASK] Remove unused legacy distribution templates #595: template macros for CentOS, Debian 7-10 and Ubuntu 12-18 removed; apache.debian9/debian12 unified as apache.debian(); bootstrap.debian() without distribution argument; dangling docker/php/7.x and 8.0 symlinks removed.
  • Fix: bootstrap.debian() still checked distribution == 'bookworm' without the argument, so make provision switched the php-official Dockerfiles to /etc/apt/sources.list, which bookworm does not have. That was the red CI. Only the debian.sources line is left.
  • php.official() without distribution; its else branch installed Buster packages.
  • Legacy leftovers: dead entries in conf/provision.yml and their provisioning/ folders, structure tests for CentOS, Debian 7-9 and Ubuntu 12.04-18.04, PHP 5.6/7.0 mappings in conf/console.yml, ci/BLACKLIST, PHP 5/7 paths in two php-dev scripts, unused imports in apache.jinja2.
  • docs/known-issues.md, with workarounds, not fixed here: contrib/non-free never enabled in the Debian PHP images; Alpine 3.20 repository in the Alpine PHP images; /etc/apt/sources.list without trailing newline in the Debian Nginx images.

How it was verified

  • make provision: in docker/, only whitespace in 4 php-official Dockerfiles and the two php-dev scripts change.
  • ci/console github:generate-ci: build.yaml unchanged.
  • Changed php-dev scripts in php-dev:8.5 and 8.5-alpine: PHP_DEBUGGER unset, none and blackfire behave as before.
  • Each known issue and its workaround reproduced in the named images.

After this is merged, #594 has to use apache.debian(), bootstrap.debian() and php.official(version=…) without distribution.

Checks in detail: andersundsehr#6.

Kanti added 7 commits November 8, 2026 09:25
- Drop template macros no image uses anymore (CentOS, Debian 7-10,
  Ubuntu 12-18, bootstrap.ubuntuOld, nginx.ubuntu).
- Unify the identical apache.debian9/debian12 macros as apache.debian()
  (PHP 8.2 still used the debian9 alias).
- bootstrap.debian() no longer needs a distribution argument: all Debian
  images use deb822 sources.
- Remove dangling docker/php/7.x and 8.0 symlinks (php-official 7.x/8.0
  no longer exist).
bootstrap.debian() lost its distribution argument, but still checked
`distribution == 'bookworm'`. The check was always false, so the
php-official Dockerfiles would have edited /etc/apt/sources.list, which
Debian bookworm does not have, and the committed Dockerfiles no longer
matched the templates. Keep only the debian.sources branch.

The regenerated Dockerfiles only lose trailing whitespace after one
line continuation.
The dangling docker/php/7.x and 8.0 symlinks are gone.
All callers passed distribution='bookworm'; the else branch installed
Buster packages (libldap-2.4-2, zlibc) that bookworm and trixie do not
have. Generated Dockerfiles are unchanged.
Only the removed debian7/debian8 macros used docker and provision.
- conf/provision.yml: drop the entries that match no image (CentOS,
  Ubuntu 12.04, the php section, apache/alpine for php-apache) and
  remove their provisioning/ folders, including provisioning/php/alpine.
- Remove provisioning/php/general 11-php-conf.sh and 20-setup-php.sh;
  php/official and php/official-alpine always overwrite them.
- tests/structure-test: drop the suites for tags that are no longer
  built (CentOS 7, Debian 7-9, Ubuntu 12.04-18.04, alpine-3).
- conf/console.yml: drop the PHP 5.6 and 7.0 test mappings.
- Remove ci/BLACKLIST; no directory matches its PHP 5.6-8.1 entries.
- php-dev scripts: only look at /usr/local/etc/php/conf.d/ and drop the
  /etc/php5 and /etc/php7 xdebug fix; those paths do not exist in the
  images.

Only the two php-dev scripts change in docker/; build.yaml is unchanged.
- Debian PHP images: contrib and non-free are never enabled, because
  the sed command expects the one-line sources.list format.
- Alpine PHP images: /etc/apk/repositories still lists the Alpine 3.20
  community repository.
- Debian Nginx images: /etc/apt/sources.list ends without a newline, so
  an appended repository is silently ignored, and the nginx.org key is
  in the global trusted.gpg keyring.

Each entry has a workaround that was tried in a container.
@sonarqubecloud

sonarqubecloud Bot commented Nov 8, 2026

Copy link
Copy Markdown

@Kanti
Kanti marked this pull request as ready for review November 8, 2026 11:19
@Kanti
Kanti merged commit 800bb8f into webdevops:master Nov 8, 2026
351 of 352 checks passed
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