20ce0f
Name:		shim
9a36fd
Version:	15.5
d03c8e
Release:	2.el8
20ce0f
Summary:	First-stage UEFI bootloader
20ce0f
License:	BSD
20ce0f
URL:		https://github.com/rhboot/shim/
20ce0f
BuildRequires:	efi-filesystem
20ce0f
BuildRequires:	efi-srpm-macros >= 3-2
20ce0f
20ce0f
ExclusiveArch:	%{efi}
20ce0f
# but we don't build a .i686 package, just a shim-ia32.x86_64 package
20ce0f
ExcludeArch:	%{ix86}
20ce0f
# and we don't have shim-unsigned-arm builds *yet*
20ce0f
ExcludeArch:	%{arm}
20ce0f
20ce0f
Source0:	shim.rpmmacros
20ce0f
Source1:	redhatsecureboot501.cer
20ce0f
Source2:	redhatsecurebootca5.cer
20ce0f
20ce0f
# keep these two lists of sources synched up arch-wise.  That is 0 and 10
20ce0f
# match, 1 and 11 match, ...
20ce0f
Source10:	BOOTAA64.CSV
20ce0f
Source20:	shimaa64.efi
9a36fd
Source30:	mmaa64.efi
9a36fd
Source40:	fbaa64.efi
20ce0f
Source11:	BOOTIA32.CSV
20ce0f
Source21:	shimia32.efi
9a36fd
Source31:	mmia32.efi
9a36fd
Source41:	fbia32.efi
20ce0f
Source12:	BOOTX64.CSV
20ce0f
Source22:	shimx64.efi
9a36fd
Source32:	mmx64.efi
9a36fd
Source42:	fbx64.efi
20ce0f
#Source13:	BOOTARM.CSV
20ce0f
#Source23:	shimarm.efi
9a36fd
#Source33:	mmarm.efi
9a36fd
#Source43:	fbarm.efi
20ce0f
20ce0f
%include %{SOURCE0}
20ce0f
20ce0f
BuildRequires:	pesign >= 0.112-20.fc27
20ce0f
# We need this because %%{efi} won't expand before choosing where to make
20ce0f
# the src.rpm in koji, and we could be on a non-efi architecture, in which
20ce0f
# case we won't have a valid expansion here...  To be solved in the future
20ce0f
# (shim 16+) by making the unsigned packages all provide "shim-unsigned", so
20ce0f
# we can just BuildRequires that.
20ce0f
%ifarch x86_64
9a36fd
# BuildRequires:	%% {unsignedx64} = %% {shimverx64}
9a36fd
# BuildRequires:	%% {unsignedia32} = %% {shimveria32}
20ce0f
BuildRequires:	%{unsignedx64} = %{shimverx64}
20ce0f
BuildRequires:	%{unsignedia32} = %{shimveria32}
20ce0f
%endif
20ce0f
%ifarch aarch64
20ce0f
BuildRequires:	%{unsignedaa64} = %{shimveraa64}
20ce0f
%endif
20ce0f
#%%ifarch arm
20ce0f
#BuildRequires:	%%{unsignedarm} = %%{shimverarm}
20ce0f
#%%endif
20ce0f
20ce0f
%description
20ce0f
Initial UEFI bootloader that handles chaining to a trusted full bootloader
20ce0f
under secure boot environments. This package contains the version signed by
20ce0f
the UEFI signing service.
20ce0f
20ce0f
%define_pkg -a %{efi_arch} -p 1
20ce0f
%if %{efi_has_alt_arch}
20ce0f
%define_pkg -a %{efi_alt_arch}
20ce0f
%endif
20ce0f
20ce0f
%prep
20ce0f
cd %{_builddir}
20ce0f
rm -rf shim-%{version}
20ce0f
mkdir shim-%{version}
20ce0f
20ce0f
%build
9a36fd
export PS4='${LINENO}: '
20ce0f
20ce0f
cd shim-%{version}
20ce0f
%if %{efi_has_alt_arch}
20ce0f
%define_build -a %{efi_alt_arch} -A %{efi_alt_arch_upper} -i %{shimefialt} -b yes -c %{is_alt_signed} -d %{shimdiralt}
20ce0f
%endif
20ce0f
%define_build -a %{efi_arch} -A %{efi_arch_upper} -i %{shimefi} -b yes -c %{is_signed} -d %{shimdir}
20ce0f
20ce0f
%install
20ce0f
rm -rf $RPM_BUILD_ROOT
20ce0f
cd shim-%{version}
20ce0f
install -D -d -m 0755 $RPM_BUILD_ROOT/boot/
20ce0f
install -D -d -m 0700 $RPM_BUILD_ROOT%{efi_esp_root}/
20ce0f
install -D -d -m 0700 $RPM_BUILD_ROOT%{efi_esp_efi}/
20ce0f
install -D -d -m 0700 $RPM_BUILD_ROOT%{efi_esp_dir}/
20ce0f
install -D -d -m 0700 $RPM_BUILD_ROOT%{efi_esp_boot}/
20ce0f
20ce0f
%do_install -a %{efi_arch} -A %{efi_arch_upper} -b %{bootcsv}
20ce0f
%if %{efi_has_alt_arch}
20ce0f
%do_install -a %{efi_alt_arch} -A %{efi_alt_arch_upper} -b %{bootcsvalt}
20ce0f
%endif
20ce0f
20ce0f
%if %{provide_legacy_shim}
20ce0f
install -m 0700 %{shimefi} $RPM_BUILD_ROOT%{efi_esp_dir}/shim.efi
20ce0f
%endif
20ce0f
20ce0f
( cd $RPM_BUILD_ROOT ; find .%{efi_esp_root} -type f ) \
20ce0f
  | sed -e 's/\./\^/' -e 's,^\\\./,.*/,' -e 's,$,$,' > %{__brp_mangle_shebangs_exclude_from_file}
20ce0f
20ce0f
%define_files -a %{efi_arch} -A %{efi_arch_upper}
20ce0f
%if %{efi_has_alt_arch}
20ce0f
%define_files -a %{efi_alt_arch} -A %{efi_alt_arch_upper}
20ce0f
%endif
20ce0f
20ce0f
%if %{provide_legacy_shim}
20ce0f
%{efi_esp_dir}/shim.efi
20ce0f
%endif
20ce0f
20ce0f
%changelog
d03c8e
* Wed Apr 20 2022 Peter Jones <pjones@redhat.com> - 15.5-2.el8
d03c8e
- Include the actual signed shim binaries.
d03c8e
  Resolves: rhbz#1970632
d03c8e
  Resolves: rhbz#1982071
d03c8e
  Resolves: rhbz#2000946
d03c8e
  Resolves: rhbz#2002265
d03c8e
9a36fd
* Tue Apr 19 2022 Peter Jones <pjones@redhat.com> - 15.5-1
9a36fd
- Update to shim-15.5
9a36fd
  Resolves: rhbz#1970632
9a36fd
  Resolves: rhbz#1982071
9a36fd
  Resolves: rhbz#2000946
9a36fd
  Resolves: rhbz#2002265
9a36fd
9a36fd
* Mon Sep 21 2020 Javier Martinez Canillas <javierm@redhat.com> - 15-16
9a36fd
- Fix an incorrect allocation size
9a36fd
  Resolves: rhbz#1877253
bda17e
20ce0f
* Fri Jul 31 2020 Peter Jones <pjones@redhat.com> - 15-15
20ce0f
- Update once again for new signed shim builds.
9a36fd
  Resolves: rhbz#1861977
20ce0f
20ce0f
* Tue Jul 28 2020 Peter Jones <pjones@redhat.com> - 15-14
20ce0f
- Get rid of our %%dist hack for now.
20ce0f
20ce0f
* Tue Jul 28 2020 Peter Jones <pjones@redhat.com> - 15-13
20ce0f
- New signing keys
20ce0f
  Related: CVE-2020-10713
20ce0f
  Related: CVE-2020-14308
20ce0f
  Related: CVE-2020-14309
20ce0f
  Related: CVE-2020-14310
20ce0f
  Related: CVE-2020-14311
20ce0f
20ce0f
* Thu Jun 11 2020 Javier Martinez Canillas <javierm@redhat.com> - 15-12
20ce0f
- Fix firmware update bug in aarch64 caused by shim ignoring arguments
9a36fd
  Resolves: rhbz#1830871
20ce0f
- Fix a shim crash when attempting to netboot
9a36fd
  Resolves: rhbz#1795654
20ce0f
20ce0f
* Fri Jun 07 2019 Javier Martinez Canillas <javierm@redhat.com> - 15-11
20ce0f
- Update the shim-unsigned-aarch64 version number
20ce0f
  Related: rhbz#1715879
20ce0f
20ce0f
* Fri Jun 07 2019 Javier Martinez Canillas <javierm@redhat.com> - 15-10
20ce0f
- Add a gating.yaml file so the package can be properly gated
20ce0f
  Related: rhbz#1681809
20ce0f
20ce0f
* Wed Jun 05 2019 Javier Martinez Canillas <javierm@redhat.com> - 15-9
20ce0f
- Bump the NVR
20ce0f
  Related: rhbz#1715879
20ce0f
20ce0f
* Wed Jun 05 2019 Javier Martinez Canillas <javierm@redhat.com> - 15-7
20ce0f
- Make EFI variable copying fatal only on secureboot enabled systems
20ce0f
  Resolves: rhbz#1715879
20ce0f
- Fix booting shim from an EFI shell using a relative path
20ce0f
  Resolves: rhbz#1717061
20ce0f
20ce0f
* Thu Mar 14 2019 Peter Jones <pjones@redhat.com> - 15-6
20ce0f
- Fix MoK mirroring issue which breaks kdump without intervention
20ce0f
  Resolves: rhbz#1668966
20ce0f
20ce0f
* Thu Jan 24 2019 Peter Jones <pjones@redhat.com> - 15-5
20ce0f
- Rebuild for signing once again. If the signer actually works, then:
20ce0f
  Resolves: rhbz#1620941
20ce0f
20ce0f
* Tue Oct 16 2018 Peter Jones <pjones@redhat.com> - 15-4
20ce0f
- Rebuild for signing
20ce0f
  Resolves: rhbz#1620941
20ce0f
20ce0f
* Mon Aug 13 2018 Troy Dawson <tdawson@redhat.com>
20ce0f
- Release Bumped for el8 Mass Rebuild
20ce0f
20ce0f
* Sat Aug 11 2018 Troy Dawson <tdawson@redhat.com>
20ce0f
- Release Bumped for el8+8 Mass Rebuild
20ce0f
20ce0f
* Mon Jul 23 2018 Peter Jones <pjones@redhat.com> - 15-1
20ce0f
- Build for RHEL 8