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