|
|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
%global pesign_vre 0.106-1
|
|
|
|
|
%global gnuefi_vre 1:3.0.5-6
|
|
|
|
|
%global openssl_vre 1.0.2j
|
|
|
|
|
%global shim_commit_id afc49558b34548644c1cd0ad1b6526a9470182ed
|
|
|
|
|
|
|
|
|
|
%global debug_package %{nil}
|
|
|
|
|
%global __debug_package 1
|
|
|
|
|
@ -8,29 +9,33 @@
|
|
|
|
|
%global __debug_install_post %{SOURCE100} aa64
|
|
|
|
|
%undefine _debuginfo_subpackages
|
|
|
|
|
|
|
|
|
|
%global efidir %(eval echo $(grep ^ID= /etc/os-release | sed -e 's/^ID=//' -e 's/rhel/redhat/'))
|
|
|
|
|
%global efidir almalinux
|
|
|
|
|
%global shimrootdir %{_datadir}/shim/
|
|
|
|
|
%global shimversiondir %{shimrootdir}/%{version}-%{release}
|
|
|
|
|
%global efiarch aa64
|
|
|
|
|
%global shimdir %{shimversiondir}/%{efiarch}
|
|
|
|
|
|
|
|
|
|
Name: shim-unsigned-aarch64
|
|
|
|
|
Version: 15.8
|
|
|
|
|
Release: 2.el8
|
|
|
|
|
Version: 16.1
|
|
|
|
|
Release: 2%{?dist}.alma.1
|
|
|
|
|
Summary: First-stage UEFI bootloader
|
|
|
|
|
ExclusiveArch: aarch64
|
|
|
|
|
License: BSD
|
|
|
|
|
URL: https://github.com/rhboot/shim
|
|
|
|
|
Source0: https://github.com/rhboot/shim/releases/download/%{version}/shim-%{version}.tar.bz2
|
|
|
|
|
Source1: securebootca.cer
|
|
|
|
|
# currently here's what's in our dbx:
|
|
|
|
|
# nothing.
|
|
|
|
|
Source2: dbx.esl
|
|
|
|
|
Source3: sbat.redhat.csv
|
|
|
|
|
Source4: shim.patches
|
|
|
|
|
|
|
|
|
|
Source100: shim-find-debuginfo.sh
|
|
|
|
|
|
|
|
|
|
# AlmaLinux Source
|
|
|
|
|
Source3: sbat.almalinux.csv
|
|
|
|
|
Source101: almalinux-sb-cert-1.der
|
|
|
|
|
Source102: almalinux-sb-cert-2.der
|
|
|
|
|
Source103: almalinux-sb-cert-3.der
|
|
|
|
|
|
|
|
|
|
%include %{SOURCE4}
|
|
|
|
|
|
|
|
|
|
BuildRequires: gcc make
|
|
|
|
|
@ -38,6 +43,7 @@ BuildRequires: elfutils-libelf-devel
|
|
|
|
|
BuildRequires: git openssl-devel openssl
|
|
|
|
|
BuildRequires: pesign >= %{pesign_vre}
|
|
|
|
|
BuildRequires: dos2unix findutils
|
|
|
|
|
BuildRequires: efitools
|
|
|
|
|
|
|
|
|
|
# Shim uses OpenSSL, but cannot use the system copy as the UEFI ABI is not
|
|
|
|
|
# compatible with SysV (there's no red zone under UEFI) and there isn't a
|
|
|
|
|
@ -76,20 +82,30 @@ BuildArch: noarch
|
|
|
|
|
%debug_desc
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -S git -n shim-%{version}
|
|
|
|
|
%autosetup -S git_am -n shim-%{version}
|
|
|
|
|
git config --unset user.email
|
|
|
|
|
git config --unset user.name
|
|
|
|
|
mkdir build-%{efiarch}
|
|
|
|
|
cp %{SOURCE3} data/
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
COMMIT_ID=5914984a1ffeab841f482c791426d7ca9935a5e6
|
|
|
|
|
MAKEFLAGS="TOPDIR=.. -f ../Makefile COMMITID=${COMMIT_ID} "
|
|
|
|
|
# Prepare vendor_db.esl file
|
|
|
|
|
openssl x509 -inform DER -in %{SOURCE101} -out 01.pem
|
|
|
|
|
openssl x509 -inform DER -in %{SOURCE102} -out 02.pem
|
|
|
|
|
openssl x509 -inform DER -in %{SOURCE103} -out 03.pem
|
|
|
|
|
cert-to-efi-sig-list -g 9DD8A2AC-0977-4AEF-99A0-E794FD2A31FE 01.pem 01.esl
|
|
|
|
|
cert-to-efi-sig-list -g 33D81FE3-5EC0-44F8-AB02-C9DA554F63D8 02.pem 02.esl
|
|
|
|
|
cert-to-efi-sig-list -g 50413300-1AC7-49DA-B755-BB0D93E634B6 03.pem 03.esl
|
|
|
|
|
cat 01.esl 02.esl 03.esl > vendor_db.esl
|
|
|
|
|
|
|
|
|
|
COMMIT_ID=%{shim_commit_id}
|
|
|
|
|
MAKEFLAGS="TOPDIR=.. -f ../Makefile COMMIT_ID=${COMMIT_ID} "
|
|
|
|
|
MAKEFLAGS+="EFIDIR=%{efidir} PKGNAME=shim RELEASE=%{release} "
|
|
|
|
|
MAKEFLAGS+="ENABLE_SHIM_HASH=true "
|
|
|
|
|
MAKEFLAGS+="SBAT_AUTOMATIC_DATE=2023012900 "
|
|
|
|
|
MAKEFLAGS+="%{_smp_mflags}"
|
|
|
|
|
if [ -f "%{SOURCE1}" ]; then
|
|
|
|
|
MAKEFLAGS="$MAKEFLAGS VENDOR_CERT_FILE=%{SOURCE1} "
|
|
|
|
|
if [ -f vendor_db.esl ]; then
|
|
|
|
|
MAKEFLAGS="$MAKEFLAGS VENDOR_DB_FILE=../vendor_db.esl "
|
|
|
|
|
fi
|
|
|
|
|
if [ -f "%{SOURCE2}" ]; then
|
|
|
|
|
MAKEFLAGS="$MAKEFLAGS VENDOR_DBX_FILE=%{SOURCE2} "
|
|
|
|
|
@ -100,13 +116,13 @@ make ${MAKEFLAGS} DEFAULT_LOADER='\\\\grub%{efiarch}.efi' all
|
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
COMMIT_ID=5914984a1ffeab841f482c791426d7ca9935a5e6
|
|
|
|
|
MAKEFLAGS="TOPDIR=.. -f ../Makefile COMMITID=${COMMIT_ID} "
|
|
|
|
|
COMMIT_ID=%{shim_commit_id}
|
|
|
|
|
MAKEFLAGS="TOPDIR=.. -f ../Makefile COMMIT_ID=${COMMIT_ID} "
|
|
|
|
|
MAKEFLAGS+="EFIDIR=%{efidir} PKGNAME=shim RELEASE=%{release} "
|
|
|
|
|
MAKEFLAGS+="ENABLE_SHIM_HASH=true "
|
|
|
|
|
MAKEFLAGS+="SBAT_AUTOMATIC_DATE=2023012900 "
|
|
|
|
|
if [ -f "%{SOURCE1}" ]; then
|
|
|
|
|
MAKEFLAGS="$MAKEFLAGS VENDOR_CERT_FILE=%{SOURCE1} "
|
|
|
|
|
if [ -f vendor_db.esl ]; then
|
|
|
|
|
MAKEFLAGS="$MAKEFLAGS VENDOR_DB_FILE=../vendor_db.esl "
|
|
|
|
|
fi
|
|
|
|
|
if [ -f "%{SOURCE2}" ]; then
|
|
|
|
|
MAKEFLAGS="$MAKEFLAGS VENDOR_DBX_FILE=%{SOURCE2} "
|
|
|
|
|
@ -133,13 +149,25 @@ cd ..
|
|
|
|
|
%files debugsource -f build-%{efiarch}/debugsource.list
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Wed Feb 07 2024 Peter Jones <pjones@redhat.com> - 15.8-2.el8
|
|
|
|
|
- Rebuild to fix the commit ident and MAKEFLAGS
|
|
|
|
|
Resolves: RHEL-11259
|
|
|
|
|
* Wed Oct 29 2025 Eduard Abdullin <eabdullin@almalinux.org> - 16.1-2.el9.alma.1
|
|
|
|
|
- Use AlmaLinux cert
|
|
|
|
|
- Use gcc-toolset-12
|
|
|
|
|
|
|
|
|
|
* Tue Dec 05 2023 Peter Jones <pjones@redhat.com> - 15.8-1.el8
|
|
|
|
|
* Tue Aug 26 2025 Peter Jones <pjones@redhat.com> - 16.1-2.el9
|
|
|
|
|
- Fix the sbat data
|
|
|
|
|
Related: RHEL-18969
|
|
|
|
|
|
|
|
|
|
* Mon Aug 18 2025 Peter Jones <pjones@redhat.com> - 16.1-1.el9
|
|
|
|
|
- Update to shim-16.1
|
|
|
|
|
Resolves: RHEL-18969
|
|
|
|
|
|
|
|
|
|
* Wed Feb 07 2024 Peter Jones <pjones@redhat.com> - 15.8-2.el9
|
|
|
|
|
- Rebuild to fix the commit ident and MAKEFLAGS
|
|
|
|
|
Resolves: RHEL-11262
|
|
|
|
|
|
|
|
|
|
* Tue Dec 05 2023 Peter Jones <pjones@redhat.com> - 15.8-1.el9
|
|
|
|
|
- Update to shim-15.8 for CVE-2023-40547
|
|
|
|
|
Resolves: RHEL-11259
|
|
|
|
|
Resolves: RHEL-11262
|
|
|
|
|
|
|
|
|
|
* Tue May 26 2020 Javier Martinez Canillas <javierm@redhat.com> - 15-6
|
|
|
|
|
- Fix a shim crash when attempting to netboot
|