Repository navigation
php.buildComposerProject2: use cacert for vendored composer/ca-bundle - #576561
Merged
Merged
Conversation
composer/ca-bundle uses SSL_CERT_FILE, SSL_CERT_DIR, openssl.cafile and well-known system paths first. If none of them is usable (for example a container without /etc/ssl, or a sandbox without cacert), it uses its vendored res/cacert.pem. That copy does not get cacert updates. Replace it with a symlink to the cacert bundle. Ref: NixOS#576541 Assisted-by: Claude Code (claude-opus-5)
Many PHP applications vendor composer/ca-bundle. It uses SSL_CERT_FILE, SSL_CERT_DIR, openssl.cafile and well-known system paths first. If none of them is usable (for example a container without /etc/ssl, or a sandbox without cacert), it uses its vendored res/cacert.pem. That copy does not get cacert updates. Replace every vendored copy with a symlink to the cacert bundle in the install hook. This also covers composer, so remove its own symlink. Ref: NixOS#576541 Assisted-by: Claude Code (claude-opus-5)
66 of 95 tasks
philiptaron
approved these changes
Oct 21, 2026
Contributor
|
Successfully created backport PR for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
composer/ca-bundle ships its own
res/cacert.pem(118 roots, including emSign ECC Root CA - G3).CaBundle::getSystemCaRootBundlePath()checks SSL_CERT_FILE, SSL_CERT_DIR,openssl.cafile/capathand well-known system paths first, and uses the vendored file only when none of them works, for example in a container or a build without cacert. That copy does not get cacert updates.In the v2 composer install hook, replace every vendored
composer/ca-bundle/res/cacert.pemwith a symlink to the cacert bundle. This covers composer itself and the packages built withbuildComposerProject2that vendor composer/ca-bundle. The vendor fixed-output hashes do not change.Not covered: apps that ship a
.phar(for example wp-cli), packages not built withbuildComposerProject2, and other vendored bundles such asrmccue/requestsin n98-magerun2.Tested on x86_64-linux with
composer show -a monolog/monolog --no-cache:Related to: #576485
Related to: #576541
Assisted-by: Claude Code (claude-opus-5)
Things done
./result/bin/.nixpkgs-reviewon this PR. See nixpkgs-review usage.passthru.tests.