Compare commits

..

No commits in common. 'i8' and 'c9' have entirely different histories.
i8 ... c9

6
.gitignore vendored

@ -1,5 +1,9 @@
SOURCES/BOOTX64.CSV
SOURCES/fbaa64.efi
SOURCES/fbx64.efi
SOURCES/mmaa64.efi
SOURCES/mmx64.efi
SOURCES/redhatsecureboot501.cer
SOURCES/redhatsecurebootca5.cer
SOURCES/shimaa64.efi
SOURCES/shimx64.efi
SOURCES/shimia32.efi

@ -1,2 +1,9 @@
ceaf8f186297081be59f409bf15b58dedf30dfb2 SOURCES/shimia32.efi
37b731f093a35202b8045cbeec86ba222aa53b11 SOURCES/shimx64.efi
6801abf1c4d54f15f869470c99e480433940407a SOURCES/BOOTX64.CSV
62b636517840e4f3027a3ecd549b7b3a95b05795 SOURCES/fbaa64.efi
9f6113ea26646fa3322c531e43c7522802bb3ecf SOURCES/fbx64.efi
211c4c134f7e1375f4618daa1e4858dd4259444a SOURCES/mmaa64.efi
933fe1154b024bfdab69346e78eaf4778fc2b76d SOURCES/mmx64.efi
ba0b760e594ff668ee72ae348adf3e49b97f75fb SOURCES/redhatsecureboot501.cer
e6f506462069aa17d2e8610503635c20f3a995c3 SOURCES/redhatsecurebootca5.cer
9c8bae2617420ba18ca6b6ac061a5bae6beb0040 SOURCES/shimaa64.efi
51bb003a7527b85e31fed0db68254a504c559dad SOURCES/shimx64.efi

Binary file not shown.
1 shimaa64.efi Red Hat Enterprise Linux This is the boot entry for Red Hat Enterprise Linux

Binary file not shown.
1 s�h�i�m�i�a�3�2�.�e�f�i�,�m�s�v�s�p�h�e�r�e�,�,�T�h�i�s� �i�s� �t�h�e� �b�o�o�t� �e�n�t�r�y� �f�o�r� �m�s�v�s�p�h�e�r�e�
2

Binary file not shown.
1 s�h�i�m�x�6�4�.�e�f�i�,�m�s�v�s�p�h�e�r�e�,�,�T�h�i�s� �i�s� �t�h�e� �b�o�o�t� �e�n�t�r�y� �f�o�r� �m�s�v�s�p�h�e�r�e�
2

@ -3,28 +3,33 @@
%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 grub_version 2.06-27.el9_0.12
%global bootcsvaa64 %{expand:%{SOURCE10}}
%global bootcsvia32 %{expand:%{SOURCE11}}
%global bootcsvx64 %{expand:%{SOURCE12}}
#%%global bootcsvarm %%{expand:%%{SOURCE13}}
%global shimefiaa64 %{expand:%{SOURCE20}}
%global shimefiia32 %{expand:%{SOURCE21}}
%global shimefix64 %{expand:%{SOURCE22}}
#%%global shimefiarm %%{expand:%%{SOURCE23}
%global shimveraa64 15-7.el8_1
%global shimveria32 15.8-1.el8.inferit
%global shimverx64 15.8-1.el8.inferit
%global fbefiaa64 %{expand:%{SOURCE30}}
%global fbefix64 %{expand:%{SOURCE32}}
#%%global fbefiarm %%{expand:%%{SOURCE33}
%global mmefiaa64 %{expand:%{SOURCE40}}
%global mmefix64 %{expand:%{SOURCE42}}
#%%global mmefiarm %%{expand:%%{SOURCE43}
%global shimveraa64 15.8-2.el9
%global shimverx64 15.8-2.el9
#%%global shimverarm 15-1.el8
%global shimdiraa64 %{_datadir}/shim/%{shimveraa64}/aa64
%global shimdiria32 %{_datadir}/shim/%{shimveria32}/ia32
%global shimdirx64 %{_datadir}/shim/%{shimverx64}/x64
#%%global shimdirarm %%{_datadir}/shim/%%{shimverarm}/arm
%global unsignedaa64 shim-unsigned-aarch64
%global unsignedia32 shim-unsigned-ia32
%global unsignedx64 shim-unsigned-x64
#%%global unsignedarm shim-unsigned-arm
@ -36,6 +41,10 @@
%global shimveralt %{expand:%{shimver%{?efi_alt_arch}}}
%global shimdir %{expand:%{shimdir%{efi_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 unsigned %{expand:%%{unsigned%{efi_arch}}}
@ -48,7 +57,7 @@ Requires: mokutil >= 1:0.3.0-1 \
Requires: efi-filesystem \
Provides: shim-signed-%{-a*} = %{version}-%{release} \
Requires: dbxtool >= 0.6-3 \
Requires: %{efi_esp_dir}/grub%{-a*}.efi \
Conflicts: grub2-efi-%{-a*} < %{grub_version} \
%{expand:%%if 0%%{-p*} \
Provides: shim = %{version}-%{release} \
Provides: shim-signed = %{version}-%{release} \
@ -70,14 +79,16 @@ version signed by the UEFI signing service. \
# -a <efiarch>
# -i <input>
%define hash(a:i:d:) \
if [ 0%{?_unsigned_test_build:%{_unsigned_test_build}} -ne 0 ] ; then \
pesign -i %{-i*} -h -P > shim.hash \
read file0 hash0 < shim.hash \
read file1 hash1 < %{-d*}/shim%{-a*}.hash \
if ! [ "$hash0" = "$hash1" ]; then \
if ! [ "$hash0" = "$hash1" ] ; then \
echo Invalid signature\! > /dev/stderr \
echo $hash0 vs $hash1 \
exit 1 \
fi \
fi \
%{nil}
# -i <input>
@ -90,8 +101,24 @@ version signed by the UEFI signing service. \
# -a <efiarch>
# -i <input>
%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 \
%{expand:%%sign -i %{-b*}%{-a*}-unsigned.efi -o %{-b*}%{-a*}-signed.efi -n redhatsecureboot501 -a %{SOURCE2} -c %{SOURCE1} }\
fi \
%{expand:%%sign -i %{-b*}%{-a*}-unsigned.efi -o %{-b*}%{-a*}-signed.efi -n redhatsecureboot501 -a %{SOURCE2} -c %{SOURCE1} } \
%{nil}
# -a <efiarch>
@ -99,16 +126,18 @@ version signed by the UEFI signing service. \
# -b <1|0> # signed by this builder?
# -c <1|0> # signed by UEFI CA?
# -i <shimARCH.efi>
# -d /usr/share dir for this build (full path)
%define define_build(a:A:b:c:i:d:) \
if [ "%{-c*}" = "yes-temporarily-disabled-20180723" ]; then \
%{expand:%%hash -i %{-i*} -a %{-a*} -d %{-d*}} \
fi \
cp %{-i*} shim%{-a*}.efi \
if [ "%{-b*}" = "yes" ]; then \
if [ "%{-b*}" = "yes" ] ; then \
%{expand:%%distrosign -b shim -a %{-a*} -d %{-d*}} \
mv shim%{-a*}-signed.efi shim%{-a*}-%{efi_vendor}.efi \
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 \
fi \
%{expand:%%distrosign -b mm -a %{-a*} -d %{-d*}} \
@ -143,15 +172,15 @@ install -m 0700 fb%{-a*}.efi \\\
# -A <EFIARCH>
%define define_files(a:A:) \
%{expand:%%files -n shim-%{-a*}} \
%{efi_esp_dir}/*%{-a*}*.efi \
%{efi_esp_dir}/BOOT%{-A*}.CSV \
%{efi_esp_boot}/*%{-a*}.efi \
%{efi_esp_boot}/*%{-A*}.EFI \
%%verify(not mtime) %{efi_esp_dir}/*%{-a*}*.efi \
%%verify(not mtime) %{efi_esp_dir}/BOOT%{-A*}.CSV \
%%verify(not mtime) %{efi_esp_boot}/*%{-a*}.efi \
%%verify(not mtime) %{efi_esp_boot}/*%{-A*}.EFI \
%{nil}
%ifarch x86_64
%global is_signed yes
%global is_alt_signed yes
%global is_alt_signed no
%global provide_legacy_shim 1
%endif
%ifarch aarch64

Binary file not shown.

Binary file not shown.

@ -1,53 +1,49 @@
%global efi_vendor msvsphere
%global efidir msvsphere
%global efi_esp_dir /boot/efi/EFI/%{efidir}
Name: shim
Version: 15.8
Release: 4.el8_9.inferit
Release: 4%{?dist}
Summary: First-stage UEFI bootloader
License: BSD
URL: https://github.com/rhboot/shim/
BuildRequires: efi-filesystem
BuildRequires: efi-srpm-macros >= 3-2
BuildRequires: efi-srpm-macros >= 6
ExclusiveArch: %{efi}
# but we don't build a .i686 package, just a shim-ia32.x86_64 package
ExcludeArch: %{ix86}
# and we don't have shim-unsigned-arm builds *yet*
ExcludeArch: %{arm}
ExcludeArch: %{arm} %{ix86}
Source0: shim.rpmmacros
Source1: spheresecureboot001.cer
Source2: spheresecurebootca.cer
Source1: redhatsecureboot501.cer
Source2: redhatsecurebootca5.cer
# keep these two lists of sources synched up arch-wise. That is 0 and 10
# match, 1 and 11 match, ...
#Source10: BOOTAA64.CSV
#Source20: shimaa64.efi
# MSVSphere note: currently we support only ia32 and x86 architecture
Source11: BOOTIA32.CSV
Source21: shimia32.efi
Source10: BOOTAA64.CSV
Source20: shimaa64.efi
Source30: mmaa64.efi
Source40: fbaa64.efi
Source12: BOOTX64.CSV
Source22: shimx64.efi
Source32: mmx64.efi
Source42: fbx64.efi
#Source13: BOOTARM.CSV
#Source23: shimarm.efi
#Source33: mmarm.efi
#Source43: fbarm.efi
%include %{SOURCE0}
BuildRequires: pesign >= 0.112-20.fc27
# We need this because %%{efi} won't expand before choosing where to make
# the src.rpm in koji, and we could be on a non-efi architecture, in which
# case we won't have a valid expansion here... To be solved in the future
# (shim 16+) by making the unsigned packages all provide "shim-unsigned", so
# we can just BuildRequires that.
%ifarch x86_64
BuildRequires: shim-unsigned-x64 = 15.8-1.el8.inferit
BuildRequires: shim-unsigned-ia32 = 15.8-1.el8.inferit
%endif
%ifarch aarch64
BuildRequires: %{unsignedaa64} = %{shimveraa64}
%endif
# Right now we're just including all of the parts from them as sources here
# to make the build+errata process less maddening. We do this because
# %%{efi} won't expand before choosing where to make the src.rpm in koji,
# and we could be on a non-efi architecture, in which case we won't have a
# valid expansion here...
#%% ifarch x86_64
#BuildRequires: %% {unsignedx64} = %% {shimverx64}
#%% endif
#%% ifarch aarch64
#BuildRequires: %% {unsignedaa64} = %% {shimveraa64}
#%% endif
#%%ifarch arm
#BuildRequires: %%{unsignedarm} = %%{shimverarm}
#%%endif
@ -68,12 +64,14 @@ rm -rf shim-%{version}
mkdir shim-%{version}
%build
export PS4='${LINENO}: '
cd shim-%{version}
%if %{efi_has_alt_arch}
%define_build -a %{efi_alt_arch} -A %{efi_alt_arch_upper} -i %{shimefialt} -b yes -c %{is_alt_signed} -d %{shimdiralt}
%endif
%define_build -a %{efi_arch} -A %{efi_arch_upper} -i %{shimefi} -b yes -c %{is_signed} -d %{shimdir}
# Temporarily using _sourcedir to avoid build dep annoyances.
%define_build -a %{efi_arch} -A %{efi_arch_upper} -i %{shimefi} -b yes -c %{is_signed} -d %{_sourcedir}
%install
rm -rf $RPM_BUILD_ROOT
@ -102,78 +100,71 @@ install -m 0700 %{shimefi} $RPM_BUILD_ROOT%{efi_esp_dir}/shim.efi
%endif
%if %{provide_legacy_shim}
%{efi_esp_dir}/shim.efi
%verify(not mtime) %{efi_esp_dir}/shim.efi
%endif
%changelog
* Mon Apr 22 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 15.8-1.el8.inferit
- 15.8 Release
* Tue Apr 16 2024 Peter Jones <pjones@redhat.com> - 15.8-4
- Rebuild to work around build system quirks.
Related: RHEL-11262
* Wed Apr 03 2024 Peter Jones <pjones@redhat.com> - 15.8-3.el9
- Fix rpm verification due to mtime granularity on FAT.
Related: RHEL-11262
* Thu Mar 21 2024 Peter Jones <pjones@redhat.com> - 15.8-2.el9
- Add the grub2-efi-ARCH conflict for SBAT.
Resolves: RHEL-11262
* Fri Dec 22 2023 Arkady L. Shane <tigro@msvsphere-os.ru> - 15.6-1.inferit
- Modified to use MSVSphere Secure Boot certificates
- Disabled aarch64 architecture until we support it
* Thu Mar 21 2024 Peter Jones <pjones@redhat.com> - 15.8-1.el9
- Update to shim-15.8 for CVE-2023-40547
Resolves: RHEL-11262
* Wed Jul 26 2023 MSVSphere Packaging Team <packager@msvsphere.ru> - 15.6-1
- Rebuilt for MSVSphere 8.8
* Thu Apr 14 2022 Peter Jones <pjones@redhat.com> - 15.5-2.el9
- Attempt to make aarch64 build.
Related: rhbz#1932057
* Mon Jun 06 2022 Peter Jones <pjones@redhat.com> - 15.6-1
- Update to shim-15.6
Resolves: CVE-2022-28737
* Thu Apr 14 2022 Peter Jones <pjones@redhat.com> - 15.5-1.el9
- Rebuild for rhel-9.0.0
Resolves: rhbz#1932057
* Mon Sep 21 2020 Javier Martinez Canillas <javierm@redhat.com> - 15-16
- Fix an incorrect allocation size
Resolves: rhbz#1877253
* Fri Jul 31 2020 Peter Jones <pjones@redhat.com> - 15-15
- Update once again for new signed shim builds.
Resolves: rhbz#1861977
* Tue Jul 28 2020 Peter Jones <pjones@redhat.com> - 15-14
- Get rid of our %%dist hack for now.
* Tue Jul 28 2020 Peter Jones <pjones@redhat.com> - 15-13
- New signing keys
Related: CVE-2020-10713
Related: CVE-2020-14308
Related: CVE-2020-14309
Related: CVE-2020-14310
Related: CVE-2020-14311
* Thu Jun 11 2020 Javier Martinez Canillas <javierm@redhat.com> - 15-12
- Fix firmware update bug in aarch64 caused by shim ignoring arguments
Resolves: rhbz#1830871
- Fix a shim crash when attempting to netboot
Resolves: rhbz#1795654
* Fri Jun 07 2019 Javier Martinez Canillas <javierm@redhat.com> - 15-11
- Update the shim-unsigned-aarch64 version number
Related: rhbz#1715879
* Fri Jun 07 2019 Javier Martinez Canillas <javierm@redhat.com> - 15-10
- Add a gating.yaml file so the package can be properly gated
Related: rhbz#1681809
* Wed Jun 05 2019 Javier Martinez Canillas <javierm@redhat.com> - 15-9
- Bump the NVR
Related: rhbz#1715879
* Wed Jun 05 2019 Javier Martinez Canillas <javierm@redhat.com> - 15-7
- Make EFI variable copying fatal only on secureboot enabled systems
Resolves: rhbz#1715879
- Fix booting shim from an EFI shell using a relative path
Resolves: rhbz#1717061
* Thu Mar 14 2019 Peter Jones <pjones@redhat.com> - 15-6
- Fix MoK mirroring issue which breaks kdump without intervention
Resolves: rhbz#1668966
* Thu Jan 24 2019 Peter Jones <pjones@redhat.com> - 15-5
- Rebuild for signing once again. If the signer actually works, then:
Resolves: rhbz#1620941
* Tue Oct 16 2018 Peter Jones <pjones@redhat.com> - 15-4
- Rebuild for signing
Resolves: rhbz#1620941
* Mon Aug 13 2018 Troy Dawson <tdawson@redhat.com>
- Release Bumped for el8 Mass Rebuild

Loading…
Cancel
Save