mirror of
https://src.fedoraproject.org/rpms/grub2.git
synced 2024-11-25 06:37:33 +00:00
Drop patch fixing a corner case in BLS variable expansion
There is a bug reported about a system failing to boot with the latest pkg and the only relevant change was this patch. Drop it just to be sure since it is fixing a corner case in variable expansion so is not worth the risk. Related: rhbz#1779611 Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
This commit is contained in:
parent
e06b103d4c
commit
2f9c936464
4 changed files with 6 additions and 54 deletions
|
@ -1,51 +0,0 @@
|
||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Javier Martinez Canillas <javierm@redhat.com>
|
|
||||||
Date: Tue, 26 Nov 2019 09:51:41 +0100
|
|
||||||
Subject: [PATCH] blscfg: add a space char when appending fields for variable
|
|
||||||
expansion
|
|
||||||
|
|
||||||
The GRUB variables are expanded and replaced by their values before adding
|
|
||||||
menu entries, but they didn't include space characters after the values so
|
|
||||||
the result was not correct.
|
|
||||||
|
|
||||||
For the common case this wasn't a problem but it is if there are variables
|
|
||||||
that are part of the values of other variables.
|
|
||||||
|
|
||||||
Resolves: rhbz#1669252
|
|
||||||
|
|
||||||
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
|
|
||||||
---
|
|
||||||
grub-core/commands/blscfg.c | 19 +++++++++----------
|
|
||||||
1 file changed, 9 insertions(+), 10 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/grub-core/commands/blscfg.c b/grub-core/commands/blscfg.c
|
|
||||||
index 8c6dd91be10..f1dc1f8e808 100644
|
|
||||||
--- a/grub-core/commands/blscfg.c
|
|
||||||
+++ b/grub-core/commands/blscfg.c
|
|
||||||
@@ -602,17 +602,16 @@ static char *field_append(bool is_var, char *buffer, char *start, char *end)
|
|
||||||
return buffer;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (!buffer) {
|
|
||||||
- buffer = grub_strdup(field);
|
|
||||||
- if (!buffer)
|
|
||||||
- return NULL;
|
|
||||||
- } else {
|
|
||||||
- buffer = grub_realloc (buffer, grub_strlen(buffer) + grub_strlen(field));
|
|
||||||
- if (!buffer)
|
|
||||||
- return NULL;
|
|
||||||
+ if (!buffer)
|
|
||||||
+ buffer = grub_zalloc (grub_strlen(field) + 1);
|
|
||||||
+ else
|
|
||||||
+ buffer = grub_realloc (buffer, grub_strlen(buffer) + grub_strlen(field) + 1);
|
|
||||||
|
|
||||||
- grub_stpcpy (buffer + grub_strlen(buffer), field);
|
|
||||||
- }
|
|
||||||
+ if (!buffer)
|
|
||||||
+ return NULL;
|
|
||||||
+
|
|
||||||
+ grub_stpcpy (buffer + grub_strlen(buffer), field);
|
|
||||||
+ grub_stpcpy (buffer + grub_strlen(buffer), " ");
|
|
||||||
|
|
||||||
return buffer;
|
|
||||||
}
|
|
|
@ -189,5 +189,4 @@ Patch0188: 0188-Don-t-add-a-class-option-to-menu-entries-generated-f.patch
|
||||||
Patch0189: 0189-blscfg-Fix-typo-for-gfxpayload-variable-name.patch
|
Patch0189: 0189-blscfg-Fix-typo-for-gfxpayload-variable-name.patch
|
||||||
Patch0190: 0190-grub-set-bootflag-Update-comment-about-running-as-ro.patch
|
Patch0190: 0190-grub-set-bootflag-Update-comment-about-running-as-ro.patch
|
||||||
Patch0191: 0191-grub-set-bootflag-Write-new-env-to-tmpfile-and-then-.patch
|
Patch0191: 0191-grub-set-bootflag-Write-new-env-to-tmpfile-and-then-.patch
|
||||||
Patch0192: 0192-blscfg-add-a-space-char-when-appending-fields-for-va.patch
|
Patch0192: 0192-grub.d-Fix-boot_indeterminate-getting-set-on-boot_su.patch
|
||||||
Patch0193: 0193-grub.d-Fix-boot_indeterminate-getting-set-on-boot_su.patch
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
Name: grub2
|
Name: grub2
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 2.02
|
Version: 2.02
|
||||||
Release: 103%{?dist}
|
Release: 104%{?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/
|
||||||
|
@ -518,6 +518,10 @@ rm -r /boot/grub2.tmp/ || :
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Dec 05 2019 Javier Martinez Canillas <javierm@redhat.com> - 2.02-104
|
||||||
|
- Drop patch fixing a corner case in BLS variable expansion
|
||||||
|
Related: rhbz#1779611
|
||||||
|
|
||||||
* Wed Nov 27 2019 Javier Martinez Canillas <javierm@redhat.com> - 2.02-103
|
* Wed Nov 27 2019 Javier Martinez Canillas <javierm@redhat.com> - 2.02-103
|
||||||
- blscfg: add a space char when appending fields for variable expansion
|
- blscfg: add a space char when appending fields for variable expansion
|
||||||
- grub.d: Fix boot_indeterminate getting set on boot_success=0 boot
|
- grub.d: Fix boot_indeterminate getting set on boot_success=0 boot
|
||||||
|
|
Loading…
Reference in a new issue