SHA256
1
0
forked from pool/fwupd

Accepting request 1059490 from Base:System

OBS-URL: https://build.opensuse.org/request/show/1059490
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/fwupd?expand=0&rev=58
This commit is contained in:
Dominique Leuenberger 2023-01-20 16:37:46 +00:00 committed by Git OBS Bridge
commit 17fb6c95d5
4 changed files with 52 additions and 1 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:255ed384340595abbc75f866528b9a6acf8bc5ffca18768950f3a57095ca9147 oid sha256:90cc2b2a3a58bc7a763207abfda9946333adb0d278e83317343a40f69e5810fa
size 16382989 size 16382989

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jan 18 17:13:29 UTC 2023 - Michal Suchanek <msuchanek@suse.com>
- Fix error generating grub.cfg when an update is available.
+ uefi-capsule-Do-not-call-grub2-probe-without-argumen.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jan 4 08:43:32 UTC 2023 - Paolo Stivanin <info@paolostivanin.com> Wed Jan 4 08:43:32 UTC 2023 - Paolo Stivanin <info@paolostivanin.com>

View File

@ -55,6 +55,8 @@ Patch2: fwupd-jscSLE-11766-close-efidir-leap-gap.patch
Patch3: harden_fwupd-offline-update.service.patch Patch3: harden_fwupd-offline-update.service.patch
# PATCH-FEATURE-OPENSUSE harden_fwupd-refresh.service.patch -- Harden services # PATCH-FEATURE-OPENSUSE harden_fwupd-refresh.service.patch -- Harden services
Patch4: harden_fwupd-refresh.service.patch Patch4: harden_fwupd-refresh.service.patch
# PATCH_FIX_UPSTREAM uefi-capsule-Do-not-call-grub2-probe-without-argumen.patch -- https://github.com/fwupd/fwupd/issues/5424
Patch5: uefi-capsule-Do-not-call-grub2-probe-without-argumen.patch
BuildRequires: dejavu-fonts BuildRequires: dejavu-fonts
BuildRequires: fdupes BuildRequires: fdupes

View File

@ -0,0 +1,43 @@
From 9065f50057cb0e9a1609e44882740ba70d98c2a6 Mon Sep 17 00:00:00 2001
From: Michal Suchanek <msuchanek@suse.de>
Date: Wed, 18 Jan 2023 16:07:05 +0100
Subject: [PATCH] uefi-capsule: Do not call grub2-probe without arguments
commit 684bc0381 ("trivial: fix various shellcheck warnings") adds call
to ${grub_probe} without any argument which causes grub2-probe to return
an error, and generating grub configuration fails.
Add --version argument to avoid the error, and redierct the output to
/dev/null so that it's not included in the grub configuration file.
The commit also adds superfluous single quotes causing another error:
/usr/sbin/grub2-probe: error: cannot find a GRUB drive for `${grub_probe} --target=device \${ESP}` | sed -e "s/^/\t/". Check your device.map.
Fix the quoting to work at least for single device.
Fixes: #5424
Fixes: 684bc0381 ("trivial: fix various shellcheck warnings")
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
plugins/uefi-capsule/fwupd.grub.conf.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugins/uefi-capsule/fwupd.grub.conf.in b/plugins/uefi-capsule/fwupd.grub.conf.in
index 9c3a22f23..6d17fc3cc 100755
--- a/plugins/uefi-capsule/fwupd.grub.conf.in
+++ b/plugins/uefi-capsule/fwupd.grub.conf.in
@@ -14,8 +14,8 @@ if [ -f @localstatedir@/lib/fwupd/uefi_capsule.conf ] &&
cat << EOF
menuentry 'Linux Firmware Updater' \$menuentry_id_option 'fwupd' {
EOF
- ${grub_probe:?}
- prepare_grub_to_access_device '`${grub_probe} --target=device \${ESP}` | sed -e "s/^/\t/"'
+ ${grub_probe:?} --version > /dev/null
+ prepare_grub_to_access_device "$(${grub_probe} --target=device ${ESP})" | sed -e "s/^/\t/"
cat << EOF
chainloader ${EFI_PATH}
}
--
2.39.0