Accepting request 818103 from Base:System
Use deterministic profile.sh script to make package build reproducible (boo#1040589) (forwarded request 817958 from bmwiedemann) OBS-URL: https://build.opensuse.org/request/show/818103 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grep?expand=0&rev=73
This commit is contained in:
commit
3b27e95d4f
@ -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>
|
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
|
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
|
||||||
Source2: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig
|
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
|
Source3: https://savannah.gnu.org/project/memberlist-gpgkeys.php?group=grep&download=1#/%{name}.keyring
|
||||||
|
Source4: profile.sh
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: makeinfo
|
BuildRequires: makeinfo
|
||||||
BuildRequires: pcre-devel
|
BuildRequires: pcre-devel
|
||||||
@ -48,9 +49,8 @@ match to a specified pattern. By default, grep prints the matching lines.
|
|||||||
--without-included-regex \
|
--without-included-regex \
|
||||||
%{nil}
|
%{nil}
|
||||||
%if 0%{?do_profiling}
|
%if 0%{?do_profiling}
|
||||||
make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_generate} -fno-profile-values"
|
make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_generate}"
|
||||||
# do not run profiling in parallel for reproducible builds (boo#1040589)
|
sh %{SOURCE4} # profiling run
|
||||||
make CFLAGS="%{optflags} %{cflags_profile_generate}" check
|
|
||||||
make clean
|
make clean
|
||||||
make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_feedback}"
|
make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_feedback}"
|
||||||
%else
|
%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