Blame SPECS/shim-unsigned-x64.spec

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