Accepting request 1045798 from home:michael-chang:branches:Base:System

- Fix inappropriately including commented lines in crypttab (bsc#1206279)
  * 0010-templates-import-etc-crypttab-to-grub.cfg.patch

- Make grub.cfg invariant to efi and legacy platforms (bsc#1205200)
- Removed patch linuxefi
  * grub2-secureboot-provide-linuxefi-config.patch
  * grub2-secureboot-use-linuxefi-on-uefi-in-os-prober.patch
  * grub2-secureboot-use-linuxefi-on-uefi.patch
- Rediff
  * grub2-btrfs-05-grub2-mkconfig.patch
  * grub2-efi-xen-cmdline.patch
  * grub2-s390x-05-grub2-mkconfig.patch
  * grub2-suse-remove-linux-root-param.patch

OBS-URL: https://build.opensuse.org/request/show/1045798
OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=434
This commit is contained in:
Michael Chang 2023-01-03 02:35:16 +00:00 committed by Git OBS Bridge
parent 7db9c91d3c
commit ef0ef13ff0
10 changed files with 78 additions and 257 deletions

View File

@ -18,7 +18,7 @@ Signed-off-by: Michael Chang <mchang@suse.com>
--- a/Makefile.util.def --- a/Makefile.util.def
+++ b/Makefile.util.def +++ b/Makefile.util.def
@@ -477,6 +477,13 @@ @@ -476,6 +476,13 @@
}; };
script = { script = {
@ -67,7 +67,7 @@ Signed-off-by: Michael Chang <mchang@suse.com>
+ +
+if [ -r "$CRYPTTAB" ]; then +if [ -r "$CRYPTTAB" ]; then
+ awk ' + awk '
+ $3 ~ /(^\/dev\/|^\/proc\/|^\/sys\/|:)/ { next } + /^\s*#/ || $3 ~ /(^\/dev\/|^\/proc\/|^\/sys\/|:)/ { next }
+ { key[0] = $3 } + { key[0] = $3 }
+ $3 ~ /(^$|none|-)/ { + $3 ~ /(^$|none|-)/ {
+ key[0] = "/etc/cryptsetup-keys.d/" $1 ".key" + key[0] = "/etc/cryptsetup-keys.d/" $1 ".key"

View File

@ -6,11 +6,9 @@
util/grub.d/20_linux_xen.in | 4 ++++ util/grub.d/20_linux_xen.in | 4 ++++
5 files changed, 42 insertions(+), 3 deletions(-) 5 files changed, 42 insertions(+), 3 deletions(-)
Index: grub-2.02~beta2/util/grub-mkconfig_lib.in --- a/util/grub-mkconfig_lib.in
=================================================================== +++ b/util/grub-mkconfig_lib.in
--- grub-2.02~beta2.orig/util/grub-mkconfig_lib.in @@ -49,7 +49,11 @@
+++ grub-2.02~beta2/util/grub-mkconfig_lib.in
@@ -49,7 +49,11 @@ grub_warn ()
make_system_path_relative_to_its_root () make_system_path_relative_to_its_root ()
{ {
@ -22,11 +20,9 @@ Index: grub-2.02~beta2/util/grub-mkconfig_lib.in
} }
is_path_readable_by_grub () is_path_readable_by_grub ()
Index: grub-2.02~beta2/util/grub.d/00_header.in --- a/util/grub.d/00_header.in
=================================================================== +++ b/util/grub.d/00_header.in
--- grub-2.02~beta2.orig/util/grub.d/00_header.in @@ -27,6 +27,14 @@
+++ grub-2.02~beta2/util/grub.d/00_header.in
@@ -27,6 +27,14 @@ export TEXTDOMAINDIR="@localedir@"
. "$pkgdatadir/grub-mkconfig_lib" . "$pkgdatadir/grub-mkconfig_lib"
@ -41,7 +37,7 @@ Index: grub-2.02~beta2/util/grub.d/00_header.in
# Do this as early as possible, since other commands might depend on it. # Do this as early as possible, since other commands might depend on it.
# (e.g. the `loadfont' command might need lvm or raid modules) # (e.g. the `loadfont' command might need lvm or raid modules)
for i in ${GRUB_PRELOAD_MODULES} ; do for i in ${GRUB_PRELOAD_MODULES} ; do
@@ -43,7 +51,9 @@ if [ "x${GRUB_DEFAULT_BUTTON}" = "xsaved @@ -43,7 +51,9 @@
if [ "x${GRUB_TIMEOUT_BUTTON}" = "x" ] ; then GRUB_TIMEOUT_BUTTON="$GRUB_TIMEOUT" ; fi if [ "x${GRUB_TIMEOUT_BUTTON}" = "x" ] ; then GRUB_TIMEOUT_BUTTON="$GRUB_TIMEOUT" ; fi
cat << EOF cat << EOF
@ -52,7 +48,7 @@ Index: grub-2.02~beta2/util/grub.d/00_header.in
load_env load_env
fi fi
@@ -367,3 +377,15 @@ fi @@ -401,3 +411,15 @@
if [ "x${GRUB_BADRAM}" != "x" ] ; then if [ "x${GRUB_BADRAM}" != "x" ] ; then
echo "badram ${GRUB_BADRAM}" echo "badram ${GRUB_BADRAM}"
fi fi
@ -68,25 +64,21 @@ Index: grub-2.02~beta2/util/grub.d/00_header.in
+fi +fi
+EOF +EOF
+fi +fi
Index: grub-2.02~beta2/util/grub-mkconfig.in --- a/util/grub-mkconfig.in
=================================================================== +++ b/util/grub-mkconfig.in
--- grub-2.02~beta2.orig/util/grub-mkconfig.in @@ -294,7 +294,8 @@
+++ grub-2.02~beta2/util/grub-mkconfig.in GRUB_BADRAM \
@@ -262,7 +262,8 @@ export GRUB_DEFAULT \
GRUB_OS_PROBER_SKIP_LIST \ GRUB_OS_PROBER_SKIP_LIST \
GRUB_DISABLE_SUBMENU \ GRUB_DISABLE_SUBMENU \
GRUB_CMDLINE_LINUX_RECOVERY \ - GRUB_CMDLINE_LINUX_RECOVERY
- GRUB_USE_LINUXEFI + GRUB_CMDLINE_LINUX_RECOVERY \
+ GRUB_USE_LINUXEFI \
+ SUSE_BTRFS_SNAPSHOT_BOOTING + SUSE_BTRFS_SNAPSHOT_BOOTING
if test "x${grub_cfg}" != "x"; then if test "x${grub_cfg}" != "x"; then
rm -f "${grub_cfg}.new" rm -f "${grub_cfg}.new"
Index: grub-2.02~beta2/util/grub.d/10_linux.in --- a/util/grub.d/10_linux.in
=================================================================== +++ b/util/grub.d/10_linux.in
--- grub-2.02~beta2.orig/util/grub.d/10_linux.in @@ -69,10 +69,14 @@
+++ grub-2.02~beta2/util/grub.d/10_linux.in
@@ -57,10 +57,14 @@ fi
case x"$GRUB_FS" in case x"$GRUB_FS" in
xbtrfs) xbtrfs)
@ -101,7 +93,7 @@ Index: grub-2.02~beta2/util/grub.d/10_linux.in
fi;; fi;;
xzfs) xzfs)
rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true` rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true`
@@ -236,7 +240,12 @@ while [ "x$list" != "x" ] ; do @@ -239,7 +243,12 @@
if [ $PLATFORM != "emu" ]; then if [ $PLATFORM != "emu" ]; then
hotkey=0 hotkey=0
else else
@ -115,11 +107,9 @@ Index: grub-2.02~beta2/util/grub.d/10_linux.in
fi fi
version=`echo $basename | sed -e "s,^[^0-9]*-,,g"` version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
alt_version=`echo $version | sed -e "s,\.old$,,g"` alt_version=`echo $version | sed -e "s,\.old$,,g"`
Index: grub-2.02~beta2/util/grub.d/20_linux_xen.in --- a/util/grub.d/20_linux_xen.in
=================================================================== +++ b/util/grub.d/20_linux_xen.in
--- grub-2.02~beta2.orig/util/grub.d/20_linux_xen.in @@ -79,10 +79,14 @@
+++ grub-2.02~beta2/util/grub.d/20_linux_xen.in
@@ -71,10 +71,14 @@ fi
case x"$GRUB_FS" in case x"$GRUB_FS" in
xbtrfs) xbtrfs)

View File

@ -1,22 +1,18 @@
Index: grub-2.02~beta2/util/grub-mkconfig.in --- a/util/grub-mkconfig.in
=================================================================== +++ b/util/grub-mkconfig.in
--- grub-2.02~beta2.orig/util/grub-mkconfig.in @@ -295,7 +295,8 @@
+++ grub-2.02~beta2/util/grub-mkconfig.in GRUB_OS_PROBER_SKIP_LIST \
@@ -260,7 +260,8 @@ export GRUB_DEFAULT \
GRUB_DISABLE_SUBMENU \ GRUB_DISABLE_SUBMENU \
GRUB_CMDLINE_LINUX_RECOVERY \ GRUB_CMDLINE_LINUX_RECOVERY \
GRUB_USE_LINUXEFI \
- SUSE_BTRFS_SNAPSHOT_BOOTING - SUSE_BTRFS_SNAPSHOT_BOOTING
+ SUSE_BTRFS_SNAPSHOT_BOOTING \ + SUSE_BTRFS_SNAPSHOT_BOOTING \
+ SUSE_CMDLINE_XENEFI + SUSE_CMDLINE_XENEFI
if test "x${grub_cfg}" != "x"; then if test "x${grub_cfg}" != "x"; then
rm -f "${grub_cfg}.new" rm -f "${grub_cfg}.new"
Index: grub-2.02~beta2/util/grub.d/20_linux_xen.in --- a/util/grub.d/20_linux_xen.in
=================================================================== +++ b/util/grub.d/20_linux_xen.in
--- grub-2.02~beta2.orig/util/grub.d/20_linux_xen.in @@ -216,7 +216,7 @@
+++ grub-2.02~beta2/util/grub.d/20_linux_xen.in
@@ -176,7 +176,7 @@ linux_entry ()
message="$(gettext_printf "Loading Xen %s with Linux %s ..." ${xen_version} ${version})" message="$(gettext_printf "Loading Xen %s with Linux %s ..." ${xen_version} ${version})"
sed "s/^/$submenu_indentation/" <<-EOF sed "s/^/$submenu_indentation/" <<-EOF
echo '$(echo "$message" | grub_quote)' echo '$(echo "$message" | grub_quote)'

View File

@ -14,11 +14,9 @@ V4:
util/grub.d/10_linux.in | 63 ++++++++++++++++++++++++++++++++++++++---------- util/grub.d/10_linux.in | 63 ++++++++++++++++++++++++++++++++++++++----------
1 file changed, 51 insertions(+), 12 deletions(-) 1 file changed, 51 insertions(+), 12 deletions(-)
Index: grub-2.02~beta2/util/grub.d/10_linux.in --- a/util/grub.d/10_linux.in
=================================================================== +++ b/util/grub.d/10_linux.in
--- grub-2.02~beta2.orig/util/grub.d/10_linux.in @@ -63,6 +63,10 @@
+++ grub-2.02~beta2/util/grub.d/10_linux.in
@@ -51,6 +51,10 @@ else
LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID} LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
fi fi
@ -29,7 +27,7 @@ Index: grub-2.02~beta2/util/grub.d/10_linux.in
case x"$GRUB_FS" in case x"$GRUB_FS" in
xbtrfs) xbtrfs)
rootsubvol="`make_system_path_relative_to_its_root /`" rootsubvol="`make_system_path_relative_to_its_root /`"
@@ -67,6 +71,21 @@ esac @@ -79,6 +83,21 @@
title_correction_code= title_correction_code=
@ -51,7 +49,7 @@ Index: grub-2.02~beta2/util/grub.d/10_linux.in
linux_entry () linux_entry ()
{ {
os="$1" os="$1"
@@ -96,9 +115,11 @@ linux_entry () @@ -108,9 +127,11 @@
title_correction_code="${title_correction_code}if [ \"x\$default\" = '$quoted' ]; then default='$(echo "$replacement_title" | grub_quote)'; fi;" title_correction_code="${title_correction_code}if [ \"x\$default\" = '$quoted' ]; then default='$(echo "$replacement_title" | grub_quote)'; fi;"
grub_warn "$(gettext_printf "Please don't use old title \`%s' for GRUB_DEFAULT, use \`%s' (for versions before 2.00) or \`%s' (for 2.00 or later)" "$GRUB_ACTUAL_DEFAULT" "$replacement_title" "gnulinux-advanced-$boot_device_id>gnulinux-$version-$type-$boot_device_id")" grub_warn "$(gettext_printf "Please don't use old title \`%s' for GRUB_DEFAULT, use \`%s' (for versions before 2.00) or \`%s' (for 2.00 or later)" "$GRUB_ACTUAL_DEFAULT" "$replacement_title" "gnulinux-advanced-$boot_device_id>gnulinux-$version-$type-$boot_device_id")"
fi fi
@ -65,7 +63,7 @@ Index: grub-2.02~beta2/util/grub.d/10_linux.in
fi fi
if [ x$type != xrecovery ] ; then if [ x$type != xrecovery ] ; then
save_default_entry | grub_add_tab save_default_entry | grub_add_tab
@@ -121,6 +142,7 @@ linux_entry () @@ -133,6 +154,7 @@
echo " insmod gzio" | sed "s/^/$submenu_indentation/" echo " insmod gzio" | sed "s/^/$submenu_indentation/"
@ -73,15 +71,15 @@ Index: grub-2.02~beta2/util/grub.d/10_linux.in
if [ x$dirname = x/ ]; then if [ x$dirname = x/ ]; then
if [ -z "${prepare_root_cache}" ]; then if [ -z "${prepare_root_cache}" ]; then
prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | grub_add_tab)" prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | grub_add_tab)"
@@ -132,6 +154,7 @@ linux_entry () @@ -144,6 +166,7 @@
fi fi
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/" printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
fi fi
+ fi + fi
message="$(gettext_printf "Loading Linux %s ..." ${version})" message="$(gettext_printf "Loading Linux %s ..." ${version})"
if [ -d /sys/firmware/efi ] && [ "x${GRUB_USE_LINUXEFI}" = "xtrue" ]; then sed "s/^/$submenu_indentation/" << EOF
sed "s/^/$submenu_indentation/" << EOF echo '$(echo "$message" | grub_quote)'
@@ -166,17 +189,15 @@ EOF @@ -168,17 +191,15 @@
machine=`uname -m` machine=`uname -m`
case "x$machine" in case "x$machine" in
@ -107,7 +105,7 @@ Index: grub-2.02~beta2/util/grub.d/10_linux.in
case "$machine" in case "$machine" in
i?86) GENKERNEL_ARCH="x86" ;; i?86) GENKERNEL_ARCH="x86" ;;
@@ -186,6 +207,15 @@ case "$machine" in @@ -188,6 +209,15 @@
*) GENKERNEL_ARCH="$machine" ;; *) GENKERNEL_ARCH="$machine" ;;
esac esac
@ -123,7 +121,7 @@ Index: grub-2.02~beta2/util/grub.d/10_linux.in
prepare_boot_cache= prepare_boot_cache=
prepare_root_cache= prepare_root_cache=
boot_device_id= boot_device_id=
@@ -202,6 +232,11 @@ while [ "x$list" != "x" ] ; do @@ -204,6 +234,11 @@
basename=`basename $linux` basename=`basename $linux`
dirname=`dirname $linux` dirname=`dirname $linux`
rel_dirname=`make_system_path_relative_to_its_root $dirname` rel_dirname=`make_system_path_relative_to_its_root $dirname`
@ -135,7 +133,7 @@ Index: grub-2.02~beta2/util/grub.d/10_linux.in
version=`echo $basename | sed -e "s,^[^0-9]*-,,g"` version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
alt_version=`echo $version | sed -e "s,\.old$,,g"` alt_version=`echo $version | sed -e "s,\.old$,,g"`
linux_root_device_thisversion="${LINUX_ROOT_DEVICE}" linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
@@ -286,7 +321,8 @@ while [ "x$list" != "x" ] ; do @@ -319,7 +354,8 @@
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")" boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
fi fi
# TRANSLATORS: %s is replaced with an OS name # TRANSLATORS: %s is replaced with an OS name

View File

@ -1,63 +0,0 @@
From 795ac61cba9674376d745813efdab395e35cff41 Mon Sep 17 00:00:00 2001
From: Michael Chang <mchang@suse.com>
Date: Mon, 26 Nov 2012 15:38:54 +0800
Subject: [PATCH] provide option in config to enable linuxefi
References: fate#314485
Patch-Mainline: no
As linuxefi module requires kernel 3.6 or later which supports EFI
handover protocol, it may not be able to load kernels without that
supports in place.
In case that things would break, and the linuxefi is really too young to
take over the position of "linux" kernel loader module, we introduce a
option GRUB_USE_LINUXEFI in the config and only explicit set it to true
will enable it. Example usage is
GRUB_USE_LINUXEFI=true grub2-mkconfig -o /boot/efi/EFI/opensuse/grub.cfg
This will output a grub.cfg which uses linuxefi in replace of linux and
enable verification of kernel signature if in secureboot enabled and
has shim exported protocols available.
---
util/grub-mkconfig.in | 3 ++-
util/grub.d/10_linux.in | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
Index: grub-2.04~rc1/util/grub-mkconfig.in
===================================================================
--- grub-2.04~rc1.orig/util/grub-mkconfig.in
+++ grub-2.04~rc1/util/grub-mkconfig.in
@@ -271,7 +271,8 @@ export GRUB_DEFAULT \
GRUB_BADRAM \
GRUB_OS_PROBER_SKIP_LIST \
GRUB_DISABLE_SUBMENU \
- GRUB_CMDLINE_LINUX_RECOVERY
+ GRUB_CMDLINE_LINUX_RECOVERY \
+ GRUB_USE_LINUXEFI
if test "x${grub_cfg}" != "x"; then
rm -f "${grub_cfg}.new"
Index: grub-2.04~rc1/util/grub.d/10_linux.in
===================================================================
--- grub-2.04~rc1.orig/util/grub.d/10_linux.in
+++ grub-2.04~rc1/util/grub.d/10_linux.in
@@ -145,7 +145,7 @@ linux_entry ()
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
fi
message="$(gettext_printf "Loading Linux %s ..." ${version})"
- if [ -d /sys/firmware/efi ]; then
+ if [ -d /sys/firmware/efi ] && [ "x${GRUB_USE_LINUXEFI}" = "xtrue" ]; then
sed "s/^/$submenu_indentation/" << EOF
echo '$(echo "$message" | grub_quote)'
linuxefi ${rel_dirname}/${basename} ${root_device} ${args}
@@ -163,7 +163,7 @@ EOF
for i in ${initrd}; do
initrd_path="${initrd_path} ${rel_dirname}/${i}"
done
- if [ -d /sys/firmware/efi ]; then
+ if [ -d /sys/firmware/efi ] && [ "x${GRUB_USE_LINUXEFI}" = "xtrue" ]; then
sed "s/^/$submenu_indentation/" << EOF
echo '$(echo "$message" | grub_quote)'
initrdefi $(echo $initrd_path)

View File

@ -1,54 +0,0 @@
From: Andrey Borzenkov <arvidjaar@gmail.com>
Subject: use linuxefi/initrdefi for Linux in 30_os-prober if secure boot is enabled
Reference: bnc#810912
Emit linuxefi/initrdefi for os-prober detected Linux installations if
secure boot is enabled.
Index: grub-2.02~beta2/util/grub.d/30_os-prober.in
===================================================================
--- grub-2.02~beta2.orig/util/grub.d/30_os-prober.in
+++ grub-2.02~beta2/util/grub.d/30_os-prober.in
@@ -41,6 +41,15 @@ if [ -z "${OSPROBED}" ] ; then
exit 0
fi
+# If secure boot is enabled, use linuxefi/initrdefi for Linux (bnc#810912)
+if [ -d /sys/firmware/efi ] && [ "x${GRUB_USE_LINUXEFI}" = "xtrue" ]; then
+ LINUX_LOADER_CMD=linuxefi
+ LINUX_INITRD_CMD=initrdefi
+else
+ LINUX_LOADER_CMD=linux
+ LINUX_INITRD_CMD=initrd
+fi
+
osx_entry() {
if [ x$2 = x32 ]; then
# TRANSLATORS: it refers to kernel architecture (32-bit)
@@ -234,11 +243,11 @@ EOF
save_default_entry | grub_add_tab
printf '%s\n' "${prepare_boot_cache}"
cat << EOF
- linux ${LKERNEL} ${LPARAMS}
+ ${LINUX_LOADER_CMD} ${LKERNEL} ${LPARAMS}
EOF
if [ -n "${LINITRD}" ] ; then
cat << EOF
- initrd ${LINITRD}
+ ${LINUX_INITRD_CMD} ${LINITRD}
EOF
fi
cat << EOF
@@ -254,11 +263,11 @@ EOF
save_default_entry | sed -e "s/^/$grub_tab$grub_tab/"
printf '%s\n' "${prepare_boot_cache}" | grub_add_tab
cat << EOF
- linux ${LKERNEL} ${LPARAMS}
+ ${LINUX_LOADER_CMD} ${LKERNEL} ${LPARAMS}
EOF
if [ -n "${LINITRD}" ] ; then
cat << EOF
- initrd ${LINITRD}
+ ${LINUX_INITRD_CMD} ${LINITRD}
EOF
fi
cat << EOF

View File

@ -1,55 +0,0 @@
From 151b1691fe0cf885df101c6e6a7cb1defc50428b Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 16 Jul 2012 18:57:11 -0400
Subject: [PATCH] Use "linuxefi" and "initrdefi" where appropriate
References: fate#314485
Patch-Mainline: no
Signed-off-by: Michael Chang <mchang@suse.com>
---
util/grub.d/10_linux.in | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
Index: grub-2.04~rc1/util/grub.d/10_linux.in
===================================================================
--- grub-2.04~rc1.orig/util/grub.d/10_linux.in
+++ grub-2.04~rc1/util/grub.d/10_linux.in
@@ -145,10 +145,17 @@ linux_entry ()
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
fi
message="$(gettext_printf "Loading Linux %s ..." ${version})"
- sed "s/^/$submenu_indentation/" << EOF
+ if [ -d /sys/firmware/efi ]; then
+ sed "s/^/$submenu_indentation/" << EOF
+ echo '$(echo "$message" | grub_quote)'
+ linuxefi ${rel_dirname}/${basename} ${root_device} ${args}
+EOF
+ else
+ sed "s/^/$submenu_indentation/" << EOF
echo '$(echo "$message" | grub_quote)'
linux ${rel_dirname}/${basename} ${root_device} ${args}
EOF
+ fi
if test -n "${initrd}" ; then
# TRANSLATORS: ramdisk isn't identifier. Should be translated.
message="$(gettext_printf "Loading initial ramdisk ...")"
@@ -156,10 +163,17 @@ EOF
for i in ${initrd}; do
initrd_path="${initrd_path} ${rel_dirname}/${i}"
done
- sed "s/^/$submenu_indentation/" << EOF
+ if [ -d /sys/firmware/efi ]; then
+ sed "s/^/$submenu_indentation/" << EOF
+ echo '$(echo "$message" | grub_quote)'
+ initrdefi $(echo $initrd_path)
+EOF
+ else
+ sed "s/^/$submenu_indentation/" << EOF
echo '$(echo "$message" | grub_quote)'
initrd $(echo $initrd_path)
EOF
+ fi
fi
sed "s/^/$submenu_indentation/" << EOF
}

View File

@ -1,10 +1,8 @@
Index: grub-2.02/util/grub-mkconfig.in --- a/util/grub-mkconfig.in
=================================================================== +++ b/util/grub-mkconfig.in
--- grub-2.02.orig/util/grub-mkconfig.in @@ -296,7 +296,8 @@
+++ grub-2.02/util/grub-mkconfig.in GRUB_DISABLE_SUBMENU \
@@ -268,7 +268,8 @@ export GRUB_DEFAULT \
GRUB_CMDLINE_LINUX_RECOVERY \ GRUB_CMDLINE_LINUX_RECOVERY \
GRUB_USE_LINUXEFI \
SUSE_BTRFS_SNAPSHOT_BOOTING \ SUSE_BTRFS_SNAPSHOT_BOOTING \
- SUSE_CMDLINE_XENEFI - SUSE_CMDLINE_XENEFI
+ SUSE_CMDLINE_XENEFI \ + SUSE_CMDLINE_XENEFI \
@ -12,11 +10,9 @@ Index: grub-2.02/util/grub-mkconfig.in
if test "x${grub_cfg}" != "x"; then if test "x${grub_cfg}" != "x"; then
rm -f "${grub_cfg}.new" rm -f "${grub_cfg}.new"
Index: grub-2.02/util/grub.d/10_linux.in --- a/util/grub.d/10_linux.in
=================================================================== +++ b/util/grub.d/10_linux.in
--- grub-2.02.orig/util/grub.d/10_linux.in @@ -74,7 +74,7 @@
+++ grub-2.02/util/grub.d/10_linux.in
@@ -64,7 +64,7 @@ case x"$GRUB_FS" in
else else
rootsubvol="`make_system_path_relative_to_its_root /`" rootsubvol="`make_system_path_relative_to_its_root /`"
rootsubvol="${rootsubvol#/}" rootsubvol="${rootsubvol#/}"
@ -25,7 +21,7 @@ Index: grub-2.02/util/grub.d/10_linux.in
GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}" GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}"
fi fi
fi;; fi;;
@@ -75,6 +75,10 @@ case x"$GRUB_FS" in @@ -85,6 +85,10 @@
;; ;;
esac esac
@ -36,11 +32,9 @@ Index: grub-2.02/util/grub.d/10_linux.in
title_correction_code= title_correction_code=
hotkey=1 hotkey=1
Index: grub-2.02/util/grub.d/20_linux_xen.in --- a/util/grub.d/20_linux_xen.in
=================================================================== +++ b/util/grub.d/20_linux_xen.in
--- grub-2.02.orig/util/grub.d/20_linux_xen.in @@ -98,7 +98,7 @@
+++ grub-2.02/util/grub.d/20_linux_xen.in
@@ -78,7 +78,7 @@ case x"$GRUB_FS" in
else else
rootsubvol="`make_system_path_relative_to_its_root /`" rootsubvol="`make_system_path_relative_to_its_root /`"
rootsubvol="${rootsubvol#/}" rootsubvol="${rootsubvol#/}"
@ -49,7 +43,7 @@ Index: grub-2.02/util/grub.d/20_linux_xen.in
GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}" GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}"
fi fi
fi;; fi;;
@@ -89,6 +89,10 @@ case x"$GRUB_FS" in @@ -109,6 +109,10 @@
;; ;;
esac esac
@ -60,11 +54,9 @@ Index: grub-2.02/util/grub.d/20_linux_xen.in
title_correction_code= title_correction_code=
grub2_unquote () grub2_unquote ()
Index: grub-2.02/util/s390x/zipl2grub.pl.in --- a/util/s390x/zipl2grub.pl.in
=================================================================== +++ b/util/s390x/zipl2grub.pl.in
--- grub-2.02.orig/util/s390x/zipl2grub.pl.in @@ -384,9 +384,13 @@
+++ grub-2.02/util/s390x/zipl2grub.pl.in
@@ -367,9 +367,13 @@ while ( <IN> ) {
} else { } else {
$v = ""; $v = "";
} }

View File

@ -1,3 +1,23 @@
-------------------------------------------------------------------
Fri Dec 30 07:58:54 UTC 2022 - Michael Chang <mchang@suse.com>
- Fix inappropriately including commented lines in crypttab (bsc#1206279)
* 0010-templates-import-etc-crypttab-to-grub.cfg.patch
-------------------------------------------------------------------
Fri Dec 23 09:50:42 UTC 2022 - Michael Chang <mchang@suse.com>
- Make grub.cfg invariant to efi and legacy platforms (bsc#1205200)
- Removed patch linuxefi
* grub2-secureboot-provide-linuxefi-config.patch
* grub2-secureboot-use-linuxefi-on-uefi-in-os-prober.patch
* grub2-secureboot-use-linuxefi-on-uefi.patch
- Rediff
* grub2-btrfs-05-grub2-mkconfig.patch
* grub2-efi-xen-cmdline.patch
* grub2-s390x-05-grub2-mkconfig.patch
* grub2-suse-remove-linux-root-param.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Dec 19 08:39:05 UTC 2022 - Michael Chang <mchang@suse.com> Mon Dec 19 08:39:05 UTC 2022 - Michael Chang <mchang@suse.com>

View File

@ -193,11 +193,8 @@ Patch15: not-display-menu-when-boot-once.patch
Patch17: grub2-pass-corret-root-for-nfsroot.patch Patch17: grub2-pass-corret-root-for-nfsroot.patch
Patch19: grub2-efi-HP-workaround.patch Patch19: grub2-efi-HP-workaround.patch
Patch21: grub2-secureboot-add-linuxefi.patch Patch21: grub2-secureboot-add-linuxefi.patch
Patch22: grub2-secureboot-use-linuxefi-on-uefi.patch
Patch23: grub2-secureboot-no-insmod-on-sb.patch Patch23: grub2-secureboot-no-insmod-on-sb.patch
Patch24: grub2-secureboot-provide-linuxefi-config.patch
Patch25: grub2-secureboot-chainloader.patch Patch25: grub2-secureboot-chainloader.patch
Patch26: grub2-secureboot-use-linuxefi-on-uefi-in-os-prober.patch
Patch27: grub2-linuxefi-fix-boot-params.patch Patch27: grub2-linuxefi-fix-boot-params.patch
Patch35: grub2-linguas.sh-no-rsync.patch Patch35: grub2-linguas.sh-no-rsync.patch
Patch37: grub2-use-Unifont-for-starfield-theme-terminal.patch Patch37: grub2-use-Unifont-for-starfield-theme-terminal.patch