[Reproducible-builds] Bug#824182: codeblocks: please make the build reproducible (timestamps)

Fabian Wolff fabi.wolff at arcor.de
Fri May 13 12:55:05 UTC 2016


Source: codeblocks
Version: 13.12+dfsg-4
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!

While working on the "reproducible builds" effort [1], we have noticed
that codeblocks could not be built reproducibly.

The attached patch replaces the preprocessor macros __DATE__ and
__TIME__ with BUILD_DATE and BUILD_TIME, respectively, which can be
set deterministically using SOURCE_DATE_EPOCH [2] in debian/rules like
so:

--- a/debian/rules
+++ b/debian/rules
@@ -12,7 +12,9 @@
 export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed
 # Disable WXDEBUG checks, which wx3.0 defaults to enabling but were off by
 # default in wx2.8, to address issues such as #736368.
-export DEB_CPPFLAGS_MAINT_APPEND=-DNDEBUG
+export DEB_CPPFLAGS_MAINT_APPEND=-DNDEBUG \
+	-DBUILD_DATE="\"\\\"`date -u -d @$(SOURCE_DATE_EPOCH) +%Y-%m-%d`\\\"\"" \
+	-DBUILD_TIME="\"\\\"`date -u -d @$(SOURCE_DATE_EPOCH) +%T`\\\"\""
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/buildflags.mk

Regards,
Fabian Wolff

[1] https://wiki.debian.org/ReproducibleBuilds
[2] https://reproducible-builds.org/specs/source-date-epoch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: codeblocks.diff
Type: text/x-diff
Size: 2460 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20160513/60b92785/attachment.diff>


More information about the Reproducible-builds mailing list