Accepting request 498585 from home:bmwiedemann:branches:security

Add reproducible.patch to sort input files to make build reproducible
  (boo#1041090)

OBS-URL: https://build.opensuse.org/request/show/498585
OBS-URL: https://build.opensuse.org/package/show/security/tpm2-0-tss?expand=0&rev=45
This commit is contained in:
Alexander Naumov 2017-05-27 21:39:27 +00:00 committed by Git OBS Bridge
parent 71cab5af7c
commit 4cbd149abb
3 changed files with 40 additions and 0 deletions

31
reproducible.patch Normal file
View File

@ -0,0 +1,31 @@
From 010ebd4a161e424e09e5d89a336a84a0a42c456e Mon Sep 17 00:00:00 2001
From: "Bernhard M. Wiedemann" <bwiedemann@suse.de>
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

View File

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

View File

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