Accepting request 499887 from 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 (forwarded request 499876 from bmwiedemann)

OBS-URL: https://build.opensuse.org/request/show/499887
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gzip?expand=0&rev=44
This commit is contained in:
Dominique Leuenberger 2017-06-07 07:52:02 +00:00 committed by Git OBS Bridge
commit 32e447fc34
2 changed files with 14 additions and 2 deletions

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
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
- changing the way how gcc profiling is generating to have a reproducible
build
-------------------------------------------------------------------
Tue Apr 11 14:08:21 UTC 2017 - kstreitova@suse.com

View File

@ -66,8 +66,8 @@ profile_gzip()
{
tmpfile=$(mktemp)
trap "rm -f $tmpfile $tmpfile.gz" EXIT
tar -cf $tmpfile %{_prefix} || true
time ./gzip $tmpfile
xz -cd %{SOURCE0} > $tmpfile
time ./gzip < $tmpfile > $tmpfile.gz
time ./gzip -d < $tmpfile.gz > /dev/null
}
%if %{do_profiling}