Skip to content

PHP build workflow broken: CentOS 7 EOL breaks static-php-cli's spc-gnu-docker image #5

@lucas-angeli-gimenes

Description

@lucas-angeli-gimenes

Summary

The Build PHP workflow (.github/workflows/php.yml) has been failing since ~early December 2025. Last green run: #34 (2025-10-31, static-php-cli 2.7.6). First red run: #35 (2025-12-05, after #4 bumped static-php-cli to 2.7.9).

Despite the coincidence with the version bump, the failure is not caused by 2.7.9 — it's caused by CentOS 7 reaching EOL and the infrastructure around it changing. Reverting to 2.7.6 would fail the same way.

Root cause

static-php-cli's bin/spc-gnu-docker uses a centos:7 base image to produce a portable GNU toolchain. CentOS 7 went EOL on 2024-06-30 and its packages moved to vault.centos.org. Since roughly early December 2025, that host:

  1. 301-redirects HTTP → HTTPS (now behind CloudFront). CentOS 7's yum does not follow redirects, so yum makecache / yum update fail.
  2. Serves a modern TLS certificate that the trust store shipped with centos:7 can no longer validate. Even after bootstrapping past yum with sslverify=0, every subsequent curl inside the Dockerfile (patchelf, cmake, etc.) fails with Peer's Certificate issuer is not recognized (CentOS 7's curl is linked against NSS, not OpenSSL, so replacing /etc/pki/tls/certs/ca-bundle.crt alone does not help).

Reproduced locally with Docker against both 2.7.6 and 2.7.9.

Why no local workaround

A patch that rewrites repo URLs to HTTPS, sets sslverify=0 in yum and drops a /root/.curlrc with insecure would make the image build again, but it disables TLS validation on every external download inside the build container. Not acceptable for a binary that will ship into production images, and brittle enough that we'd rather not carry it.

Upstream status

  • No upstream issue or PR specifically about the vault.centos.org redirect as of this writing.
  • static-php-cli v3 (PR crazywhalecc/static-php-cli#980) deprecates CentOS 7 entirely. Maintainer confirmed the direction in #1050 ("deprecating CentOS 7 support" in v3). Related: #1027, #1049.

Decision

Wait for static-php-cli v3 and bump once it ships. Until then the Build PHP workflow is expected to fail on manual dispatch; existing published images are unaffected.

Action items

  • Watch StaticPHP v3 crazywhalecc/static-php-cli#980 for merge.
  • Once v3 is released, bump ref: in .github/workflows/php.yml and re-run the matrix.
  • Validate that the new toolchain still produces binaries compatible with gcr.io/distroless/cc-debian12:nonroot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions