--- 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 +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