|
|
8d419f |
From 340f8e02cf4db0e6b3733bfcc14630b3ce8181a5 Mon Sep 17 00:00:00 2001
|
|
|
8d419f |
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
|
8d419f |
Date: Thu, 23 Dec 2021 13:19:42 +0100
|
|
|
8d419f |
Subject: [PATCH] meson: report SBAT settings
|
|
|
8d419f |
|
|
|
8d419f |
(cherry picked from commit e4e44a0107645891e82a538100a7590eb59a516c)
|
|
|
8d419f |
|
|
|
8d419f |
Related: #2017035
|
|
|
8d419f |
---
|
|
|
8d419f |
src/boot/efi/meson.build | 14 +++++++++++++-
|
|
|
8d419f |
1 file changed, 13 insertions(+), 1 deletion(-)
|
|
|
8d419f |
|
|
|
8d419f |
diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
|
|
|
8d419f |
index dd318079fc..e628068596 100644
|
|
|
8d419f |
--- a/src/boot/efi/meson.build
|
|
|
8d419f |
+++ b/src/boot/efi/meson.build
|
|
|
8d419f |
@@ -130,7 +130,6 @@ elif get_option('sbat-distro') != ''
|
|
|
8d419f |
if (value == '' or value == 'auto') and not meson.is_cross_build()
|
|
|
8d419f |
cmd = 'if [ -e /etc/os-release ]; then . /etc/os-release; else . /usr/lib/os-release; fi; echo $@0@'.format(sbatvar[1])
|
|
|
8d419f |
value = run_command(sh, '-c', cmd).stdout().strip()
|
|
|
8d419f |
- message('@0@ (from @1@): @2@'.format(sbatvar[0], sbatvar[1], value))
|
|
|
8d419f |
endif
|
|
|
8d419f |
if value == ''
|
|
|
8d419f |
error('Required @0@ option not set and autodetection failed'.format(sbatvar[0]))
|
|
|
8d419f |
@@ -147,8 +146,11 @@ elif get_option('sbat-distro') != ''
|
|
|
8d419f |
pkgver = get_option('sbat-distro-version')
|
|
|
8d419f |
if pkgver == ''
|
|
|
8d419f |
efi_conf.set('SBAT_DISTRO_VERSION', 'GIT_VERSION')
|
|
|
8d419f |
+ # This is determined during build, not configuration, so we can't display it yet.
|
|
|
8d419f |
+ sbat_distro_version_display = '(git version)'
|
|
|
8d419f |
else
|
|
|
8d419f |
efi_conf.set_quoted('SBAT_DISTRO_VERSION', pkgver)
|
|
|
8d419f |
+ sbat_distro_version_display = pkgver
|
|
|
8d419f |
endif
|
|
|
8d419f |
endif
|
|
|
8d419f |
|
|
|
8d419f |
@@ -288,6 +290,16 @@ summary({
|
|
|
8d419f |
'EFI include directory' : efi_incdir},
|
|
|
8d419f |
section : 'Extensible Firmware Interface')
|
|
|
8d419f |
|
|
|
8d419f |
+if efi_conf.get('SBAT_DISTRO', '') != ''
|
|
|
8d419f |
+ summary({
|
|
|
8d419f |
+ 'SBAT distro': efi_conf.get('SBAT_DISTRO'),
|
|
|
8d419f |
+ 'SBAT distro generation': efi_conf.get('SBAT_DISTRO_GENERATION'),
|
|
|
8d419f |
+ 'SBAT distro version': sbat_distro_version_display,
|
|
|
8d419f |
+ 'SBAT distro summary': efi_conf.get('SBAT_DISTRO_SUMMARY'),
|
|
|
8d419f |
+ 'SBAT distro URL': efi_conf.get('SBAT_DISTRO_URL')},
|
|
|
8d419f |
+ section : 'Extensible Firmware Interface')
|
|
|
8d419f |
+endif
|
|
|
8d419f |
+
|
|
|
8d419f |
############################################################
|
|
|
8d419f |
|
|
|
8d419f |
efi_headers = files(
|