[Reproducible-builds] Bug#835495: broccoli: please make the build reproducible
Chris Lamb
lamby at debian.org
Fri Aug 26 10:50:02 UTC 2016
Source: broccoli
Version: 1.97-3
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], I noticed
that broccoli could not be built reproducibly.
Patch attached.
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/patches/0002-Reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/0002-Reproducible-build.patch 2016-08-26 11:48:55.007259035 +0100
@@ -0,0 +1,29 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2016-08-26
+
+--- broccoli-1.97.orig/CMakeLists.txt
++++ broccoli-1.97/CMakeLists.txt
+@@ -15,14 +15,18 @@ if (NOT BRO_SYSCONF_FILE)
+ set(BRO_SYSCONF_FILE ${BRO_SYSCONF_DIR}/broccoli.conf)
+ endif ()
+
+-site_name(hostname)
+ if (UNIX)
+- execute_process(COMMAND date OUTPUT_VARIABLE builddate
+- OUTPUT_STRIP_TRAILING_WHITESPACE)
++ if (DEFINED ENV{SOURCE_DATE_EPOCH})
++ execute_process(COMMAND date --utc --date=@$ENV{SOURCE_DATE_EPOCH} OUTPUT_VARIABLE builddate
++ OUTPUT_STRIP_TRAILING_WHITESPACE)
++ else ()
++ execute_process(COMMAND date OUTPUT_VARIABLE builddate
++ OUTPUT_STRIP_TRAILING_WHITESPACE)
++ endif ()
+ else ()
+ set(builddate "build date not available")
+ endif ()
+-set(BUILDINFO "${hostname}, ${builddate}, Debugging support: ${ENABLE_DEBUG}")
++set(BUILDINFO "${builddate}, Debugging support: ${ENABLE_DEBUG}")
+
+ # if no static/shared library preference is given, default to building both
+ if (NOT DEFINED ENABLE_SHARED)
--- a/debian/patches/series 2016-08-26 11:31:19.612653230 +0100
--- b/debian/patches/series 2016-08-26 11:46:42.833909070 +0100
@@ -1 +1,2 @@
0001-Fix-build-with-SSLv3-less-OpenSSL.patch
+0002-Reproducible-build.patch
More information about the Reproducible-builds
mailing list