Source: strace Version: 4.21-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 strace could not be built reproducibly as it encodes a timezone-varying date in the manpage. Patch attached that uses SOURCE_DATE_EPOCH [1]. [0] https://reproducible-builds.org/ [1] https://reproducible-builds.org/specs/source-date-epoch/ Best wishes, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/debian/patches/reproducible-build 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/reproducible-build 2018-04-18 18:48:03.072934833 +0100 @@ -0,0 +1,24 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2018-04-18 + +--- strace-4.21.orig/file-date-gen ++++ strace-4.21/file-date-gen +@@ -20,6 +20,11 @@ date= + + [ -f "${DATE_FILE}" ] && date="$(cat "${DATE_FILE}")" + ++# Use SOURCE_DATE_EPOCH if it exists. ++# <https://reproducible-builds.org/specs/source-date-epoch/> ++[ -n "${SOURCE_DATE_EPOCH}" ] || ++ date="@${SOURCE_DATE_EPOCH}" ++ + [ -n "${date}" ] || + date="$(git log -n 1 --format=format:%cD --no-patch "${FILE}")" + +@@ -32,4 +37,4 @@ date= + exit 1 + } + +-exec printf "%s" $(date "+${DATE_FORMAT}" -d "${date}") ++exec printf "%s" $(date -u "+${DATE_FORMAT}" -d "${date}") --- a/debian/patches/series 2018-04-18 18:43:14.655180095 +0100 --- b/debian/patches/series 2018-04-18 18:48:01.920928268 +0100 @@ -1 +1,2 @@ no-arm-unaligned-access +reproducible-build