Skip to content

build EOL PHP versions from source - #140

Draft
le0m wants to merge 2 commits into
mainfrom
secure-old-php-versions
Draft

le0m wants to merge 2 commits into
mainfrom
secure-old-php-versions

Conversation

@le0m

@le0m le0m commented Oct 22, 2026

Copy link
Copy Markdown
Member

with community backports for latest PHP CVEs

@fquffio fquffio mentioned this pull request Oct 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The critical artifact-matching issue can publish images from the wrong flavor under a tag and must be fixed before approval.

1 open issue
What changed in this PR

Builds end-of-life PHP images from source with community security backports while preserving existing image layouts and extension tooling.

Changes:

  • Adds version-specific patch series, source-patching utilities, and PHP helper scripts.
  • Integrates patched sources into local and compatibility builds, with patch-metadata and runtime checks.
  • Consolidates image build, test, and publication automation and documents backport behavior.

Blocking issue — critical: In .github/workflows/publish-images.yml:42, the artifact pattern’s trailing * matches other image flavors, mixing their digests into a single tag’s manifest and potentially publishing the wrong image. Restrict the final component to the two architecture names.

File Description
xhprof/​Makefile Checks image existence by exact tag.
README.md Documents EOL backports and scanner limitations.
pcov/​Makefile Checks image existence by exact tag.
otel/​Makefile Checks image existence by exact tag.
Makefile Builds patched EOL bases and checks FPM and patch metadata.
eol/​patches/​docker-php-source-patch Applies patches and repacks PHP sources.
eol/​patches/​8.1/​series Defines PHP 8.1 patch ordering.
eol/​patches/​8.0/​series Defines PHP 8.0 patch ordering.
eol/​patches/​7.4/​series Defines PHP 7.4 patch ordering.
eol/​patches/​7.3/​series Defines PHP 7.3 patch ordering.
eol/​patches/​7.3/​0107-backport-ZSTR_MAX_LEN.patch Backports string-allocation size constants.
eol/​patches/​7.2/​series Defines PHP 7.2 patch ordering.
eol/​patches/​7.2/​0135-backport-ZSTR_MAX_LEN.patch Backports string-allocation size constants.
eol/​patches/​7.1/​series Defines PHP 7.1 patch ordering.
eol/​patches/​7.1/​0167-backport-ZSTR_MAX_LEN.patch Backports string-allocation size constants.
eol/​patches/​7.0/​series Defines PHP 7.0 patch ordering.
eol/​patches/​7.0/​0211-backport-ZSTR_MAX_LEN.patch Backports string-allocation size constants.
eol/​patches/​5.6/​series Defines PHP 5.6 patch ordering.
eol/​8.1/​fpm/​docker-php-source Manages source extraction and cleanup.
eol/​8.1/​fpm/​docker-php-ext-configure Configures bundled extensions.
eol/​8.1/​fpm/​docker-php-entrypoint Dispatches FPM commands.
eol/​8.1/​fpm-alpine/​docker-php-source Manages source extraction and cleanup.
eol/​8.1/​fpm-alpine/​docker-php-ext-configure Configures bundled extensions.
eol/​8.1/​fpm-alpine/​docker-php-entrypoint Dispatches FPM commands.
eol/​8.1/​cli/​docker-php-source Manages source extraction and cleanup.
eol/​8.1/​cli/​docker-php-ext-configure Configures bundled extensions.
eol/​8.1/​cli/​docker-php-entrypoint Dispatches CLI commands.
eol/​8.1/​apache/​docker-php-source Manages source extraction and cleanup.
eol/​8.1/​apache/​docker-php-ext-configure Configures bundled extensions.
eol/​8.1/​apache/​docker-php-entrypoint Dispatches Apache commands.
eol/​8.1/​apache/​apache2-foreground Starts Apache in the foreground.
eol/​8.1/​alpine/​docker-php-source Manages source extraction and cleanup.
eol/​8.1/​alpine/​docker-php-ext-configure Configures bundled extensions.
eol/​8.1/​alpine/​docker-php-entrypoint Dispatches CLI commands.
eol/​8.0/​fpm/​docker-php-source Manages source extraction and cleanup.
eol/​8.0/​fpm/​docker-php-ext-configure Configures bundled extensions.
eol/​8.0/​fpm/​docker-php-entrypoint Dispatches FPM commands.
eol/​8.0/​fpm-alpine/​docker-php-source Manages source extraction and cleanup.
eol/​8.0/​fpm-alpine/​docker-php-ext-configure Configures bundled extensions.
eol/​8.0/​fpm-alpine/​docker-php-entrypoint Dispatches FPM commands.
eol/​8.0/​cli/​docker-php-source Manages source extraction and cleanup.
eol/​8.0/​cli/​docker-php-ext-configure Configures bundled extensions.
eol/​8.0/​cli/​docker-php-entrypoint Dispatches CLI commands.
eol/​8.0/​apache/​docker-php-source Manages source extraction and cleanup.
eol/​8.0/​apache/​docker-php-ext-configure Configures bundled extensions.
eol/​8.0/​apache/​docker-php-entrypoint Dispatches Apache commands.
eol/​8.0/​apache/​apache2-foreground Starts Apache in the foreground.
eol/​8.0/​alpine/​docker-php-source Manages source extraction and cleanup.
eol/​8.0/​alpine/​docker-php-ext-configure Configures bundled extensions.
eol/​8.0/​alpine/​docker-php-entrypoint Dispatches CLI commands.
eol/​7.4/​fpm/​docker-php-source Manages source extraction and cleanup.
eol/​7.4/​fpm/​docker-php-ext-configure Configures bundled extensions.
eol/​7.4/​fpm/​docker-php-entrypoint Dispatches FPM commands.
eol/​7.4/​fpm-alpine/​docker-php-source Manages source extraction and cleanup.
eol/​7.4/​fpm-alpine/​docker-php-ext-configure Configures bundled extensions.
eol/​7.4/​fpm-alpine/​docker-php-entrypoint Dispatches FPM commands.
eol/​7.4/​cli/​docker-php-source Manages source extraction and cleanup.
eol/​7.4/​cli/​docker-php-ext-configure Configures bundled extensions.
eol/​7.4/​cli/​docker-php-entrypoint Dispatches CLI commands.
eol/​7.4/​apache/​docker-php-source Manages source extraction and cleanup.
eol/​7.4/​apache/​docker-php-ext-configure Configures bundled extensions.
eol/​7.4/​apache/​docker-php-entrypoint Dispatches Apache commands.
eol/​7.4/​apache/​apache2-foreground Starts Apache in the foreground.
eol/​7.4/​alpine/​docker-php-source Manages source extraction and cleanup.
eol/​7.4/​alpine/​docker-php-ext-configure Configures bundled extensions.
eol/​7.4/​alpine/​docker-php-entrypoint Dispatches CLI commands.
eol/​7.3/​fpm/​docker-php-source Manages source extraction and cleanup.
eol/​7.3/​fpm/​docker-php-ext-configure Configures bundled extensions.
eol/​7.3/​fpm/​docker-php-entrypoint Dispatches FPM commands.
eol/​7.3/​fpm-alpine/​docker-php-source Manages source extraction and cleanup.
eol/​7.3/​fpm-alpine/​docker-php-ext-configure Configures bundled extensions.
eol/​7.3/​fpm-alpine/​docker-php-entrypoint Dispatches FPM commands.
eol/​7.3/​cli/​docker-php-source Manages source extraction and cleanup.
eol/​7.3/​cli/​docker-php-ext-configure Configures bundled extensions.
eol/​7.3/​cli/​docker-php-entrypoint Dispatches CLI commands.
eol/​7.3/​apache/​docker-php-source Manages source extraction and cleanup.
eol/​7.3/​apache/​docker-php-ext-configure Configures bundled extensions.
eol/​7.3/​apache/​docker-php-entrypoint Dispatches Apache commands.
eol/​7.3/​apache/​apache2-foreground Starts Apache in the foreground.
eol/​7.3/​alpine/​docker-php-source Manages source extraction and cleanup.
eol/​7.3/​alpine/​docker-php-ext-configure Configures bundled extensions.
eol/​7.3/​alpine/​docker-php-entrypoint Dispatches CLI commands.
eol/​7.2/​fpm/​docker-php-source Manages source extraction and cleanup.
eol/​7.2/​fpm/​docker-php-ext-configure Configures bundled extensions.
eol/​7.2/​fpm/​docker-php-entrypoint Dispatches FPM commands.
eol/​7.2/​fpm-alpine/​docker-php-source Manages source extraction and cleanup.
eol/​7.2/​fpm-alpine/​docker-php-ext-configure Configures bundled extensions.
eol/​7.2/​fpm-alpine/​docker-php-entrypoint Dispatches FPM commands.
eol/​7.2/​cli/​docker-php-source Manages source extraction and cleanup.
eol/​7.2/​cli/​docker-php-ext-configure Configures bundled extensions.
eol/​7.2/​cli/​docker-php-entrypoint Dispatches CLI commands.
eol/​7.2/​apache/​docker-php-source Manages source extraction and cleanup.
eol/​7.2/​apache/​docker-php-ext-configure Configures bundled extensions.
eol/​7.2/​apache/​docker-php-entrypoint Dispatches Apache commands.
eol/​7.2/​apache/​apache2-foreground Starts Apache in the foreground.
eol/​7.2/​alpine/​docker-php-source Manages source extraction and cleanup.
eol/​7.2/​alpine/​docker-php-ext-configure Configures bundled extensions.
eol/​7.2/​alpine/​docker-php-entrypoint Dispatches CLI commands.
eol/​7.1/​fpm/​docker-php-source Manages source extraction and cleanup.
eol/​7.1/​fpm/​docker-php-ext-enable Enables compiled extensions.
eol/​7.1/​fpm/​docker-php-ext-configure Configures bundled extensions.
eol/​7.1/​fpm/​docker-php-entrypoint Dispatches FPM commands.
eol/​7.1/​fpm-alpine/​docker-php-source Manages source extraction and cleanup.
eol/​7.1/​fpm-alpine/​docker-php-ext-enable Enables compiled extensions.
eol/​7.1/​fpm-alpine/​docker-php-ext-configure Configures bundled extensions.
eol/​7.1/​fpm-alpine/​docker-php-entrypoint Dispatches FPM commands.
eol/​7.1/​cli/​docker-php-source Manages source extraction and cleanup.
eol/​7.1/​cli/​docker-php-ext-enable Enables compiled extensions.
eol/​7.1/​cli/​docker-php-ext-configure Configures bundled extensions.
eol/​7.1/​cli/​docker-php-entrypoint Dispatches CLI commands.
eol/​7.1/​apache/​docker-php-source Manages source extraction and cleanup.
eol/​7.1/​apache/​docker-php-ext-install Builds and installs bundled extensions.
eol/​7.1/​apache/​docker-php-ext-enable Enables compiled extensions.
eol/​7.1/​apache/​docker-php-ext-configure Configures bundled extensions.
eol/​7.1/​apache/​docker-php-entrypoint Dispatches Apache commands.
eol/​7.1/​apache/​apache2-foreground Starts Apache in the foreground.
eol/​7.1/​alpine/​docker-php-source Manages source extraction and cleanup.
eol/​7.1/​alpine/​docker-php-ext-enable Enables compiled extensions.
eol/​7.1/​alpine/​docker-php-ext-configure Configures bundled extensions.
eol/​7.1/​alpine/​docker-php-entrypoint Dispatches CLI commands.
eol/​7.0/​fpm/​docker-php-source Manages source extraction and cleanup.
eol/​7.0/​fpm/​docker-php-ext-install Builds and installs bundled extensions.
eol/​7.0/​fpm/​docker-php-ext-enable Enables compiled extensions.
eol/​7.0/​fpm/​docker-php-ext-configure Configures bundled extensions.
eol/​7.0/​fpm/​docker-php-entrypoint Dispatches FPM commands.
eol/​7.0/​cli/​docker-php-source Manages source extraction and cleanup.
eol/​7.0/​cli/​docker-php-ext-enable Enables compiled extensions.
eol/​7.0/​cli/​docker-php-ext-configure Configures bundled extensions.
eol/​7.0/​cli/​docker-php-entrypoint Dispatches CLI commands.
eol/​7.0/​apache/​docker-php-source Manages source extraction and cleanup.
eol/​7.0/​apache/​docker-php-ext-install Builds and installs bundled extensions.
eol/​7.0/​apache/​docker-php-ext-enable Enables compiled extensions.
eol/​7.0/​apache/​docker-php-ext-configure Configures bundled extensions.
eol/​7.0/​apache/​docker-php-entrypoint Dispatches Apache commands.
eol/​7.0/​apache/​apache2-foreground Starts Apache in the foreground.
eol/​5.6/​fpm/​docker-php-source Manages source extraction and cleanup.
eol/​5.6/​fpm/​docker-php-ext-enable Enables compiled extensions.
eol/​5.6/​fpm/​docker-php-ext-configure Configures bundled extensions.
eol/​5.6/​fpm/​docker-php-entrypoint Dispatches FPM commands.
eol/​5.6/​cli/​docker-php-source Manages source extraction and cleanup.
eol/​5.6/​cli/​docker-php-ext-enable Enables compiled extensions.
eol/​5.6/​cli/​docker-php-ext-configure Configures bundled extensions.
eol/​5.6/​cli/​docker-php-entrypoint Dispatches CLI commands.
eol/​5.6/​apache/​docker-php-source Manages source extraction and cleanup.
eol/​5.6/​apache/​docker-php-ext-install Builds and installs bundled extensions.
eol/​5.6/​apache/​docker-php-ext-enable Enables compiled extensions.
eol/​5.6/​apache/​docker-php-ext-configure Configures bundled extensions.
eol/​5.6/​apache/​docker-php-entrypoint Dispatches Apache commands.
eol/​5.6/​apache/​apache2-foreground Starts Apache in the foreground.
dev/​Makefile Checks image existence by exact tag.
compat/​Makefile Supplies patch context and checks patch metadata.
compat/​Dockerfile.5.6-fpm Applies security backports to the FPM compatibility build.
compat/​Dockerfile.5.6-apache Applies security backports to the Apache compatibility build.
compat/​Dockerfile.5.6 Applies PHP 5.6 security backports.
.github/​workflows/​test.latest.yml Delegates latest-image builds and tests.
.github/​workflows/​test.compat.yml Supplies patches to compatibility builds.
.github/​workflows/​test.5.yml Delegates PHP 5.6 builds and tests.
.github/​workflows/​publish.compat.yml Supplies patches during compatibility publication.
.github/​workflows/​publish.5.yml Delegates publication of tested PHP 5 images.
.github/​workflows/​publish-images.yml Publishes manifests from digests; contains the critical flavor-matching issue.
.github/​dependabot.yml Includes composite-action dependency updates.
.github/​actions/​build-image/​action.yml Centralizes image building, testing, and digest recording.

Review effort: Balanced

- name: Download digests
uses: actions/download-artifact@v4
with:
pattern: digests-${{ matrix.version }}${{ matrix.flavor }}-*
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.

3 participants