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
This commit is contained in:
Marcus Meissner 2017-05-31 05:39:57 +00:00 committed by Git OBS Bridge
parent fe8d63443a
commit a0f4a903e3
2 changed files with 7 additions and 1 deletions

View File

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

View File

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