diff --git a/fwupd-1.8.9.obscpio b/fwupd-1.8.9.obscpio index 04f41dc..c2952aa 100644 --- a/fwupd-1.8.9.obscpio +++ b/fwupd-1.8.9.obscpio @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:255ed384340595abbc75f866528b9a6acf8bc5ffca18768950f3a57095ca9147 +oid sha256:90cc2b2a3a58bc7a763207abfda9946333adb0d278e83317343a40f69e5810fa size 16382989 diff --git a/fwupd.changes b/fwupd.changes index 8c130d1..7ce3497 100644 --- a/fwupd.changes +++ b/fwupd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jan 18 17:13:29 UTC 2023 - Michal Suchanek + +- 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 diff --git a/fwupd.spec b/fwupd.spec index cdaa288..1984102 100644 --- a/fwupd.spec +++ b/fwupd.spec @@ -55,6 +55,8 @@ Patch2: fwupd-jscSLE-11766-close-efidir-leap-gap.patch Patch3: harden_fwupd-offline-update.service.patch # PATCH-FEATURE-OPENSUSE harden_fwupd-refresh.service.patch -- Harden services 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: fdupes diff --git a/uefi-capsule-Do-not-call-grub2-probe-without-argumen.patch b/uefi-capsule-Do-not-call-grub2-probe-without-argumen.patch new file mode 100644 index 0000000..9f9d2f4 --- /dev/null +++ b/uefi-capsule-Do-not-call-grub2-probe-without-argumen.patch @@ -0,0 +1,43 @@ +From 9065f50057cb0e9a1609e44882740ba70d98c2a6 Mon Sep 17 00:00:00 2001 +From: Michal Suchanek +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 +--- + 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 +