From 327561019d4ff15a88f30eb77e4d1b2a078d1c786452ccdf6340d6f480e5fe5c Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Tue, 30 May 2017 09:47:23 +0000 Subject: [PATCH 1/3] Accepting request 499520 from home:heijligen:branches:Base:System changing the way how gcc profiling is generating to have a reproducible build https://en.opensuse.org/openSUSE:Reproducible_Builds OBS-URL: https://build.opensuse.org/request/show/499520 OBS-URL: https://build.opensuse.org/package/show/Base:System/gzip?expand=0&rev=50 --- gzip.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gzip.spec b/gzip.spec index 5d8a4cd..c9b9e02 100644 --- a/gzip.spec +++ b/gzip.spec @@ -66,8 +66,8 @@ profile_gzip() { tmpfile=$(mktemp) trap "rm -f $tmpfile $tmpfile.gz" EXIT - tar -cf $tmpfile %{_prefix} || true - time ./gzip $tmpfile + tar -cfd %{SOURCE0} > $tmpfile || true + time ./gzip < $tmpfile > $tmpfile.gz time ./gzip -d < $tmpfile.gz > /dev/null } %if %{do_profiling} From fe8d63443a76f2ec883f95c54dc8eaae5e493b815a8b3b5180303ed891c44b13 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Tue, 30 May 2017 10:01:07 +0000 Subject: [PATCH 2/3] - changing the way how gcc profiling is generating to have a reproducible build OBS-URL: https://build.opensuse.org/package/show/Base:System/gzip?expand=0&rev=51 --- gzip.changes | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gzip.changes b/gzip.changes index 6a03145..0053f20 100644 --- a/gzip.changes +++ b/gzip.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue May 30 09:59:59 UTC 2017 - src@posteo.de + +- changing the way how gcc profiling is generating to have a reproducible + build + ------------------------------------------------------------------- Tue Apr 11 14:08:21 UTC 2017 - kstreitova@suse.com From a0f4a903e36f775014c0e64b285518172bf07b9bf1deea75c3d6a0b09f64a361 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Wed, 31 May 2017 05:39:57 +0000 Subject: [PATCH 3/3] Accepting request 499876 from home:bmwiedemann:branches:Base:System Make build reproducible in spite of gcc profile based optimizations (boo#1040589) The previous version would create an unused tar file called 'd' and use an empty tmpfile for training gzip profiles though it did make builds reproducible, it would lose some optimizations OBS-URL: https://build.opensuse.org/request/show/499876 OBS-URL: https://build.opensuse.org/package/show/Base:System/gzip?expand=0&rev=52 --- gzip.changes | 6 ++++++ gzip.spec | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gzip.changes b/gzip.changes index 0053f20..9da2c11 100644 --- a/gzip.changes +++ b/gzip.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed May 31 02:54:52 UTC 2017 - bwiedemann@suse.com + +- Make build reproducible in spite of gcc profile based optimizations + (boo#1040589) + ------------------------------------------------------------------- Tue May 30 09:59:59 UTC 2017 - src@posteo.de diff --git a/gzip.spec b/gzip.spec index c9b9e02..62a9724 100644 --- a/gzip.spec +++ b/gzip.spec @@ -66,7 +66,7 @@ profile_gzip() { tmpfile=$(mktemp) trap "rm -f $tmpfile $tmpfile.gz" EXIT - tar -cfd %{SOURCE0} > $tmpfile || true + xz -cd %{SOURCE0} > $tmpfile time ./gzip < $tmpfile > $tmpfile.gz time ./gzip -d < $tmpfile.gz > /dev/null }