Accepting request 817958 from home:bmwiedemann:branches:Base:System
Use deterministic profile.sh script to make package build reproducible (boo#1040589) OBS-URL: https://build.opensuse.org/request/show/817958 OBS-URL: https://build.opensuse.org/package/show/Base:System/grep?expand=0&rev=100
This commit is contained in:
parent
ad77cef40c
commit
9d3f35e52d
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 1 03:30:01 UTC 2020 - Bernhard Wiedemann <bwiedemann@suse.com>
|
||||
|
||||
- Use deterministic profile.sh script to make package build
|
||||
reproducible (boo#1040589)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 21 10:57:16 UTC 2020 - Andreas Schwab <schwab@suse.de>
|
||||
|
||||
|
@ -26,6 +26,7 @@ URL: https://www.gnu.org/software/grep/
|
||||
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
|
||||
Source2: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig
|
||||
Source3: https://savannah.gnu.org/project/memberlist-gpgkeys.php?group=grep&download=1#/%{name}.keyring
|
||||
Source4: profile.sh
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: makeinfo
|
||||
BuildRequires: pcre-devel
|
||||
@ -48,9 +49,8 @@ match to a specified pattern. By default, grep prints the matching lines.
|
||||
--without-included-regex \
|
||||
%{nil}
|
||||
%if 0%{?do_profiling}
|
||||
make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_generate} -fno-profile-values"
|
||||
# do not run profiling in parallel for reproducible builds (boo#1040589)
|
||||
make CFLAGS="%{optflags} %{cflags_profile_generate}" check
|
||||
make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_generate}"
|
||||
sh %{SOURCE4} # profiling run
|
||||
make clean
|
||||
make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_feedback}"
|
||||
%else
|
||||
|
14
profile.sh
Normal file
14
profile.sh
Normal file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
# profiling script for profile-guided-optimizations (PGO)
|
||||
# must be fully deterministic in what it does for reproducible builds
|
||||
# should cover most code for good PGO optimization benefit
|
||||
# See https://github.com/bmwiedemann/theunreproduciblepackage/tree/master/pgo
|
||||
# for background information on PGO reproducibility
|
||||
|
||||
grep=src/grep
|
||||
t=COPYING
|
||||
exec > /dev/null
|
||||
for param in "" "-v" "-i" "-h" "-H" "-l" "-L" "-q" "-n" "-Z" "-E" "-F" "-P" "-e" "-w" "-c" "-o" ; do
|
||||
$grep $param "GNU" $t
|
||||
$grep $param "G.*U" $t
|
||||
done
|
Loading…
Reference in New Issue
Block a user