diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..caa18d1 --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,31 @@ +From 010ebd4a161e424e09e5d89a336a84a0a42c456e Mon Sep 17 00:00:00 2001 +From: "Bernhard M. Wiedemann" +Date: Sat, 27 May 2017 07:08:56 +0200 +Subject: [PATCH] sort input files + +when building packages (e.g. for openSUSE Linux) +(random) filesystem order of input files +influences ordering of functions in the output, +thus without the patch, builds (in disposable VMs) would differ. + +See https://reproducible-builds.org/ for why this matters. +--- + bootstrap | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bootstrap b/bootstrap +index 95a6dda..610e817 100755 +--- a/bootstrap ++++ b/bootstrap +@@ -8,7 +8,7 @@ src_listvar () { + suffix=$2 + var=$3 + +- find "${basedir}" -name "${suffix}" | tr '\n' ' ' | (echo -n "${var} = " && cat) ++ find "${basedir}" -name "${suffix}" | LC_ALL=C sort | tr '\n' ' ' | (echo -n "${var} = " && cat) + echo "" + } + +-- +2.12.0 + diff --git a/tpm2-0-tss.changes b/tpm2-0-tss.changes index 0c14825..6ae4cd3 100644 --- a/tpm2-0-tss.changes +++ b/tpm2-0-tss.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat May 27 05:07:22 UTC 2017 - bwiedemann@suse.com + +- Add reproducible.patch to sort input files to make build reproducible + (boo#1041090) + ------------------------------------------------------------------- Thu May 11 15:13:49 UTC 2017 - matthias.gerstner@suse.com diff --git a/tpm2-0-tss.spec b/tpm2-0-tss.spec index 2f7e398..9003237 100644 --- a/tpm2-0-tss.spec +++ b/tpm2-0-tss.spec @@ -26,6 +26,8 @@ Url: https://github.com/01org/TPM2.0-TSS Source0: https://github.com/01org/TPM2.0-TSS/archive/%{version}.tar.gz Source2: baselibs.conf Patch0: tpm2-0-tss-configure.patch +# PATCH-FIX-UPSTREAM bmwiedemann https://github.com/01org/TPM2.0-TSS/pull/419 +Patch1: reproducible.patch BuildRequires: autoconf-archive BuildRequires: automake BuildRequires: gcc-c++ @@ -83,6 +85,7 @@ TPM over a socket. %prep %setup -q -n TPM2.0-TSS-%{version} %patch0 -p1 +%patch1 -p1 %build bash bootstrap