Source: vmatch Version: 2.3.0+git20200101.0.b1bd228+dfsg-1 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: timestamps environment X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
Hi, Whilst working on the Reproducible Builds effort [0] we noticed that vmatch could not be built reproducibly. Patch attached that ensures that the vmrelease.h file does not contain the build time and the hostname of the build system. However, vmatch remains unreproducible even when this is applied. My best guess at this moment is because it is not actually being built with the -fdebug-prefix-map=... GCC argument in places: $ grep 'gcc ' build.log | grep -v prefix-map | wc -l 348 … in other words, it is not respecting CFLAGS / dpkg-buildflags. [0] https://reproducible-builds.org/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/debian/patches/reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/reproducible-build.patch 2020-01-20 12:14:47.105963705 +0000 @@ -0,0 +1,30 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2020-01-20 + +--- vmatch-2.3.0+git20200101.0.b1bd228+dfsg.orig/src/bin/vmrelease.sh ++++ vmatch-2.3.0+git20200101.0.b1bd228+dfsg/src/bin/vmrelease.sh +@@ -22,14 +22,21 @@ cat << ENDOFRELEASEPRE + #define ${PROGRAM}RELEASE_H + ENDOFRELEASEPRE + +-date +"#define ${PROGRAM}COMPILEDATE \"%Y-%m-%d %H:%M:%S\"" ++date +"#define ${PROGRAM}COMPILEDATE \"%Y-%m-%d %H:%M:%S\"" --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" + + shift # get rid of first argument + echo "#define ${PROGRAM}CFLAGS \"$*\"" + ++if [ -e "${SOURCE_DATE_EPOCH}" ] ++then ++ HOSTNAME="(reproducible build)" ++else ++ HOSTNAME="`hostname`" ++fi ++ + cat << ENDOFRELEASEPOST + #define ${PROGRAM}RELEASEDATE "2007-Aug-27" + #define ${PROGRAM}VERSION "`cat ${WORKVSTREESRC}/VERSION`" +-#define ${PROGRAM}COMPILEHOST "`hostname`" ++#define ${PROGRAM}COMPILEHOST "${HOSTNAME}" + #endif + ENDOFRELEASEPOST --- a/debian/patches/series 2020-01-20 12:01:19.356205198 +0000 --- b/debian/patches/series 2020-01-20 12:12:49.580609231 +0000 @@ -4,3 +4,4 @@ common-distdir.patch skip-doc-installation.patch hardening.patch +reproducible-build.patch