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

Adhere to SOURCE_DATE_EPOCH specification to fix reproducibility #1314

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ohnatiuk1
Copy link

Description of the issue

Currently Makefile uses current date and time as an argument to the linker which leads to the timestamp being embedded in the binary causing reproducibility issues: we will get different binaries each time we build we build the project.
Reproducible builds are ones where the same source code input produces the same binary output. This helps with caching, authentication of binaries, etc.

Description of changes

My change adds support for a standardised variable. When set, this variable indicates that the build environment wishes to have the value of this variable used as timestamps instead of "current time".

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

License

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your current license (MIT).

Tests

I am able to build the project after applying this patch.
Furthermore, examining the resulting binaries shows that timestamps are set as expected.

@ohnatiuk1 ohnatiuk1 requested a review from a team as a code owner August 23, 2024 16:32
@ohnatiuk1 ohnatiuk1 force-pushed the implement-source-date-epoch branch from d69fb96 to 64a044d Compare August 23, 2024 16:34
Reproducible builds are ones where the same source code input produces the same
binary output. This helps with caching, authentication of binaries, etc.
SOURCE_DATE_EPOCH is a standardised variable which allows the build setup to
specify date and time to be used in place of "current time" such that it will
not change unless the source code changes.

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

Signed-off-by: Oleksandr Hnatiuk <[email protected]>
@ohnatiuk1 ohnatiuk1 force-pushed the implement-source-date-epoch branch from 64a044d to a0f256f Compare August 23, 2024 16:37
Copy link
Contributor

This PR was marked stale due to lack of activity.

@github-actions github-actions bot added the Stale label Aug 31, 2024
@ohnatiuk1
Copy link
Author

Hi. When will this be reviewed and merged?

@github-actions github-actions bot removed the Stale label Dec 10, 2024
Copy link
Contributor

This PR was marked stale due to lack of activity.

@github-actions github-actions bot added the Stale label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant