Skip to content

Set SOURCE_DATE_EPOCH for Unix extension builds - #824

Open
shyim wants to merge 1 commit into
php:1.6.xfrom
shyim:source-date-epoch
Open

shyim wants to merge 1 commit into
php:1.6.xfrom
shyim:source-date-epoch

Conversation

@shyim

@shyim shyim commented Nov 19, 2026 •

Copy link
Copy Markdown

Unix source builds can embed the wall-clock time through compiler macros such as APCu's __TIME__. Pass SOURCE_DATE_EPOCH to phpize, configure, and make so rebuilding the same package can reuse the same timestamp.

Preserve any caller-supplied value. When the variable is unset, use the package release timestamp and fall back to 0 when a usable timestamp is unavailable.

See also https://reproducible-builds.org/docs/source-date-epoch/

Verification

  • All 11 Unix build integration tests passed. The new cases check the compiled __TIME__ for the release timestamp, the fallback, and a caller override.
  • PHPStan and coding standards passed.
  • Six sudo-dependent unit tests errored in the noninteractive terminal.

PR submitter checklist

  • I have read CONTRIBUTING.md
  • I discussed this bug with the maintainers in an issue or discussion
  • I have added appropriate tests
  • I confirm that I have the right to submit this under the project's open source licence

This branch has not been deployed

No deployments
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