diff -Nru grub2-2.04/debian/changelog grub2-2.04/debian/changelog --- grub2-2.04/debian/changelog 2021-06-19 09:04:38.000000000 -0300 +++ grub2-2.04/debian/changelog 2021-07-08 18:49:25.000000000 -0300 @@ -1,3 +1,11 @@ +grub2 (2.04-19+hwmatch) UNRELEASED; urgency=medium + + * d/p/gfxpayload-dynamic.patch: Only call hwmatch on i386/pc. + Fixes "error: can't find command `hwmatch'." on x86_64/efi. + (closes: #) + + -- Mauricio Faria de Oliveira Thu, 08 Jul 2021 18:49:25 -0300 + grub2 (2.04-19) unstable; urgency=medium * Resync grub-install backup and restore patches from upstream, fixing diff -Nru grub2-2.04/debian/patches/gfxpayload-dynamic.patch grub2-2.04/debian/patches/gfxpayload-dynamic.patch --- grub2-2.04/debian/patches/gfxpayload-dynamic.patch 2021-06-19 09:04:38.000000000 -0300 +++ grub2-2.04/debian/patches/gfxpayload-dynamic.patch 2021-07-08 18:49:25.000000000 -0300 @@ -7,9 +7,16 @@ the current hardware. See https://blueprints.launchpad.net/ubuntu/+spec/packageselection-foundations-n-grub2-boot-framebuffer. +2021-07-08: Only call hwmatch on i386/pc as it is only available there. +This avoids "error: can't find command `hwmatch'." on e.g., x86_64/efi. +The equivalent behavior is linux_gfx_mode=keep because grub is special: +the `if hwmatch` clause is true on that error and `$match = 0` is true +too, as it is undefined (confirmed in grub shell.) A quick fix for now. + - Mauricio Faria de Oliveira + Author: Colin Watson Forwarded: no -Last-Update: 2019-05-25 +Last-Update: 2021-07-08 Patch-Name: gfxpayload-dynamic.patch --- @@ -252,7 +259,7 @@ fi echo " insmod gzio" | sed "s/^/$submenu_indentation/" -@@ -226,6 +228,35 @@ prepare_root_cache= +@@ -226,6 +228,37 @@ prepare_root_cache= boot_device_id= title_correction_code= @@ -264,7 +271,9 @@ + cat << EOF +if [ "\${recordfail}" != 1 ]; then + if [ -e \${prefix}/gfxblacklist.txt ]; then -+ if hwmatch \${prefix}/gfxblacklist.txt 3; then ++ if [ \${grub_platform} != pc ]; then ++ set linux_gfx_mode=keep ++ elif hwmatch \${prefix}/gfxblacklist.txt 3; then + if [ \${match} = 0 ]; then + set linux_gfx_mode=keep + else