From f70ee60311d5d5206263da1335ca7e970443cd034704fb52c5d7877aacf98156 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Wed, 14 Mar 2018 22:46:52 +0000 Subject: [PATCH] Accepting request 585128 from home:bmwiedemann:branches:Base:System - Add autogen-reproducible-tar.patch to make .tar.gz build reproducible ( https://sourceforge.net/p/autogen/bugs/182/ ) - Add autogen-constant-timeout.patch to make build reproducible (boo#1041534) - Set MAN_PAGE_DATE to not include build date into man pages (boo#1047218) OBS-URL: https://build.opensuse.org/request/show/585128 OBS-URL: https://build.opensuse.org/package/show/Base:System/autogen?expand=0&rev=56 --- autogen-constant-timeout.patch | 32 ++++++++++++++++++++++++++++++++ autogen-reproducible-tar.patch | 32 ++++++++++++++++++++++++++++++++ autogen.changes | 8 ++++++++ autogen.spec | 7 +++++++ 4 files changed, 79 insertions(+) create mode 100644 autogen-constant-timeout.patch create mode 100644 autogen-reproducible-tar.patch diff --git a/autogen-constant-timeout.patch b/autogen-constant-timeout.patch new file mode 100644 index 0000000..11a6249 --- /dev/null +++ b/autogen-constant-timeout.patch @@ -0,0 +1,32 @@ +Author: Bernhard M. Wiedemann +Date: 2018-03-09 + +avoid using benchmarks from the build system +that sometimes return 7 or 9 + + +Index: autogen-5.18.12/configure +=================================================================== +--- autogen-5.18.12.orig/configure ++++ autogen-5.18.12/configure +@@ -17770,6 +17770,7 @@ then + + AG_TIMEOUT=${time_delta} + fi ++AG_TIMEOUT=12 + + + cat >>confdefs.h <<_ACEOF + +Index: autogen-5.18.12/configure.ac +=================================================================== +--- autogen-5.18.12.orig/configure.ac ++++ autogen-5.18.12/configure.ac +@@ -191,6 +191,7 @@ then + + AG_TIMEOUT=${time_delta} + fi ++AG_TIMEOUT=12 + ] + AC_DEFINE_UNQUOTED(AG_DEFAULT_TIMEOUT, ${AG_TIMEOUT}, + [define to suitable timeout limit for shell command]) diff --git a/autogen-reproducible-tar.patch b/autogen-reproducible-tar.patch new file mode 100644 index 0000000..1e56da4 --- /dev/null +++ b/autogen-reproducible-tar.patch @@ -0,0 +1,32 @@ +Author: Bernhard M. Wiedemann +Date: 2018-03-09 + +https://sourceforge.net/p/autogen/bugs/182/ + +libopts-41.1.16.tar.gz contained timestamps from build +and indeterminism from filesystem readdir order. + +See https://reproducible-builds.org/ for why this matters. + +Index: autogen-5.18.12/pkg/libopts/mklibsrc.sh +=================================================================== +--- autogen-5.18.12.orig/pkg/libopts/mklibsrc.sh ++++ autogen-5.18.12/pkg/libopts/mklibsrc.sh +@@ -107,13 +107,15 @@ EOMakefile + | ${CLexe} -I4 --spread=1 --line-sep=" \\" + } > Makefile.am + +-gz='gzip --best' ++gz='gzip --best -n' + sfx=tar.gz + + cd .. + echo ! cd `pwd` + echo ! tar cvf ${tag}.${sfx} ${tag} +-tar cvf - ${tag} | $gz > ${top_builddir}/autoopts/${tag}.${sfx} ++rbopts="" ++[ -z "$SOURCE_DATE_EPOCH" ] || ! tar --help|grep -q sort= || rbopts="--sort=name --format=gnu --clamp-mtime --mtime @$SOURCE_DATE_EPOCH" ++tar cvf - $rbopts ${tag} | $gz > ${top_builddir}/autoopts/${tag}.${sfx} + rm -rf ${tag} + + ## Local Variables: diff --git a/autogen.changes b/autogen.changes index c846bd2..13f9ff5 100644 --- a/autogen.changes +++ b/autogen.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Aug 23 15:03:54 UTC 2017 - bwiedemann@suse.com + +- Add autogen-reproducible-tar.patch to make .tar.gz build reproducible + ( https://sourceforge.net/p/autogen/bugs/182/ ) +- Add autogen-constant-timeout.patch to make build reproducible (boo#1041534) +- Set MAN_PAGE_DATE to not include build date into man pages (boo#1047218) + ------------------------------------------------------------------- Tue Jul 4 08:45:03 UTC 2017 - tchvatal@suse.com diff --git a/autogen.spec b/autogen.spec index ace1474..0374ec2 100644 --- a/autogen.spec +++ b/autogen.spec @@ -32,6 +32,10 @@ Patch1: autogen-build_ldpath.patch Patch2: autogen-catch-race-error.patch # PATCH-FIX-UPSTREAM -- guile 2.2 support Patch3: autogen-guile-2.2.patch +# PATCH-FIX-UPSTREAM -- https://sourceforge.net/p/autogen/bugs/182/ +Patch4: autogen-reproducible-tar.patch +# PATCH-FIX-OPENSUSE +Patch5: autogen-constant-timeout.patch BuildRequires: fdupes BuildRequires: guile-devel BuildRequires: libtool @@ -86,6 +90,8 @@ This package contains devel files for libopts %patch1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 +%patch5 -p1 %build %configure \ @@ -94,6 +100,7 @@ This package contains devel files for libopts make %{?_smp_mflags} %install +export MAN_PAGE_DATE=$(date -u -r ChangeLog -I) %make_install find %{buildroot} -type f -name "*.la" -delete -print %fdupes -s %{buildroot}%{_datadir}