Compare commits

...

No commits in common. "c8" and "a10" have entirely different histories.
c8 ... a10

10 changed files with 56 additions and 22 deletions

5
.gitignore vendored
View File

@ -1 +1,4 @@
SOURCES/shim-15.8.tar.bz2
almalinux-sb-cert-1.der
almalinux-sb-cert-2.der
almalinux-sb-cert-3.der
shim-16.1.tar.bz2

View File

@ -1 +0,0 @@
cdec924ca437a4509dcb178396996ddf92c11183 SOURCES/shim-15.8.tar.bz2

View File

@ -1 +0,0 @@
shim.redhat,3,Red Hat Inc,shim,15.8,secalert@redhat.com
1 shim.redhat 3 Red Hat Inc shim 15.8 secalert@redhat.com

Binary file not shown.

1
sbat.almalinux.csv Normal file
View File

@ -0,0 +1 @@
shim.almalinux,3,AlmaLinux,shim,16.1,security@almalinux.org
1 shim.almalinux 3 AlmaLinux shim 16.1 security@almalinux.org

View File

@ -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

4
sources Normal file
View File

@ -0,0 +1,4 @@
SHA512 (almalinux-sb-cert-1.der) = 9190a7d5808d3f4181f0f868d07ba83368357a02970f40594e5ec880d33771d890c69f1dfd4ce6c2bc92e6e14217be1aebf7ecc045e6603032b50e33228763ae
SHA512 (almalinux-sb-cert-2.der) = 15a8e4b8a835f26ec552e9574ebec683cef13101734cd6b5ec52925a4e58f199325443a368be85093963998e633258c61c003b66151859694cc47bedd9fbd911
SHA512 (almalinux-sb-cert-3.der) = 8cc47b54781dc140e8c96977ca10f30bf875f469d27b77a5423bf62d7f41689679069746cfe4fd373e880297e769b445398454ad5256873007b88b755fe894cf
SHA512 (shim-16.1.tar.bz2) = ca5f80e82f3b80b622028f03ef23105c98ee1b6a25f52a59c823080a3202dd4b9962266489296e99f955eb92e36ce13e0b1d57f688350006bba45f2718f159fb