diff --git a/gengetopt.changes b/gengetopt.changes index 24132c1..73357fa 100644 --- a/gengetopt.changes +++ b/gengetopt.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Dec 28 09:07:29 UTC 2018 - Bernhard Wiedemann + +- Add reproducible.patch to make package build + reproducible again (boo#1047218) + ------------------------------------------------------------------- Mon Nov 12 13:54:22 CET 2018 - sbrabec@suse.com diff --git a/gengetopt.spec b/gengetopt.spec index c40e258..06f7205 100644 --- a/gengetopt.spec +++ b/gengetopt.spec @@ -28,6 +28,8 @@ Source1: https://ftp.gnu.org/gnu/gengetopt/%{name}-%{version}.tar.gz.sig Source2: %{name}.keyring # PATCH-FIX-UPSTREAM sbrabec@suse.cz savannah54996 -- Fix glibc license. https://savannah.gnu.org/bugs/?54996 Patch1: gengetopt-glibc-license.patch +# PATCH-FIX-UPSTREAM bmwiedemann boo#1047218 https://savannah.gnu.org/bugs/index.php?55311 +Patch2: reproducible.patch BuildRequires: bison BuildRequires: flex BuildRequires: gcc-c++ @@ -46,6 +48,7 @@ reading/writing the options from/to config files is also supported. %prep %setup -q %patch1 -p1 +%patch2 -p1 %build %configure diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..fbc6ba7 --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,26 @@ +https://savannah.gnu.org/bugs/index.php?55311 +Author: Bernhard M. Wiedemann +Date: 2018-12-28 + +Use $SOURCE_DATE_EPOCH in mdate-sh + +When patches touch input files, output files will contain the build date +making package build unreproducible. + +See https://reproducible-builds.org/ for why this matters. + +Index: gengetopt-2.22.6/build-aux/mdate-sh +=================================================================== +--- gengetopt-2.22.6.orig/build-aux/mdate-sh ++++ gengetopt-2.22.6/build-aux/mdate-sh +@@ -75,6 +75,10 @@ export LC_ALL + LC_TIME=C + export LC_TIME + ++if [ -n "$SOURCE_DATE_EPOCH" ] ; then ++ exec date -d "@$SOURCE_DATE_EPOCH" -u "+%d %B %Y" ++fi ++ + # GNU ls changes its time format in response to the TIME_STYLE + # variable. Since we cannot assume `unset' works, revert this + # variable to its documented default.