[Reproducible-builds] Bug#833819: n2n: please make the build reproducible
Chris Lamb
lamby at debian.org
Mon Aug 8 22:42:27 UTC 2016
Source: n2n
Version: 1.3.1~svn3789-5
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds at lists.alioth.debian.org
Hi,
Whilst working on the "reproducible builds" effort [0], we noticed
that n2n could not be built reproducibly.
Patch attached.
[0] https://wiki.debian.org/ReproducibleBuilds
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/patches/02-reproducible-build.diff 1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/02-reproducible-build.diff 2016-08-08 23:39:02.090124318 +0100
@@ -0,0 +1,18 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2016-08-08
+
+--- 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
--- a/debian/patches/series 2016-08-08 23:36:03.288651222 +0100
--- b/debian/patches/series 2016-08-08 23:40:33.494871046 +0100
@@ -1,3 +1,4 @@
01-edge.8.diff
upstream-svn4235.patch
makefile.patch
+02-reproducible-build.diff
More information about the Reproducible-builds
mailing list