-
Notifications
You must be signed in to change notification settings - Fork 0
/
shim.spec
118 lines (108 loc) · 4.87 KB
/
shim.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#
# This file is auto-generated. DO NOT EDIT
# Generated by: autospec.py
# Using build pattern: make
# autospec version: v10
# autospec commit: 6fa3d52
#
# Source0 file verified with key 0xA348D61BC2713E9F (pjones@redhat.com)
#
Name : shim
Version : 15.8
Release : 23
URL : https://github.com/rhboot/shim/releases/download/15.8/shim-15.8.tar.bz2
Source0 : https://github.com/rhboot/shim/releases/download/15.8/shim-15.8.tar.bz2
Source1 : https://github.com/rhboot/shim/releases/download/15.8/shim-15.8.tar.bz2.asc
Source2 : A348D61BC2713E9F.pkey
Summary : No detailed summary available
Group : Development/Tools
License : BSD-2-Clause
Requires: shim-license = %{version}-%{release}
BuildRequires : gnupg
BuildRequires : nss-bin
BuildRequires : openssl-dev
BuildRequires : pesign
BuildRequires : util-linux
# Suppress stripping binaries
%define __strip /bin/true
%define debug_package %{nil}
Patch1: 0001-Add-Intel-Certificate.patch
Patch2: 0002-Add-build-workaround.patch
%description
This directory contains all the public include files from the OpenSSL project.
%package license
Summary: license components for the shim package.
Group: Default
%description license
license components for the shim package.
%prep
mkdir .gnupg
chmod 700 .gnupg
gpg --homedir .gnupg --import %{SOURCE2}
gpg --homedir .gnupg --status-fd 1 --verify %{SOURCE1} %{SOURCE0} > gpg.status
grep -E '^\[GNUPG:\] (GOODSIG|EXPKEYSIG) A348D61BC2713E9F' gpg.status
%setup -q -n shim-15.8
cd %{_builddir}/shim-15.8
%patch -P 1 -p1
%patch -P 2 -p1
%build
## build_prepend content
openssl x509 -in clear-linux-sb.pem -out clear-linux-sb.cer -outform der
## build_prepend end
export http_proxy=http://127.0.0.1:9/
export https_proxy=http://127.0.0.1:9/
export no_proxy=localhost,127.0.0.1,0.0.0.0
export LANG=C.UTF-8
export SOURCE_DATE_EPOCH=1715724713
export GCC_IGNORE_WERROR=1
export AR=gcc-ar
export RANLIB=gcc-ranlib
export NM=gcc-nm
CLEAR_INTERMEDIATE_CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd "
CLEAR_INTERMEDIATE_FCFLAGS="$CLEAR_INTERMEDIATE_FFLAGS -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd "
CLEAR_INTERMEDIATE_FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd "
CLEAR_INTERMEDIATE_CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd "
CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS"
CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS"
FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS"
FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS"
ASFLAGS="$CLEAR_INTERMEDIATE_ASFLAGS"
LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS"
export GOAMD64=v2
make DEFAULT_LOADER=loaderx64.efi VENDOR_CERT_FILE=clear-linux-sb.cer
%install
export GCC_IGNORE_WERROR=1
export AR=gcc-ar
export RANLIB=gcc-ranlib
export NM=gcc-nm
CLEAR_INTERMEDIATE_CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd "
CLEAR_INTERMEDIATE_FCFLAGS="$CLEAR_INTERMEDIATE_FFLAGS -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd "
CLEAR_INTERMEDIATE_FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd "
CLEAR_INTERMEDIATE_CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS -O3 -fdebug-types-section -femit-struct-debug-baseonly -ffat-lto-objects -flto=auto -g1 -gno-column-info -gno-variable-location-views -gz=zstd "
CFLAGS="$CLEAR_INTERMEDIATE_CFLAGS"
CXXFLAGS="$CLEAR_INTERMEDIATE_CXXFLAGS"
FFLAGS="$CLEAR_INTERMEDIATE_FFLAGS"
FCFLAGS="$CLEAR_INTERMEDIATE_FCFLAGS"
ASFLAGS="$CLEAR_INTERMEDIATE_ASFLAGS"
LDFLAGS="$CLEAR_INTERMEDIATE_LDFLAGS"
export SOURCE_DATE_EPOCH=1715724713
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/share/package-licenses/shim
cp %{_builddir}/shim-%{version}/COPYRIGHT %{buildroot}/usr/share/package-licenses/shim/41c2083cdffc5a7e8c72080749c7e2bd913dd5c1 || :
export GOAMD64=v2
GOAMD64=v2
true
## install_append content
mkdir -p %{buildroot}/usr/lib/shim
/usr/bin/install -p -D -m 0755 shimx64.efi %{buildroot}/usr/lib/shim/shimx64.efi
/usr/bin/install -p -D -m 0755 mmx64.efi %{buildroot}/usr/lib/shim/mmx64.efi
/usr/bin/install -p -D -m 0755 fbx64.efi %{buildroot}/usr/lib/shim/fbx64.efi
## install_append end
%files
%defattr(-,root,root,-)
/usr/lib/shim/fbx64.efi
/usr/lib/shim/mmx64.efi
/usr/lib/shim/shimx64.efi
%files license
%defattr(0644,root,root,0755)
/usr/share/package-licenses/shim/41c2083cdffc5a7e8c72080749c7e2bd913dd5c1