Source: gr-gsm Version: 0.41.2-1 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: timestamps X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
Hi, Whilst working on the Reproducible Builds effort [0], we noticed that gr-gsm could not be built reproducibly as it includes a timestamp in the binary. Patch attached. [0] https://reproducible-builds.org/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/debian/patches/10001-reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/10001-reproducible-build.patch 2018-02-25 09:54:38.647275238 +0000 @@ -0,0 +1,15 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2018-02-25 + +--- gr-gsm-0.41.2.orig/lib/CMakeLists.txt ++++ gr-gsm-0.41.2/lib/CMakeLists.txt +@@ -44,7 +44,7 @@ endmacro() + # Handle the generated constants + ######################################################################## + execute_process(COMMAND ${PYTHON_EXECUTABLE} -c +- "import time;print time.strftime('%a, %d %b %Y %H:%M:%S', time.gmtime())" ++ "import os,time,datetime; print datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))).strftime('%a, %d %b %Y %H:%M:%S')" + OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE + ) + message(STATUS "Loading build date ${BUILD_DATE} into constants...") --- a/debian/patches/series 2018-02-25 08:41:45.525339428 +0000 --- b/debian/patches/series 2018-02-25 09:54:38.027269791 +0000 @@ -1 +1,2 @@ 1000-desktop-file-location.patch +10001-reproducible-build.patch