patches: Make the build reproducible. Closes: #833819

This commit is contained in:
Chris Lamb 2018-04-17 15:45:33 +08:00 committed by Rolf Leggewie
parent 6e91622a4c
commit 4e9934e5ec
2 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,22 @@
Description: Make the build reproducible
Author: Chris Lamb <lamby@debian.org>
Last-Update: 2016-08-08
X-Bug: https://bugs.debian.org/833819
Make the build reproducible:
https://wiki.debian.org/ReproducibleBuilds
--- n2n-1.3.1~svn3789.orig/Makefile
+++ n2n-1.3.1~svn3789/Makefile
@@ -57,7 +57,11 @@ $(N2N_LIB): $(N2N_OBJS)
version.c:
@echo $(N2N_VERSION) | sed -e 's/.*/const char * version = "&";/' > version.c
@uname -p | sed -e 's/.*/const char * osName = "&";/' >> version.c
+ifdef SOURCE_DATE_EPOCH
+ @LC_ALL=C date --utc --date="@$(SOURCE_DATE_EPOCH)" +"%D %r" | sed -e 's/.*/const char * buildDate = "&";/' >> version.c
+else
@date +"%D %r" | sed -e 's/.*/const char * buildDate = "&";/' >> version.c
+endif
clean:
rm -rf $(N2N_OBJS) $(N2N_LIB) $(APPS) $(DOCS) *.dSYM *~ version.c

View file

@ -1,3 +1,4 @@
01-edge.8.diff
upstream-svn4235.patch
makefile.patch
02-reproducible-build.diff