[Reproducible-builds] Bug#835262: radare2: please make the build reproducible

Chris Lamb lamby at debian.org
Tue Aug 23 22:13:16 UTC 2016


Source: radare2
Version: 0.9.6-3.1
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 radare2 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/13_reproducible_build.patch	1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/13_reproducible_build.patch	2016-08-23 23:09:07.717989001 +0100
@@ -0,0 +1,34 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2016-08-23
+
+--- radare2-0.9.6.orig/binr/blob/Makefile
++++ radare2-0.9.6/binr/blob/Makefile
+@@ -8,7 +8,11 @@ include ../../config-user.mk
+ 
+ CFLAGS=-I ../../libr/include/
+ CFLAGS+=-DLIBDIR="\"${LIBDIR}\""
+-CFLAGS+=-DR2_BIRTH=\"`date +%Y-%m-%d`\"
++ifdef SOURCE_DATE_EPOCH
++	CFLAGS+=-DR2_BIRTH=\"`date --utc --date="@$$SOURCE_DATE_EPOCH" +%Y-%m-%d`\"
++else
++	CFLAGS+=-DR2_BIRTH=\"`date +%Y-%m-%d`\"
++endif
+ CFLAGS+=-DR2_GITTIP=\"$(GIT_TIP)\"
+ CFLAGS+=-DR2_GITTAP=\"$(GIT_TAP)\"
+ 
+--- radare2-0.9.6.orig/binr/rules.mk
++++ radare2-0.9.6/binr/rules.mk
+@@ -2,7 +2,11 @@ BINR_PROGRAM=1
+ include ../../libr/config.mk
+ 
+ CFLAGS+=-DLIBDIR=\"${LIBDIR}\" -I$(LTOP)/include
+-CFLAGS+=-DR2_BIRTH=\"`date +%Y-%m-%d`\" 
++ifdef SOURCE_DATE_EPOCH
++	CFLAGS+=-DR2_BIRTH=\"`date --utc --date="@$$SOURCE_DATE_EPOCH" +%Y-%m-%d`\"
++else
++	CFLAGS+=-DR2_BIRTH=\"`date +%Y-%m-%d`\"
++endif
+ CFLAGS+=-DR2_GITTIP=\"$(GIT_TIP)\"
+ CFLAGS+=-DR2_GITTAP=\"$(GIT_TAP)\"
+ 
--- a/debian/patches/series	2016-08-23 22:27:04.522597470 +0100
--- b/debian/patches/series	2016-08-23 22:55:02.644700860 +0100
@@ -11,3 +11,4 @@
 11_block_libtcc_install.patch
 101_split_plugins_installation
 12_fix_strcasestr_declaration.patch
+13_reproducible_build.patch


More information about the Reproducible-builds mailing list