PHP / Local Debian builds
Noble Patcher
for PHP
Apply the official PHP security fixes to your Debian source package, preserve its packaging, and build a matching package family for Ubuntu 24.04 Noble amd64.
01 /Download and verify
The archive contains the patching and build tool, vendored PHP patches, their provenance, licenses, and operator instructions. Use it with your authenticated Debian PHP source to produce local .deb packages.
Noble Patcher for PHP
- File
- noble-patcher-for-php-0.1.1.tar.gz
- Size
- 624,468 bytes
- SHA-256
07ff9e1a9e9b87f09b48090f31f0e475e98fd16637db38cd680fe2b2f02c8947
Original tool code: MIT license. Vendored PHP material retains its upstream licenses and notices.
printf '%s %s\n' \
'07ff9e1a9e9b87f09b48090f31f0e475e98fd16637db38cd680fe2b2f02c8947' \
'noble-patcher-for-php-0.1.1.tar.gz' | sha256sum --check -
tar -xzf noble-patcher-for-php-0.1.1.tar.gz
cd noble-patcher-for-php-0.1.1
python3 php_patcher.py verifyverify checks the bundled patches, raw upstream references, declared prerequisite transformations, and retained license hashes. Continue after the archive checksum and payload verification pass.
02 /Download Debian source from the Parallax mirror
The complete Ubuntu 24.04 Noble source packages are mirrored here, including the original signed descriptors, upstream archives, Debian packaging, and referenced signature files. PHP source downloads use Spaces; the container gets build dependencies from Ubuntu’s standard repositories.
| Base source | Fixed upstream release | Mirrored package |
|---|---|---|
| PHP 8.2.34 | 8.2.35 | Signed .dsc · Checksums |
| PHP 8.3.35 | 8.3.36 | Signed .dsc · Checksums |
| PHP 8.4.26 | 8.4.27 | Signed .dsc · Checksums |
| PHP 8.5.11 | 8.5.12 | Signed .dsc · Checksums |
The downloader checks the original uploader’s signature and every file’s signed SHA-256 and size before extracting. It uses only distro.parallax.link. Source files and signatures are mirrored unchanged.
Run this from the extracted Noble Patcher directory with Python 3, curl, gpgv, and dpkg-source available. Choose --branch 8.2, 8.3, 8.4, or 8.5; the example prepares PHP 8.4.
curl -fL --proto '=https' \
'https://distro.parallax.link/sources/php/fetch-php-source-0.1.0.py' \
-o fetch-php-source.py
printf '%s %s\n' \
'09627b9ae5e42e9378e8f82ec5d1b3723dde69078a0b762f54ab201d1e3385d1' \
'fetch-php-source.py' | sha256sum --check -
python3 fetch-php-source.py \
--branch 8.4 \
--output ../php8.4-source \
--extractThe new directory retains the original descriptor and source files, the uploader public key, and a verification receipt. Its source/ subdirectory contains the unpacked Debian 3.0 (quilt) tree with the distribution’s patches applied, ready for the inspection below.
Source uploader fingerprint: 6A1AAD7AE5B401C6E259A7B257067BAA1314C7FC. Mirrored public key · Upstream key identity · Complete source catalog.
The main security patches keep their official upstream bytes. PHP 8.4 and 8.5 include prerequisite fixes recorded in the tool’s manifest. Distribution changes can affect applicability: continue only when inspection reports ready. These source versions require the security backport before deployment.
03 /Inspect and prepare a new tree
Run preparation on Linux or WSL with Python 3, patch, quilt, and dpkg-dev installed. The commands below use the PHP 8.4 source directory created by the mirror downloader.
01 / VERIFY
Check payloadsVerify the bundled patch and license hashes.02 / INSPECT
Check your sourceTest every hunk without changing the input.03 / PREPARE
Create a new treeApply the ordered patches and local package revision.04 / BUILD
Compile in NobleRun packaging checks and security regressions.python3 php_patcher.py inspect \
--source ../php8.4-source/source
# Continue only after status: ready.
python3 php_patcher.py prepare \
--source ../php8.4-source/source \
--output ../php8.4-patchedPreparation copies the source to a new directory, preserves the distribution packaging, and applies the verified patch sequence with zero fuzz. Already fixed, already patched, partially patched, and incompatible sources stop before a prepared output is promoted. The original source is preserved.
The default Debian revision is +parallax1. For example, 8.5.11-1+ubuntu24.04.1+deb.sury.org+1 becomes 8.5.11-1+ubuntu24.04.1+deb.sury.org+1+parallax1. PHP continues to report 8.5.11; the package version and provenance identify the backport.
The prepared tree includes debian/parallax-security.json, the applied quilt entries, and a patch log. A custom --revision is available when separate local builds need distinct package versions.
04 /Build with the Noble container
From Linux or WSL with Docker, run the supplied wrapper. It uses a pinned Ubuntu 24.04 image and targets amd64. Build dependencies are installed inside the container using the prepared source’s debian/control.
./build.sh \
--source ../php8.4-patched \
--output ../php-builds/php8.4-noble \
--jobs 4The output directory must be new. Give it a dedicated parent outside the source tree that does not contain the tool directory. Docker mounts source and tool code read-only; the build runs on a working copy and returns artifacts with the invoking user’s ownership.
Normal packaging tests stay enabled. Independent security regressions must pass before the artifact directory is promoted. The explicit --skip-regressions option records missing validation in provenance; retain the default for a tested build.
A native php_patcher.py build command is also available on Noble amd64 with the source package’s build dependencies installed. See the included BUILDING.md for that path and failure diagnostics.
05 /Review artifacts and install manually
A successful build produces matching Debian binary packages, SHA256SUMS, build records, logs, and provenance.json. Provenance records the patch commits and hashes, original and local package versions, architecture, and regression results.
sha256sum --check SHA256SUMSSelect the destination host’s required matching package subset: common files, CLI, FPM or Apache, and every installed bundled extension. Review dependency requirements and keep the previous matching packages and configuration available for rollback.
# Replace VERSION with the complete local Debian package version.
# Add the host's installed bundled extension packages at that same version.
sudo dpkg -i \
./php8.5-common_VERSION_amd64.deb \
./php8.5-cli_VERSION_amd64.deb \
./php8.5-fpm_VERSION_amd64.debdpkg -i does not fetch missing dependencies. Installation runs package maintainer scripts and can restart services. Validate the package set and application in staging before the serving runtime is replaced, then ensure the affected PHP workers use the new binaries.
Check extension loading, FPM or Apache configuration, request handling, uploads, sessions, and background jobs. An unchanged upstream PHP version or module API number alone does not establish compatibility for every third-party extension.
06 /Validation evidence
- 36 automated tool tests passed in Noble, including a tiny real Debian package build and checks for source preservation, prerequisite ordering, unsafe paths, patch integrity, and version ordering.
- PHP 8.3 and PHP 8.5 CLI and CGI runtimes compiled from the patched official base sources. All five selected upstream security PHPT tests passed on each runtime, with no skips or failures.
- All four mirrored Noble source packages passed preparation (PHP 8.2.34, 8.3.35, 8.4.26 and 8.5.11), preserving their original distribution patches and validating the added security backports.
- All 27 source mirror objects verified over public HTTPS. Original uploader signatures, signed file hashes and sizes passed verification. The public downloader fetched and extracted PHP 8.4 without Launchpad.
Build status: a complete production PHP binary package family has not been compiled with this tool. The download supplies the builder and verified patches; validate the packages produced from your own authenticated source and configuration.
Read VALIDATION.md, README.md, and THIRD_PARTY.md in the archive for the recorded checks, build limits, and upstream attribution.