Blame SPECS/shim-unsigned-x64.spec

a9dd6f
%global pesign_vre 0.106-1
a9dd6f
%global openssl_vre 1.0.2j
a9dd6f
a9dd6f
%global efidir %(eval echo $(grep ^ID= /etc/os-release | sed -e 's/^ID=//' -e 's/rhel/redhat/'))
a9dd6f
%global shimrootdir %{_datadir}/shim/
a9dd6f
%global shimversiondir %{shimrootdir}/%{version}-%{release}
a9dd6f
%global efiarch x64
a9dd6f
%global shimdir %{shimversiondir}/%{efiarch}
a9dd6f
%global efialtarch ia32
a9dd6f
%global shimaltdir %{shimversiondir}/%{efialtarch}
a9dd6f
a9dd6f
%global debug_package %{nil}
a9dd6f
%global __debug_package 1
a9dd6f
%global _binaries_in_noarch_packages_terminate_build 0
a9dd6f
%global __debug_install_post %{SOURCE100} %{efiarch} %{efialtarch}
a9dd6f
%undefine _debuginfo_subpackages
a9dd6f
a9dd6f
# currently here's what's in our dbx: nothing
a9dd6f
%global dbxfile %{nil}
a9dd6f
a9dd6f
Name:		shim-unsigned-%{efiarch}
6a9b75
Version:	15.6
a9dd6f
Release:	1.el9
a9dd6f
Summary:	First-stage UEFI bootloader
a9dd6f
ExclusiveArch:	x86_64
a9dd6f
License:	BSD
a9dd6f
URL:		https://github.com/rhboot/shim
a9dd6f
Source0:	https://github.com/rhboot/shim/releases/download/%{version}/shim-%{version}.tar.bz2
a9dd6f
Source1:	redhatsecurebootca5.cer
a9dd6f
%if 0%{?dbxfile}
a9dd6f
Source2:	%{dbxfile}
a9dd6f
%endif
a9dd6f
Source3:	sbat.redhat.csv
6a9b75
Source4:	shim.patches
a9dd6f
a9dd6f
Source100:	shim-find-debuginfo.sh
a9dd6f
6a9b75
%include %{SOURCE4}
6a9b75
a9dd6f
BuildRequires:	gcc make
a9dd6f
BuildRequires:	elfutils-libelf-devel
a9dd6f
BuildRequires:	git openssl-devel openssl
a9dd6f
BuildRequires:	pesign >= %{pesign_vre}
a9dd6f
BuildRequires:	dos2unix findutils
a9dd6f
a9dd6f
# Shim uses OpenSSL, but cannot use the system copy as the UEFI ABI is not
a9dd6f
# compatible with SysV (there's no red zone under UEFI) and there isn't a
a9dd6f
# POSIX-style C library.
a9dd6f
# BuildRequires:	OpenSSL
a9dd6f
Provides:	bundled(openssl) = %{openssl_vre}
a9dd6f
a9dd6f
%global desc \
a9dd6f
Initial UEFI bootloader that handles chaining to a trusted full \
a9dd6f
bootloader under secure boot environments.
a9dd6f
%global debug_desc \
a9dd6f
This package provides debug information for package %{expand:%%{name}} \
a9dd6f
Debug information is useful when developing applications that \
a9dd6f
use this package or when debugging this package.
a9dd6f
a9dd6f
%description
a9dd6f
%desc
a9dd6f
a9dd6f
%package -n shim-unsigned-%{efialtarch}
a9dd6f
Summary:	First-stage UEFI bootloader (unsigned data)
a9dd6f
Provides:	bundled(openssl) = %{openssl_vre}
a9dd6f
a9dd6f
%description -n shim-unsigned-%{efialtarch}
a9dd6f
%desc
a9dd6f
a9dd6f
%package debuginfo
a9dd6f
Summary:	Debug information for shim-unsigned-%{efiarch}
a9dd6f
Group:		Development/Debug
a9dd6f
AutoReqProv:	0
a9dd6f
BuildArch:	noarch
a9dd6f
a9dd6f
%description debuginfo
a9dd6f
%debug_desc
a9dd6f
a9dd6f
%package -n shim-unsigned-%{efialtarch}-debuginfo
a9dd6f
Summary:	Debug information for shim-unsigned-%{efialtarch}
a9dd6f
Group:		Development/Debug
a9dd6f
AutoReqProv:	0
a9dd6f
BuildArch:	noarch
a9dd6f
a9dd6f
%description -n shim-unsigned-%{efialtarch}-debuginfo
a9dd6f
%debug_desc
a9dd6f
a9dd6f
%package debugsource
a9dd6f
Summary:	Debug Source for shim-unsigned
a9dd6f
Group:		Development/Debug
a9dd6f
AutoReqProv:	0
a9dd6f
BuildArch:	noarch
a9dd6f
a9dd6f
%description debugsource
a9dd6f
%debug_desc
a9dd6f
a9dd6f
%prep
6a9b75
%autosetup -S git_am -n shim-%{version}
a9dd6f
git config --unset user.email
a9dd6f
git config --unset user.name
a9dd6f
mkdir build-%{efiarch}
a9dd6f
mkdir build-%{efialtarch}
a9dd6f
cp %{SOURCE3} data/
a9dd6f
a9dd6f
%build
a9dd6f
COMMITID=$(cat commit)
a9dd6f
MAKEFLAGS="TOPDIR=.. -f ../Makefile COMMITID=${COMMITID} "
a9dd6f
MAKEFLAGS+="EFIDIR=%{efidir} PKGNAME=shim RELEASE=%{release} "
a9dd6f
MAKEFLAGS+="ENABLE_SHIM_HASH=true "
a9dd6f
MAKEFLAGS+="%{_smp_mflags}"
a9dd6f
if [ -f "%{SOURCE1}" ]; then
a9dd6f
	MAKEFLAGS="$MAKEFLAGS VENDOR_CERT_FILE=%{SOURCE1}"
a9dd6f
fi
a9dd6f
%if 0%{?dbxfile}
a9dd6f
if [ -f "%{SOURCE2}" ]; then
a9dd6f
	MAKEFLAGS="$MAKEFLAGS VENDOR_DBX_FILE=%{SOURCE2}"
a9dd6f
fi
a9dd6f
%endif
a9dd6f
a9dd6f
cd build-%{efiarch}
a9dd6f
make ${MAKEFLAGS} \
a9dd6f
	DEFAULT_LOADER='\\\\grub%{efiarch}.efi' \
a9dd6f
	all
a9dd6f
cd ..
a9dd6f
a9dd6f
%install
a9dd6f
COMMITID=$(cat commit)
a9dd6f
MAKEFLAGS="TOPDIR=.. -f ../Makefile COMMITID=${COMMITID} "
a9dd6f
MAKEFLAGS+="EFIDIR=%{efidir} PKGNAME=shim RELEASE=%{release} "
a9dd6f
MAKEFLAGS+="ENABLE_SHIM_HASH=true "
a9dd6f
if [ -f "%{SOURCE1}" ]; then
a9dd6f
	MAKEFLAGS="$MAKEFLAGS VENDOR_CERT_FILE=%{SOURCE1}"
a9dd6f
fi
a9dd6f
%if 0%{?dbxfile}
a9dd6f
if [ -f "%{SOURCE2}" ]; then
a9dd6f
	MAKEFLAGS="$MAKEFLAGS VENDOR_DBX_FILE=%{SOURCE2}"
a9dd6f
fi
a9dd6f
%endif
a9dd6f
a9dd6f
cd build-%{efiarch}
a9dd6f
make ${MAKEFLAGS} \
a9dd6f
	DEFAULT_LOADER='\\\\grub%{efiarch}.efi' \
a9dd6f
	DESTDIR=${RPM_BUILD_ROOT} \
a9dd6f
	install-as-data install-debuginfo install-debugsource
a9dd6f
cd ..
a9dd6f
a9dd6f
%files
a9dd6f
%license COPYRIGHT
a9dd6f
%dir %{shimrootdir}
a9dd6f
%dir %{shimversiondir}
a9dd6f
%dir %{shimdir}
a9dd6f
%{shimdir}/*.efi
a9dd6f
%{shimdir}/*.hash
a9dd6f
%{shimdir}/*.CSV
a9dd6f
a9dd6f
%files debuginfo -f build-%{efiarch}/debugfiles.list
a9dd6f
a9dd6f
%files debugsource -f build-%{efiarch}/debugsource.list
a9dd6f
a9dd6f
%changelog
6a9b75
* Wed Jun 01 2022 Peter Jones <pjones@redhat.com> - 15.6-1.el9
6a9b75
- Update to shim-15.6
6a9b75
  Resolves: CVE-2022-28737
6a9b75
a9dd6f
* Wed Mar 09 2022 Peter Jones <pjones@redhat.com> - 15.5-1
a9dd6f
- Update to shim-15.5
a9dd6f
  Related: rhbz#1932057
a9dd6f
a9dd6f
* Thu Apr 01 2021 Peter Jones <pjones@redhat.com> - 15.4-4
a9dd6f
- Fix the sbat data to actually match /this/ product.
a9dd6f
  Resolves: CVE-2020-14372
a9dd6f
  Resolves: CVE-2020-25632
a9dd6f
  Resolves: CVE-2020-25647
a9dd6f
  Resolves: CVE-2020-27749
a9dd6f
  Resolves: CVE-2020-27779
a9dd6f
  Resolves: CVE-2021-20225
a9dd6f
  Resolves: CVE-2021-20233
a9dd6f
a9dd6f
* Wed Mar 31 2021 Peter Jones <pjones@redhat.com> - 15.4-3
a9dd6f
- Build with the correct certificate trust list for this OS.
a9dd6f
  Resolves: CVE-2020-14372
a9dd6f
  Resolves: CVE-2020-25632
a9dd6f
  Resolves: CVE-2020-25647
a9dd6f
  Resolves: CVE-2020-27749
a9dd6f
  Resolves: CVE-2020-27779
a9dd6f
  Resolves: CVE-2021-20225
a9dd6f
  Resolves: CVE-2021-20233
a9dd6f
a9dd6f
* Wed Mar 31 2021 Peter Jones <pjones@redhat.com> - 15.4-2
a9dd6f
- Fix the ia32 build.
a9dd6f
  Resolves: CVE-2020-14372
a9dd6f
  Resolves: CVE-2020-25632
a9dd6f
  Resolves: CVE-2020-25647
a9dd6f
  Resolves: CVE-2020-27749
a9dd6f
  Resolves: CVE-2020-27779
a9dd6f
  Resolves: CVE-2021-20225
a9dd6f
  Resolves: CVE-2021-20233
a9dd6f
a9dd6f
* Tue Mar 30 2021 Peter Jones <pjones@redhat.com> - 15.4-1
a9dd6f
- Update to shim 15.4
a9dd6f
  - Support for revocations via the ".sbat" section and SBAT EFI variable
a9dd6f
  - A new unit test framework and a bunch of unit tests
a9dd6f
  - No external gnu-efi dependency
a9dd6f
  - Better CI
a9dd6f
  Resolves: CVE-2020-14372
a9dd6f
  Resolves: CVE-2020-25632
a9dd6f
  Resolves: CVE-2020-25647
a9dd6f
  Resolves: CVE-2020-27749
a9dd6f
  Resolves: CVE-2020-27779
a9dd6f
  Resolves: CVE-2021-20225
a9dd6f
  Resolves: CVE-2021-20233
a9dd6f
a9dd6f
* Wed Mar 24 2021 Peter Jones <pjones@redhat.com> - 15.3-0~1
a9dd6f
- Update to shim 15.3
a9dd6f
  - Support for revocations via the ".sbat" section and SBAT EFI variable
a9dd6f
  - A new unit test framework and a bunch of unit tests
a9dd6f
  - No external gnu-efi dependency
a9dd6f
  - Better CI
a9dd6f
  Resolves: CVE-2020-14372
a9dd6f
  Resolves: CVE-2020-25632
a9dd6f
  Resolves: CVE-2020-25647
a9dd6f
  Resolves: CVE-2020-27749
a9dd6f
  Resolves: CVE-2020-27779
a9dd6f
  Resolves: CVE-2021-20225
a9dd6f
  Resolves: CVE-2021-20233
a9dd6f
a9dd6f
* Wed Jun 05 2019 Javier Martinez Canillas <javierm@redhat.com> - 15-3
a9dd6f
- Make EFI variable copying fatal only on secureboot enabled systems
a9dd6f
  Resolves: rhbz#1715878
a9dd6f
- Fix booting shim from an EFI shell using a relative path
a9dd6f
  Resolves: rhbz#1717064
a9dd6f
a9dd6f
* Tue Feb 12 2019 Peter Jones <pjones@redhat.com> - 15-2
a9dd6f
- Fix MoK mirroring issue which breaks kdump without intervention
a9dd6f
  Related: rhbz#1668966
a9dd6f
a9dd6f
* Thu Apr 05 2018 Peter Jones <pjones@redhat.com> - 15-1
a9dd6f
- Update to shim 15
a9dd6f
- better checking for bad linker output
a9dd6f
- flicker-free console if there's no error output
a9dd6f
- improved http boot support
a9dd6f
- better protocol re-installation
a9dd6f
- dhcp proxy support
a9dd6f
- tpm measurement even when verification is disabled
a9dd6f
- REQUIRE_TPM build flag
a9dd6f
- more reproducable builds
a9dd6f
- measurement of everything verified through shim_verify()
a9dd6f
- coverity and scan-build checker make targets
a9dd6f
- misc cleanups
a9dd6f
a9dd6f
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 13-0.2
a9dd6f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
a9dd6f
a9dd6f
* Fri Aug 18 2017 Peter Jones <pjones@redhat.com> - 13-0.1
a9dd6f
- Make a new shim-unsigned-x64 package like the shim-unsigned-aarch64 one.
a9dd6f
- This will (eventually) supersede what's in the "shim" package so we can
a9dd6f
  make "shim" hold the signed one, which will confuse fewer people.