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 #5

Merged
merged 1 commit into from
Feb 3, 2023

Conversation

bmwiedemann
Copy link
Contributor

@bmwiedemann bmwiedemann commented Jan 20, 2023

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 date call only works with GNU date. Do you want to support MacOSX, FreeBSD and such? Then I can modify the patch to work for these, too.

Also use UTC/gmtime to be independent of timezone.

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

Without this patch, we would get such a diff in our package build:

+++ new//usr/share/doc/packages/librcc-devel/examples/Makefile  2022-12-09 00:00:00.000000000 +0000
@@ -268,7 +268,7 @@
 LIBGUESS_LIBS = -lguess
 LIBOBJS =
 LIBRCC_CVS = 1
-LIBRCC_CVS_DATE = 230117.18
+LIBRCC_CVS_DATE = 390219.07

@csa7fff
Copy link
Contributor

csa7fff commented Jan 20, 2023

Thanks a lot! I have FreeBSD users and will appreciate modification to support FreeBSD as well.

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 date call works with various implementations of date.

Also use UTC to be independent of timezone.

This patch was done while working on reproducible builds for openSUSE.
@bmwiedemann
Copy link
Contributor Author

I updated it.

@csa7fff csa7fff merged commit 2bfe27e into RusXMMS:master Feb 3, 2023
@csa7fff
Copy link
Contributor

csa7fff commented Feb 3, 2023

Merged. Thanks a lot!

@bmwiedemann bmwiedemann deleted the date branch October 16, 2023 17: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.

2 participants