Fix a couple of merge mistakes made when rebasing to 2.06~rc1
Resolves: rhbz#1940524 Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
This commit is contained in:
parent
46968b6e63
commit
51b7d6220e
@ -14,7 +14,7 @@ Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
|
||||
Signed-off-by: Will Thompson <wjt@endlessm.com>
|
||||
---
|
||||
grub-core/Makefile.core.def | 11 +
|
||||
grub-core/commands/blscfg.c | 1171 ++++++++++++++++++++++++++++++++++++++++
|
||||
grub-core/commands/blscfg.c | 1177 ++++++++++++++++++++++++++++++++++++++++
|
||||
grub-core/commands/legacycfg.c | 5 +-
|
||||
grub-core/commands/loadenv.c | 77 +--
|
||||
grub-core/commands/menuentry.c | 20 +-
|
||||
@ -23,7 +23,7 @@ Signed-off-by: Will Thompson <wjt@endlessm.com>
|
||||
include/grub/compiler.h | 2 +
|
||||
include/grub/menu.h | 13 +
|
||||
include/grub/normal.h | 2 +-
|
||||
10 files changed, 1318 insertions(+), 82 deletions(-)
|
||||
10 files changed, 1324 insertions(+), 82 deletions(-)
|
||||
create mode 100644 grub-core/commands/blscfg.c
|
||||
create mode 100644 grub-core/commands/loadenv.h
|
||||
|
||||
@ -58,10 +58,10 @@ index c865a08b027..c15e91943b9 100644
|
||||
|
||||
diff --git a/grub-core/commands/blscfg.c b/grub-core/commands/blscfg.c
|
||||
new file mode 100644
|
||||
index 00000000000..ab35c75443a
|
||||
index 00000000000..e907a6a5d28
|
||||
--- /dev/null
|
||||
+++ b/grub-core/commands/blscfg.c
|
||||
@@ -0,0 +1,1171 @@
|
||||
@@ -0,0 +1,1177 @@
|
||||
+/*-*- Mode: C; c-basic-offset: 2; indent-tabs-mode: t -*-*/
|
||||
+
|
||||
+/* bls.c - implementation of the boot loader spec */
|
||||
@ -678,25 +678,29 @@ index 00000000000..ab35c75443a
|
||||
+
|
||||
+static char *field_append(bool is_var, char *buffer, const char *start, const char *end)
|
||||
+{
|
||||
+ char *temp = grub_strndup(start, end - start + 1);
|
||||
+ const char *field = temp;
|
||||
+ char *tmp = grub_strndup(start, end - start + 1);
|
||||
+ const char *field = tmp;
|
||||
+ int term = is_var ? 2 : 1;
|
||||
+
|
||||
+ if (is_var) {
|
||||
+ field = grub_env_get (temp);
|
||||
+ field = grub_env_get (tmp);
|
||||
+ if (!field)
|
||||
+ return buffer;
|
||||
+ }
|
||||
+
|
||||
+ if (!buffer)
|
||||
+ buffer = grub_zalloc (grub_strlen(field) + 1);
|
||||
+ buffer = grub_zalloc (grub_strlen(field) + term);
|
||||
+ else
|
||||
+ buffer = grub_realloc (buffer, grub_strlen(buffer) + grub_strlen(field) + 1);
|
||||
+ buffer = grub_realloc (buffer, grub_strlen(buffer) + grub_strlen(field) + term);
|
||||
+
|
||||
+ if (!buffer)
|
||||
+ return NULL;
|
||||
+
|
||||
+ grub_stpcpy (buffer + grub_strlen(buffer), field);
|
||||
+ grub_stpcpy (buffer + grub_strlen(buffer), " ");
|
||||
+ tmp = buffer + grub_strlen(buffer);
|
||||
+ tmp = grub_stpcpy (tmp, field);
|
||||
+
|
||||
+ if (is_var)
|
||||
+ tmp = grub_stpcpy (tmp, " ");
|
||||
+
|
||||
+ return buffer;
|
||||
+}
|
||||
@ -726,6 +730,8 @@ index 00000000000..ab35c75443a
|
||||
+ buffer = field_append(is_var, buffer, start, end);
|
||||
+ is_var = false;
|
||||
+ start = value;
|
||||
+ if (*start == ' ')
|
||||
+ start++;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
@ -8,10 +8,11 @@ happens so quickly it looks like something is wrong and isn't
|
||||
very appealing.
|
||||
---
|
||||
grub-core/gettext/gettext.c | 25 +++++--------------------
|
||||
grub-core/kern/main.c | 5 -----
|
||||
grub-core/boot/i386/pc/boot.S | 3 ---
|
||||
grub-core/boot/i386/pc/diskboot.S | 5 -----
|
||||
util/grub.d/10_linux.in | 7 -------
|
||||
4 files changed, 5 insertions(+), 35 deletions(-)
|
||||
5 files changed, 5 insertions(+), 40 deletions(-)
|
||||
|
||||
diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c
|
||||
index 4d02e62c109..84d520cd494 100644
|
||||
@ -95,6 +96,22 @@ index 4d02e62c109..84d520cd494 100644
|
||||
|
||||
grub_register_variable_hook ("locale_dir", NULL, read_main);
|
||||
grub_register_variable_hook ("secondary_locale_dir", NULL, read_secondary);
|
||||
diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c
|
||||
index d1de9fa6873..48058d983ce 100644
|
||||
--- a/grub-core/kern/main.c
|
||||
+++ b/grub-core/kern/main.c
|
||||
@@ -269,11 +269,6 @@ grub_main (void)
|
||||
|
||||
grub_boot_time ("After machine init.");
|
||||
|
||||
- /* Hello. */
|
||||
- grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT);
|
||||
- grub_printf ("Welcome to GRUB!\n\n");
|
||||
- grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);
|
||||
-
|
||||
/* Init verifiers API. */
|
||||
grub_verifiers_init ();
|
||||
|
||||
diff --git a/grub-core/boot/i386/pc/boot.S b/grub-core/boot/i386/pc/boot.S
|
||||
index 2bd0b2d2866..ea167fe1206 100644
|
||||
--- a/grub-core/boot/i386/pc/boot.S
|
||||
|
@ -24,9 +24,9 @@ Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
|
||||
---
|
||||
util/grub-mkconfig.8 | 4 +
|
||||
util/grub-mkconfig.in | 9 +-
|
||||
util/grub-mkconfig_lib.in | 20 ++++-
|
||||
util/grub-mkconfig_lib.in | 22 ++++-
|
||||
util/grub.d/10_linux.in | 223 +++++++++++++++++++++++++++++++++++++++++++++-
|
||||
4 files changed, 251 insertions(+), 5 deletions(-)
|
||||
4 files changed, 252 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/util/grub-mkconfig.8 b/util/grub-mkconfig.8
|
||||
index a2d1f577b9b..434fa4deda4 100644
|
||||
@ -84,7 +84,7 @@ index e671ce68aec..1a70b7ea056 100644
|
||||
if test "x${grub_cfg}" != "x"; then
|
||||
rm -f "${grub_cfg}.new"
|
||||
diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
|
||||
index fafeac95061..4e6534a41f6 100644
|
||||
index fafeac95061..d8bb4069360 100644
|
||||
--- a/util/grub-mkconfig_lib.in
|
||||
+++ b/util/grub-mkconfig_lib.in
|
||||
@@ -30,6 +30,9 @@ fi
|
||||
@ -117,7 +117,7 @@ index fafeac95061..4e6534a41f6 100644
|
||||
old_ifs="$IFS"
|
||||
IFS='
|
||||
'
|
||||
@@ -161,15 +175,15 @@ prepare_grub_to_access_device ()
|
||||
@@ -161,18 +175,18 @@ prepare_grub_to_access_device ()
|
||||
# otherwise set root as per value in device.map.
|
||||
fs_hint="`"${grub_probe}" --device $@ --target=compatibility_hint`"
|
||||
if [ "x$fs_hint" != x ]; then
|
||||
@ -135,7 +135,11 @@ index fafeac95061..4e6534a41f6 100644
|
||||
+ echo " search --no-floppy --fs-uuid --set=${device_variable} ${fs_uuid}"
|
||||
echo "fi"
|
||||
else
|
||||
echo "search --no-floppy --fs-uuid --set=root ${fs_uuid}"
|
||||
- echo "search --no-floppy --fs-uuid --set=root ${fs_uuid}"
|
||||
+ echo "search --no-floppy --fs-uuid --set=${device_variable} ${fs_uuid}"
|
||||
fi
|
||||
fi
|
||||
IFS="$old_ifs"
|
||||
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
||||
index cbfaca34cc7..68adb55d893 100644
|
||||
--- a/util/grub.d/10_linux.in
|
||||
|
@ -14,7 +14,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
2 files changed, 71 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c
|
||||
index d1de9fa6873..1c540fc8c26 100644
|
||||
index 48058d983ce..4ec3f5e4d33 100644
|
||||
--- a/grub-core/kern/main.c
|
||||
+++ b/grub-core/kern/main.c
|
||||
@@ -131,11 +131,19 @@ grub_set_prefix_and_root (void)
|
||||
|
@ -25,7 +25,7 @@ Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c
|
||||
index 1c540fc8c26..b573be6650d 100644
|
||||
index 4ec3f5e4d33..0285e95a2bb 100644
|
||||
--- a/grub-core/kern/main.c
|
||||
+++ b/grub-core/kern/main.c
|
||||
@@ -143,6 +143,7 @@ grub_set_prefix_and_root (void)
|
||||
|
@ -464,6 +464,9 @@ cd .. \
|
||||
cd grub-emu-%{tarversion} \
|
||||
%configure \\\
|
||||
%{cc_equals} \\\
|
||||
HOST_CFLAGS="%{legacy_host_cflags}" \\\
|
||||
HOST_CPPFLAGS="-I$(pwd)" \\\
|
||||
HOST_LDFLAGS="%{legacy_host_ldflags}" \\\
|
||||
--with-platform=emu \\\
|
||||
--with-grubdir=%{name} \\\
|
||||
--program-transform-name=s,grub,%{name}, \\\
|
||||
|
@ -14,7 +14,7 @@
|
||||
Name: grub2
|
||||
Epoch: 1
|
||||
Version: 2.06~rc1
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Bootloader with support for Linux, Multiboot and more
|
||||
License: GPLv3+
|
||||
URL: http://www.gnu.org/software/grub/
|
||||
@ -554,6 +554,10 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Mar 24 2021 Javier Martinez Canillas <javierm@redhat.com> - 2.06~rc1-2
|
||||
- Fix a couple of merge mistakes made when rebasing to 2.06~rc1
|
||||
Resolves: rhbz#1940524
|
||||
|
||||
* Fri Mar 12 2021 Javier Martinez Canillas <javierm@redhat.com> - 2.06~rc1-1
|
||||
- Update to 2.06~rc1 to fix a bunch of CVEs
|
||||
Resolves: CVE-2020-14372
|
||||
|
Loading…
Reference in New Issue
Block a user