sys-boot/shim: Include @@VERSION@@ in SBAT for version

Signed-off-by: Sayan Chowdhury <schowdhury@microsoft.com>
This commit is contained in:
Sayan Chowdhury 2024-09-06 19:43:25 +05:30 committed by James Le Cuirot
parent eef935e596
commit 02c0bdaa28
No known key found for this signature in database
GPG Key ID: 1226415D00DD3137
3 changed files with 7 additions and 2 deletions

View File

@ -1 +0,0 @@
shim.flatcar,1,Flatcar Container Linux,shim,15.8,security@flatcar-linux.org
1 shim.flatcar 1 Flatcar Container Linux shim 15.8 security@flatcar-linux.org

View File

@ -0,0 +1,3 @@
sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md
shim,4,UEFI shim,shim,1,https://github.com/rhboot/shim
shim.flatcar,1,Flatcar Container Linux,shim,@@VERSION@@,security@flatcar-linux.org

View File

@ -31,6 +31,9 @@ src_compile() {
local emake_args=( local emake_args=(
CROSS_COMPILE="${CHOST}-" CROSS_COMPILE="${CHOST}-"
) )
sed -e "s/@@VERSION@@/${PVR}/" "${FILESDIR}"/sbat.csv.in >"${WORKDIR}/sbat.csv" || die
# Apparently our environment already has the ARCH variable in # Apparently our environment already has the ARCH variable in
# it, and Makefile picks it up instead of figuring it out # it, and Makefile picks it up instead of figuring it out
# itself with the compiler -dumpmachine flag. But also it # itself with the compiler -dumpmachine flag. But also it
@ -42,7 +45,7 @@ src_compile() {
emake_args+=( ARCH=aarch64 ) emake_args+=( ARCH=aarch64 )
fi fi
emake_args+=( ENABLE_SBSIGN=1 ) emake_args+=( ENABLE_SBSIGN=1 )
emake_args+=( SBATPATH="${FILESDIR}/sbat.csv" ) emake_args+=( SBATPATH="${WORKDIR}/sbat.csv" )
if use official; then if use official; then
if [ -z "${SHIM_SIGNING_CERTIFICATE}" ]; then if [ -z "${SHIM_SIGNING_CERTIFICATE}" ]; then