Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to override build date with SOURCE_DATE_EPOCH #1050

Merged
merged 2 commits into from Aug 12, 2021

Conversation

bmwiedemann
Copy link
Contributor

Allow to override build date with SOURCE_DATE_EPOCH
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.

This PR was done while working on reproducible builds for openSUSE.

bmwiedemann and others added 2 commits August 9, 2021 10:20
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.

This PR was done while working on reproducible builds for openSUSE.
@jpivarski
Copy link
Member

This seems sensible; I can understand why you'd want the timestamp in the source code to not vary with time. The documentation on reproducible builds talk about reproducing the application binary, and both of these timestamps go into comments, which cannot affect the binaries, but I can see it being good to make it regular, just on principle.

I see that there's a fallback to time.time() if SOURCE_DATE_EPOCH is not defined, which is good. I don't know under what conditions the variable is defined (only during compilation?), but the fallback just reproduces the previous behavior, so I have no complaints.

Anyway, I'm happy with this PR and will merge it if I'm sure you're done. If you don't plan to make any more changes, let me know in a comment and I'll merge it into the codebase. Thanks!

@bmwiedemann
Copy link
Contributor Author

Being able to trust binaries is the primary goal, but in the context of the openSUSE distribution, we also have python scripts and documentation all bundled into rpm packages and it is easier to reason for trust of our users if we are able to reproduce every bit in our packages and long term even the whole images.

@jpivarski jpivarski merged commit 71222b3 into scikit-hep:main Aug 12, 2021
31 checks passed
@jpivarski
Copy link
Member

@all-contributors please add @bmwiedemann for code

@allcontributors
Copy link
Contributor

@jpivarski

I've put up a pull request to add @bmwiedemann! 🎉

@bmwiedemann bmwiedemann deleted the date branch September 9, 2021 18:42
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.

None yet

3 participants