|
|
@ -3,6 +3,8 @@
|
|
|
|
%global vendor_token_str %{expand:%%{nil}%%{?vendor_token_name:-t "%{vendor_token_name}"}}
|
|
|
|
%global vendor_token_str %{expand:%%{nil}%%{?vendor_token_name:-t "%{vendor_token_name}"}}
|
|
|
|
%global vendor_cert_str %{expand:%%{!?vendor_cert_nickname:-c "Red Hat Test Certificate"}%%{?vendor_cert_nickname:-c "%%{vendor_cert_nickname}"}}
|
|
|
|
%global vendor_cert_str %{expand:%%{!?vendor_cert_nickname:-c "Red Hat Test Certificate"}%%{?vendor_cert_nickname:-c "%%{vendor_cert_nickname}"}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%global grub_version 2.02-87.el8_1.11
|
|
|
|
|
|
|
|
|
|
|
|
%global bootcsvaa64 %{expand:%{SOURCE10}}
|
|
|
|
%global bootcsvaa64 %{expand:%{SOURCE10}}
|
|
|
|
%global bootcsvia32 %{expand:%{SOURCE11}}
|
|
|
|
%global bootcsvia32 %{expand:%{SOURCE11}}
|
|
|
|
%global bootcsvx64 %{expand:%{SOURCE12}}
|
|
|
|
%global bootcsvx64 %{expand:%{SOURCE12}}
|
|
|
@ -13,9 +15,19 @@
|
|
|
|
%global shimefix64 %{expand:%{SOURCE22}}
|
|
|
|
%global shimefix64 %{expand:%{SOURCE22}}
|
|
|
|
#%%global shimefiarm %%{expand:%%{SOURCE23}
|
|
|
|
#%%global shimefiarm %%{expand:%%{SOURCE23}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%global fbefiaa64 %{expand:%{SOURCE30}}
|
|
|
|
|
|
|
|
%global fbefiia32 %{expand:%{SOURCE31}}
|
|
|
|
|
|
|
|
%global fbefix64 %{expand:%{SOURCE32}}
|
|
|
|
|
|
|
|
#%%global fbefiarm %%{expand:%%{SOURCE33}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%global mmefiaa64 %{expand:%{SOURCE40}}
|
|
|
|
|
|
|
|
%global mmefiia32 %{expand:%{SOURCE41}}
|
|
|
|
|
|
|
|
%global mmefix64 %{expand:%{SOURCE42}}
|
|
|
|
|
|
|
|
#%%global mmefiarm %%{expand:%%{SOURCE43}
|
|
|
|
|
|
|
|
|
|
|
|
%global shimveraa64 15-7.el8_1
|
|
|
|
%global shimveraa64 15-7.el8_1
|
|
|
|
%global shimveria32 15.6-1.el8
|
|
|
|
%global shimveria32 15.8-2.el8
|
|
|
|
%global shimverx64 15.6-1.el8
|
|
|
|
%global shimverx64 15.8-2.el8
|
|
|
|
#%%global shimverarm 15-1.el8
|
|
|
|
#%%global shimverarm 15-1.el8
|
|
|
|
|
|
|
|
|
|
|
|
%global shimdiraa64 %{_datadir}/shim/%{shimveraa64}/aa64
|
|
|
|
%global shimdiraa64 %{_datadir}/shim/%{shimveraa64}/aa64
|
|
|
@ -36,6 +48,10 @@
|
|
|
|
%global shimveralt %{expand:%{shimver%{?efi_alt_arch}}}
|
|
|
|
%global shimveralt %{expand:%{shimver%{?efi_alt_arch}}}
|
|
|
|
%global shimdir %{expand:%{shimdir%{efi_arch}}}
|
|
|
|
%global shimdir %{expand:%{shimdir%{efi_arch}}}
|
|
|
|
%global shimdiralt %{expand:%{shimdir%{?efi_alt_arch}}}
|
|
|
|
%global shimdiralt %{expand:%{shimdir%{?efi_alt_arch}}}
|
|
|
|
|
|
|
|
%global fbefi %{expand:%{fbefi%{efi_arch}}}
|
|
|
|
|
|
|
|
%global fbefialt %{expand:%{fbefi%{?efi_alt_arch}}}
|
|
|
|
|
|
|
|
%global mmefi %{expand:%{mmefi%{efi_arch}}}
|
|
|
|
|
|
|
|
%global mmefialt %{expand:%{mmefi%{?efi_alt_arch}}}
|
|
|
|
|
|
|
|
|
|
|
|
%global unsignednone shim-unsigned-none
|
|
|
|
%global unsignednone shim-unsigned-none
|
|
|
|
%global unsigned %{expand:%%{unsigned%{efi_arch}}}
|
|
|
|
%global unsigned %{expand:%%{unsigned%{efi_arch}}}
|
|
|
@ -48,6 +64,7 @@ Requires: mokutil >= 1:0.3.0-1 \
|
|
|
|
Requires: efi-filesystem \
|
|
|
|
Requires: efi-filesystem \
|
|
|
|
Provides: shim-signed-%{-a*} = %{version}-%{release} \
|
|
|
|
Provides: shim-signed-%{-a*} = %{version}-%{release} \
|
|
|
|
Requires: dbxtool >= 0.6-3 \
|
|
|
|
Requires: dbxtool >= 0.6-3 \
|
|
|
|
|
|
|
|
Conflicts: grub2-efi-%{-a*} < %{grub_version} \
|
|
|
|
%{expand:%%if 0%%{-p*} \
|
|
|
|
%{expand:%%if 0%%{-p*} \
|
|
|
|
Provides: shim = %{version}-%{release} \
|
|
|
|
Provides: shim = %{version}-%{release} \
|
|
|
|
Provides: shim-signed = %{version}-%{release} \
|
|
|
|
Provides: shim-signed = %{version}-%{release} \
|
|
|
@ -69,6 +86,7 @@ version signed by the UEFI signing service. \
|
|
|
|
# -a <efiarch>
|
|
|
|
# -a <efiarch>
|
|
|
|
# -i <input>
|
|
|
|
# -i <input>
|
|
|
|
%define hash(a:i:d:) \
|
|
|
|
%define hash(a:i:d:) \
|
|
|
|
|
|
|
|
if [ 0%{?_unsigned_test_build:%{_unsigned_test_build}} -ne 0 ] ; then \
|
|
|
|
pesign -i %{-i*} -h -P > shim.hash \
|
|
|
|
pesign -i %{-i*} -h -P > shim.hash \
|
|
|
|
read file0 hash0 < shim.hash \
|
|
|
|
read file0 hash0 < shim.hash \
|
|
|
|
read file1 hash1 < %{-d*}/shim%{-a*}.hash \
|
|
|
|
read file1 hash1 < %{-d*}/shim%{-a*}.hash \
|
|
|
@ -77,6 +95,7 @@ version signed by the UEFI signing service. \
|
|
|
|
echo $hash0 vs $hash1 \
|
|
|
|
echo $hash0 vs $hash1 \
|
|
|
|
exit 1 \
|
|
|
|
exit 1 \
|
|
|
|
fi \
|
|
|
|
fi \
|
|
|
|
|
|
|
|
fi \
|
|
|
|
%{nil}
|
|
|
|
%{nil}
|
|
|
|
|
|
|
|
|
|
|
|
# -i <input>
|
|
|
|
# -i <input>
|
|
|
@ -89,7 +108,23 @@ version signed by the UEFI signing service. \
|
|
|
|
# -a <efiarch>
|
|
|
|
# -a <efiarch>
|
|
|
|
# -i <input>
|
|
|
|
# -i <input>
|
|
|
|
%define distrosign(b:a:d:) \
|
|
|
|
%define distrosign(b:a:d:) \
|
|
|
|
|
|
|
|
if [ 0%{?_unsigned_test_build:%{_unsigned_test_build}} -ne 0 ] ; then \
|
|
|
|
|
|
|
|
if [ "%{-b*}%{-a*}" = "shim%{efi_arch}" ] ; then \
|
|
|
|
|
|
|
|
cp -av "%{shimefi}" %{-b*}%{-a*}-unsigned.efi \
|
|
|
|
|
|
|
|
elif [ "%{-b*}%{-a*}" = "shim%{efi_alt_arch}" ] ; then \
|
|
|
|
|
|
|
|
cp -av "%{shimefialt}" %{-b*}%{-a*}-unsigned.efi \
|
|
|
|
|
|
|
|
elif [ "%{-b*}%{-a*}" = "mm%{efi_arch}" ] ; then \
|
|
|
|
|
|
|
|
cp -av "%{mmefi}" %{-b*}%{-a*}-unsigned.efi \
|
|
|
|
|
|
|
|
elif [ "%{-b*}%{-a*}" = "mm%{efi_alt_arch}" ] ; then \
|
|
|
|
|
|
|
|
cp -av "%{mmefialt}" %{-b*}%{-a*}-unsigned.efi \
|
|
|
|
|
|
|
|
elif [ "%{-b*}%{-a*}" = "fb%{efi_arch}" ] ; then \
|
|
|
|
|
|
|
|
cp -av "%{fbefi}" %{-b*}%{-a*}-unsigned.efi \
|
|
|
|
|
|
|
|
elif [ "%{-b*}%{-a*}" = "fb%{efi_alt_arch}" ] ; then \
|
|
|
|
|
|
|
|
cp -av "%{fbefialt}" %{-b*}%{-a*}-unsigned.efi \
|
|
|
|
|
|
|
|
fi \
|
|
|
|
|
|
|
|
else \
|
|
|
|
cp -av %{-d*}/%{-b*}%{-a*}.efi %{-b*}%{-a*}-unsigned.efi \
|
|
|
|
cp -av %{-d*}/%{-b*}%{-a*}.efi %{-b*}%{-a*}-unsigned.efi \
|
|
|
|
|
|
|
|
fi \
|
|
|
|
%{expand:%%sign -i %{-b*}%{-a*}-unsigned.efi -o %{-b*}%{-a*}-signed.efi -n redhatsecureboot501 -a %{SOURCE2} -c %{SOURCE1} } \
|
|
|
|
%{expand:%%sign -i %{-b*}%{-a*}-unsigned.efi -o %{-b*}%{-a*}-signed.efi -n redhatsecureboot501 -a %{SOURCE2} -c %{SOURCE1} } \
|
|
|
|
%{nil}
|
|
|
|
%{nil}
|
|
|
|
|
|
|
|
|
|
|
@ -98,6 +133,7 @@ version signed by the UEFI signing service. \
|
|
|
|
# -b <1|0> # signed by this builder?
|
|
|
|
# -b <1|0> # signed by this builder?
|
|
|
|
# -c <1|0> # signed by UEFI CA?
|
|
|
|
# -c <1|0> # signed by UEFI CA?
|
|
|
|
# -i <shimARCH.efi>
|
|
|
|
# -i <shimARCH.efi>
|
|
|
|
|
|
|
|
# -d /usr/share dir for this build (full path)
|
|
|
|
%define define_build(a:A:b:c:i:d:) \
|
|
|
|
%define define_build(a:A:b:c:i:d:) \
|
|
|
|
if [ "%{-c*}" = "yes-temporarily-disabled-20180723" ]; then \
|
|
|
|
if [ "%{-c*}" = "yes-temporarily-disabled-20180723" ]; then \
|
|
|
|
%{expand:%%hash -i %{-i*} -a %{-a*} -d %{-d*}} \
|
|
|
|
%{expand:%%hash -i %{-i*} -a %{-a*} -d %{-d*}} \
|
|
|
@ -107,7 +143,8 @@ if [ "%{-b*}" = "yes" ]; then \
|
|
|
|
%{expand:%%distrosign -b shim -a %{-a*} -d %{-d*}} \
|
|
|
|
%{expand:%%distrosign -b shim -a %{-a*} -d %{-d*}} \
|
|
|
|
mv shim%{-a*}-signed.efi shim%{-a*}-%{efi_vendor}.efi \
|
|
|
|
mv shim%{-a*}-signed.efi shim%{-a*}-%{efi_vendor}.efi \
|
|
|
|
fi \
|
|
|
|
fi \
|
|
|
|
if [ "%{-c*}" = "no" ]; then \
|
|
|
|
if [ "%{-c*}" = "no" ] || \
|
|
|
|
|
|
|
|
[ 0%{?_unsigned_test_build:%{_unsigned_test_build}} -ne 0 ] ; then \
|
|
|
|
cp shim%{-a*}-%{efi_vendor}.efi shim%{-a*}.efi \
|
|
|
|
cp shim%{-a*}-%{efi_vendor}.efi shim%{-a*}.efi \
|
|
|
|
fi \
|
|
|
|
fi \
|
|
|
|
%{expand:%%distrosign -b mm -a %{-a*} -d %{-d*}} \
|
|
|
|
%{expand:%%distrosign -b mm -a %{-a*} -d %{-d*}} \
|
|
|
@ -142,10 +179,10 @@ install -m 0700 fb%{-a*}.efi \\\
|
|
|
|
# -A <EFIARCH>
|
|
|
|
# -A <EFIARCH>
|
|
|
|
%define define_files(a:A:) \
|
|
|
|
%define define_files(a:A:) \
|
|
|
|
%{expand:%%files -n shim-%{-a*}} \
|
|
|
|
%{expand:%%files -n shim-%{-a*}} \
|
|
|
|
%{efi_esp_dir}/*%{-a*}*.efi \
|
|
|
|
%%verify(not mtime) %{efi_esp_dir}/*%{-a*}*.efi \
|
|
|
|
%{efi_esp_dir}/BOOT%{-A*}.CSV \
|
|
|
|
%%verify(not mtime) %{efi_esp_dir}/BOOT%{-A*}.CSV \
|
|
|
|
%{efi_esp_boot}/*%{-a*}.efi \
|
|
|
|
%%verify(not mtime) %{efi_esp_boot}/*%{-a*}.efi \
|
|
|
|
%{efi_esp_boot}/*%{-A*}.EFI \
|
|
|
|
%%verify(not mtime) %{efi_esp_boot}/*%{-A*}.EFI \
|
|
|
|
%{nil}
|
|
|
|
%{nil}
|
|
|
|
|
|
|
|
|
|
|
|
%ifarch x86_64
|
|
|
|
%ifarch x86_64
|
|
|
|