Skip machine ID check when updating BLS

Signed-off-by: Robbie Harwood <rharwood@redhat.com>
This commit is contained in:
Robbie Harwood 2022-01-20 22:48:15 +00:00
parent a382c9e3c9
commit 3e40727f72
4 changed files with 20 additions and 22 deletions

View File

@ -22,13 +22,16 @@ and Tom Gundersen respectively.
Signed-off-by: Peter Jones <pjones@redhat.com> Signed-off-by: Peter Jones <pjones@redhat.com>
[javierm: remove outdated URL for BLS document] [javierm: remove outdated URL for BLS document]
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
[iwienand@redhat.com: skip machine ID check when updating entries]
Signed-off-by: Ian Wienand <iwienand@redhat.com>
[rharwood: commit message composits]
Signed-off-by: Robbie Harwood <rharwood@redhat.com> Signed-off-by: Robbie Harwood <rharwood@redhat.com>
--- ---
util/grub-mkconfig.8 | 4 + util/grub-mkconfig.8 | 4 +
util/grub-mkconfig.in | 9 +- util/grub-mkconfig.in | 9 +-
util/grub-mkconfig_lib.in | 22 ++++- util/grub-mkconfig_lib.in | 22 ++++-
util/grub.d/10_linux.in | 223 +++++++++++++++++++++++++++++++++++++++++++++- util/grub.d/10_linux.in | 218 +++++++++++++++++++++++++++++++++++++++++++++-
4 files changed, 252 insertions(+), 6 deletions(-) 4 files changed, 247 insertions(+), 6 deletions(-)
diff --git a/util/grub-mkconfig.8 b/util/grub-mkconfig.8 diff --git a/util/grub-mkconfig.8 b/util/grub-mkconfig.8
index a2d1f577b9b..434fa4deda4 100644 index a2d1f577b9b..434fa4deda4 100644
@ -143,10 +146,10 @@ index fafeac95061..d8bb4069360 100644
fi fi
IFS="$old_ifs" IFS="$old_ifs"
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 7bb3a211a7c..6bceabf3dc9 100644 index 7bb3a211a7c..9fcd77cacc3 100644
--- a/util/grub.d/10_linux.in --- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in
@@ -82,6 +82,223 @@ case x"$GRUB_FS" in @@ -82,6 +82,218 @@ case x"$GRUB_FS" in
;; ;;
esac esac
@ -206,18 +209,13 @@ index 7bb3a211a7c..6bceabf3dc9 100644
+ +
+get_sorted_bls() +get_sorted_bls()
+{ +{
+ if ! [ -d "${blsdir}" ] || ! [ -e /etc/machine-id ]; then + if ! [ -d "${blsdir}" ]; then
+ return
+ fi
+
+ read machine_id < /etc/machine-id
+ if [ -z "${machine_id}" ]; then
+ return + return
+ fi + fi
+ +
+ local IFS=$'\n' + local IFS=$'\n'
+ +
+ files=($(for bls in ${blsdir}/${machine_id}-*.conf; do + files=($(for bls in ${blsdir}/*.conf; do
+ if ! [[ -e "${bls}" ]] ; then + if ! [[ -e "${bls}" ]] ; then
+ continue + continue
+ fi + fi
@ -370,7 +368,7 @@ index 7bb3a211a7c..6bceabf3dc9 100644
mktitle () mktitle ()
{ {
local title_type local title_type
@@ -121,6 +338,7 @@ linux_entry () @@ -121,6 +333,7 @@ linux_entry ()
if [ -z "$boot_device_id" ]; then if [ -z "$boot_device_id" ]; then
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")" boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
fi fi
@ -378,7 +376,7 @@ index 7bb3a211a7c..6bceabf3dc9 100644
if [ x$type != xsimple ] ; then if [ x$type != xsimple ] ; then
title=$(mktitle "$type" "$version") title=$(mktitle "$type" "$version")
if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then
@@ -231,6 +449,7 @@ is_top_level=true @@ -231,6 +444,7 @@ is_top_level=true
while [ "x$list" != "x" ] ; do while [ "x$list" != "x" ] ; do
linux=`version_find_latest $list` linux=`version_find_latest $list`
gettext_printf "Found linux image: %s\n" "$linux" >&2 gettext_printf "Found linux image: %s\n" "$linux" >&2
@ -386,7 +384,7 @@ index 7bb3a211a7c..6bceabf3dc9 100644
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`
@@ -269,7 +488,9 @@ while [ "x$list" != "x" ] ; do @@ -269,7 +483,9 @@ while [ "x$list" != "x" ] ; do
for i in ${initrd}; do for i in ${initrd}; do
initrd_display="${initrd_display} ${dirname}/${i}" initrd_display="${initrd_display} ${dirname}/${i}"
done done

View File

@ -20,10 +20,10 @@ Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
1 file changed, 3 insertions(+), 1 deletion(-) 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 6bceabf3dc9..b95a9a8d7ca 100644 index 9fcd77cacc3..dc473f4333c 100644
--- a/util/grub.d/10_linux.in --- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in
@@ -261,7 +261,9 @@ if [ -z "\${kernelopts}" ]; then @@ -256,7 +256,9 @@ if [ -z "\${kernelopts}" ]; then
fi fi
EOF EOF

View File

@ -1,4 +1,4 @@
From 8c68222cbb8e7527c447bd6908578b72b7302f80 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: fluteze <fluteze@gmail.com> From: fluteze <fluteze@gmail.com>
Date: Sat, 27 Nov 2021 10:54:44 -0600 Date: Sat, 27 Nov 2021 10:54:44 -0600
Subject: [PATCH] Add Fedora location of DejaVu SANS font Subject: [PATCH] Add Fedora location of DejaVu SANS font
@ -16,7 +16,7 @@ Signed-off-by: Robbie Harwood <rharwood@redhat.com>
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac diff --git a/configure.ac b/configure.ac
index 3c808a722..3527f069a 100644 index 3c808a72230..3527f069ab2 100644
--- a/configure.ac --- a/configure.ac
+++ b/configure.ac +++ b/configure.ac
@@ -1812,7 +1812,7 @@ fi @@ -1812,7 +1812,7 @@ fi
@ -28,6 +28,3 @@ index 3c808a722..3527f069a 100644
if test -f "$dir/DejaVuSans.$ext"; then if test -f "$dir/DejaVuSans.$ext"; then
DJVU_FONT_SOURCE="$dir/DejaVuSans.$ext" DJVU_FONT_SOURCE="$dir/DejaVuSans.$ext"
break 2 break 2
--
2.34.1

View File

@ -14,7 +14,7 @@
Name: grub2 Name: grub2
Epoch: 1 Epoch: 1
Version: 2.06 Version: 2.06
Release: 14%{?dist} Release: 15%{?dist}
Summary: Bootloader with support for Linux, Multiboot and more Summary: Bootloader with support for Linux, Multiboot and more
License: GPLv3+ License: GPLv3+
URL: http://www.gnu.org/software/grub/ URL: http://www.gnu.org/software/grub/
@ -523,6 +523,9 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg
%endif %endif
%changelog %changelog
* Thu Jan 20 2022 Robbie Harwood <rharwood@redhat.com> - 2.06-15
- Skip machine ID check when updating BLS
* Tue Jan 18 2022 Robbie Harwood <rharwood@redhat.com> - 2.06-14 * Tue Jan 18 2022 Robbie Harwood <rharwood@redhat.com> - 2.06-14
- Add location of DejaVu Sans font - Add location of DejaVu Sans font