import grub2-2.06-46.el9_1.5

This commit is contained in:
CentOS Sources 2023-04-11 14:25:15 +00:00 committed by Stepan Oksanichenko
parent 90fc0a39bf
commit 7b714248cd
353 changed files with 7666 additions and 7276 deletions

2
.gitignore vendored
View File

@ -1,4 +1,4 @@
SOURCES/gnulib-fixes.tar.gz
SOURCES/gnulib-9f48fb992a3d7e96610c4ce8be969cff2d61a01b.tar.gz
SOURCES/grub-2.06.tar.xz
SOURCES/theme.tar.bz2
SOURCES/unifont-13.0.06.pcf.gz

View File

@ -1,4 +1,4 @@
1a07692dfaa916675a92b1383885141f490f98d2 SOURCES/gnulib-fixes.tar.gz
d08376d97163f99ce0d61fce160d6f7667c5c944 SOURCES/gnulib-9f48fb992a3d7e96610c4ce8be969cff2d61a01b.tar.gz
c9f93f1e195ec7a5a21d36a13b469788c0b29f0f SOURCES/grub-2.06.tar.xz
cf0b7763c528902da7e8b05cfa248f20c8825ce5 SOURCES/theme.tar.bz2
3b39cb0830367171760ec536cab805abdbe08bc5 SOURCES/unifont-13.0.06.pcf.gz

View File

@ -164,18 +164,33 @@ following branches:
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1347291
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Also:
commit cc06f149fbd2d8c1da1e83173d21629ba97e0d92
Author: Raymund Will <rw@suse.com>
chainloader: Define machine types for RISC-V
The commit "Add secureboot support on efi chainloader" didn't add machine
types for RISC-V, so this patch adds them.
Note, that grub-core/loader/riscv/linux.c is skipped because Linux is not
supported yet. This patch might need a new revision once that's the case.
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
---
grub-core/kern/efi/efi.c | 14 +-
grub-core/loader/arm64/linux.c | 4 +-
grub-core/loader/efi/chainloader.c | 816 +++++++++++++++++++++++++++++++++----
grub-core/loader/efi/chainloader.c | 820 +++++++++++++++++++++++++++++++++----
grub-core/loader/efi/linux.c | 25 +-
grub-core/loader/i386/efi/linux.c | 17 +-
include/grub/efi/linux.h | 2 +-
include/grub/efi/pe32.h | 52 ++-
7 files changed, 840 insertions(+), 90 deletions(-)
7 files changed, 844 insertions(+), 90 deletions(-)
diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
index 35b8f670602..4a2259aa1c7 100644
index 35b8f67060..4a2259aa1c 100644
--- a/grub-core/kern/efi/efi.c
+++ b/grub-core/kern/efi/efi.c
@@ -296,14 +296,20 @@ grub_efi_secure_boot (void)
@ -204,7 +219,7 @@ index 35b8f670602..4a2259aa1c7 100644
if (*secure_boot && !*setup_mode)
ret = 1;
diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c
index a312c668685..04994d5c67d 100644
index a312c66868..04994d5c67 100644
--- a/grub-core/loader/arm64/linux.c
+++ b/grub-core/loader/arm64/linux.c
@@ -284,6 +284,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
@ -226,7 +241,7 @@ index a312c668685..04994d5c67d 100644
grub_error (GRUB_ERR_INVALID_COMMAND, N_("%s has invalid signature"), argv[0]);
goto fail;
diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
index 2bd80f4db3d..b54cf6986fc 100644
index 2bd80f4db3..e6a8d4ad0e 100644
--- a/grub-core/loader/efi/chainloader.c
+++ b/grub-core/loader/efi/chainloader.c
@@ -32,6 +32,8 @@
@ -261,7 +276,7 @@ index 2bd80f4db3d..b54cf6986fc 100644
grub_dl_unref (my_mod);
return GRUB_ERR_NONE;
@@ -213,20 +221,690 @@ make_file_path (grub_efi_device_path_t *dp, const char *filename)
@@ -213,20 +221,694 @@ make_file_path (grub_efi_device_path_t *dp, const char *filename)
return file_path;
}
@ -376,6 +391,10 @@ index 2bd80f4db3d..b54cf6986fc 100644
+ GRUB_PE32_MACHINE_I386;
+#elif defined(__ia64__)
+ GRUB_PE32_MACHINE_IA64;
+#elif defined(__riscv) && (__riscv_xlen == 32)
+ GRUB_PE32_MACHINE_RISCV32;
+#elif defined(__riscv) && (__riscv_xlen == 64)
+ GRUB_PE32_MACHINE_RISCV64;
+#else
+#error this architecture is not supported by grub2
+#endif
@ -955,7 +974,7 @@ index 2bd80f4db3d..b54cf6986fc 100644
if (argc == 0)
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
@@ -238,15 +916,45 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
@@ -238,15 +920,45 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
address = 0;
image_handle = 0;
file_path = 0;
@ -1003,7 +1022,7 @@ index 2bd80f4db3d..b54cf6986fc 100644
if (! dev)
goto fail;
@@ -283,17 +991,14 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
@@ -283,17 +995,14 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
if (! file_path)
goto fail;
@ -1024,7 +1043,7 @@ index 2bd80f4db3d..b54cf6986fc 100644
status = efi_call_4 (b->allocate_pages, GRUB_EFI_ALLOCATE_ANY_PAGES,
GRUB_EFI_LOADER_CODE,
@@ -307,7 +1012,7 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
@@ -307,7 +1016,7 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
}
boot_image = (void *) ((grub_addr_t) address);
@ -1033,7 +1052,7 @@ index 2bd80f4db3d..b54cf6986fc 100644
{
if (grub_errno == GRUB_ERR_NONE)
grub_error (GRUB_ERR_BAD_OS, N_("premature end of file %s"),
@@ -317,7 +1022,7 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
@@ -317,7 +1026,7 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
}
#if defined (__i386__) || defined (__x86_64__)
@ -1042,7 +1061,7 @@ index 2bd80f4db3d..b54cf6986fc 100644
{
struct grub_macho_fat_header *head = boot_image;
if (head->magic
@@ -326,6 +1031,14 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
@@ -326,6 +1035,14 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
grub_uint32_t i;
struct grub_macho_fat_arch *archs
= (struct grub_macho_fat_arch *) (head + 1);
@ -1057,7 +1076,7 @@ index 2bd80f4db3d..b54cf6986fc 100644
for (i = 0; i < grub_cpu_to_le32 (head->nfat_arch); i++)
{
if (GRUB_MACHO_CPUTYPE_IS_HOST_CURRENT (archs[i].cputype))
@@ -340,79 +1053,39 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
@@ -340,79 +1057,39 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
> ~grub_cpu_to_le32 (archs[i].size)
|| grub_cpu_to_le32 (archs[i].offset)
+ grub_cpu_to_le32 (archs[i].size)
@ -1154,7 +1173,7 @@ index 2bd80f4db3d..b54cf6986fc 100644
if (dev)
grub_device_close (dev);
@@ -424,6 +1097,9 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
@@ -424,6 +1101,9 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
if (address)
efi_call_2 (b->free_pages, address, pages);
@ -1165,7 +1184,7 @@ index 2bd80f4db3d..b54cf6986fc 100644
return grub_errno;
diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c
index c24202a5dd1..c8ecce6dfd0 100644
index c24202a5dd..c8ecce6dfd 100644
--- a/grub-core/loader/efi/linux.c
+++ b/grub-core/loader/efi/linux.c
@@ -33,21 +33,34 @@ struct grub_efi_shim_lock
@ -1210,7 +1229,7 @@ index c24202a5dd1..c8ecce6dfd0 100644
#pragma GCC diagnostic push
diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c
index bb2616a8092..6b24cbb9483 100644
index bb2616a809..6b24cbb948 100644
--- a/grub-core/loader/i386/efi/linux.c
+++ b/grub-core/loader/i386/efi/linux.c
@@ -117,6 +117,8 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
@ -1278,7 +1297,7 @@ index bb2616a8092..6b24cbb9483 100644
grub_file_close (file);
diff --git a/include/grub/efi/linux.h b/include/grub/efi/linux.h
index d9ede36773b..0033d9305a9 100644
index d9ede36773..0033d9305a 100644
--- a/include/grub/efi/linux.h
+++ b/include/grub/efi/linux.h
@@ -22,7 +22,7 @@
@ -1291,7 +1310,7 @@ index d9ede36773b..0033d9305a9 100644
grub_err_t
EXPORT_FUNC(grub_efi_linux_boot) (void *kernel_address, grub_off_t offset,
diff --git a/include/grub/efi/pe32.h b/include/grub/efi/pe32.h
index 0ed8781f037..a43adf27464 100644
index 0ed8781f03..a43adf2746 100644
--- a/include/grub/efi/pe32.h
+++ b/include/grub/efi/pe32.h
@@ -223,7 +223,11 @@ struct grub_pe64_optional_header

View File

@ -4,14 +4,14 @@ Date: Mon, 8 Jul 2019 12:55:29 +0200
Subject: [PATCH] re-write .gitignore
---
.gitignore | 152 ++++++++++++++++++++++++++++++++++++++
.gitignore | 150 ++++++++++++++++++++++++++++++++++++++
docs/.gitignore | 5 ++
grub-core/.gitignore | 16 ++++
grub-core/lib/.gitignore | 1 +
include/grub/gcrypt/.gitignore | 2 +
po/.gitignore | 5 ++
util/bash-completion.d/.gitignore | 2 +
7 files changed, 183 insertions(+)
7 files changed, 181 insertions(+)
create mode 100644 docs/.gitignore
create mode 100644 grub-core/.gitignore
create mode 100644 grub-core/lib/.gitignore
@ -20,10 +20,10 @@ Subject: [PATCH] re-write .gitignore
create mode 100644 util/bash-completion.d/.gitignore
diff --git a/.gitignore b/.gitignore
index f6a1bd05175..594d0134d33 100644
index f6a1bd0517..208d1d2325 100644
--- a/.gitignore
+++ b/.gitignore
@@ -275,3 +275,155 @@ widthspec.bin
@@ -275,3 +275,153 @@ widthspec.bin
/xfs_test
/xzcompress_test
/zfs_test
@ -152,8 +152,6 @@ index f6a1bd05175..594d0134d33 100644
+/grub*-reboot.8
+/grub*-render-label
+/grub*-render-label.1
+/grub*-rpm-sort
+/grub*-rpm-sort.8
+/grub*-script-check
+/grub*-script-check.1
+/grub*-set-bootflag
@ -181,7 +179,7 @@ index f6a1bd05175..594d0134d33 100644
+/widthspec.h
diff --git a/docs/.gitignore b/docs/.gitignore
new file mode 100644
index 00000000000..e1d849ef95b
index 0000000000..e1d849ef95
--- /dev/null
+++ b/docs/.gitignore
@@ -0,0 +1,5 @@
@ -192,7 +190,7 @@ index 00000000000..e1d849ef95b
+/version*.texi
diff --git a/grub-core/.gitignore b/grub-core/.gitignore
new file mode 100644
index 00000000000..2acce281159
index 0000000000..2acce28115
--- /dev/null
+++ b/grub-core/.gitignore
@@ -0,0 +1,16 @@
@ -214,14 +212,14 @@ index 00000000000..2acce281159
+/trigtables.c
diff --git a/grub-core/lib/.gitignore b/grub-core/lib/.gitignore
new file mode 100644
index 00000000000..68154591404
index 0000000000..6815459140
--- /dev/null
+++ b/grub-core/lib/.gitignore
@@ -0,0 +1 @@
+/libgcrypt-grub/
diff --git a/include/grub/gcrypt/.gitignore b/include/grub/gcrypt/.gitignore
new file mode 100644
index 00000000000..8fbf5646246
index 0000000000..8fbf564624
--- /dev/null
+++ b/include/grub/gcrypt/.gitignore
@@ -0,0 +1,2 @@
@ -229,7 +227,7 @@ index 00000000000..8fbf5646246
+gcrypt.h
diff --git a/po/.gitignore b/po/.gitignore
new file mode 100644
index 00000000000..f507e7741e3
index 0000000000..f507e7741e
--- /dev/null
+++ b/po/.gitignore
@@ -0,0 +1,5 @@
@ -240,7 +238,7 @@ index 00000000000..f507e7741e3
+/stamp-po
diff --git a/util/bash-completion.d/.gitignore b/util/bash-completion.d/.gitignore
new file mode 100644
index 00000000000..6813a527ad3
index 0000000000..6813a527ad
--- /dev/null
+++ b/util/bash-completion.d/.gitignore
@@ -0,0 +1,2 @@

View File

@ -7,16 +7,20 @@ This is an implementation of IBM client architecture (CAS) reboot for GRUB.
There are cases where the POWER firmware must reboot in order to support
specific features requested by a kernel. The kernel calls
ibm,client-architecture-support and it may either return or reboot with the new
feature set. eg:
ibm,client-architecture-support and it may either return or reboot with
the new feature set. eg:
Calling ibm,client-architecture-support.../
Elapsed time since release of system processors: 70959 mins 50 secs
Welcome to GRUB!
Instead of return to the GRUB menu, it will check if the flag for CAS reboot is
set. If so, grub will automatically boot the last booted kernel using the same
parameters
Instead of return to the GRUB menu, it will check if the flag for CAS
reboot is set. If so, grub will automatically boot the last booted
kernel using the same parameters
Signed-off-by: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
[rharwood@redhat.com: commit message rewrap]
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
grub-core/kern/ieee1275/openfw.c | 63 ++++++++++++++++++++++++++++++++++++++++
grub-core/normal/main.c | 19 ++++++++++++
@ -25,7 +29,7 @@ parameters
4 files changed, 91 insertions(+)
diff --git a/grub-core/kern/ieee1275/openfw.c b/grub-core/kern/ieee1275/openfw.c
index 4d493ab7661..3a6689abb11 100644
index 4d493ab766..3a6689abb1 100644
--- a/grub-core/kern/ieee1275/openfw.c
+++ b/grub-core/kern/ieee1275/openfw.c
@@ -591,3 +591,66 @@ grub_ieee1275_get_boot_dev (void)
@ -96,7 +100,7 @@ index 4d493ab7661..3a6689abb11 100644
+ return 0;
+}
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
index c4ebe9e22ad..70614de1565 100644
index c4ebe9e22a..70614de156 100644
--- a/grub-core/normal/main.c
+++ b/grub-core/normal/main.c
@@ -34,6 +34,9 @@
@ -133,7 +137,7 @@ index c4ebe9e22ad..70614de1565 100644
grub_errno = GRUB_ERR_NONE;
}
diff --git a/grub-core/script/execute.c b/grub-core/script/execute.c
index 25158407dd8..ad80399246a 100644
index 25158407dd..ad80399246 100644
--- a/grub-core/script/execute.c
+++ b/grub-core/script/execute.c
@@ -28,6 +28,9 @@
@ -158,7 +162,7 @@ index 25158407dd8..ad80399246a 100644
{
char *line;
diff --git a/include/grub/ieee1275/ieee1275.h b/include/grub/ieee1275/ieee1275.h
index 73e2f464475..0a599607f31 100644
index 73e2f46447..0a599607f3 100644
--- a/include/grub/ieee1275/ieee1275.h
+++ b/include/grub/ieee1275/ieee1275.h
@@ -254,6 +254,8 @@ int EXPORT_FUNC(grub_ieee1275_devalias_next) (struct grub_ieee1275_devalias *ali

View File

@ -10,12 +10,14 @@ This should fix this bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=908519
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
grub-core/term/terminfo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/term/terminfo.c b/grub-core/term/terminfo.c
index 85ecf06b4df..05c88dcf49e 100644
index 85ecf06b4d..05c88dcf49 100644
--- a/grub-core/term/terminfo.c
+++ b/grub-core/term/terminfo.c
@@ -151,7 +151,7 @@ grub_terminfo_set_current (struct grub_term_output *term,

View File

@ -5,6 +5,9 @@ Subject: [PATCH] Disable GRUB video support for IBM power machines
Should fix the problem in bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=973205
Signed-off-by: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
grub-core/kern/ieee1275/cmain.c | 5 ++++-
grub-core/video/ieee1275.c | 9 ++++++---
@ -12,7 +15,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=973205
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/grub-core/kern/ieee1275/cmain.c b/grub-core/kern/ieee1275/cmain.c
index 20cbbd761ec..04df9d2c667 100644
index 20cbbd761e..04df9d2c66 100644
--- a/grub-core/kern/ieee1275/cmain.c
+++ b/grub-core/kern/ieee1275/cmain.c
@@ -90,7 +90,10 @@ grub_ieee1275_find_options (void)
@ -28,7 +31,7 @@ index 20cbbd761ec..04df9d2c667 100644
/* Old Macs have no key repeat, newer ones have fully working one.
The ones inbetween when repeated key generates an escaoe sequence
diff --git a/grub-core/video/ieee1275.c b/grub-core/video/ieee1275.c
index 17a3dbbb575..b8e4b3feb32 100644
index 17a3dbbb57..b8e4b3feb3 100644
--- a/grub-core/video/ieee1275.c
+++ b/grub-core/video/ieee1275.c
@@ -352,9 +352,12 @@ static struct grub_video_adapter grub_video_ieee1275_adapter =
@ -48,7 +51,7 @@ index 17a3dbbb575..b8e4b3feb32 100644
GRUB_MOD_FINI(ieee1275_fb)
diff --git a/include/grub/ieee1275/ieee1275.h b/include/grub/ieee1275/ieee1275.h
index 0a599607f31..b5a1d49bbc3 100644
index 0a599607f3..b5a1d49bbc 100644
--- a/include/grub/ieee1275/ieee1275.h
+++ b/include/grub/ieee1275/ieee1275.h
@@ -148,6 +148,8 @@ enum grub_ieee1275_flag

View File

@ -3,8 +3,11 @@ From: Mark Hamzy <hamzy@us.ibm.com>
Date: Wed, 28 Mar 2012 14:46:41 -0500
Subject: [PATCH] Migrate PPC from Yaboot to Grub2
Add configuration support for serial terminal consoles. This will set the
maximum screen size so that text is not overwritten.
Add configuration support for serial terminal consoles. This will set
the maximum screen size so that text is not overwritten.
Signed-off-by: Mark Hamzy <hamzy@us.ibm.com>
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
Makefile.util.def | 7 +++
util/grub.d/20_ppc_terminfo.in | 114 +++++++++++++++++++++++++++++++++++++++++
@ -12,7 +15,7 @@ maximum screen size so that text is not overwritten.
create mode 100644 util/grub.d/20_ppc_terminfo.in
diff --git a/Makefile.util.def b/Makefile.util.def
index f8b356cc1fa..2c9b283a230 100644
index f8b356cc1f..2c9b283a23 100644
--- a/Makefile.util.def
+++ b/Makefile.util.def
@@ -508,6 +508,13 @@ script = {
@ -31,7 +34,7 @@ index f8b356cc1fa..2c9b283a230 100644
common = util/grub.d/30_os-prober.in;
diff --git a/util/grub.d/20_ppc_terminfo.in b/util/grub.d/20_ppc_terminfo.in
new file mode 100644
index 00000000000..10d66586820
index 0000000000..10d6658682
--- /dev/null
+++ b/util/grub.d/20_ppc_terminfo.in
@@ -0,0 +1,114 @@

View File

@ -8,13 +8,16 @@ found. It was originally written by Matthew Garrett, and adapted to fix the
"No modules are loaded on grub2 network boot" issue:
https://bugzilla.redhat.com/show_bug.cgi?id=857936
Signed-off-by: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
grub-core/kern/main.c | 13 ++++++-------
grub-core/normal/main.c | 25 ++++++++++++++++++++++++-
2 files changed, 30 insertions(+), 8 deletions(-)
diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c
index 73967e2f5b0..d1de9fa6873 100644
index 73967e2f5b..d1de9fa687 100644
--- a/grub-core/kern/main.c
+++ b/grub-core/kern/main.c
@@ -128,16 +128,15 @@ grub_set_prefix_and_root (void)
@ -41,7 +44,7 @@ index 73967e2f5b0..d1de9fa6873 100644
}
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
index 70614de1565..62571e6dfcc 100644
index 70614de156..62571e6dfc 100644
--- a/grub-core/normal/main.c
+++ b/grub-core/normal/main.c
@@ -339,7 +339,30 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),

View File

@ -1,176 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Jon McCann <william.jon.mccann@gmail.com>
Date: Wed, 15 May 2013 13:30:20 -0400
Subject: [PATCH] Don't write messages to the screen
Writing messages to the screen before the menus or boot splash
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 -------
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
--- a/grub-core/gettext/gettext.c
+++ b/grub-core/gettext/gettext.c
@@ -434,16 +434,12 @@ static char *
grub_gettext_env_write_lang (struct grub_env_var *var
__attribute__ ((unused)), const char *val)
{
- grub_err_t err;
+ grub_err_t __attribute__((__unused__)) err;
err = grub_gettext_init_ext (&main_context, val, grub_env_get ("locale_dir"),
grub_env_get ("prefix"));
- if (err)
- grub_print_error ();
err = grub_gettext_init_ext (&secondary_context, val,
grub_env_get ("secondary_locale_dir"), 0);
- if (err)
- grub_print_error ();
return grub_strdup (val);
}
@@ -451,23 +447,19 @@ grub_gettext_env_write_lang (struct grub_env_var *var
void
grub_gettext_reread_prefix (const char *val)
{
- grub_err_t err;
+ grub_err_t __attribute__((__unused__)) err;
err = grub_gettext_init_ext (&main_context, grub_env_get ("lang"),
grub_env_get ("locale_dir"),
val);
- if (err)
- grub_print_error ();
}
static char *
read_main (struct grub_env_var *var
__attribute__ ((unused)), const char *val)
{
- grub_err_t err;
+ grub_err_t __attribute__((__unused__)) err;
err = grub_gettext_init_ext (&main_context, grub_env_get ("lang"), val,
grub_env_get ("prefix"));
- if (err)
- grub_print_error ();
return grub_strdup (val);
}
@@ -475,12 +467,9 @@ static char *
read_secondary (struct grub_env_var *var
__attribute__ ((unused)), const char *val)
{
- grub_err_t err;
+ grub_err_t __attribute__((__unused__)) err;
err = grub_gettext_init_ext (&secondary_context, grub_env_get ("lang"), val,
0);
- if (err)
- grub_print_error ();
-
return grub_strdup (val);
}
@@ -500,18 +489,14 @@ grub_cmd_translate (grub_command_t cmd __attribute__ ((unused)),
GRUB_MOD_INIT (gettext)
{
const char *lang;
- grub_err_t err;
+ grub_err_t __attribute__((__unused__)) err;
lang = grub_env_get ("lang");
err = grub_gettext_init_ext (&main_context, lang, grub_env_get ("locale_dir"),
grub_env_get ("prefix"));
- if (err)
- grub_print_error ();
err = grub_gettext_init_ext (&secondary_context, lang,
grub_env_get ("secondary_locale_dir"), 0);
- if (err)
- grub_print_error ();
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
+++ b/grub-core/boot/i386/pc/boot.S
@@ -249,9 +249,6 @@ real_start:
/* save drive reference first thing! */
pushw %dx
- /* print a notification message on the screen */
- MSG(notification_string)
-
/* set %si to the disk address packet */
movw $disk_address_packet, %si
diff --git a/grub-core/boot/i386/pc/diskboot.S b/grub-core/boot/i386/pc/diskboot.S
index c1addc0df29..68d31de0c4c 100644
--- a/grub-core/boot/i386/pc/diskboot.S
+++ b/grub-core/boot/i386/pc/diskboot.S
@@ -50,11 +50,6 @@ _start:
/* save drive reference first thing! */
pushw %dx
- /* print a notification message on the screen */
- pushw %si
- MSG(notification_string)
- popw %si
-
/* this sets up for the first run through "bootloop" */
movw $LOCAL(firstlist), %di
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index dc75a1c30bf..ad2ac4b078d 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -138,27 +138,20 @@ linux_entry ()
fi
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
fi
- message="$(gettext_printf "Loading Linux %s ..." ${version})"
sed "s/^/$submenu_indentation/" << EOF
- echo '$(echo "$message" | grub_quote)'
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
EOF
if test -n "${initrd}" ; then
- # TRANSLATORS: ramdisk isn't identifier. Should be translated.
- message="$(gettext_printf "Loading initial ramdisk ...")"
initrd_path=
for i in ${initrd}; do
initrd_path="${initrd_path} ${rel_dirname}/${i}"
done
sed "s/^/$submenu_indentation/" << EOF
- echo '$(echo "$message" | grub_quote)'
initrd $(echo $initrd_path)
EOF
fi
if test -n "${fdt}" ; then
- message="$(gettext_printf "Loading fdt ...")"
sed "s/^/$submenu_indentation/" << EOF
- echo '$(echo "$message" | grub_quote)'
devicetree ${rel_dirname}/${fdt}
EOF
fi

View File

@ -9,7 +9,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
1 file changed, 2 insertions(+)
diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
index 93a90233ead..858b526c925 100644
index 93a90233ea..858b526c92 100644
--- a/util/grub.d/00_header.in
+++ b/util/grub.d/00_header.in
@@ -43,6 +43,8 @@ if [ "x${GRUB_DEFAULT_BUTTON}" = "xsaved" ] ; then GRUB_DEFAULT_BUTTON='${saved_

View File

@ -1,42 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Jon McCann <william.jon.mccann@gmail.com>
Date: Wed, 15 May 2013 13:53:48 -0400
Subject: [PATCH] Don't print GNU GRUB header
No one cares.
---
grub-core/normal/main.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
index 7ca2e5400b1..5d5f7b539f5 100644
--- a/grub-core/normal/main.c
+++ b/grub-core/normal/main.c
@@ -208,15 +208,16 @@ read_config_file (const char *config)
/* Initialize the screen. */
void
grub_normal_init_page (struct grub_term_output *term,
- int y)
+ int y __attribute__((__unused__)))
{
+ grub_term_cls (term);
+
+#if 0
grub_ssize_t msg_len;
int posx;
char *msg_formatted;
grub_uint32_t *unicode_msg;
grub_uint32_t *last_position;
-
- grub_term_cls (term);
msg_formatted = grub_xasprintf (_("GNU GRUB version %s"), PACKAGE_VERSION);
if (!msg_formatted)
@@ -241,6 +242,7 @@ grub_normal_init_page (struct grub_term_output *term,
grub_putcode ('\n', term);
grub_putcode ('\n', term);
grub_free (unicode_msg);
+#endif
}
static void

View File

@ -0,0 +1,85 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 14 Mar 2011 14:27:42 -0400
Subject: [PATCH] Don't say "GNU/Linux" in generated menus.
[rharwood: say it even less]
---
grub-core/normal/main.c | 2 +-
tests/util/grub-shell-tester.in | 2 +-
tests/util/grub-shell.in | 2 +-
util/grub.d/10_linux.in | 4 ++--
util/grub.d/20_linux_xen.in | 4 ++--
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
index 7ca2e5400b..98372217ad 100644
--- a/grub-core/normal/main.c
+++ b/grub-core/normal/main.c
@@ -218,7 +218,7 @@ grub_normal_init_page (struct grub_term_output *term,
grub_term_cls (term);
- msg_formatted = grub_xasprintf (_("GNU GRUB version %s"), PACKAGE_VERSION);
+ msg_formatted = grub_xasprintf (_("GRUB version %s"), PACKAGE_VERSION);
if (!msg_formatted)
return;
diff --git a/tests/util/grub-shell-tester.in b/tests/util/grub-shell-tester.in
index 8a87109b15..9a4319d4f4 100644
--- a/tests/util/grub-shell-tester.in
+++ b/tests/util/grub-shell-tester.in
@@ -56,7 +56,7 @@ for option in "$@"; do
usage
exit 0 ;;
-v | --version)
- echo "$0 (GNU GRUB ${PACKAGE_VERSION})"
+ echo "$0 (GRUB ${PACKAGE_VERSION})"
exit 0 ;;
--modules=*)
ms=`echo "$option" | sed -e 's/--modules=//'`
diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in
index 93e9f51484..ec1182bf93 100644
--- a/tests/util/grub-shell.in
+++ b/tests/util/grub-shell.in
@@ -209,7 +209,7 @@ for option in "$@"; do
usage
exit 0 ;;
-v | --version)
- echo "$0 (GNU GRUB ${PACKAGE_VERSION})"
+ echo "$0 (GRUB ${PACKAGE_VERSION})"
exit 0 ;;
--trim)
trim=1
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index dc75a1c30b..4a499c53a6 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -29,9 +29,9 @@ export TEXTDOMAINDIR="@localedir@"
CLASS="--class gnu-linux --class gnu --class os"
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
- OS=GNU/Linux
+ OS="$(sed 's, release .*$,,g' /etc/system-release)"
else
- OS="${GRUB_DISTRIBUTOR} GNU/Linux"
+ OS="${GRUB_DISTRIBUTOR}"
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
fi
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
index 3b1f470492..ada20775a1 100644
--- a/util/grub.d/20_linux_xen.in
+++ b/util/grub.d/20_linux_xen.in
@@ -29,9 +29,9 @@ export TEXTDOMAINDIR="@localedir@"
CLASS="--class gnu-linux --class gnu --class os --class xen"
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
- OS=GNU/Linux
+ OS="$(sed 's, release .*$,,g' /etc/system-release)"
else
- OS="${GRUB_DISTRIBUTOR} GNU/Linux"
+ OS="${GRUB_DISTRIBUTOR}"
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
fi

View File

@ -8,7 +8,7 @@ Subject: [PATCH] Add .eh_frame to list of relocations stripped
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/conf/Makefile.common b/conf/Makefile.common
index 2a1a886f6d5..191b1a70c6b 100644
index 2a1a886f6d..191b1a70c6 100644
--- a/conf/Makefile.common
+++ b/conf/Makefile.common
@@ -38,7 +38,7 @@ CFLAGS_KERNEL = $(CFLAGS_PLATFORM) -ffreestanding

View File

@ -1,23 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Jon McCann <william.jon.mccann@gmail.com>
Date: Wed, 15 May 2013 17:49:45 -0400
Subject: [PATCH] Don't add '*' to highlighted row
It is already highlighted.
---
grub-core/normal/menu_text.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
index 18240e76cea..65deafda531 100644
--- a/grub-core/normal/menu_text.c
+++ b/grub-core/normal/menu_text.c
@@ -242,7 +242,7 @@ print_entry (int y, int highlight, grub_menu_entry_t entry,
unicode_title[i] = ' ';
if (data->geo.num_entries > 1)
- grub_putcode (highlight ? '*' : ' ', data->term);
+ grub_putcode (' ', data->term);
grub_print_ucs4_menu (unicode_title,
unicode_title + len,

View File

@ -14,7 +14,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 4fc58c83304..635d2fe0cd3 100644
index 4a499c53a6..cf8d118698 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -26,7 +26,7 @@ datarootdir="@datarootdir@"

View File

@ -1,68 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Jon McCann <william.jon.mccann@gmail.com>
Date: Fri, 7 Jun 2013 11:09:04 -0400
Subject: [PATCH] Message string cleanups
Make use of terminology consistent. Remove jargon.
---
grub-core/normal/menu_text.c | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
index 65deafda531..cc5837ed2b8 100644
--- a/grub-core/normal/menu_text.c
+++ b/grub-core/normal/menu_text.c
@@ -157,9 +157,8 @@ print_message (int nested, int edit, struct grub_term_output *term, int dry_run)
if (edit)
{
- ret += grub_print_message_indented_real (_("Minimum Emacs-like screen editing is \
-supported. TAB lists completions. Press Ctrl-x or F10 to boot, Ctrl-c or F2 for a \
-command-line or ESC to discard edits and return to the GRUB menu."),
+ ret += grub_print_message_indented_real (_("Press Ctrl-x or F10 to start, Ctrl-c or F2 for a \
+command prompt or Escape to discard edits and return to the menu. Pressing Tab lists possible completions."),
STANDARD_MARGIN, STANDARD_MARGIN,
term, dry_run);
}
@@ -167,8 +166,8 @@ command-line or ESC to discard edits and return to the GRUB menu."),
{
char *msg_translated;
- msg_translated = grub_xasprintf (_("Use the %C and %C keys to select which "
- "entry is highlighted."),
+ msg_translated = grub_xasprintf (_("Use the %C and %C keys to change the "
+ "selection."),
GRUB_UNICODE_UPARROW,
GRUB_UNICODE_DOWNARROW);
if (!msg_translated)
@@ -181,17 +180,15 @@ command-line or ESC to discard edits and return to the GRUB menu."),
if (nested)
{
ret += grub_print_message_indented_real
- (_("Press enter to boot the selected OS, "
- "`e' to edit the commands before booting "
- "or `c' for a command-line. ESC to return previous menu."),
+ (_("Press 'e' to edit the selected item, "
+ "or 'c' for a command prompt. Press Escape to return to the previous menu."),
STANDARD_MARGIN, STANDARD_MARGIN, term, dry_run);
}
else
{
ret += grub_print_message_indented_real
- (_("Press enter to boot the selected OS, "
- "`e' to edit the commands before booting "
- "or `c' for a command-line."),
+ (_("Press 'e' to edit the selected item, "
+ "or 'c' for a command prompt."),
STANDARD_MARGIN, STANDARD_MARGIN, term, dry_run);
}
}
@@ -443,7 +440,7 @@ menu_text_print_timeout (int timeout, void *dataptr)
|| data->timeout_msg == TIMEOUT_TERSE_NO_MARGIN)
msg_translated = grub_xasprintf (_("%ds"), timeout);
else
- msg_translated = grub_xasprintf (_("The highlighted entry will be executed automatically in %ds."), timeout);
+ msg_translated = grub_xasprintf (_("The selected entry will be started automatically in %ds."), timeout);
if (!msg_translated)
{
grub_print_error ();

View File

@ -1,29 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Jon McCann <william.jon.mccann@gmail.com>
Date: Fri, 7 Jun 2013 14:08:23 -0400
Subject: [PATCH] Fix border spacing now that we aren't displaying it
---
grub-core/normal/menu_text.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
index cc5837ed2b8..b49835a9af7 100644
--- a/grub-core/normal/menu_text.c
+++ b/grub-core/normal/menu_text.c
@@ -331,12 +331,12 @@ grub_menu_init_page (int nested, int edit,
int empty_lines = 1;
int version_msg = 1;
- geo->border = 1;
- geo->first_entry_x = 1 /* margin */ + 1 /* border */;
+ geo->border = 0;
+ geo->first_entry_x = 0 /* margin */ + 0 /* border */;
geo->entry_width = grub_term_width (term) - 5;
geo->first_entry_y = 2 /* two empty lines*/
- + 1 /* GNU GRUB version text */ + 1 /* top border */;
+ + 0 /* GNU GRUB version text */ + 1 /* top border */;
geo->timeout_lines = 2;

View File

@ -17,10 +17,10 @@ Signed-off-by: Mark Salter <msalter@redhat.com>
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
index ec1cd257397..d85f7598d23 100644
index 98372217ad..bf24e65713 100644
--- a/grub-core/normal/main.c
+++ b/grub-core/normal/main.c
@@ -349,7 +349,7 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
@@ -347,7 +347,7 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
char *config;
const char *prefix, *fw_path;
@ -29,7 +29,7 @@ index ec1cd257397..d85f7598d23 100644
if (fw_path)
{
config = grub_xasprintf ("%s/grub.cfg", fw_path);
@@ -372,7 +372,8 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
@@ -370,7 +370,8 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
}
}

View File

@ -9,10 +9,10 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
1 file changed, 51 insertions(+), 46 deletions(-)
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
index d85f7598d23..1e509fceb91 100644
index bf24e65713..0a99768f75 100644
--- a/grub-core/normal/main.c
+++ b/grub-core/normal/main.c
@@ -347,61 +347,66 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
@@ -345,61 +345,66 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
/* Guess the config filename. It is necessary to make CONFIG static,
so that it won't get broken by longjmp. */
char *config;

View File

@ -1,25 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Jon McCann <william.jon.mccann@gmail.com>
Date: Fri, 7 Jun 2013 14:08:49 -0400
Subject: [PATCH] Use the correct indentation for the term help text
That is consistent with the menu help text
---
grub-core/normal/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
index 5d5f7b539f5..ec1cd257397 100644
--- a/grub-core/normal/main.c
+++ b/grub-core/normal/main.c
@@ -440,8 +440,8 @@ grub_normal_reader_init (int nested)
grub_normal_init_page (term, 1);
grub_term_setcursor (term, 1);
- if (grub_term_width (term) > 3 + STANDARD_MARGIN + 20)
- grub_print_message_indented (msg_formatted, 3, STANDARD_MARGIN, term);
+ if (grub_term_width (term) > 2 * STANDARD_MARGIN + 20)
+ grub_print_message_indented (msg_formatted, STANDARD_MARGIN, STANDARD_MARGIN, term);
else
grub_print_message_indented (msg_formatted, 0, 0, term);
grub_putcode ('\n', term);

View File

@ -14,7 +14,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 635d2fe0cd3..fed73271478 100644
index cf8d118698..5f6d3c8d52 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -29,7 +29,8 @@ export TEXTDOMAINDIR="@localedir@"

View File

@ -1,23 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Jon McCann <william.jon.mccann@gmail.com>
Date: Fri, 7 Jun 2013 14:30:55 -0400
Subject: [PATCH] Indent menu entries
---
grub-core/normal/menu_text.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
index b49835a9af7..6a57376fa80 100644
--- a/grub-core/normal/menu_text.c
+++ b/grub-core/normal/menu_text.c
@@ -239,7 +239,8 @@ print_entry (int y, int highlight, grub_menu_entry_t entry,
unicode_title[i] = ' ';
if (data->geo.num_entries > 1)
- grub_putcode (' ', data->term);
+ for (i = 0; i < STANDARD_MARGIN; i++)
+ grub_putcode (' ', data->term);
grub_print_ucs4_menu (unicode_title,
unicode_title + len,

View File

@ -1,34 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Jon McCann <william.jon.mccann@gmail.com>
Date: Fri, 7 Jun 2013 14:59:36 -0400
Subject: [PATCH] Fix margins
---
grub-core/normal/menu_text.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
index 6a57376fa80..cbd62f714cb 100644
--- a/grub-core/normal/menu_text.c
+++ b/grub-core/normal/menu_text.c
@@ -333,17 +333,15 @@ grub_menu_init_page (int nested, int edit,
int version_msg = 1;
geo->border = 0;
- geo->first_entry_x = 0 /* margin */ + 0 /* border */;
- geo->entry_width = grub_term_width (term) - 5;
+ geo->first_entry_x = 0; /* no margin */
+ geo->entry_width = grub_term_width (term) - 1;
- geo->first_entry_y = 2 /* two empty lines*/
- + 0 /* GNU GRUB version text */ + 1 /* top border */;
+ geo->first_entry_y = 3; /* three empty lines*/
geo->timeout_lines = 2;
/* 3 lines for timeout message and bottom margin. 2 lines for the border. */
geo->num_entries = grub_term_height (term) - geo->first_entry_y
- - 1 /* bottom border */
- 1 /* empty line before info message*/
- geo->timeout_lines /* timeout */
- 1 /* empty final line */;

View File

@ -10,7 +10,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
1 file changed, 8 insertions(+)
diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
index 301d1ac229a..0f6505bf3b6 100644
index 301d1ac229..0f6505bf3b 100644
--- a/util/grub-mkconfig_lib.in
+++ b/util/grub-mkconfig_lib.in
@@ -253,6 +253,14 @@ version_test_gt ()

View File

@ -13,7 +13,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
3 files changed, 82 insertions(+), 82 deletions(-)
diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c
index e71d1584164..0cd2a627231 100644
index e71d158416..0cd2a62723 100644
--- a/grub-core/kern/ieee1275/init.c
+++ b/grub-core/kern/ieee1275/init.c
@@ -127,23 +127,25 @@ grub_machine_get_bootlocation (char **device, char **path)
@ -56,7 +56,7 @@ index e71d1584164..0cd2a627231 100644
}
diff --git a/grub-core/net/net.c b/grub-core/net/net.c
index 4d3eb5c1a52..0ef148f4adc 100644
index 4d3eb5c1a5..0ef148f4ad 100644
--- a/grub-core/net/net.c
+++ b/grub-core/net/net.c
@@ -1869,7 +1869,7 @@ grub_net_search_config_file (char *config)
@ -69,10 +69,10 @@ index 4d3eb5c1a52..0ef148f4adc 100644
static struct grub_preboot *fini_hnd;
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
index 1e509fceb91..d5968797f4f 100644
index 0a99768f75..55558cc0b9 100644
--- a/grub-core/normal/main.c
+++ b/grub-core/normal/main.c
@@ -337,81 +337,79 @@ grub_enter_normal_mode (const char *config)
@@ -335,81 +335,79 @@ grub_enter_normal_mode (const char *config)
grub_boot_time ("Exiting normal mode");
}

View File

@ -1,24 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Fri, 21 Jun 2013 14:44:08 -0400
Subject: [PATCH] Use -2 instead of -1 for our right-hand margin, so
linewrapping works (#976643).
Signed-off-by: Peter Jones <grub2-owner@fedoraproject.org>
---
grub-core/normal/menu_text.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
index cbd62f714cb..26e9e82042a 100644
--- a/grub-core/normal/menu_text.c
+++ b/grub-core/normal/menu_text.c
@@ -334,7 +334,7 @@ grub_menu_init_page (int nested, int edit,
geo->border = 0;
geo->first_entry_x = 0; /* no margin */
- geo->entry_width = grub_term_width (term) - 1;
+ geo->entry_width = grub_term_width (term) - 2;
geo->first_entry_y = 3; /* three empty lines*/

View File

@ -12,7 +12,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
1 file changed, 27 insertions(+), 7 deletions(-)
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index fed73271478..2e59f3b4197 100644
index 5f6d3c8d52..786dbabb4a 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -78,6 +78,32 @@ case x"$GRUB_FS" in

View File

@ -13,21 +13,23 @@ Signed-off-by: Robert Marshall <rmarshall@redhat.com>
[pjones: fix the efidir in grub-setpassword and rename tool]
Signed-off-by: Peter Jones <pjones@redhat.com>
[luto: fix grub-setpassword -o's output path]
Andy Lutomirski <luto@kernel.org>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
[rharwood: migrate man page to h2m, context]
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
configure.ac | 1 +
Makefile.util.def | 13 +++++
util/grub-mkconfig.in | 2 +
util/grub-set-password.8 | 28 ++++++++++
util/grub-set-password.in | 128 ++++++++++++++++++++++++++++++++++++++++++++++
util/grub.d/01_users.in | 11 ++++
6 files changed, 183 insertions(+)
create mode 100644 util/grub-set-password.8
configure.ac | 1 +
Makefile.util.def | 13 +++++
docs/man/grub-set-password.h2m | 2 +
util/grub-mkconfig.in | 2 +
util/grub-set-password.in | 128 +++++++++++++++++++++++++++++++++++++++++
util/grub.d/01_users.in | 11 ++++
6 files changed, 157 insertions(+)
create mode 100644 docs/man/grub-set-password.h2m
create mode 100644 util/grub-set-password.in
create mode 100644 util/grub.d/01_users.in
diff --git a/configure.ac b/configure.ac
index fdcb452581c..30fd84d8067 100644
index 8331f95b64..7f59ad788f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -72,6 +72,7 @@ grub_TRANSFORM([grub-mkrelpath])
@ -35,11 +37,11 @@ index fdcb452581c..30fd84d8067 100644
grub_TRANSFORM([grub-probe])
grub_TRANSFORM([grub-reboot])
+grub_TRANSFORM([grub-set-password])
grub_TRANSFORM([grub-rpm-sort])
grub_TRANSFORM([grub-script-check])
grub_TRANSFORM([grub-set-default])
grub_TRANSFORM([grub-sparc64-setup])
diff --git a/Makefile.util.def b/Makefile.util.def
index ba4cf4b29b0..1a7dd433e33 100644
index 2c9b283a23..4ee22c5daa 100644
--- a/Makefile.util.def
+++ b/Makefile.util.def
@@ -452,6 +452,12 @@ script = {
@ -55,7 +57,7 @@ index ba4cf4b29b0..1a7dd433e33 100644
script = {
name = '10_windows';
common = util/grub.d/10_windows.in;
@@ -740,6 +746,13 @@ script = {
@@ -724,6 +730,13 @@ script = {
installdir = sbin;
};
@ -69,8 +71,16 @@ index ba4cf4b29b0..1a7dd433e33 100644
script = {
name = grub-mkconfig_lib;
common = util/grub-mkconfig_lib.in;
diff --git a/docs/man/grub-set-password.h2m b/docs/man/grub-set-password.h2m
new file mode 100644
index 0000000000..10ee82f4d5
--- /dev/null
+++ b/docs/man/grub-set-password.h2m
@@ -0,0 +1,2 @@
+[NAME]
+grub-set-password \- generate the user.cfg file containing the hashed grub bootloader password
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
index 8ea2315ebc2..ba14cf6261c 100644
index 8ea2315ebc..ba14cf6261 100644
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
@@ -276,6 +276,8 @@ for i in "${grub_mkconfig_dir}"/* ; do
@ -82,43 +92,9 @@ index 8ea2315ebc2..ba14cf6261c 100644
*)
if grub_file_is_not_garbage "$i" && test -x "$i" ; then
echo
diff --git a/util/grub-set-password.8 b/util/grub-set-password.8
new file mode 100644
index 00000000000..9646546e43d
--- /dev/null
+++ b/util/grub-set-password.8
@@ -0,0 +1,28 @@
+.TH GRUB-SET-PASSWORD 3 "Thu Jun 25 2015"
+.SH NAME
+\fBgrub-set-password\fR \(em Generate the user.cfg file containing the hashed grub bootloader password.
+
+.SH SYNOPSIS
+\fBgrub-set-password\fR [OPTION]
+
+.SH DESCRIPTION
+\fBgrub-set-password\fR outputs the user.cfg file which contains the hashed GRUB bootloader password. This utility only supports configurations where there is a single root user.
+
+The file has the format:
+GRUB2_PASSWORD=<\fIhashed password\fR>.
+
+.SH OPTIONS
+.TP
+-h, --help
+Display program usage and exit.
+.TP
+-v, --version
+Display the current version.
+.TP
+-o, --output=<\fIDIRECTORY\fR>
+Choose the file path to which user.cfg will be written.
+
+.SH SEE ALSO
+.BR "info grub"
+
+.BR "info grub2-mkpasswd-pbkdf2"
diff --git a/util/grub-set-password.in b/util/grub-set-password.in
new file mode 100644
index 00000000000..5ebf50576d6
index 0000000000..5ebf50576d
--- /dev/null
+++ b/util/grub-set-password.in
@@ -0,0 +1,128 @@
@ -252,7 +228,7 @@ index 00000000000..5ebf50576d6
+fi
diff --git a/util/grub.d/01_users.in b/util/grub.d/01_users.in
new file mode 100644
index 00000000000..db2f44bfb78
index 0000000000..db2f44bfb7
--- /dev/null
+++ b/util/grub.d/01_users.in
@@ -0,0 +1,11 @@

View File

@ -1,24 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 28 Oct 2013 10:13:27 -0400
Subject: [PATCH] F10 doesn't work on serial, so don't tell the user to hit it
(#987443)
Signed-off-by: Peter Jones <pjones@redhat.com>
---
grub-core/normal/menu_text.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
index 26e9e82042a..4895ffe7d1d 100644
--- a/grub-core/normal/menu_text.c
+++ b/grub-core/normal/menu_text.c
@@ -157,7 +157,7 @@ print_message (int nested, int edit, struct grub_term_output *term, int dry_run)
if (edit)
{
- ret += grub_print_message_indented_real (_("Press Ctrl-x or F10 to start, Ctrl-c or F2 for a \
+ ret += grub_print_message_indented_real (_("Press Ctrl-x to start, Ctrl-c for a \
command prompt or Escape to discard edits and return to the menu. Pressing Tab lists possible completions."),
STANDARD_MARGIN, STANDARD_MARGIN,
term, dry_run);

View File

@ -1,42 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 14 Mar 2011 14:27:42 -0400
Subject: [PATCH] Don't say "GNU/Linux" in generated menus.
---
util/grub.d/10_linux.in | 4 ++--
util/grub.d/20_linux_xen.in | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index ad2ac4b078d..4fc58c83304 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -29,9 +29,9 @@ export TEXTDOMAINDIR="@localedir@"
CLASS="--class gnu-linux --class gnu --class os"
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
- OS=GNU/Linux
+ OS="$(sed 's, release .*$,,g' /etc/system-release)"
else
- OS="${GRUB_DISTRIBUTOR} GNU/Linux"
+ OS="${GRUB_DISTRIBUTOR}"
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
fi
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
index 3b1f4704921..ada20775a14 100644
--- a/util/grub.d/20_linux_xen.in
+++ b/util/grub.d/20_linux_xen.in
@@ -29,9 +29,9 @@ export TEXTDOMAINDIR="@localedir@"
CLASS="--class gnu-linux --class gnu --class os --class xen"
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
- OS=GNU/Linux
+ OS="$(sed 's, release .*$,,g' /etc/system-release)"
else
- OS="${GRUB_DISTRIBUTOR} GNU/Linux"
+ OS="${GRUB_DISTRIBUTOR}"
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
fi

View File

@ -17,7 +17,7 @@ Signed-off-by: Josef Bacik <jbacik@fb.com>
1 file changed, 29 insertions(+), 13 deletions(-)
diff --git a/grub-core/net/tcp.c b/grub-core/net/tcp.c
index e8ad34b84d4..7d4b822626d 100644
index e8ad34b84d..7d4b822626 100644
--- a/grub-core/net/tcp.c
+++ b/grub-core/net/tcp.c
@@ -106,6 +106,18 @@ struct tcphdr

View File

@ -1,71 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Jon McCann <william.jon.mccann@gmail.com>
Date: Wed, 15 May 2013 16:47:33 -0400
Subject: [PATCH] Don't draw a border around the menu
It looks cleaner without it.
---
grub-core/normal/menu_text.c | 43 -------------------------------------------
1 file changed, 43 deletions(-)
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
index 4895ffe7d1d..e72ed438ba3 100644
--- a/grub-core/normal/menu_text.c
+++ b/grub-core/normal/menu_text.c
@@ -108,47 +108,6 @@ grub_print_message_indented (const char *msg, int margin_left, int margin_right,
grub_print_message_indented_real (msg, margin_left, margin_right, term, 0);
}
-static void
-draw_border (struct grub_term_output *term, const struct grub_term_screen_geometry *geo)
-{
- int i;
-
- grub_term_setcolorstate (term, GRUB_TERM_COLOR_NORMAL);
-
- grub_term_gotoxy (term, (struct grub_term_coordinate) { geo->first_entry_x - 1,
- geo->first_entry_y - 1 });
- grub_putcode (GRUB_UNICODE_CORNER_UL, term);
- for (i = 0; i < geo->entry_width + 1; i++)
- grub_putcode (GRUB_UNICODE_HLINE, term);
- grub_putcode (GRUB_UNICODE_CORNER_UR, term);
-
- for (i = 0; i < geo->num_entries; i++)
- {
- grub_term_gotoxy (term, (struct grub_term_coordinate) { geo->first_entry_x - 1,
- geo->first_entry_y + i });
- grub_putcode (GRUB_UNICODE_VLINE, term);
- grub_term_gotoxy (term,
- (struct grub_term_coordinate) { geo->first_entry_x + geo->entry_width + 1,
- geo->first_entry_y + i });
- grub_putcode (GRUB_UNICODE_VLINE, term);
- }
-
- grub_term_gotoxy (term,
- (struct grub_term_coordinate) { geo->first_entry_x - 1,
- geo->first_entry_y - 1 + geo->num_entries + 1 });
- grub_putcode (GRUB_UNICODE_CORNER_LL, term);
- for (i = 0; i < geo->entry_width + 1; i++)
- grub_putcode (GRUB_UNICODE_HLINE, term);
- grub_putcode (GRUB_UNICODE_CORNER_LR, term);
-
- grub_term_setcolorstate (term, GRUB_TERM_COLOR_NORMAL);
-
- grub_term_gotoxy (term,
- (struct grub_term_coordinate) { geo->first_entry_x - 1,
- (geo->first_entry_y - 1 + geo->num_entries
- + GRUB_TERM_MARGIN + 1) });
-}
-
static int
print_message (int nested, int edit, struct grub_term_output *term, int dry_run)
{
@@ -406,8 +365,6 @@ grub_menu_init_page (int nested, int edit,
grub_term_normal_color = grub_color_menu_normal;
grub_term_highlight_color = grub_color_menu_highlight;
- if (geo->border)
- draw_border (term, geo);
grub_term_normal_color = old_color_normal;
grub_term_highlight_color = old_color_highlight;
geo->timeout_y = geo->first_entry_y + geo->num_entries

View File

@ -14,7 +14,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
6 files changed, 477 insertions(+), 14 deletions(-)
diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c
index 6fb5627025d..e28fb6a09f9 100644
index 6fb5627025..e28fb6a09f 100644
--- a/grub-core/net/bootp.c
+++ b/grub-core/net/bootp.c
@@ -902,6 +902,179 @@ grub_cmd_bootp (struct grub_command *cmd __attribute__ ((unused)),
@ -198,7 +198,7 @@ index 6fb5627025d..e28fb6a09f9 100644
grub_bootp_init (void)
{
diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
index 5388f952ba9..173fb63153c 100644
index 5388f952ba..173fb63153 100644
--- a/grub-core/net/drivers/efi/efinet.c
+++ b/grub-core/net/drivers/efi/efinet.c
@@ -18,11 +18,14 @@
@ -307,7 +307,7 @@ index 5388f952ba9..173fb63153c 100644
}
}
diff --git a/grub-core/net/net.c b/grub-core/net/net.c
index 0ef148f4adc..22f2689aaeb 100644
index 0ef148f4ad..22f2689aae 100644
--- a/grub-core/net/net.c
+++ b/grub-core/net/net.c
@@ -960,6 +960,78 @@ grub_net_network_level_interface_register (struct grub_net_network_level_interfa
@ -390,7 +390,7 @@ index 0ef148f4adc..22f2689aaeb 100644
grub_err_t
grub_net_add_ipv4_local (struct grub_net_network_level_interface *inter,
diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c
index 7f44b30f521..4ab2f5c7357 100644
index 7f44b30f52..4ab2f5c735 100644
--- a/grub-core/net/tftp.c
+++ b/grub-core/net/tftp.c
@@ -358,18 +358,22 @@ tftp_open (struct grub_file *file, const char *filename)
@ -417,7 +417,7 @@ index 7f44b30f521..4ab2f5c7357 100644
return grub_errno;
}
diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
index f1a52210c0c..117469450d3 100644
index f1a52210c0..117469450d 100644
--- a/include/grub/efi/api.h
+++ b/include/grub/efi/api.h
@@ -592,10 +592,16 @@ typedef void *grub_efi_handle_t;
@ -572,7 +572,7 @@ index f1a52210c0c..117469450d3 100644
typedef struct grub_efi_pxe
diff --git a/include/grub/net.h b/include/grub/net.h
index 7ae4b6bd805..8a05ec4fe7a 100644
index 7ae4b6bd80..8a05ec4fe7 100644
--- a/include/grub/net.h
+++ b/include/grub/net.h
@@ -447,6 +447,51 @@ struct grub_net_bootp_packet

View File

@ -10,20 +10,21 @@ variables are then used by 10_linux to choose whether or not to create
debug stanzas.
Resolves: rhbz#1226325
[rharwood: migrate man page to h2m]
---
configure.ac | 2 +
configure.ac | 1 +
Makefile.util.def | 7 ++
docs/man/grub-get-kernel-settings.h2m | 2 +
util/bash-completion.d/grub-completion.bash.in | 22 +++++++
util/grub-get-kernel-settings.3 | 20 ++++++
util/grub-get-kernel-settings.in | 88 ++++++++++++++++++++++++++
util/grub-mkconfig.in | 3 +
util/grub.d/10_linux.in | 23 +++++--
7 files changed, 160 insertions(+), 5 deletions(-)
create mode 100644 util/grub-get-kernel-settings.3
7 files changed, 141 insertions(+), 5 deletions(-)
create mode 100644 docs/man/grub-get-kernel-settings.h2m
create mode 100644 util/grub-get-kernel-settings.in
diff --git a/configure.ac b/configure.ac
index 30fd84d8067..ed31ea457d2 100644
index 7f59ad788f..0d0e6782a1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -65,6 +65,7 @@ grub_TRANSFORM([grub-install])
@ -34,19 +35,11 @@ index 30fd84d8067..ed31ea457d2 100644
grub_TRANSFORM([grub-glue-efi])
grub_TRANSFORM([grub-mklayout])
grub_TRANSFORM([grub-mkpasswd-pbkdf2])
@@ -82,6 +83,7 @@ grub_TRANSFORM([grub-file])
grub_TRANSFORM([grub-bios-setup.3])
grub_TRANSFORM([grub-editenv.1])
grub_TRANSFORM([grub-fstest.3])
+grub_TRANSFORM([grub-get-kernel-settings.3])
grub_TRANSFORM([grub-glue-efi.3])
grub_TRANSFORM([grub-install.1])
grub_TRANSFORM([grub-kbdcomp.3])
diff --git a/Makefile.util.def b/Makefile.util.def
index 1a7dd433e33..cdd2f51fe4b 100644
index 4ee22c5daa..18a9242776 100644
--- a/Makefile.util.def
+++ b/Makefile.util.def
@@ -732,6 +732,13 @@ script = {
@@ -716,6 +716,13 @@ script = {
installdir = sbin;
};
@ -60,8 +53,16 @@ index 1a7dd433e33..cdd2f51fe4b 100644
script = {
name = grub-set-default;
common = util/grub-set-default.in;
diff --git a/docs/man/grub-get-kernel-settings.h2m b/docs/man/grub-get-kernel-settings.h2m
new file mode 100644
index 0000000000..b8051f01f3
--- /dev/null
+++ b/docs/man/grub-get-kernel-settings.h2m
@@ -0,0 +1,2 @@
+[NAME]
+grub-get-kernel-settings \- Evaluate the system's kernel installation settings for use while making a grub configuration file
diff --git a/util/bash-completion.d/grub-completion.bash.in b/util/bash-completion.d/grub-completion.bash.in
index 44bf135b9f8..5c4acd496d4 100644
index 44bf135b9f..5c4acd496d 100644
--- a/util/bash-completion.d/grub-completion.bash.in
+++ b/util/bash-completion.d/grub-completion.bash.in
@@ -264,6 +264,28 @@ have ${__grub_sparc64_setup_program} && \
@ -93,35 +94,9 @@ index 44bf135b9f8..5c4acd496d4 100644
#
# grub-install
#
diff --git a/util/grub-get-kernel-settings.3 b/util/grub-get-kernel-settings.3
new file mode 100644
index 00000000000..ba33330e28d
--- /dev/null
+++ b/util/grub-get-kernel-settings.3
@@ -0,0 +1,20 @@
+.TH GRUB-GET-KERNEL-SETTINGS 3 "Thu Jun 25 2015"
+.SH NAME
+\fBgrub-get-kernel-settings\fR \(em Evaluate the system's kernel installation settings for use while making a grub configuration file.
+
+.SH SYNOPSIS
+\fBgrub-get-kernel-settings\fR [OPTION]
+
+.SH DESCRIPTION
+\fBgrub-get-kernel-settings\fR reads the kernel installation settings on the host system, and emits a set of grub settings suitable for use when creating a grub configuration file.
+
+.SH OPTIONS
+.TP
+-h, --help
+Display program usage and exit.
+.TP
+-v, --version
+Display the current version.
+
+.SH SEE ALSO
+.BR "info grub"
diff --git a/util/grub-get-kernel-settings.in b/util/grub-get-kernel-settings.in
new file mode 100644
index 00000000000..7e87dfccc0e
index 0000000000..7e87dfccc0
--- /dev/null
+++ b/util/grub-get-kernel-settings.in
@@ -0,0 +1,88 @@
@ -214,7 +189,7 @@ index 00000000000..7e87dfccc0e
+ echo export GRUB_UPDATE_DEFAULT_KERNEL
+fi
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
index ba14cf6261c..005f093809b 100644
index ba14cf6261..005f093809 100644
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
@@ -45,6 +45,7 @@ grub_probe="${sbindir}/@grub_probe@"
@ -235,7 +210,7 @@ index ba14cf6261c..005f093809b 100644
if [ -z "${GRUB_DISABLE_LINUX_UUID}" ]; then
GRUB_DISABLE_LINUX_UUID="true"
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 2e59f3b4197..0f3c19e30cc 100644
index 786dbabb4a..292e333324 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -111,7 +111,8 @@ linux_entry ()
@ -258,7 +233,7 @@ index 2e59f3b4197..0f3c19e30cc 100644
echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
else
echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
@@ -299,11 +303,15 @@ while [ "x$list" != "x" ] ; do
@@ -306,11 +310,15 @@ while [ "x$list" != "x" ] ; do
fi
if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xtrue ]; then
@ -276,7 +251,7 @@ index 2e59f3b4197..0f3c19e30cc 100644
if [ -z "$boot_device_id" ]; then
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
fi
@@ -312,10 +320,15 @@ while [ "x$list" != "x" ] ; do
@@ -319,10 +327,15 @@ while [ "x$list" != "x" ] ; do
is_top_level=false
fi

View File

@ -1,40 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Jon McCann <william.jon.mccann@gmail.com>
Date: Fri, 7 Jun 2013 10:52:32 -0400
Subject: [PATCH] Use the standard margin for the timeout string
So that it aligns with the other messages
---
grub-core/normal/menu_text.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
index e72ed438ba3..ca135624356 100644
--- a/grub-core/normal/menu_text.c
+++ b/grub-core/normal/menu_text.c
@@ -372,7 +372,7 @@ grub_menu_init_page (int nested, int edit,
if (bottom_message)
{
grub_term_gotoxy (term,
- (struct grub_term_coordinate) { GRUB_TERM_MARGIN,
+ (struct grub_term_coordinate) { STANDARD_MARGIN,
geo->timeout_y });
print_message (nested, edit, term, 0);
@@ -407,14 +407,14 @@ menu_text_print_timeout (int timeout, void *dataptr)
if (data->timeout_msg == TIMEOUT_UNKNOWN)
{
data->timeout_msg = grub_print_message_indented_real (msg_translated,
- 3, 1, data->term, 1)
+ STANDARD_MARGIN, 1, data->term, 1)
<= data->geo.timeout_lines ? TIMEOUT_NORMAL : TIMEOUT_TERSE;
if (data->timeout_msg == TIMEOUT_TERSE)
{
grub_free (msg_translated);
msg_translated = grub_xasprintf (_("%ds"), timeout);
if (grub_term_width (data->term) < 10)
- data->timeout_msg = TIMEOUT_TERSE_NO_MARGIN;
+ data->timeout_msg = STANDARD_MARGIN;
}
}

View File

@ -25,12 +25,15 @@ This patch changes it as below.
0000 0000 0000 0000 0000 0011 1111 1111 # ~grub_swap_bytes32(grub_le_to_cpu32 (subnet_mask.ipv4))
The count of zero with __builtin_clz can be 22. (clz counts the number of one bits preceding the most significant zero bit)
Signed-off-by: Masahiro Matsuya <mmatsuya@redhat.com>
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
grub-core/net/drivers/ieee1275/ofnet.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/grub-core/net/drivers/ieee1275/ofnet.c b/grub-core/net/drivers/ieee1275/ofnet.c
index ac4e62a95c9..3860b6f78d8 100644
index ac4e62a95c..3860b6f78d 100644
--- a/grub-core/net/drivers/ieee1275/ofnet.c
+++ b/grub-core/net/drivers/ieee1275/ofnet.c
@@ -220,8 +220,7 @@ grub_ieee1275_parse_bootpath (const char *devpath, char *bootpath,

View File

@ -13,7 +13,7 @@ Subject: [PATCH] Make grub_fatal() also backtrace.
create mode 100644 grub-core/lib/arm64/backtrace.c
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index c15e91943b9..058c88ac3af 100644
index c15e91943b..058c88ac3a 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -188,6 +188,9 @@ kernel = {
@ -27,7 +27,7 @@ index c15e91943b9..058c88ac3af 100644
i386_xen = kern/i386/dl.c;
i386_xen_pvh = kern/i386/dl.c;
diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
index 63b586d09cb..a3e215155bd 100644
index 63b586d09c..a3e215155b 100644
--- a/grub-core/kern/misc.c
+++ b/grub-core/kern/misc.c
@@ -24,6 +24,7 @@
@ -55,7 +55,7 @@ index 63b586d09cb..a3e215155bd 100644
#endif
diff --git a/grub-core/lib/arm64/backtrace.c b/grub-core/lib/arm64/backtrace.c
new file mode 100644
index 00000000000..1079b5380e1
index 0000000000..1079b5380e
--- /dev/null
+++ b/grub-core/lib/arm64/backtrace.c
@@ -0,0 +1,62 @@
@ -122,7 +122,7 @@ index 00000000000..1079b5380e1
+}
+
diff --git a/grub-core/lib/backtrace.c b/grub-core/lib/backtrace.c
index 825a8800e25..c0ad6ab8be1 100644
index 825a8800e2..c0ad6ab8be 100644
--- a/grub-core/lib/backtrace.c
+++ b/grub-core/lib/backtrace.c
@@ -29,6 +29,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
@ -142,7 +142,7 @@ index 825a8800e25..c0ad6ab8be1 100644
}
diff --git a/grub-core/lib/i386/backtrace.c b/grub-core/lib/i386/backtrace.c
index c3e03c7275c..c67273db3ae 100644
index c3e03c7275..c67273db3a 100644
--- a/grub-core/lib/i386/backtrace.c
+++ b/grub-core/lib/i386/backtrace.c
@@ -15,11 +15,23 @@

View File

@ -1,49 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Tue, 18 Feb 2014 09:37:49 -0500
Subject: [PATCH] Don't emit "Booting ..." message.
UI team still hates this stuff, so we're disabling it for RHEL 7.
Resolves: rhbz#1023142
Signed-off-by: Peter Jones <pjones@redhat.com>
---
grub-core/normal/menu.c | 4 +++-
grub-core/normal/menu_entry.c | 3 ---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c
index d7a222e681b..37d753d8081 100644
--- a/grub-core/normal/menu.c
+++ b/grub-core/normal/menu.c
@@ -838,12 +838,14 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
/* Callback invoked immediately before a menu entry is executed. */
static void
-notify_booting (grub_menu_entry_t entry,
+notify_booting (grub_menu_entry_t __attribute__((unused)) entry,
void *userdata __attribute__((unused)))
{
+#if 0
grub_printf (" ");
grub_printf_ (N_("Booting `%s'"), entry->title);
grub_printf ("\n\n");
+#endif
}
/* Callback invoked when a default menu entry executed because of a timeout
diff --git a/grub-core/normal/menu_entry.c b/grub-core/normal/menu_entry.c
index 50eef918cf6..de64a367c4e 100644
--- a/grub-core/normal/menu_entry.c
+++ b/grub-core/normal/menu_entry.c
@@ -1176,9 +1176,6 @@ run (struct screen *screen)
char *dummy[1] = { NULL };
grub_cls ();
- grub_printf (" ");
- grub_printf_ (N_("Booting a command list"));
- grub_printf ("\n\n");
errs_before = grub_err_printed_errors;

View File

@ -13,7 +13,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
2 files changed, 171 insertions(+), 154 deletions(-)
diff --git a/docs/grub-dev.texi b/docs/grub-dev.texi
index 6c629a23e2d..19f708ee662 100644
index 6c629a23e2..19f708ee66 100644
--- a/docs/grub-dev.texi
+++ b/docs/grub-dev.texi
@@ -1,7 +1,7 @@
@ -35,7 +35,7 @@ index 6c629a23e2d..19f708ee662 100644
@setchapternewpage odd
diff --git a/docs/grub.texi b/docs/grub.texi
index 69f08d289f9..0615d0ed97e 100644
index 69f08d289f..0615d0ed97 100644
--- a/docs/grub.texi
+++ b/docs/grub.texi
@@ -1,7 +1,7 @@

View File

@ -20,7 +20,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
1 file changed, 18 insertions(+), 60 deletions(-)
diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
index 1b91c102f35..4b27bd20153 100644
index 1b91c102f3..4b27bd2015 100644
--- a/util/grub.d/30_os-prober.in
+++ b/util/grub.d/30_os-prober.in
@@ -42,68 +42,25 @@ if [ -z "${OSPROBED}" ] ; then

View File

@ -24,7 +24,7 @@ Signed-off-by: Jeff Mahoney <jeffm@suse.com>
2 files changed, 533 insertions(+), 20 deletions(-)
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
index 63203034dfc..f1fff7385b5 100644
index 63203034df..f1fff7385b 100644
--- a/grub-core/fs/btrfs.c
+++ b/grub-core/fs/btrfs.c
@@ -38,6 +38,9 @@
@ -690,7 +690,7 @@ index 63203034dfc..f1fff7385b5 100644
+
+// vim: si et sw=2:
diff --git a/include/grub/btrfs.h b/include/grub/btrfs.h
index 9d93fb6c182..234ad976771 100644
index 9d93fb6c18..234ad97677 100644
--- a/include/grub/btrfs.h
+++ b/include/grub/btrfs.h
@@ -29,6 +29,7 @@ enum

View File

@ -12,7 +12,7 @@ Signed-off-by: Michael Chang <mchang@suse.com>
1 file changed, 2 insertions(+)
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
index f1fff7385b5..ad1b56b716d 100644
index f1fff7385b..ad1b56b716 100644
--- a/grub-core/fs/btrfs.c
+++ b/grub-core/fs/btrfs.c
@@ -2714,6 +2714,8 @@ GRUB_MOD_INIT (btrfs)

View File

@ -3,12 +3,14 @@ From: Michael Chang <mchang@suse.com>
Date: Thu, 21 Aug 2014 03:39:11 +0000
Subject: [PATCH] grub2-btrfs-03-follow_default
Signed-off-by: Michael Chang <mchang@suse.com>
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
grub-core/fs/btrfs.c | 107 ++++++++++++++++++++++++++++++++++++---------------
1 file changed, 76 insertions(+), 31 deletions(-)
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
index ad1b56b716d..113c1f746c9 100644
index ad1b56b716..113c1f746c 100644
--- a/grub-core/fs/btrfs.c
+++ b/grub-core/fs/btrfs.c
@@ -1256,6 +1256,7 @@ grub_btrfs_mount (grub_device_t dev)

View File

@ -3,6 +3,8 @@ From: Michael Chang <mchang@suse.com>
Date: Thu, 21 Aug 2014 03:39:11 +0000
Subject: [PATCH] grub2-btrfs-04-grub2-install
Signed-off-by: Michael Chang <mchang@suse.com>
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
grub-core/osdep/linux/getroot.c | 7 +++++++
grub-core/osdep/unix/config.c | 17 +++++++++++++++--
@ -13,7 +15,7 @@ Subject: [PATCH] grub2-btrfs-04-grub2-install
6 files changed, 54 insertions(+), 2 deletions(-)
diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
index 001b818fe58..caf9b1ccd3f 100644
index 001b818fe5..caf9b1ccd3 100644
--- a/grub-core/osdep/linux/getroot.c
+++ b/grub-core/osdep/linux/getroot.c
@@ -376,6 +376,7 @@ get_btrfs_fs_prefix (const char *mount_path)
@ -38,7 +40,7 @@ index 001b818fe58..caf9b1ccd3f 100644
else if (!retry && grub_strcmp (entries[i].fstype, "autofs") == 0)
{
diff --git a/grub-core/osdep/unix/config.c b/grub-core/osdep/unix/config.c
index 7d6325138ce..46a881530c0 100644
index 7d6325138c..46a881530c 100644
--- a/grub-core/osdep/unix/config.c
+++ b/grub-core/osdep/unix/config.c
@@ -82,6 +82,19 @@ grub_util_load_config (struct grub_util_config *cfg)
@ -73,7 +75,7 @@ index 7d6325138ce..46a881530c0 100644
argv[2] = script;
argv[3] = '\0';
diff --git a/util/config.c b/util/config.c
index ebcdd8f5e22..f044a880a76 100644
index ebcdd8f5e2..f044a880a7 100644
--- a/util/config.c
+++ b/util/config.c
@@ -42,6 +42,16 @@ grub_util_parse_config (FILE *f, struct grub_util_config *cfg, int simple)
@ -94,7 +96,7 @@ index ebcdd8f5e22..f044a880a76 100644
sizeof ("GRUB_DISTRIBUTOR=") - 1) == 0)
{
diff --git a/util/grub-install.c b/util/grub-install.c
index 0fbe7f78c6d..0f66f36d23a 100644
index 0fbe7f78c6..0f66f36d23 100644
--- a/util/grub-install.c
+++ b/util/grub-install.c
@@ -827,6 +827,8 @@ fill_core_services (const char *core_services)
@ -134,7 +136,7 @@ index 0fbe7f78c6d..0f66f36d23a 100644
char *install_drive = NULL;
diff --git a/util/grub-mkrelpath.c b/util/grub-mkrelpath.c
index 47a241a391b..5db7a9a7d97 100644
index 47a241a391..5db7a9a7d9 100644
--- a/util/grub-mkrelpath.c
+++ b/util/grub-mkrelpath.c
@@ -40,9 +40,12 @@ struct arguments
@ -161,7 +163,7 @@ index 47a241a391b..5db7a9a7d97 100644
if (state->arg_num == 0)
arguments->pathname = xstrdup (arg);
diff --git a/include/grub/emu/config.h b/include/grub/emu/config.h
index 875d5896ce1..c9a7e5f4ade 100644
index 875d5896ce..c9a7e5f4ad 100644
--- a/include/grub/emu/config.h
+++ b/include/grub/emu/config.h
@@ -37,6 +37,7 @@ struct grub_util_config

View File

@ -13,7 +13,7 @@ Signed-off-by: Michael Chang <mchang@suse.com>
5 files changed, 38 insertions(+), 2 deletions(-)
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
index 005f093809b..535c0f02499 100644
index 005f093809..535c0f0249 100644
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
@@ -252,7 +252,8 @@ export GRUB_DEFAULT \
@ -27,10 +27,10 @@ index 005f093809b..535c0f02499 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 42c2ea9ba50..fafeac95061 100644
index 0f6505bf3b..5e96f6cc5d 100644
--- a/util/grub-mkconfig_lib.in
+++ b/util/grub-mkconfig_lib.in
@@ -52,7 +52,11 @@ grub_warn ()
@@ -49,7 +49,11 @@ grub_warn ()
make_system_path_relative_to_its_root ()
{
@ -43,7 +43,7 @@ index 42c2ea9ba50..fafeac95061 100644
is_path_readable_by_grub ()
diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
index 858b526c925..de727e6ee6b 100644
index 858b526c92..de727e6ee6 100644
--- a/util/grub.d/00_header.in
+++ b/util/grub.d/00_header.in
@@ -27,6 +27,14 @@ export TEXTDOMAINDIR="@localedir@"
@ -90,7 +90,7 @@ index 858b526c925..de727e6ee6b 100644
+EOF
+fi
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 0f3c19e30cc..cbfaca34cc7 100644
index 292e333324..7bb3a211a7 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -66,10 +66,14 @@ fi
@ -109,7 +109,7 @@ index 0f3c19e30cc..cbfaca34cc7 100644
xzfs)
rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true`
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
index ada20775a14..e9e73b815fb 100644
index ada20775a1..e9e73b815f 100644
--- a/util/grub.d/20_linux_xen.in
+++ b/util/grub.d/20_linux_xen.in
@@ -73,10 +73,14 @@ fi

View File

@ -1,458 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Robert Marshall <rmarshall@redhat.com>
Date: Mon, 16 Mar 2015 14:14:19 -0400
Subject: [PATCH] Use Distribution Package Sort for grub2-mkconfig (#1124074)
Users reported that newly installed kernels on their systems installed
with grub-mkconfig would not appear on the grub boot list in order
starting with the most recent. Added an option for rpm-based systems to
use the rpm-sort library to sort kernels instead.
Resolves rhbz#1124074
Signed-off-by: Robert Marshall <rmarshall@redhat.com>
[pjones: fix --enable-rpm-sort configure option]
Signed-off-by: Peter Jones <pjones@redhat.com>
[thierry.vignaud: fix build with rpm-4.16]
Signed-off-by: Thierry Vignaud <thierry.vignaud@gmail.com>
---
configure.ac | 38 +++++++
Makefile.util.def | 16 +++
util/grub-rpm-sort.c | 281 ++++++++++++++++++++++++++++++++++++++++++++++
util/grub-mkconfig_lib.in | 11 +-
util/grub-rpm-sort.8 | 12 ++
5 files changed, 357 insertions(+), 1 deletion(-)
create mode 100644 util/grub-rpm-sort.c
create mode 100644 util/grub-rpm-sort.8
diff --git a/configure.ac b/configure.ac
index bec8535af70..fdcb452581c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -72,6 +72,7 @@ grub_TRANSFORM([grub-mkrelpath])
grub_TRANSFORM([grub-mkrescue])
grub_TRANSFORM([grub-probe])
grub_TRANSFORM([grub-reboot])
+grub_TRANSFORM([grub-rpm-sort])
grub_TRANSFORM([grub-script-check])
grub_TRANSFORM([grub-set-default])
grub_TRANSFORM([grub-sparc64-setup])
@@ -95,6 +96,7 @@ grub_TRANSFORM([grub-mkrescue.1])
grub_TRANSFORM([grub-mkstandalone.3])
grub_TRANSFORM([grub-ofpathname.3])
grub_TRANSFORM([grub-probe.3])
+grub_TRANSFORM([grub-rpm-sort.8])
grub_TRANSFORM([grub-reboot.3])
grub_TRANSFORM([grub-render-label.3])
grub_TRANSFORM([grub-script-check.3])
@@ -1860,6 +1862,42 @@ fi
AC_SUBST([LIBDEVMAPPER])
+AC_ARG_ENABLE([rpm-sort],
+ [AS_HELP_STRING([--enable-rpm-sort],
+ [enable native rpm sorting of kernels in grub (default=guessed)])])
+if test x"$enable_rpm_sort" = xno ; then
+ rpm_sort_excuse="explicitly disabled"
+fi
+
+if test x"$rpm_sort_excuse" = x ; then
+ # Check for rpmlib header.
+ AC_CHECK_HEADER([rpm/rpmlib.h], [],
+ [rpm_sort_excuse="need rpm/rpmlib header"])
+fi
+
+if test x"$rpm_sort_excuse" = x ; then
+ # Check for rpm library.
+ AC_CHECK_LIB([rpm], [rpmvercmp], [],
+ [rpm_sort_excuse="rpmlib missing rpmvercmp"])
+fi
+
+if test x"$rpm_sort_excuse" = x ; then
+ LIBRPM="-lrpm";
+ AC_DEFINE([HAVE_RPM], [1],
+ [Define to 1 if you have the rpm library.])
+fi
+
+if test x"$LIBRPM" = x ; then
+ # Check for rpm library.
+ AC_CHECK_LIB([rpmio], [rpmvercmp], [],
+ [rpm_sort_excuse="rpmio missing rpmvercmp"])
+ LIBRPM="-lrpmio";
+ AC_DEFINE([HAVE_RPMIO], [1],
+ [Define to 1 if you have the rpm library.])
+fi
+
+AC_SUBST([LIBRPM])
+
LIBGEOM=
if test x$host_kernel = xkfreebsd; then
AC_CHECK_LIB([geom], [geom_gettree], [],
diff --git a/Makefile.util.def b/Makefile.util.def
index 2c9b283a230..ba4cf4b29b0 100644
--- a/Makefile.util.def
+++ b/Makefile.util.def
@@ -703,6 +703,22 @@ program = {
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
};
+program = {
+ name = grub-rpm-sort;
+ mansection = 8;
+ installdir = sbin;
+
+ common = grub-core/kern/emu/misc.c;
+ common = grub-core/kern/emu/argp_common.c;
+ common = grub-core/osdep/init.c;
+ common = util/misc.c;
+ common = util/grub-rpm-sort.c;
+
+ ldadd = libgrubkern.a;
+ ldadd = grub-core/lib/gnulib/libgnu.a;
+ ldadd = '$(LIBDEVMAPPER) $(LIBRPM)';
+};
+
script = {
name = grub-mkconfig;
common = util/grub-mkconfig.in;
diff --git a/util/grub-rpm-sort.c b/util/grub-rpm-sort.c
new file mode 100644
index 00000000000..f33bd1ed568
--- /dev/null
+++ b/util/grub-rpm-sort.c
@@ -0,0 +1,281 @@
+#include <config.h>
+#include <grub/types.h>
+#include <grub/util/misc.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+#include <assert.h>
+#include <argp.h>
+#include <rpm/rpmlib.h>
+
+static size_t
+read_file (const char *input, char **ret)
+{
+ FILE *in;
+ size_t s;
+ size_t sz = 2048;
+ size_t offset = 0;
+ char *text;
+
+ if (!strcmp(input, "-"))
+ in = stdin;
+ else
+ in = grub_util_fopen(input, "r");
+
+ text = xmalloc (sz);
+
+ if (!in)
+ grub_util_error (_("cannot open `%s': %s"), input, strerror (errno));
+
+ while ((s = fread (text + offset, 1, sz - offset, in)) != 0)
+ {
+ offset += s;
+ if (sz - offset == 0)
+ {
+ sz += 2048;
+ text = xrealloc (text, sz);
+ }
+ }
+
+ text[offset] = '\0';
+ *ret = text;
+
+ if (in != stdin)
+ fclose(in);
+
+ return offset + 1;
+}
+
+/* returns name/version/release */
+/* NULL string pointer returned if nothing found */
+static void
+split_package_string (char *package_string, char **name,
+ char **version, char **release)
+{
+ char *package_version, *package_release;
+
+ /* Release */
+ package_release = strrchr (package_string, '-');
+
+ if (package_release != NULL)
+ *package_release++ = '\0';
+
+ *release = package_release;
+
+ /* Version */
+ package_version = strrchr(package_string, '-');
+
+ if (package_version != NULL)
+ *package_version++ = '\0';
+
+ *version = package_version;
+ /* Name */
+ *name = package_string;
+
+ /* Bubble up non-null values from release to name */
+ if (*name == NULL)
+ {
+ *name = (*version == NULL ? *release : *version);
+ *version = *release;
+ *release = NULL;
+ }
+ if (*version == NULL)
+ {
+ *version = *release;
+ *release = NULL;
+ }
+}
+
+/*
+ * package name-version-release comparator for qsort
+ * expects p, q which are pointers to character strings (char *)
+ * which will not be altered in this function
+ */
+static int
+package_version_compare (const void *p, const void *q)
+{
+ char *local_p, *local_q;
+ char *lhs_name, *lhs_version, *lhs_release;
+ char *rhs_name, *rhs_version, *rhs_release;
+ int vercmpflag = 0;
+
+ local_p = alloca (strlen (*(char * const *)p) + 1);
+ local_q = alloca (strlen (*(char * const *)q) + 1);
+
+ /* make sure these allocated */
+ assert (local_p);
+ assert (local_q);
+
+ strcpy (local_p, *(char * const *)p);
+ strcpy (local_q, *(char * const *)q);
+
+ split_package_string (local_p, &lhs_name, &lhs_version, &lhs_release);
+ split_package_string (local_q, &rhs_name, &rhs_version, &rhs_release);
+
+ /* Check Name and return if unequal */
+ vercmpflag = rpmvercmp ((lhs_name == NULL ? "" : lhs_name),
+ (rhs_name == NULL ? "" : rhs_name));
+ if (vercmpflag != 0)
+ return vercmpflag;
+
+ /* Check version and return if unequal */
+ vercmpflag = rpmvercmp ((lhs_version == NULL ? "" : lhs_version),
+ (rhs_version == NULL ? "" : rhs_version));
+ if (vercmpflag != 0)
+ return vercmpflag;
+
+ /* Check release and return the version compare value */
+ vercmpflag = rpmvercmp ((lhs_release == NULL ? "" : lhs_release),
+ (rhs_release == NULL ? "" : rhs_release));
+
+ return vercmpflag;
+}
+
+static void
+add_input (const char *filename, char ***package_names, size_t *n_package_names)
+{
+ char *orig_input_buffer = NULL;
+ char *input_buffer;
+ char *position_of_newline;
+ char **names = *package_names;
+ char **new_names = NULL;
+ size_t n_names = *n_package_names;
+
+ if (!*package_names)
+ new_names = names = xmalloc (sizeof (char *) * 2);
+
+ if (read_file (filename, &orig_input_buffer) < 2)
+ {
+ if (new_names)
+ free (new_names);
+ if (orig_input_buffer)
+ free (orig_input_buffer);
+ return;
+ }
+
+ input_buffer = orig_input_buffer;
+ while (input_buffer && *input_buffer &&
+ (position_of_newline = strchrnul (input_buffer, '\n')))
+ {
+ size_t sz = position_of_newline - input_buffer;
+ char *new;
+
+ if (sz == 0)
+ {
+ input_buffer = position_of_newline + 1;
+ continue;
+ }
+
+ new = xmalloc (sz+1);
+ strncpy (new, input_buffer, sz);
+ new[sz] = '\0';
+
+ names = xrealloc (names, sizeof (char *) * (n_names + 1));
+ names[n_names] = new;
+ n_names++;
+
+ /* move buffer ahead to next line */
+ input_buffer = position_of_newline + 1;
+ if (*position_of_newline == '\0')
+ input_buffer = NULL;
+ }
+
+ free (orig_input_buffer);
+
+ *package_names = names;
+ *n_package_names = n_names;
+}
+
+static char *
+help_filter (int key, const char *text, void *input __attribute__ ((unused)))
+{
+ return (char *)text;
+}
+
+static struct argp_option options[] = {
+ { 0, }
+};
+
+struct arguments
+{
+ size_t ninputs;
+ size_t input_max;
+ char **inputs;
+};
+
+static error_t
+argp_parser (int key, char *arg, struct argp_state *state)
+{
+ struct arguments *arguments = state->input;
+ switch (key)
+ {
+ case ARGP_KEY_ARG:
+ assert (arguments->ninputs < arguments->input_max);
+ arguments->inputs[arguments->ninputs++] = xstrdup (arg);
+ break;
+ default:
+ return ARGP_ERR_UNKNOWN;
+ }
+ return 0;
+}
+
+static struct argp argp = {
+ options, argp_parser, N_("[INPUT_FILES]"),
+ N_("Sort a list of strings in RPM version sort order."),
+ NULL, help_filter, NULL
+};
+
+int
+main (int argc, char *argv[])
+{
+ struct arguments arguments;
+ char **package_names = NULL;
+ size_t n_package_names = 0;
+ int i;
+
+ grub_util_host_init (&argc, &argv);
+
+ memset (&arguments, 0, sizeof (struct arguments));
+ arguments.input_max = argc+1;
+ arguments.inputs = xmalloc ((arguments.input_max + 1)
+ * sizeof (arguments.inputs[0]));
+ memset (arguments.inputs, 0, (arguments.input_max + 1)
+ * sizeof (arguments.inputs[0]));
+
+ /* Parse our arguments */
+ if (argp_parse (&argp, argc, argv, 0, 0, &arguments) != 0)
+ grub_util_error ("%s", _("Error in parsing command line arguments\n"));
+
+ /* If there's no inputs in argv, add one for stdin */
+ if (!arguments.ninputs)
+ {
+ arguments.ninputs = 1;
+ arguments.inputs[0] = xmalloc (2);
+ strcpy(arguments.inputs[0], "-");
+ }
+
+ for (i = 0; i < arguments.ninputs; i++)
+ add_input(arguments.inputs[i], &package_names, &n_package_names);
+
+ if (package_names == NULL || n_package_names < 1)
+ grub_util_error ("%s", _("Invalid input\n"));
+
+ qsort (package_names, n_package_names, sizeof (char *),
+ package_version_compare);
+
+ /* send sorted list to stdout */
+ for (i = 0; i < n_package_names; i++)
+ {
+ fprintf (stdout, "%s\n", package_names[i]);
+ free (package_names[i]);
+ }
+
+ free (package_names);
+ for (i = 0; i < arguments.ninputs; i++)
+ free (arguments.inputs[i]);
+
+ free (arguments.inputs);
+
+ return 0;
+}
diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
index 0f6505bf3b6..42c2ea9ba50 100644
--- a/util/grub-mkconfig_lib.in
+++ b/util/grub-mkconfig_lib.in
@@ -33,6 +33,9 @@ fi
if test "x$grub_mkrelpath" = x; then
grub_mkrelpath="${bindir}/@grub_mkrelpath@"
fi
+if test "x$grub_rpm_sort" = x; then
+ grub_rpm_sort="${sbindir}/@grub_rpm_sort@"
+fi
if command -v gettext >/dev/null; then
:
@@ -218,6 +221,12 @@ version_sort ()
esac
}
+if [ "x$grub_rpm_sort" != x -a -x "$grub_rpm_sort" ]; then
+ kernel_sort="$grub_rpm_sort"
+else
+ kernel_sort=version_sort
+fi
+
version_test_numeric ()
{
version_test_numeric_a="$1"
@@ -234,7 +243,7 @@ version_test_numeric ()
version_test_numeric_a="$version_test_numeric_b"
version_test_numeric_b="$version_test_numeric_c"
fi
- if (echo "$version_test_numeric_a" ; echo "$version_test_numeric_b") | version_sort | head -n 1 | grep -qx "$version_test_numeric_b" ; then
+ if (echo "$version_test_numeric_a" ; echo "$version_test_numeric_b") | "$kernel_sort" | head -n 1 | grep -qx "$version_test_numeric_b" ; then
return 0
else
return 1
diff --git a/util/grub-rpm-sort.8 b/util/grub-rpm-sort.8
new file mode 100644
index 00000000000..8ce21488448
--- /dev/null
+++ b/util/grub-rpm-sort.8
@@ -0,0 +1,12 @@
+.TH GRUB-RPM-SORT 8 "Wed Feb 26 2014"
+.SH NAME
+\fBgrub-rpm-sort\fR \(em Sort input according to RPM version compare.
+
+.SH SYNOPSIS
+\fBgrub-rpm-sort\fR [OPTIONS].
+
+.SH DESCRIPTION
+You should not normally run this program directly. Use grub-mkconfig instead.
+
+.SH SEE ALSO
+.BR "info grub"

View File

@ -3,6 +3,8 @@ From: Michael Chang <mchang@suse.com>
Date: Tue, 9 Jul 2019 13:56:16 +0200
Subject: [PATCH] grub2-btrfs-06-subvol-mount
Signed-off-by: Michael Chang <mchang@suse.com>
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
grub-core/fs/btrfs.c | 195 +++++++++++++++++++++++++++++++++++++++-
grub-core/osdep/linux/getroot.c | 148 +++++++++++++++++++++++++++++-
@ -11,7 +13,7 @@ Subject: [PATCH] grub2-btrfs-06-subvol-mount
4 files changed, 392 insertions(+), 5 deletions(-)
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
index 113c1f746c9..d323746ecfa 100644
index 113c1f746c..d323746ecf 100644
--- a/grub-core/fs/btrfs.c
+++ b/grub-core/fs/btrfs.c
@@ -41,6 +41,7 @@
@ -277,7 +279,7 @@ index 113c1f746c9..d323746ecfa 100644
grub_cmd_btrfs_list_subvols, 0,
"[-p|-n] [-o var] DEVICE",
diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
index caf9b1ccd3f..28790307e00 100644
index caf9b1ccd3..28790307e0 100644
--- a/grub-core/osdep/linux/getroot.c
+++ b/grub-core/osdep/linux/getroot.c
@@ -107,6 +107,14 @@ struct btrfs_ioctl_search_key
@ -460,7 +462,7 @@ index caf9b1ccd3f..28790307e00 100644
grub_make_system_path_relative_to_its_root_os (const char *path)
{
diff --git a/util/grub-install.c b/util/grub-install.c
index 0f66f36d23a..84ed6e88ecb 100644
index 0f66f36d23..84ed6e88ec 100644
--- a/util/grub-install.c
+++ b/util/grub-install.c
@@ -1569,6 +1569,55 @@ main (int argc, char *argv[])
@ -520,7 +522,7 @@ index 0f66f36d23a..84ed6e88ecb 100644
const char *core_name = NULL;
diff --git a/include/grub/emu/getroot.h b/include/grub/emu/getroot.h
index 73fa2d34abb..9c642ae3fe3 100644
index 73fa2d34ab..9c642ae3fe 100644
--- a/include/grub/emu/getroot.h
+++ b/include/grub/emu/getroot.h
@@ -53,6 +53,11 @@ char **

View File

@ -10,7 +10,7 @@ Ref: bsc#953538
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
index d323746ecfa..673ded03522 100644
index d323746ecf..673ded0352 100644
--- a/grub-core/fs/btrfs.c
+++ b/grub-core/fs/btrfs.c
@@ -1260,11 +1260,41 @@ lookup_root_by_name(struct grub_btrfs_data *data, const char *path)

View File

@ -3,12 +3,14 @@ From: Michael Chang <mchang@suse.com>
Date: Thu, 11 May 2017 08:56:57 +0000
Subject: [PATCH] Grub not working correctly with btrfs snapshots (bsc#1026511)
Signed-off-by: Michael Chang <mchang@suse.com>
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
grub-core/fs/btrfs.c | 238 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 238 insertions(+)
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
index 673ded03522..2b21cbaa67e 100644
index 673ded0352..2b21cbaa67 100644
--- a/grub-core/fs/btrfs.c
+++ b/grub-core/fs/btrfs.c
@@ -2887,6 +2887,238 @@ out:

View File

@ -10,7 +10,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
1 file changed, 32 insertions(+), 4 deletions(-)
diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h
index 585fa6662b6..03f9a9d0118 100644
index 585fa6662b..03f9a9d011 100644
--- a/include/grub/efi/efi.h
+++ b/include/grub/efi/efi.h
@@ -24,6 +24,10 @@

View File

@ -13,7 +13,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
1 file changed, 9 insertions(+), 15 deletions(-)
diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
index 3ff305b1d32..ba3d2930197 100644
index 07c4937898..89ac84cc66 100644
--- a/grub-core/loader/efi/chainloader.c
+++ b/grub-core/loader/efi/chainloader.c
@@ -65,7 +65,7 @@ grub_chainloader_unload (void)
@ -34,7 +34,7 @@ index 3ff305b1d32..ba3d2930197 100644
grub_loader_unset ();
@@ -523,10 +523,9 @@ grub_efi_get_media_file_path (grub_efi_device_path_t *dp)
@@ -527,10 +527,9 @@ grub_efi_get_media_file_path (grub_efi_device_path_t *dp)
static grub_efi_boolean_t
handle_image (void *data, grub_efi_uint32_t datasize)
{
@ -46,7 +46,7 @@ index 3ff305b1d32..ba3d2930197 100644
char *buffer_aligned = NULL;
grub_efi_uint32_t i;
struct grub_pe32_section_table *section;
@@ -537,8 +536,6 @@ handle_image (void *data, grub_efi_uint32_t datasize)
@@ -541,8 +540,6 @@ handle_image (void *data, grub_efi_uint32_t datasize)
int found_entry_point = 0;
int rc;
@ -55,7 +55,7 @@ index 3ff305b1d32..ba3d2930197 100644
rc = read_header (data, datasize, &context);
if (rc < 0)
{
@@ -578,8 +575,8 @@ handle_image (void *data, grub_efi_uint32_t datasize)
@@ -582,8 +579,8 @@ handle_image (void *data, grub_efi_uint32_t datasize)
grub_dprintf ("chain", "image size is %08"PRIxGRUB_UINT64_T", datasize is %08x\n",
context.image_size, datasize);
@ -66,7 +66,7 @@ index 3ff305b1d32..ba3d2930197 100644
if (efi_status != GRUB_EFI_SUCCESS)
{
@@ -811,14 +808,14 @@ handle_image (void *data, grub_efi_uint32_t datasize)
@@ -815,14 +812,14 @@ handle_image (void *data, grub_efi_uint32_t datasize)
grub_dprintf ("chain", "entry_point returned %ld\n", efi_status);
grub_memcpy (li, &li_bak, sizeof (grub_efi_loaded_image_t));
@ -83,7 +83,7 @@ index 3ff305b1d32..ba3d2930197 100644
return 0;
}
@@ -826,10 +823,7 @@ error_exit:
@@ -830,10 +827,7 @@ error_exit:
static grub_err_t
grub_secureboot_chainloader_unload (void)
{
@ -95,7 +95,7 @@ index 3ff305b1d32..ba3d2930197 100644
grub_free (file_path);
grub_free (cmdline);
cmdline = 0;
@@ -1096,7 +1090,7 @@ fail:
@@ -1100,7 +1094,7 @@ fail:
grub_free (file_path);
if (address)

View File

@ -12,10 +12,10 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
index ba3d2930197..47f5aa14817 100644
index 89ac84cc66..ac8dfd40c6 100644
--- a/grub-core/loader/efi/chainloader.c
+++ b/grub-core/loader/efi/chainloader.c
@@ -806,7 +806,8 @@ handle_image (void *data, grub_efi_uint32_t datasize)
@@ -810,7 +810,8 @@ handle_image (void *data, grub_efi_uint32_t datasize)
efi_status = efi_call_2 (entry_point, grub_efi_image_handle,
grub_efi_system_table);
@ -26,7 +26,7 @@ index ba3d2930197..47f5aa14817 100644
efi_status = grub_efi_free_pool (buffer);
diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
index 117469450d3..99628801478 100644
index 117469450d..9962880147 100644
--- a/include/grub/efi/api.h
+++ b/include/grub/efi/api.h
@@ -546,7 +546,16 @@ typedef grub_uint64_t grub_efi_uint64_t;

View File

@ -8,7 +8,7 @@ Subject: [PATCH] don't use int for efi status
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
index 05d8237a9b2..ae9885edb84 100644
index 05d8237a9b..ae9885edb8 100644
--- a/grub-core/kern/efi/efi.c
+++ b/grub-core/kern/efi/efi.c
@@ -167,7 +167,7 @@ grub_reboot (void)

View File

@ -8,7 +8,7 @@ Subject: [PATCH] make GRUB_MOD_INIT() declare its function prototypes.
1 file changed, 2 insertions(+)
diff --git a/include/grub/dl.h b/include/grub/dl.h
index b3753c9ca26..91933b85f2c 100644
index b3753c9ca2..91933b85f2 100644
--- a/include/grub/dl.h
+++ b/include/grub/dl.h
@@ -54,6 +54,7 @@ grub_mod_fini (void)

View File

@ -16,7 +16,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/util/grub-install.c b/util/grub-install.c
index 84ed6e88ecb..a2bec7446cb 100644
index 84ed6e88ec..a2bec7446c 100644
--- a/util/grub-install.c
+++ b/util/grub-install.c
@@ -1190,18 +1190,8 @@ main (int argc, char *argv[])

View File

@ -1,150 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Tue, 23 Sep 2014 09:58:49 -0400
Subject: [PATCH] Fix up some man pages rpmdiff noticed.
---
configure.ac | 2 ++
util/grub-macbless.8 | 26 +++++++++++++++++++
util/grub-mkimage.1 | 2 +-
util/grub-syslinux2cfg.1 | 65 ++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 94 insertions(+), 1 deletion(-)
create mode 100644 util/grub-macbless.8
create mode 100644 util/grub-syslinux2cfg.1
diff --git a/configure.ac b/configure.ac
index ed31ea457d2..537ed411469 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,6 +87,7 @@ grub_TRANSFORM([grub-get-kernel-settings.3])
grub_TRANSFORM([grub-glue-efi.3])
grub_TRANSFORM([grub-install.1])
grub_TRANSFORM([grub-kbdcomp.3])
+grub_TRANSFORM([grub-macbless.8])
grub_TRANSFORM([grub-menulst2cfg.1])
grub_TRANSFORM([grub-mkconfig.1])
grub_TRANSFORM([grub-mkfont.3])
@@ -105,6 +106,7 @@ grub_TRANSFORM([grub-render-label.3])
grub_TRANSFORM([grub-script-check.3])
grub_TRANSFORM([grub-set-default.1])
grub_TRANSFORM([grub-sparc64-setup.3])
+grub_TRANSFORM([grub-syslinux2cfg.1])
# Optimization flag. Allow user to override.
if test "x$TARGET_CFLAGS" = x; then
diff --git a/util/grub-macbless.8 b/util/grub-macbless.8
new file mode 100644
index 00000000000..ae842f3a606
--- /dev/null
+++ b/util/grub-macbless.8
@@ -0,0 +1,26 @@
+.TH GRUB-MACBLESS 1 "Wed Feb 26 2014"
+.SH NAME
+\fBgrub-macbless\fR \(em Mac-style bless utility for HFS or HFS+
+
+.SH SYNOPSIS
+\fBgrub-macbless\fR [-p | --ppc] [-v | --verbose] [-x | --x86] \fIFILE\fR
+
+.SH DESCRIPTION
+\fBgrub-mkimage\fR blesses a file on an HFS or HFS+ file system, so that it
+can be used to boot a Mac.
+
+.SH OPTIONS
+.TP
+--ppc
+Bless the file for use on PPC-based Macs.
+
+.TP
+--verbose
+Print verbose messages.
+
+.TP
+--x86
+Bless the file for use on x86-based Macs.
+
+.SH SEE ALSO
+.BR "info grub"
diff --git a/util/grub-mkimage.1 b/util/grub-mkimage.1
index 4dea4f54597..0eaaafe505b 100644
--- a/util/grub-mkimage.1
+++ b/util/grub-mkimage.1
@@ -17,7 +17,7 @@
[-v | --verbose] \fIMODULES\fR
.SH DESCRIPTION
-\fBgrub-mkimage\fI builds a bootable image of GRUB.
+\fBgrub-mkimage\fR builds a bootable image of GRUB.
.SH OPTIONS
.TP
diff --git a/util/grub-syslinux2cfg.1 b/util/grub-syslinux2cfg.1
new file mode 100644
index 00000000000..85309482718
--- /dev/null
+++ b/util/grub-syslinux2cfg.1
@@ -0,0 +1,65 @@
+.TH GRUB-SYSLINUX2CFG 1 "Wed Feb 26 2014"
+.SH NAME
+\fBgrub-syslinux2cfg\fR \(em Transform a syslinux config file into a GRUB config.
+
+.SH SYNOPSIS
+\fBgrub-syslinux2cfg\fR [-c | --cwd=\fRDIR\fI] [-r | --root=\fIDIR\fR] [-v | --verbose]
+.RE
+.RS 25
+[-t | --target-root=\fIDIR\fR] [-T | --target-cwd=\fIDIR\fR]
+.RE
+.RS 25
+[-o | --output=\fIFILE\fR] [[-i | --isolinux] |
+.RE
+.RS 46
+ [-s | --syslinux] |
+.RE
+.RS 46
+ [-p | --pxelinux]] \fIFILE\fR
+
+.SH DESCRIPTION
+\fBgrub-syslinux2cfg\fR builds a GRUB configuration file out of an existing
+syslinux configuration file.
+
+.SH OPTIONS
+.TP
+--cwd=\fIDIR\fR
+Set \fIDIR\fR as syslinux's working directory. The default is to use the
+parent directory of the input file.
+
+.TP
+--root=\fIDIR\fR
+Set \fIDIR\fR as the root directory of the syslinux disk. The default value
+is "/".
+
+.TP
+--verbose
+Print verbose messages.
+
+.TP
+--target-root=\fIDIR\fR
+Root directory as it will be seen at runtime. The default value is "/".
+
+.TP
+--target-cwd=\fIDIR\fR
+Working directory of syslinux as it will be seen at runtime. The default
+value is the parent directory of the input file.
+
+.TP
+--output=\fIFILE\fR
+Write the new config file to \fIFILE\fR. The default value is standard output.
+
+.TP
+--isolinux
+Assume that the input file is an isolinux configuration file.
+
+.TP
+--pxelinux
+Assume that the input file is a pxelinux configuration file.
+
+.TP
+--syslinux
+Assume that the input file is a syslinux configuration file.
+
+.SH SEE ALSO
+.BR "info grub"

View File

@ -9,7 +9,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
1 file changed, 5 insertions(+)
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
index e9e73b815fb..c23b064be6c 100644
index e9e73b815f..c23b064be6 100644
--- a/util/grub.d/20_linux_xen.in
+++ b/util/grub.d/20_linux_xen.in
@@ -153,6 +153,7 @@ linux_entry_xsm ()

View File

@ -63,7 +63,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
1 file changed, 89 insertions(+), 20 deletions(-)
diff --git a/grub-core/kern/i386/tsc_pmtimer.c b/grub-core/kern/i386/tsc_pmtimer.c
index c9c36169978..ca15c3aacd7 100644
index c9c3616997..ca15c3aacd 100644
--- a/grub-core/kern/i386/tsc_pmtimer.c
+++ b/grub-core/kern/i386/tsc_pmtimer.c
@@ -28,40 +28,101 @@

View File

@ -9,7 +9,7 @@ Subject: [PATCH] align struct efi_variable better...
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/grub/efiemu/runtime.h b/include/grub/efiemu/runtime.h
index 36d2dedf47e..9d93ba88bac 100644
index 36d2dedf47..9d93ba88ba 100644
--- a/include/grub/efiemu/runtime.h
+++ b/include/grub/efiemu/runtime.h
@@ -33,5 +33,5 @@ struct efi_variable
@ -20,7 +20,7 @@ index 36d2dedf47e..9d93ba88bac 100644
+} GRUB_PACKED GRUB_ALIGNED(8);
#endif /* ! GRUB_EFI_EMU_RUNTIME_HEADER */
diff --git a/include/grub/types.h b/include/grub/types.h
index 0a3ff159136..ba446d99040 100644
index 0a3ff15913..ba446d9904 100644
--- a/include/grub/types.h
+++ b/include/grub/types.h
@@ -29,6 +29,7 @@

View File

@ -20,30 +20,20 @@ kernels are found in the boot directory were proposed by Yclept Nemo
and Tom Gundersen respectively.
Signed-off-by: Peter Jones <pjones@redhat.com>
[javierm: remove outdated URL for BLS document]
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: use sort(1), commit message composits, drop man pages]
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
util/grub-mkconfig.8 | 4 +
util/grub-mkconfig.in | 9 +-
util/grub-mkconfig_lib.in | 22 ++++-
util/grub.d/10_linux.in | 223 +++++++++++++++++++++++++++++++++++++++++++++-
4 files changed, 252 insertions(+), 6 deletions(-)
util/grub.d/10_linux.in | 218 +++++++++++++++++++++++++++++++++++++++++++++-
3 files changed, 243 insertions(+), 6 deletions(-)
diff --git a/util/grub-mkconfig.8 b/util/grub-mkconfig.8
index a2d1f577b9b..434fa4deda4 100644
--- a/util/grub-mkconfig.8
+++ b/util/grub-mkconfig.8
@@ -13,5 +13,9 @@
\fB--output\fR=\fIFILE\fR
Write generated output to \fIFILE\fR.
+.TP
+\fB--no-grubenv-update\fR
+Do not update variables in the grubenv file.
+
.SH SEE ALSO
.BR "info grub"
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
index 535c0f02499..f55339a3f64 100644
index 535c0f0249..f55339a3f6 100644
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
@@ -50,6 +50,8 @@ grub_get_kernel_settings="${sbindir}/@grub_get_kernel_settings@"
@ -84,7 +74,7 @@ index 535c0f02499..f55339a3f64 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..d8bb4069360 100644
index 5e96f6cc5d..301d8a8a1e 100644
--- a/util/grub-mkconfig_lib.in
+++ b/util/grub-mkconfig_lib.in
@@ -30,6 +30,9 @@ fi
@ -97,7 +87,7 @@ index fafeac95061..d8bb4069360 100644
if test "x$grub_mkrelpath" = x; then
grub_mkrelpath="${bindir}/@grub_mkrelpath@"
fi
@@ -125,8 +128,19 @@ EOF
@@ -122,8 +125,19 @@ EOF
fi
}
@ -117,7 +107,7 @@ index fafeac95061..d8bb4069360 100644
old_ifs="$IFS"
IFS='
'
@@ -161,18 +175,18 @@ prepare_grub_to_access_device ()
@@ -158,18 +172,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
@ -141,10 +131,10 @@ index fafeac95061..d8bb4069360 100644
fi
IFS="$old_ifs"
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index cbfaca34cc7..68adb55d893 100644
index 7bb3a211a7..2851952659 100644
--- a/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
@ -162,7 +152,7 @@ index cbfaca34cc7..68adb55d893 100644
+#
+# The $bls_parser parses the BootLoaderSpec files stored in /boot/loader/entries and
+# populates the boot menu. Please refer to the Boot Loader Specification documentation
+# for the files format: https://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/.
+# for the files format: https://systemd.io/BOOT_LOADER_SPECIFICATION/.
+
+EOF
+}
@ -204,25 +194,20 @@ index cbfaca34cc7..68adb55d893 100644
+
+get_sorted_bls()
+{
+ if ! [ -d "${blsdir}" ] || ! [ -e /etc/machine-id ]; then
+ return
+ fi
+
+ read machine_id < /etc/machine-id
+ if [ -z "${machine_id}" ]; then
+ if ! [ -d "${blsdir}" ]; then
+ return
+ fi
+
+ local IFS=$'\n'
+
+ files=($(for bls in ${blsdir}/${machine_id}-*.conf; do
+ files=($(for bls in ${blsdir}/*.conf; do
+ if ! [[ -e "${bls}" ]] ; then
+ continue
+ fi
+ bls="${bls%.conf}"
+ bls="${bls##*/}"
+ echo "${bls}"
+ done | ${kernel_sort} 2>/dev/null | tac)) || :
+ done | sort -Vr 2>/dev/null)) || :
+
+ echo "${files[@]}"
+}
@ -263,7 +248,7 @@ index cbfaca34cc7..68adb55d893 100644
+}
+
+# Make BLS the default if GRUB_ENABLE_BLSCFG was not set and grubby is not installed.
+if [ -z "${GRUB_ENABLE_BLSCFG}" ] && [ -z "$(which new-kernel-pkg 2> /dev/null)" ]; then
+if [ -z "${GRUB_ENABLE_BLSCFG}" ] && ! command -v new-kernel-pkg >/dev/null; then
+ GRUB_ENABLE_BLSCFG="true"
+fi
+
@ -368,7 +353,7 @@ index cbfaca34cc7..68adb55d893 100644
mktitle ()
{
local title_type
@@ -121,6 +338,7 @@ linux_entry ()
@@ -121,6 +333,7 @@ linux_entry ()
if [ -z "$boot_device_id" ]; then
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
fi
@ -376,7 +361,7 @@ index cbfaca34cc7..68adb55d893 100644
if [ x$type != xsimple ] ; then
title=$(mktitle "$type" "$version")
if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then
@@ -224,6 +442,7 @@ is_top_level=true
@@ -231,6 +444,7 @@ is_top_level=true
while [ "x$list" != "x" ] ; do
linux=`version_find_latest $list`
gettext_printf "Found linux image: %s\n" "$linux" >&2
@ -384,7 +369,7 @@ index cbfaca34cc7..68adb55d893 100644
basename=`basename $linux`
dirname=`dirname $linux`
rel_dirname=`make_system_path_relative_to_its_root $dirname`
@@ -262,7 +481,9 @@ while [ "x$list" != "x" ] ; do
@@ -269,7 +483,9 @@ while [ "x$list" != "x" ] ; do
for i in ${initrd}; do
initrd_display="${initrd_display} ${dirname}/${i}"
done

View File

@ -12,7 +12,7 @@ Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
index a3e215155bd..c60601b699d 100644
index a3e215155b..c60601b699 100644
--- a/grub-core/kern/misc.c
+++ b/grub-core/kern/misc.c
@@ -1201,7 +1201,7 @@ static void __attribute__ ((noreturn))

View File

@ -7,20 +7,23 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
[jhlavac: Use ${etcdefaultgrub} instead of /etc/default/grub]
Signed-off-by: Jan Hlavac <jhlavac@redhat.com>
[rharwood: skip on ostree installations, migrate man to h2m]
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
Makefile.util.def | 7 +
util/grub-set-password.in | 2 +-
util/grub-switch-to-blscfg.8 | 33 +++++
util/grub-switch-to-blscfg.in | 317 ++++++++++++++++++++++++++++++++++++++++++
4 files changed, 358 insertions(+), 1 deletion(-)
create mode 100644 util/grub-switch-to-blscfg.8
Makefile.util.def | 7 +
docs/man/grub-switch-to-blscfg.h2m | 2 +
util/grub-set-password.in | 2 +-
util/grub-switch-to-blscfg.in | 317 +++++++++++++++++++++++++++++++++++++
util/grub.d/10_linux.in | 2 +-
5 files changed, 328 insertions(+), 2 deletions(-)
create mode 100644 docs/man/grub-switch-to-blscfg.h2m
create mode 100644 util/grub-switch-to-blscfg.in
diff --git a/Makefile.util.def b/Makefile.util.def
index cdd2f51fe4b..afc4d7b0c3e 100644
index 18a9242776..88f55e35c4 100644
--- a/Makefile.util.def
+++ b/Makefile.util.def
@@ -1364,6 +1364,13 @@ program = {
@@ -1348,6 +1348,13 @@ program = {
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
};
@ -34,8 +37,16 @@ index cdd2f51fe4b..afc4d7b0c3e 100644
program = {
name = grub-glue-efi;
mansection = 1;
diff --git a/docs/man/grub-switch-to-blscfg.h2m b/docs/man/grub-switch-to-blscfg.h2m
new file mode 100644
index 0000000000..fa341426a5
--- /dev/null
+++ b/docs/man/grub-switch-to-blscfg.h2m
@@ -0,0 +1,2 @@
+[NAME]
+grub-switch-to-blscfg \- switch to using BLS config files
diff --git a/util/grub-set-password.in b/util/grub-set-password.in
index 5ebf50576d6..c0b5ebbfdc5 100644
index 5ebf50576d..c0b5ebbfdc 100644
--- a/util/grub-set-password.in
+++ b/util/grub-set-password.in
@@ -1,6 +1,6 @@
@ -46,48 +57,9 @@ index 5ebf50576d6..c0b5ebbfdc5 100644
if [ -d /sys/firmware/efi/efivars/ ]; then
grubdir=`echo "/@bootdirname@/efi/EFI/${EFIDIR}/" | sed 's,//*,/,g'`
else
diff --git a/util/grub-switch-to-blscfg.8 b/util/grub-switch-to-blscfg.8
new file mode 100644
index 00000000000..9a886282976
--- /dev/null
+++ b/util/grub-switch-to-blscfg.8
@@ -0,0 +1,33 @@
+.TH GRUB-SWITCH-TO-BLSCFG 1 "Wed Feb 26 2014"
+.SH NAME
+\fBgrub-switch-to-blscfg\fR \(em Switch to using BLS config files.
+
+.SH SYNOPSIS
+\fBgrub-switch-to-blscfg\fR [--grub-directory=\fIDIR\fR] [--config-file=\fIFILE\fR] [--grub-defaults=\fIFILE\fR]
+
+.SH DESCRIPTION
+\fBgrub-switch-to-blscfg\fR reconfigures grub-mkconfig to use BLS-style config files, and then regenerates the GRUB configuration.
+
+.SH OPTIONS
+.TP
+--grub-directory=\fIDIR\fR
+Search for grub.cfg under \fIDIR\fR. The default value is \fI/boot/efi/EFI/\fBVENDOR\fR on UEFI machines and \fI/boot/grub2\fR elsewhere.
+
+.TP
+--config-file=\fIFILE\fR
+The grub config file to use. The default value is \fI/etc/grub2-efi.cfg\fR on UEFI machines and \fI/etc/grub2.cfg\fR elsewhere. Symbolic links will be followed.
+
+.TP
+--grub-defaults=\fIFILE\fR
+The defaults file for grub-mkconfig. The default value is \fI/etc/default/grub\fR.
+
+.TP
+--bls-directory=\fIDIR\fR
+Create BootLoaderSpec fragments in \fIDIR\fR. The default value is \fI/boot/loader/entries\fR.
+
+.TP
+--backup-suffix=\fSUFFIX\fR
+The suffix to use for saved backup files. The default value is \fI.bak\fR.
+
+.SH SEE ALSO
+.BR "info grub"
diff --git a/util/grub-switch-to-blscfg.in b/util/grub-switch-to-blscfg.in
new file mode 100644
index 00000000000..a851424beb2
index 0000000000..a851424beb
--- /dev/null
+++ b/util/grub-switch-to-blscfg.in
@@ -0,0 +1,317 @@
@ -408,3 +380,16 @@ index 00000000000..a851424beb2
+
+# Bye.
+exit 0
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 2851952659..e490e1a43a 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -138,7 +138,7 @@ blsdir="/boot/loader/entries"
get_sorted_bls()
{
- if ! [ -d "${blsdir}" ]; then
+ if ! [ -d "${blsdir}" ] || [ -f /run/ostree-booted ] || [ -d /ostree/repo ]; then
return
fi

View File

@ -38,7 +38,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
delete mode 100644 grub-core/lib/i386/backtrace.c
diff --git a/Makefile.util.def b/Makefile.util.def
index afc4d7b0c3e..41906486a71 100644
index 88f55e35c4..bda9fd1211 100644
--- a/Makefile.util.def
+++ b/Makefile.util.def
@@ -51,6 +51,12 @@ library = {
@ -55,7 +55,7 @@ index afc4d7b0c3e..41906486a71 100644
library = {
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index 5354f9613d3..4b7c45a7b06 100644
index 058c88ac3a..52ec0fafcd 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -142,6 +142,12 @@ kernel = {
@ -81,7 +81,7 @@ index 5354f9613d3..4b7c45a7b06 100644
i386 = kern/i386/dl.c;
i386_xen = kern/i386/dl.c;
i386_xen_pvh = kern/i386/dl.c;
@@ -2398,15 +2401,12 @@ module = {
@@ -2399,15 +2402,12 @@ module = {
module = {
name = backtrace;
@ -103,7 +103,7 @@ diff --git a/grub-core/lib/backtrace.c b/grub-core/commands/backtrace.c
similarity index 98%
rename from grub-core/lib/backtrace.c
rename to grub-core/commands/backtrace.c
index c0ad6ab8be1..8b5ec3913b5 100644
index c0ad6ab8be..8b5ec3913b 100644
--- a/grub-core/lib/backtrace.c
+++ b/grub-core/commands/backtrace.c
@@ -54,7 +54,7 @@ grub_cmd_backtrace (grub_command_t cmd __attribute__ ((unused)),
@ -116,7 +116,7 @@ index c0ad6ab8be1..8b5ec3913b5 100644
}
diff --git a/grub-core/gdb/cstub.c b/grub-core/gdb/cstub.c
index b64acd70fee..99281472d36 100644
index b64acd70fe..99281472d3 100644
--- a/grub-core/gdb/cstub.c
+++ b/grub-core/gdb/cstub.c
@@ -215,7 +215,6 @@ grub_gdb_trap (int trap_no)
@ -129,7 +129,7 @@ index b64acd70fee..99281472d36 100644
diff --git a/grub-core/kern/arm64/backtrace.c b/grub-core/kern/arm64/backtrace.c
new file mode 100644
index 00000000000..019c6fdfef2
index 0000000000..019c6fdfef
--- /dev/null
+++ b/grub-core/kern/arm64/backtrace.c
@@ -0,0 +1,94 @@
@ -229,7 +229,7 @@ index 00000000000..019c6fdfef2
+}
diff --git a/grub-core/kern/backtrace.c b/grub-core/kern/backtrace.c
new file mode 100644
index 00000000000..4a82e865cc6
index 0000000000..4a82e865cc
--- /dev/null
+++ b/grub-core/kern/backtrace.c
@@ -0,0 +1,97 @@
@ -331,7 +331,7 @@ index 00000000000..4a82e865cc6
+ grub_backtrace (skip + 1);
+}
diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
index 7afb9e6f724..88d2077709e 100644
index 7afb9e6f72..88d2077709 100644
--- a/grub-core/kern/dl.c
+++ b/grub-core/kern/dl.c
@@ -124,6 +124,50 @@ grub_dl_resolve_symbol (const char *name)
@ -395,7 +395,7 @@ index 7afb9e6f724..88d2077709e 100644
i++, s = (Elf_Shdr *) ((char *) s + e->e_shentsize))
diff --git a/grub-core/kern/i386/backtrace.c b/grub-core/kern/i386/backtrace.c
new file mode 100644
index 00000000000..2413f9a57db
index 0000000000..2413f9a57d
--- /dev/null
+++ b/grub-core/kern/i386/backtrace.c
@@ -0,0 +1,125 @@
@ -525,7 +525,7 @@ index 00000000000..2413f9a57db
+#endif
+}
diff --git a/grub-core/kern/i386/pc/init.c b/grub-core/kern/i386/pc/init.c
index 27bc68b8a53..b51d0abfa6e 100644
index 27bc68b8a5..b51d0abfa6 100644
--- a/grub-core/kern/i386/pc/init.c
+++ b/grub-core/kern/i386/pc/init.c
@@ -153,7 +153,7 @@ compact_mem_regions (void)
@ -547,7 +547,7 @@ index 27bc68b8a53..b51d0abfa6e 100644
/* Initialize the console as early as possible. */
grub_console_init ();
diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c
index 0cd2a627231..937c1bc44cb 100644
index 0cd2a62723..937c1bc44c 100644
--- a/grub-core/kern/ieee1275/init.c
+++ b/grub-core/kern/ieee1275/init.c
@@ -63,7 +63,6 @@
@ -559,7 +559,7 @@ index 0cd2a627231..937c1bc44cb 100644
#ifdef __sparc__
diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
index c60601b699d..a432a6be54a 100644
index c60601b699..a432a6be54 100644
--- a/grub-core/kern/misc.c
+++ b/grub-core/kern/misc.c
@@ -1197,15 +1197,15 @@ grub_printf_fmt_check (const char *fmt, const char *fmt_expected)
@ -593,7 +593,7 @@ index c60601b699d..a432a6be54a 100644
grub_vprintf (_(fmt), ap);
va_end (ap);
diff --git a/grub-core/kern/mm.c b/grub-core/kern/mm.c
index c070afc621f..d8c8377578b 100644
index c070afc621..d8c8377578 100644
--- a/grub-core/kern/mm.c
+++ b/grub-core/kern/mm.c
@@ -97,13 +97,13 @@ get_header_from_pointer (void *ptr, grub_mm_header_t *p, grub_mm_region_t *r)
@ -615,7 +615,7 @@ index c070afc621f..d8c8377578b 100644
diff --git a/grub-core/lib/arm64/backtrace.c b/grub-core/lib/arm64/backtrace.c
deleted file mode 100644
index 1079b5380e1..00000000000
index 1079b5380e..0000000000
--- a/grub-core/lib/arm64/backtrace.c
+++ /dev/null
@@ -1,62 +0,0 @@
@ -683,7 +683,7 @@ index 1079b5380e1..00000000000
-
diff --git a/grub-core/lib/i386/backtrace.c b/grub-core/lib/i386/backtrace.c
deleted file mode 100644
index c67273db3ae..00000000000
index c67273db3a..0000000000
--- a/grub-core/lib/i386/backtrace.c
+++ /dev/null
@@ -1,78 +0,0 @@
@ -766,7 +766,7 @@ index c67273db3ae..00000000000
-}
-
diff --git a/include/grub/backtrace.h b/include/grub/backtrace.h
index 395519762f0..275cf85e2d3 100644
index 395519762f..275cf85e2d 100644
--- a/include/grub/backtrace.h
+++ b/include/grub/backtrace.h
@@ -19,8 +19,14 @@
@ -787,7 +787,7 @@ index 395519762f0..275cf85e2d3 100644
#endif
diff --git a/include/grub/dl.h b/include/grub/dl.h
index 91933b85f2c..2f76e6b0437 100644
index 91933b85f2..2f76e6b043 100644
--- a/include/grub/dl.h
+++ b/include/grub/dl.h
@@ -259,6 +259,8 @@ grub_dl_is_persistent (grub_dl_t mod)
@ -800,7 +800,7 @@ index 91933b85f2c..2f76e6b0437 100644
int isfunc, grub_dl_t mod);
diff --git a/include/grub/kernel.h b/include/grub/kernel.h
index abbca5ea335..300a9766cda 100644
index abbca5ea33..300a9766cd 100644
--- a/include/grub/kernel.h
+++ b/include/grub/kernel.h
@@ -111,6 +111,9 @@ grub_addr_t grub_modules_get_end (void);
@ -814,7 +814,7 @@ index abbca5ea335..300a9766cda 100644
void grub_main (void) __attribute__ ((noreturn));
diff --git a/grub-core/kern/arm/efi/startup.S b/grub-core/kern/arm/efi/startup.S
index 9f8265315a9..f3bc41f9d0f 100644
index 9f8265315a..f3bc41f9d0 100644
--- a/grub-core/kern/arm/efi/startup.S
+++ b/grub-core/kern/arm/efi/startup.S
@@ -23,6 +23,8 @@
@ -827,7 +827,7 @@ index 9f8265315a9..f3bc41f9d0f 100644
/*
* EFI_SYSTEM_TABLE and EFI_HANDLE are passed in r1/r0.
diff --git a/grub-core/kern/arm/startup.S b/grub-core/kern/arm/startup.S
index 3946fe8e183..5679a1d00ad 100644
index 3946fe8e18..5679a1d00a 100644
--- a/grub-core/kern/arm/startup.S
+++ b/grub-core/kern/arm/startup.S
@@ -48,6 +48,8 @@
@ -840,7 +840,7 @@ index 3946fe8e183..5679a1d00ad 100644
b codestart
diff --git a/grub-core/kern/arm64/efi/startup.S b/grub-core/kern/arm64/efi/startup.S
index 666a7ee3c92..41676bdb2b8 100644
index 666a7ee3c9..41676bdb2b 100644
--- a/grub-core/kern/arm64/efi/startup.S
+++ b/grub-core/kern/arm64/efi/startup.S
@@ -19,7 +19,9 @@
@ -854,7 +854,7 @@ index 666a7ee3c92..41676bdb2b8 100644
/*
* EFI_SYSTEM_TABLE and EFI_HANDLE are passed in x1/x0.
diff --git a/grub-core/kern/i386/qemu/startup.S b/grub-core/kern/i386/qemu/startup.S
index 0d89858d9b3..939f182fc74 100644
index 0d89858d9b..939f182fc7 100644
--- a/grub-core/kern/i386/qemu/startup.S
+++ b/grub-core/kern/i386/qemu/startup.S
@@ -24,7 +24,8 @@
@ -868,7 +868,7 @@ index 0d89858d9b3..939f182fc74 100644
jmp codestart
diff --git a/grub-core/kern/ia64/efi/startup.S b/grub-core/kern/ia64/efi/startup.S
index d75c6d7cc74..8f2a593e529 100644
index d75c6d7cc7..8f2a593e52 100644
--- a/grub-core/kern/ia64/efi/startup.S
+++ b/grub-core/kern/ia64/efi/startup.S
@@ -24,8 +24,9 @@
@ -883,7 +883,7 @@ index d75c6d7cc74..8f2a593e529 100644
alloc loc0=ar.pfs,2,4,0,0
mov loc1=rp
diff --git a/grub-core/kern/sparc64/ieee1275/crt0.S b/grub-core/kern/sparc64/ieee1275/crt0.S
index 03b916f0534..701bf63abcf 100644
index 03b916f053..701bf63abc 100644
--- a/grub-core/kern/sparc64/ieee1275/crt0.S
+++ b/grub-core/kern/sparc64/ieee1275/crt0.S
@@ -22,7 +22,8 @@
@ -897,7 +897,7 @@ index 03b916f0534..701bf63abcf 100644
ba codestart
mov %o4, %o0
diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
index 80e7a83edf9..f512573c0da 100644
index ee88e44e97..bfd29a3bf0 100644
--- a/grub-core/Makefile.am
+++ b/grub-core/Makefile.am
@@ -66,6 +66,7 @@ CLEANFILES += grub_script.yy.c grub_script.yy.h

View File

@ -8,10 +8,10 @@ Subject: [PATCH] normal: don't draw our startup message if debug is set
1 file changed, 3 insertions(+)
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
index d5968797f4f..e349303c29b 100644
index 55558cc0b9..af9792c963 100644
--- a/grub-core/normal/main.c
+++ b/grub-core/normal/main.c
@@ -432,6 +432,9 @@ grub_normal_reader_init (int nested)
@@ -430,6 +430,9 @@ grub_normal_reader_init (int nested)
const char *msg_esc = _("ESC at any time exits.");
char *msg_formatted;

View File

@ -17,7 +17,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
diff --git a/include/grub/arm/efi/console.h b/include/grub/arm/efi/console.h
new file mode 100644
index 00000000000..1592f6f76b5
index 0000000000..1592f6f76b
--- /dev/null
+++ b/include/grub/arm/efi/console.h
@@ -0,0 +1,24 @@
@ -47,7 +47,7 @@ index 00000000000..1592f6f76b5
+#endif /* ! GRUB_ARM_EFI_CONSOLE_H */
diff --git a/include/grub/arm64/efi/console.h b/include/grub/arm64/efi/console.h
new file mode 100644
index 00000000000..95689339384
index 0000000000..9568933938
--- /dev/null
+++ b/include/grub/arm64/efi/console.h
@@ -0,0 +1,24 @@
@ -77,7 +77,7 @@ index 00000000000..95689339384
+#endif /* ! GRUB_ARM64_EFI_CONSOLE_H */
diff --git a/include/grub/i386/efi/console.h b/include/grub/i386/efi/console.h
new file mode 100644
index 00000000000..9231375cb07
index 0000000000..9231375cb0
--- /dev/null
+++ b/include/grub/i386/efi/console.h
@@ -0,0 +1,24 @@
@ -107,7 +107,7 @@ index 00000000000..9231375cb07
+#endif /* ! GRUB_I386_EFI_CONSOLE_H */
diff --git a/include/grub/x86_64/efi/console.h b/include/grub/x86_64/efi/console.h
new file mode 100644
index 00000000000..dba9d8678d0
index 0000000000..dba9d8678d
--- /dev/null
+++ b/include/grub/x86_64/efi/console.h
@@ -0,0 +1,24 @@

View File

@ -10,10 +10,10 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
2 files changed, 27 insertions(+)
diff --git a/configure.ac b/configure.ac
index 537ed411469..b4455e4732d 100644
index 0d0e6782a1..302300711f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1470,7 +1470,15 @@ grub_PROG_TARGET_CC
@@ -1442,7 +1442,15 @@ grub_PROG_TARGET_CC
if test "x$TARGET_APPLE_LINKER" != x1 ; then
grub_PROG_OBJCOPY_ABSOLUTE
fi
@ -30,7 +30,7 @@ index 537ed411469..b4455e4732d 100644
if test "$platform" != emu && test "x$TARGET_APPLE_LINKER" != x1 ; then
if test ! -z "$TARGET_IMG_LDSCRIPT"; then
diff --git a/acinclude.m4 b/acinclude.m4
index 6e14bb553c6..21238fcfd03 100644
index 6e14bb553c..21238fcfd0 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -136,6 +136,25 @@ if test "x$grub_cv_prog_ld_build_id_none" = xyes; then

View File

@ -13,7 +13,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
2 files changed, 20 insertions(+)
diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
index a432a6be54a..9a2fae6398e 100644
index a432a6be54..9a2fae6398 100644
--- a/grub-core/kern/misc.c
+++ b/grub-core/kern/misc.c
@@ -191,6 +191,24 @@ grub_real_dprintf (const char *file, const int line, const char *condition,
@ -42,7 +42,7 @@ index a432a6be54a..9a2fae6398e 100644
int
diff --git a/include/grub/misc.h b/include/grub/misc.h
index fd18e6320b8..3adc4036e3b 100644
index fd18e6320b..3adc4036e3 100644
--- a/include/grub/misc.h
+++ b/include/grub/misc.h
@@ -345,6 +345,8 @@ void EXPORT_FUNC(grub_real_dprintf) (const char *file,

View File

@ -20,7 +20,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
4 files changed, 78 insertions(+), 4 deletions(-)
diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
index 88d2077709e..9557254035e 100644
index 88d2077709..9557254035 100644
--- a/grub-core/kern/dl.c
+++ b/grub-core/kern/dl.c
@@ -501,6 +501,23 @@ grub_dl_find_section (Elf_Ehdr *e, const char *name)
@ -95,7 +95,7 @@ index 88d2077709e..9557254035e 100644
{
grub_dl_unload (mod);
diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
index ae9885edb84..d6a2fb57789 100644
index ae9885edb8..d6a2fb5778 100644
--- a/grub-core/kern/efi/efi.c
+++ b/grub-core/kern/efi/efi.c
@@ -296,7 +296,7 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid,
@ -117,7 +117,7 @@ index ae9885edb84..d6a2fb57789 100644
}
diff --git a/grub-core/kern/efi/init.c b/grub-core/kern/efi/init.c
index 6d39bd3ad29..2d12e6188fd 100644
index 6d39bd3ad2..2d12e6188f 100644
--- a/grub-core/kern/efi/init.c
+++ b/grub-core/kern/efi/init.c
@@ -115,10 +115,33 @@ grub_efi_env_init (void)
@ -164,7 +164,7 @@ index 6d39bd3ad29..2d12e6188fd 100644
}
diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h
index 03f9a9d0118..2e0691454b1 100644
index 03f9a9d011..2e0691454b 100644
--- a/include/grub/efi/efi.h
+++ b/include/grub/efi/efi.h
@@ -138,7 +138,7 @@ grub_err_t grub_arch_efi_linux_check_image(struct linux_arch_kernel_header *lh);

View File

@ -9,7 +9,7 @@ Subject: [PATCH] Fixup for newer compiler
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
index 2b21cbaa67e..4cc86e9b79e 100644
index 2b21cbaa67..4cc86e9b79 100644
--- a/grub-core/fs/btrfs.c
+++ b/grub-core/fs/btrfs.c
@@ -218,7 +218,7 @@ struct grub_btrfs_inode
@ -22,7 +22,7 @@ index 2b21cbaa67e..4cc86e9b79e 100644
struct grub_btrfs_extent_data
{
diff --git a/include/grub/gpt_partition.h b/include/grub/gpt_partition.h
index 7a93f43291c..8212697bf6b 100644
index 7a93f43291..8212697bf6 100644
--- a/include/grub/gpt_partition.h
+++ b/include/grub/gpt_partition.h
@@ -76,7 +76,7 @@ struct grub_gpt_partentry

View File

@ -26,7 +26,7 @@ Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
1 file changed, 2 insertions(+)
diff --git a/include/grub/kernel.h b/include/grub/kernel.h
index 300a9766cda..55849777eaa 100644
index 300a9766cd..55849777ea 100644
--- a/include/grub/kernel.h
+++ b/include/grub/kernel.h
@@ -111,8 +111,10 @@ grub_addr_t grub_modules_get_end (void);

View File

@ -8,7 +8,7 @@ Subject: [PATCH] Fixup for newer compiler
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/conf/Makefile.common b/conf/Makefile.common
index 191b1a70c6b..5f0ef969857 100644
index 191b1a70c6..5f0ef96985 100644
--- a/conf/Makefile.common
+++ b/conf/Makefile.common
@@ -38,7 +38,7 @@ CFLAGS_KERNEL = $(CFLAGS_PLATFORM) -ffreestanding

View File

@ -38,7 +38,7 @@ Signed-off-by: Mark Salter <msalter@redhat.com>
12 files changed, 219 insertions(+), 152 deletions(-)
diff --git a/grub-core/net/arp.c b/grub-core/net/arp.c
index 54306e3b16d..67b409a8acc 100644
index 54306e3b16..67b409a8ac 100644
--- a/grub-core/net/arp.c
+++ b/grub-core/net/arp.c
@@ -31,22 +31,12 @@ enum
@ -271,7 +271,7 @@ index 54306e3b16d..67b409a8acc 100644
/* Change operation to REPLY and send packet */
send_ethernet_packet (inf, &nb_reply, target, GRUB_NET_ETHERTYPE_ARP);
diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c
index e28fb6a09f9..08b6b2b5d6c 100644
index e28fb6a09f..08b6b2b5d6 100644
--- a/grub-core/net/bootp.c
+++ b/grub-core/net/bootp.c
@@ -233,7 +233,6 @@ grub_net_configure_by_dhcp_ack (const char *name,
@ -318,7 +318,7 @@ index e28fb6a09f9..08b6b2b5d6c 100644
grub_netbuff_push (nb, sizeof (*udph));
diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
index 173fb63153c..a673bea807a 100644
index 173fb63153..a673bea807 100644
--- a/grub-core/net/drivers/efi/efinet.c
+++ b/grub-core/net/drivers/efi/efinet.c
@@ -279,6 +279,9 @@ grub_efinet_findcards (void)
@ -346,7 +346,7 @@ index 173fb63153c..a673bea807a 100644
card->efi_handle = *handle;
diff --git a/grub-core/net/drivers/emu/emunet.c b/grub-core/net/drivers/emu/emunet.c
index b194920861f..5b6c5e16a6d 100644
index b194920861..5b6c5e16a6 100644
--- a/grub-core/net/drivers/emu/emunet.c
+++ b/grub-core/net/drivers/emu/emunet.c
@@ -46,6 +46,7 @@ static struct grub_net_card emucard =
@ -358,7 +358,7 @@ index b194920861f..5b6c5e16a6d 100644
},
.flags = 0
diff --git a/grub-core/net/drivers/i386/pc/pxe.c b/grub-core/net/drivers/i386/pc/pxe.c
index 3f4152d036c..9f8fb4b6d2b 100644
index 3f4152d036..9f8fb4b6d2 100644
--- a/grub-core/net/drivers/i386/pc/pxe.c
+++ b/grub-core/net/drivers/i386/pc/pxe.c
@@ -386,20 +386,21 @@ GRUB_MOD_INIT(pxe)
@ -390,7 +390,7 @@ index 3f4152d036c..9f8fb4b6d2b 100644
grub_pxe_card.default_address.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET;
diff --git a/grub-core/net/drivers/ieee1275/ofnet.c b/grub-core/net/drivers/ieee1275/ofnet.c
index 3860b6f78d8..bcb3f9ea02d 100644
index 3860b6f78d..bcb3f9ea02 100644
--- a/grub-core/net/drivers/ieee1275/ofnet.c
+++ b/grub-core/net/drivers/ieee1275/ofnet.c
@@ -160,6 +160,7 @@ grub_ieee1275_parse_bootpath (const char *devpath, char *bootpath,
@ -410,7 +410,7 @@ index 3860b6f78d8..bcb3f9ea02d 100644
card->txbufsize = ALIGN_UP (card->mtu, 64) + 256;
diff --git a/grub-core/net/drivers/uboot/ubootnet.c b/grub-core/net/drivers/uboot/ubootnet.c
index 056052e40d5..22ebcbf211e 100644
index 056052e40d..22ebcbf211 100644
--- a/grub-core/net/drivers/uboot/ubootnet.c
+++ b/grub-core/net/drivers/uboot/ubootnet.c
@@ -131,6 +131,7 @@ GRUB_MOD_INIT (ubootnet)
@ -422,7 +422,7 @@ index 056052e40d5..22ebcbf211e 100644
card->txbufsize = ALIGN_UP (card->mtu, 64) + 256;
card->txbuf = grub_zalloc (card->txbufsize);
diff --git a/grub-core/net/ethernet.c b/grub-core/net/ethernet.c
index 4d7ceed6f93..9aae83a5eb4 100644
index 4d7ceed6f9..9aae83a5eb 100644
--- a/grub-core/net/ethernet.c
+++ b/grub-core/net/ethernet.c
@@ -29,13 +29,6 @@
@ -572,7 +572,7 @@ index 4d7ceed6f93..9aae83a5eb4 100644
{
/* ARP packet. */
diff --git a/grub-core/net/icmp6.c b/grub-core/net/icmp6.c
index 2cbd95dce25..56a3ec5c8e8 100644
index 2cbd95dce2..56a3ec5c8e 100644
--- a/grub-core/net/icmp6.c
+++ b/grub-core/net/icmp6.c
@@ -231,8 +231,9 @@ grub_net_recv_icmp6_packet (struct grub_net_buff *nb,
@ -612,7 +612,7 @@ index 2cbd95dce25..56a3ec5c8e8 100644
}
if (ohdr->type == OPTION_PREFIX && ohdr->len == 4)
diff --git a/grub-core/net/ip.c b/grub-core/net/ip.c
index ea5edf8f1f6..a5896f6dc26 100644
index ea5edf8f1f..a5896f6dc2 100644
--- a/grub-core/net/ip.c
+++ b/grub-core/net/ip.c
@@ -276,8 +276,8 @@ handle_dgram (struct grub_net_buff *nb,
@ -627,7 +627,7 @@ index ea5edf8f1f6..a5896f6dc26 100644
grub_net_process_dhcp (nb, inf);
grub_netbuff_free (nb);
diff --git a/grub-core/net/net.c b/grub-core/net/net.c
index 22f2689aaeb..a46f82362ed 100644
index 22f2689aae..a46f82362e 100644
--- a/grub-core/net/net.c
+++ b/grub-core/net/net.c
@@ -133,8 +133,9 @@ grub_net_link_layer_resolve (struct grub_net_network_level_interface *inf,
@ -713,7 +713,7 @@ index 22f2689aaeb..a46f82362ed 100644
int
diff --git a/include/grub/net.h b/include/grub/net.h
index 8a05ec4fe7a..af0404db7e3 100644
index 8a05ec4fe7..af0404db7e 100644
--- a/include/grub/net.h
+++ b/include/grub/net.h
@@ -29,7 +29,8 @@

View File

@ -18,7 +18,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
4 files changed, 109 insertions(+), 12 deletions(-)
diff --git a/grub-core/net/http.c b/grub-core/net/http.c
index b616cf40b1e..12a2632ea55 100644
index b616cf40b1..12a2632ea5 100644
--- a/grub-core/net/http.c
+++ b/grub-core/net/http.c
@@ -289,7 +289,9 @@ http_receive (grub_net_tcp_socket_t sock __attribute__ ((unused)),
@ -87,7 +87,7 @@ index b616cf40b1e..12a2632ea55 100644
file);
if (!data->sock)
diff --git a/grub-core/net/net.c b/grub-core/net/net.c
index a46f82362ed..0ce5e675ed7 100644
index a46f82362e..0ce5e675ed 100644
--- a/grub-core/net/net.c
+++ b/grub-core/net/net.c
@@ -444,6 +444,13 @@ parse_ip6 (const char *val, grub_uint64_t *ip, const char **rest)
@ -225,7 +225,7 @@ index a46f82362ed..0ce5e675ed7 100644
}
diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c
index 4ab2f5c7357..d54b13f09ff 100644
index 4ab2f5c735..d54b13f09f 100644
--- a/grub-core/net/tftp.c
+++ b/grub-core/net/tftp.c
@@ -295,6 +295,7 @@ tftp_open (struct grub_file *file, const char *filename)
@ -257,7 +257,7 @@ index 4ab2f5c7357..d54b13f09ff 100644
if (!data->sock)
{
diff --git a/include/grub/net.h b/include/grub/net.h
index af0404db7e3..d55d505a03a 100644
index af0404db7e..d55d505a03 100644
--- a/include/grub/net.h
+++ b/include/grub/net.h
@@ -273,6 +273,7 @@ typedef struct grub_net

View File

@ -19,7 +19,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
5 files changed, 1002 insertions(+), 209 deletions(-)
diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c
index 08b6b2b5d6c..fe93b80f1cf 100644
index 08b6b2b5d6..fe93b80f1c 100644
--- a/grub-core/net/bootp.c
+++ b/grub-core/net/bootp.c
@@ -24,6 +24,98 @@
@ -1136,7 +1136,7 @@ index 08b6b2b5d6c..fe93b80f1cf 100644
grub_unregister_command (cmd_bootp);
grub_unregister_command (cmd_dhcp);
diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
index a673bea807a..8e25680db0c 100644
index a673bea807..8e25680db0 100644
--- a/grub-core/net/drivers/efi/efinet.c
+++ b/grub-core/net/drivers/efi/efinet.c
@@ -393,9 +393,6 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
@ -1174,7 +1174,7 @@ index a673bea807a..8e25680db0c 100644
}
else
diff --git a/grub-core/net/ip.c b/grub-core/net/ip.c
index a5896f6dc26..ce6bdc75c6d 100644
index a5896f6dc2..ce6bdc75c6 100644
--- a/grub-core/net/ip.c
+++ b/grub-core/net/ip.c
@@ -239,6 +239,45 @@ handle_dgram (struct grub_net_buff *nb,
@ -1224,7 +1224,7 @@ index a5896f6dc26..ce6bdc75c6d 100644
{
const struct grub_net_bootp_packet *bootp;
diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
index 99628801478..7614b58dca8 100644
index 9962880147..7614b58dca 100644
--- a/include/grub/efi/api.h
+++ b/include/grub/efi/api.h
@@ -1532,7 +1532,7 @@ typedef struct grub_efi_pxe_ip_filter
@ -1237,7 +1237,7 @@ index 99628801478..7614b58dca8 100644
} grub_efi_pxe_ip_filter_t;
diff --git a/include/grub/net.h b/include/grub/net.h
index d55d505a03a..543251f7273 100644
index d55d505a03..543251f727 100644
--- a/include/grub/net.h
+++ b/include/grub/net.h
@@ -451,50 +451,65 @@ struct grub_net_bootp_packet

View File

@ -15,7 +15,7 @@ Signed-off-by: Ken Lin <ken.lin@hpe.com>
2 files changed, 46 insertions(+), 27 deletions(-)
diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
index 8e25680db0c..014e5bf9802 100644
index 8e25680db0..014e5bf980 100644
--- a/grub-core/net/drivers/efi/efinet.c
+++ b/grub-core/net/drivers/efi/efinet.c
@@ -409,6 +409,8 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
@ -28,7 +28,7 @@ index 8e25680db0c..014e5bf9802 100644
else
{
diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
index 7614b58dca8..91ab528e4d0 100644
index 7614b58dca..91ab528e4d 100644
--- a/include/grub/efi/api.h
+++ b/include/grub/efi/api.h
@@ -1524,31 +1524,6 @@ typedef union

View File

@ -12,7 +12,7 @@ Signed-off-by: Ken Lin <ken.lin@hpe.com>
1 file changed, 17 insertions(+)
diff --git a/docs/grub.texi b/docs/grub.texi
index 0615d0ed97e..04ed6ac1f07 100644
index 0615d0ed97..04ed6ac1f0 100644
--- a/docs/grub.texi
+++ b/docs/grub.texi
@@ -5487,6 +5487,7 @@ This command is only available on AArch64 systems.

View File

@ -22,7 +22,7 @@ Signed-off-by: Ken Lin <ken.lin@hpe.com>
2 files changed, 56 insertions(+)
diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c
index fe93b80f1cf..8fb8918ae7e 100644
index fe93b80f1c..8fb8918ae7 100644
--- a/grub-core/net/bootp.c
+++ b/grub-core/net/bootp.c
@@ -20,6 +20,7 @@
@ -95,7 +95,7 @@ index fe93b80f1cf..8fb8918ae7e 100644
if (opt && opt_len)
grub_env_set_net_property (name, "extensionspath", (const char *) opt, opt_len);
diff --git a/include/grub/net.h b/include/grub/net.h
index 543251f7273..42af7de250a 100644
index 543251f727..42af7de250 100644
--- a/include/grub/net.h
+++ b/include/grub/net.h
@@ -531,6 +531,7 @@ enum

View File

@ -1,347 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Michael Chang <mchang@suse.com>
Date: Tue, 6 Feb 2018 09:09:00 +0100
Subject: [PATCH] Add linux and initrd commands for grub-emu
When using grub-emu, the linux and initrd commands are used as arguments
to the kexec command line tool, to allow booting the selected menu entry.
---
grub-core/Makefile.core.def | 1 -
grub-core/kern/emu/main.c | 4 +
grub-core/kern/emu/misc.c | 18 ++++-
grub-core/loader/emu/linux.c | 172 +++++++++++++++++++++++++++++++++++++++++++
include/grub/emu/exec.h | 4 +-
include/grub/emu/hostfile.h | 3 +-
include/grub/emu/misc.h | 3 +
grub-core/Makefile.am | 1 +
8 files changed, 202 insertions(+), 4 deletions(-)
create mode 100644 grub-core/loader/emu/linux.c
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index 058c88ac3af..5354f9613d3 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -1826,7 +1826,6 @@ module = {
common = loader/linux.c;
common = lib/cmdline.c;
- enable = noemu;
efi = loader/efi/linux.c;
};
diff --git a/grub-core/kern/emu/main.c b/grub-core/kern/emu/main.c
index 55ea5a11ccd..846fe9715ec 100644
--- a/grub-core/kern/emu/main.c
+++ b/grub-core/kern/emu/main.c
@@ -107,6 +107,7 @@ static struct argp_option options[] = {
N_("use GRUB files in the directory DIR [default=%s]"), 0},
{"verbose", 'v', 0, 0, N_("print verbose messages."), 0},
{"hold", 'H', N_("SECS"), OPTION_ARG_OPTIONAL, N_("wait until a debugger will attach"), 0},
+ {"kexec", 'X', 0, 0, N_("try the untryable."), 0},
{ 0, 0, 0, 0, 0, 0 }
};
@@ -164,6 +165,9 @@ argp_parser (int key, char *arg, struct argp_state *state)
case 'v':
verbosity++;
break;
+ case 'X':
+ grub_util_set_kexecute();
+ break;
case ARGP_KEY_ARG:
{
diff --git a/grub-core/kern/emu/misc.c b/grub-core/kern/emu/misc.c
index 0ff13bcaf8c..eeea092752d 100644
--- a/grub-core/kern/emu/misc.c
+++ b/grub-core/kern/emu/misc.c
@@ -39,6 +39,7 @@
#include <grub/emu/misc.h>
int verbosity;
+int kexecute;
void
grub_util_warn (const char *fmt, ...)
@@ -82,7 +83,7 @@ grub_util_error (const char *fmt, ...)
vfprintf (stderr, fmt, ap);
va_end (ap);
fprintf (stderr, ".\n");
- exit (1);
+ grub_exit (1);
}
void *
@@ -154,6 +155,9 @@ void
__attribute__ ((noreturn))
grub_exit (int rc)
{
+#if defined (GRUB_KERNEL)
+ grub_reboot();
+#endif
exit (rc < 0 ? 1 : rc);
}
#endif
@@ -215,3 +219,15 @@ grub_util_load_image (const char *path, char *buf)
fclose (fp);
}
+
+void
+grub_util_set_kexecute(void)
+{
+ kexecute++;
+}
+
+int
+grub_util_get_kexecute(void)
+{
+ return kexecute;
+}
diff --git a/grub-core/loader/emu/linux.c b/grub-core/loader/emu/linux.c
new file mode 100644
index 00000000000..fda9e00d24c
--- /dev/null
+++ b/grub-core/loader/emu/linux.c
@@ -0,0 +1,172 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/loader.h>
+#include <grub/dl.h>
+#include <grub/command.h>
+#include <grub/time.h>
+
+#include <grub/emu/exec.h>
+#include <grub/emu/hostfile.h>
+#include <grub/emu/misc.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_dl_t my_mod;
+
+static char *kernel_path;
+static char *initrd_path;
+static char *boot_cmdline;
+
+static grub_err_t
+grub_linux_boot (void)
+{
+ grub_err_t rc = GRUB_ERR_NONE;
+ char *initrd_param;
+ const char *kexec[] = { "kexec", "-l", kernel_path, boot_cmdline, NULL, NULL };
+ const char *systemctl[] = { "systemctl", "kexec", NULL };
+ int kexecute = grub_util_get_kexecute();
+
+ if (initrd_path) {
+ initrd_param = grub_xasprintf("--initrd=%s", initrd_path);
+ kexec[3] = initrd_param;
+ kexec[4] = boot_cmdline;
+ } else {
+ initrd_param = grub_xasprintf("%s", "");
+ }
+
+ grub_printf("%serforming 'kexec -l %s %s %s'\n",
+ (kexecute) ? "P" : "Not p",
+ kernel_path, initrd_param, boot_cmdline);
+
+ if (kexecute)
+ rc = grub_util_exec(kexec);
+
+ grub_free(initrd_param);
+
+ if (rc != GRUB_ERR_NONE) {
+ grub_error (rc, N_("Error trying to perform kexec load operation."));
+ grub_sleep (3);
+ return rc;
+ }
+ if (kexecute < 1)
+ grub_fatal (N_("Use '"PACKAGE"-emu --kexec' to force a system restart."));
+
+ grub_printf("Performing 'systemctl kexec' (%s) ",
+ (kexecute==1) ? "do-or-die" : "just-in-case");
+ rc = grub_util_exec (systemctl);
+
+ if (kexecute == 1)
+ grub_fatal (N_("Error trying to perform 'systemctl kexec'"));
+
+ /* need to check read-only root before resetting hard!? */
+ grub_printf("Performing 'kexec -e'");
+ kexec[1] = "-e";
+ kexec[2] = NULL;
+ rc = grub_util_exec(kexec);
+ if ( rc != GRUB_ERR_NONE )
+ grub_fatal (N_("Error trying to directly perform 'kexec -e'."));
+
+ return rc;
+}
+
+static grub_err_t
+grub_linux_unload (void)
+{
+ grub_dl_unref (my_mod);
+ if ( boot_cmdline != NULL )
+ grub_free (boot_cmdline);
+ boot_cmdline = NULL;
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), int argc, char *argv[])
+{
+ int i;
+ char *tempstr;
+
+ grub_dl_ref (my_mod);
+
+ if (argc == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
+
+ if ( !grub_util_is_regular(argv[0]) )
+ return grub_error(GRUB_ERR_FILE_NOT_FOUND, N_("Cannot find kernel file %s"), argv[0]);
+
+ if ( kernel_path != NULL )
+ grub_free(kernel_path);
+
+ kernel_path = grub_xasprintf("%s", argv[0]);
+
+ if ( boot_cmdline != NULL ) {
+ grub_free(boot_cmdline);
+ boot_cmdline = NULL;
+ }
+
+ if ( argc > 1 )
+ {
+ boot_cmdline = grub_xasprintf("--command-line=%s", argv[1]);
+ for ( i = 2; i < argc; i++ ) {
+ tempstr = grub_xasprintf("%s %s", boot_cmdline, argv[i]);
+ grub_free(boot_cmdline);
+ boot_cmdline = tempstr;
+ }
+ }
+
+ grub_loader_set (grub_linux_boot, grub_linux_unload, 0);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)), int argc, char *argv[])
+{
+ if (argc == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
+
+ if ( !grub_util_is_regular(argv[0]) )
+ return grub_error(GRUB_ERR_FILE_NOT_FOUND, N_("Cannot find initrd file %s"), argv[0]);
+
+ if ( initrd_path != NULL )
+ grub_free(initrd_path);
+
+ initrd_path = grub_xasprintf("%s", argv[0]);
+
+ grub_dl_unref (my_mod);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_command_t cmd_linux, cmd_initrd;
+
+GRUB_MOD_INIT(linux)
+{
+ cmd_linux = grub_register_command ("linux", grub_cmd_linux, 0, N_("Load Linux."));
+ cmd_initrd = grub_register_command ("initrd", grub_cmd_initrd, 0, N_("Load initrd."));
+ my_mod = mod;
+ kernel_path = NULL;
+ initrd_path = NULL;
+ boot_cmdline = NULL;
+}
+
+GRUB_MOD_FINI(linux)
+{
+ grub_unregister_command (cmd_linux);
+ grub_unregister_command (cmd_initrd);
+}
diff --git a/include/grub/emu/exec.h b/include/grub/emu/exec.h
index d1073ef86af..1b61b4a2e5d 100644
--- a/include/grub/emu/exec.h
+++ b/include/grub/emu/exec.h
@@ -23,6 +23,8 @@
#include <stdarg.h>
#include <sys/types.h>
+#include <grub/symbol.h>
+
pid_t
grub_util_exec_pipe (const char *const *argv, int *fd);
pid_t
@@ -32,7 +34,7 @@ int
grub_util_exec_redirect_all (const char *const *argv, const char *stdin_file,
const char *stdout_file, const char *stderr_file);
int
-grub_util_exec (const char *const *argv);
+EXPORT_FUNC(grub_util_exec) (const char *const *argv);
int
grub_util_exec_redirect (const char *const *argv, const char *stdin_file,
const char *stdout_file);
diff --git a/include/grub/emu/hostfile.h b/include/grub/emu/hostfile.h
index cfb1e2b5661..a61568e36e9 100644
--- a/include/grub/emu/hostfile.h
+++ b/include/grub/emu/hostfile.h
@@ -22,6 +22,7 @@
#include <grub/disk.h>
#include <grub/partition.h>
#include <sys/types.h>
+#include <grub/symbol.h>
#include <grub/osdep/hostfile.h>
int
@@ -29,7 +30,7 @@ grub_util_is_directory (const char *path);
int
grub_util_is_special_file (const char *path);
int
-grub_util_is_regular (const char *path);
+EXPORT_FUNC(grub_util_is_regular) (const char *path);
char *
grub_util_path_concat (size_t n, ...);
diff --git a/include/grub/emu/misc.h b/include/grub/emu/misc.h
index ff9c48a6490..01056954b96 100644
--- a/include/grub/emu/misc.h
+++ b/include/grub/emu/misc.h
@@ -57,6 +57,9 @@ void EXPORT_FUNC(grub_util_warn) (const char *fmt, ...) __attribute__ ((format (
void EXPORT_FUNC(grub_util_info) (const char *fmt, ...) __attribute__ ((format (GNU_PRINTF, 1, 2)));
void EXPORT_FUNC(grub_util_error) (const char *fmt, ...) __attribute__ ((format (GNU_PRINTF, 1, 2), noreturn));
+void EXPORT_FUNC(grub_util_set_kexecute) (void);
+int EXPORT_FUNC(grub_util_get_kexecute) (void) WARN_UNUSED_RESULT;
+
grub_uint64_t EXPORT_FUNC (grub_util_get_cpu_time_ms) (void);
#ifdef HAVE_DEVICE_MAPPER
diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
index ee88e44e97a..80e7a83edf9 100644
--- a/grub-core/Makefile.am
+++ b/grub-core/Makefile.am
@@ -307,6 +307,7 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/net.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/hostdisk.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/hostfile.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/exec.h
if COND_GRUB_EMU_SDL
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/sdl.h
endif

View File

@ -32,7 +32,7 @@ Signed-off-by: Ken Lin <ken.lin@hpe.com>
2 files changed, 280 insertions(+), 15 deletions(-)
diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
index 014e5bf9802..8171ecaa5e4 100644
index 014e5bf980..8171ecaa5e 100644
--- a/grub-core/net/drivers/efi/efinet.c
+++ b/grub-core/net/drivers/efi/efinet.c
@@ -26,6 +26,7 @@
@ -375,7 +375,7 @@ index 014e5bf9802..8171ecaa5e4 100644
}
}
diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
index 91ab528e4d0..4a51667adb1 100644
index 91ab528e4d..4a51667adb 100644
--- a/include/grub/efi/api.h
+++ b/include/grub/efi/api.h
@@ -864,6 +864,8 @@ struct grub_efi_ipv4_device_path

View File

@ -33,7 +33,7 @@ Signed-off-by: Ken Lin <ken.lin@hpe.com>
2 files changed, 238 insertions(+)
diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
index 8171ecaa5e4..715a6168d77 100644
index 8171ecaa5e..715a6168d7 100644
--- a/grub-core/net/drivers/efi/efinet.c
+++ b/grub-core/net/drivers/efi/efinet.c
@@ -33,6 +33,8 @@ GRUB_MOD_LICENSE ("GPLv3+");
@ -242,7 +242,7 @@ index 8171ecaa5e4..715a6168d77 100644
}
diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
index 4a51667adb1..0b490195ad9 100644
index 4a51667adb..0b490195ad 100644
--- a/include/grub/efi/api.h
+++ b/include/grub/efi/api.h
@@ -352,6 +352,15 @@

View File

@ -57,10 +57,10 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
create mode 100644 include/grub/net/efi.h
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index 4b7c45a7b06..c40170f2dd2 100644
index 52ec0fafcd..12797336c9 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -2299,6 +2299,12 @@ module = {
@@ -2300,6 +2300,12 @@ module = {
common = hook/datehook.c;
};
@ -73,7 +73,7 @@ index 4b7c45a7b06..c40170f2dd2 100644
module = {
name = net;
common = net/net.c;
@@ -2312,6 +2318,12 @@ module = {
@@ -2313,6 +2319,12 @@ module = {
common = net/ethernet.c;
common = net/arp.c;
common = net/netbuff.c;
@ -87,7 +87,7 @@ index 4b7c45a7b06..c40170f2dd2 100644
module = {
diff --git a/grub-core/io/bufio.c b/grub-core/io/bufio.c
index a458c3aca78..1637731535e 100644
index a458c3aca7..1637731535 100644
--- a/grub-core/io/bufio.c
+++ b/grub-core/io/bufio.c
@@ -139,7 +139,7 @@ grub_bufio_read (grub_file_t file, char *buf, grub_size_t len)
@ -100,7 +100,7 @@ index a458c3aca78..1637731535e 100644
if (file->offset + res < next_buf)
{
diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
index d6a2fb57789..2a446f5031b 100644
index d6a2fb5778..2a446f5031 100644
--- a/grub-core/kern/efi/efi.c
+++ b/grub-core/kern/efi/efi.c
@@ -755,7 +755,7 @@ grub_efi_print_device_path (grub_efi_device_path_t *dp)
@ -231,7 +231,7 @@ index d6a2fb57789..2a446f5031b 100644
grub_printf ("/UnknownMessaging(%x)", (unsigned) subtype);
break;
diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
index 715a6168d77..e11d759f19a 100644
index 715a6168d7..e11d759f19 100644
--- a/grub-core/net/drivers/efi/efinet.c
+++ b/grub-core/net/drivers/efi/efinet.c
@@ -27,6 +27,7 @@
@ -304,7 +304,7 @@ index 715a6168d77..e11d759f19a 100644
diff --git a/grub-core/net/efi/dhcp.c b/grub-core/net/efi/dhcp.c
new file mode 100644
index 00000000000..dbef63d8c08
index 0000000000..dbef63d8c0
--- /dev/null
+++ b/grub-core/net/efi/dhcp.c
@@ -0,0 +1,397 @@
@ -707,7 +707,7 @@ index 00000000000..dbef63d8c08
+grub_command_func_t grub_efi_net_bootp6 = grub_cmd_efi_bootp6;
diff --git a/grub-core/net/efi/efi_netfs.c b/grub-core/net/efi/efi_netfs.c
new file mode 100644
index 00000000000..ef371d885ea
index 0000000000..ef371d885e
--- /dev/null
+++ b/grub-core/net/efi/efi_netfs.c
@@ -0,0 +1,57 @@
@ -770,7 +770,7 @@ index 00000000000..ef371d885ea
+}
diff --git a/grub-core/net/efi/http.c b/grub-core/net/efi/http.c
new file mode 100644
index 00000000000..3f61fd2fa5b
index 0000000000..3f61fd2fa5
--- /dev/null
+++ b/grub-core/net/efi/http.c
@@ -0,0 +1,419 @@
@ -1195,7 +1195,7 @@ index 00000000000..3f61fd2fa5b
+ };
diff --git a/grub-core/net/efi/ip4_config.c b/grub-core/net/efi/ip4_config.c
new file mode 100644
index 00000000000..b711a5d9457
index 0000000000..b711a5d945
--- /dev/null
+++ b/grub-core/net/efi/ip4_config.c
@@ -0,0 +1,398 @@
@ -1599,7 +1599,7 @@ index 00000000000..b711a5d9457
+ };
diff --git a/grub-core/net/efi/ip6_config.c b/grub-core/net/efi/ip6_config.c
new file mode 100644
index 00000000000..017c4d05bc7
index 0000000000..017c4d05bc
--- /dev/null
+++ b/grub-core/net/efi/ip6_config.c
@@ -0,0 +1,422 @@
@ -2027,7 +2027,7 @@ index 00000000000..017c4d05bc7
+ };
diff --git a/grub-core/net/efi/net.c b/grub-core/net/efi/net.c
new file mode 100644
index 00000000000..86bce6535d3
index 0000000000..86bce6535d
--- /dev/null
+++ b/grub-core/net/efi/net.c
@@ -0,0 +1,1428 @@
@ -3461,7 +3461,7 @@ index 00000000000..86bce6535d3
+}
diff --git a/grub-core/net/efi/pxe.c b/grub-core/net/efi/pxe.c
new file mode 100644
index 00000000000..531949cba5c
index 0000000000..531949cba5
--- /dev/null
+++ b/grub-core/net/efi/pxe.c
@@ -0,0 +1,424 @@
@ -3890,7 +3890,7 @@ index 00000000000..531949cba5c
+ };
+
diff --git a/grub-core/net/net.c b/grub-core/net/net.c
index 0ce5e675ed7..55aed92722c 100644
index 0ce5e675ed..55aed92722 100644
--- a/grub-core/net/net.c
+++ b/grub-core/net/net.c
@@ -32,6 +32,9 @@
@ -4000,7 +4000,7 @@ index 0ce5e675ed7..55aed92722c 100644
+#endif
}
diff --git a/util/grub-mknetdir.c b/util/grub-mknetdir.c
index a2461cda1c4..77958dd9dd5 100644
index a2461cda1c..77958dd9dd 100644
--- a/util/grub-mknetdir.c
+++ b/util/grub-mknetdir.c
@@ -32,13 +32,15 @@
@ -4082,7 +4082,7 @@ index a2461cda1c4..77958dd9dd5 100644
if (!grub_install_source_directory)
{
diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
index 0b490195ad9..f431f49973e 100644
index 0b490195ad..f431f49973 100644
--- a/include/grub/efi/api.h
+++ b/include/grub/efi/api.h
@@ -622,6 +622,23 @@ typedef union
@ -4333,7 +4333,7 @@ index 0b490195ad9..f431f49973e 100644
|| defined(__riscv)
diff --git a/include/grub/efi/dhcp.h b/include/grub/efi/dhcp.h
new file mode 100644
index 00000000000..fdb88eb810e
index 0000000000..fdb88eb810
--- /dev/null
+++ b/include/grub/efi/dhcp.h
@@ -0,0 +1,343 @@
@ -4682,7 +4682,7 @@ index 00000000000..fdb88eb810e
+#endif /* ! GRUB_EFI_DHCP_HEADER */
diff --git a/include/grub/efi/http.h b/include/grub/efi/http.h
new file mode 100644
index 00000000000..c5e9a89f505
index 0000000000..c5e9a89f50
--- /dev/null
+++ b/include/grub/efi/http.h
@@ -0,0 +1,215 @@
@ -4903,7 +4903,7 @@ index 00000000000..c5e9a89f505
+#endif /* !GRUB_EFI_HTTP_HEADER */
diff --git a/include/grub/net/efi.h b/include/grub/net/efi.h
new file mode 100644
index 00000000000..de90d223e8e
index 0000000000..de90d223e8
--- /dev/null
+++ b/include/grub/net/efi.h
@@ -0,0 +1,144 @@

View File

@ -22,7 +22,7 @@ Signed-off-by: Michael Chang <mchang@suse.com>
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/grub-core/net/efi/net.c b/grub-core/net/efi/net.c
index 86bce6535d3..4bb308026ce 100644
index 86bce6535d..4bb308026c 100644
--- a/grub-core/net/efi/net.c
+++ b/grub-core/net/efi/net.c
@@ -645,8 +645,10 @@ grub_efihttp_chunk_read (grub_file_t file, char *buf,
@ -38,7 +38,7 @@ index 86bce6535d3..4bb308026ce 100644
if (buf)
{
diff --git a/grub-core/net/http.c b/grub-core/net/http.c
index 12a2632ea55..b52b558d631 100644
index 12a2632ea5..b52b558d63 100644
--- a/grub-core/net/http.c
+++ b/grub-core/net/http.c
@@ -31,7 +31,8 @@ GRUB_MOD_LICENSE ("GPLv3+");

View File

@ -17,7 +17,7 @@ Signed-off-by: Hans de Goede <hdegoede@redhat.com>
1 file changed, 50 insertions(+)
diff --git a/util/grub-editenv.c b/util/grub-editenv.c
index db6f187cc63..948eec8a114 100644
index db6f187cc6..948eec8a11 100644
--- a/util/grub-editenv.c
+++ b/util/grub-editenv.c
@@ -53,6 +53,9 @@ static struct argp_option options[] = {

View File

@ -35,12 +35,6 @@ fastboot If set to "1" and the conditions for auto-hiding the menu
https://git.launchpad.net/~ubuntu-core-dev/grub/+git/ubuntu/tree/debian/patches/quick_boot.patch
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
Changes in v2:
-Drop shutdown_success tests, there is no meaningful way for systemd to set
this flag (by the time it knows all filesystems are unmounted or read-only
-Drop fwsetup_once support, systemd already supports booting directly into
the fwsetup by doing "systemctl reboot --firmware"
---
Makefile.util.def | 6 +++++
util/grub.d/01_menu_auto_hide.in | 48 ++++++++++++++++++++++++++++++++++++++++
@ -49,7 +43,7 @@ Changes in v2:
create mode 100644 util/grub.d/01_menu_auto_hide.in
diff --git a/Makefile.util.def b/Makefile.util.def
index 41906486a71..04551e095bd 100644
index bda9fd1211..cb8e3c3270 100644
--- a/Makefile.util.def
+++ b/Makefile.util.def
@@ -458,6 +458,12 @@ script = {
@ -67,7 +61,7 @@ index 41906486a71..04551e095bd 100644
common = util/grub.d/01_users.in;
diff --git a/util/grub.d/01_menu_auto_hide.in b/util/grub.d/01_menu_auto_hide.in
new file mode 100644
index 00000000000..ad175870a54
index 0000000000..ad175870a5
--- /dev/null
+++ b/util/grub.d/01_menu_auto_hide.in
@@ -0,0 +1,48 @@
@ -120,7 +114,7 @@ index 00000000000..ad175870a54
+fi
+EOF
diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
index 4b27bd20153..3c9431cfcfb 100644
index 4b27bd2015..3c9431cfcf 100644
--- a/util/grub.d/30_os-prober.in
+++ b/util/grub.d/30_os-prober.in
@@ -42,6 +42,7 @@ if [ -z "${OSPROBED}" ] ; then

View File

@ -31,24 +31,28 @@ and a symlink to grub-boot-success.timer should be added to
/lib/systemd/user/timers.target.wants.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
[makhomed: grub-boot-success.timer: Only run if not in a container]
Signed-off-by: Gena Makhomed <makhomed@gmail.com>
[rharwood: migrate to h2m]
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
Makefile.util.def | 7 ++
util/grub-set-bootflag.c | 160 +++++++++++++++++++++++++++++++++++++++++
util/grub-set-bootflag.c | 172 +++++++++++++++++++++++++++++++++++++++++
conf/Makefile.extra-dist | 3 +
docs/grub-boot-success.service | 6 ++
docs/grub-boot-success.timer | 6 ++
util/grub-set-bootflag.1 | 20 ++++++
6 files changed, 202 insertions(+)
docs/grub-boot-success.timer | 7 ++
docs/man/grub-set-bootflag.h2m | 2 +
6 files changed, 197 insertions(+)
create mode 100644 util/grub-set-bootflag.c
create mode 100644 docs/grub-boot-success.service
create mode 100644 docs/grub-boot-success.timer
create mode 100644 util/grub-set-bootflag.1
create mode 100644 docs/man/grub-set-bootflag.h2m
diff --git a/Makefile.util.def b/Makefile.util.def
index 04551e095bd..c6375933faa 100644
index cb8e3c3270..d066652e9b 100644
--- a/Makefile.util.def
+++ b/Makefile.util.def
@@ -1445,3 +1445,10 @@ program = {
@@ -1429,3 +1429,10 @@ program = {
ldadd = grub-core/lib/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
};
@ -61,10 +65,10 @@ index 04551e095bd..c6375933faa 100644
+};
diff --git a/util/grub-set-bootflag.c b/util/grub-set-bootflag.c
new file mode 100644
index 00000000000..bb198f02351
index 0000000000..d506f7e75b
--- /dev/null
+++ b/util/grub-set-bootflag.c
@@ -0,0 +1,160 @@
@@ -0,0 +1,172 @@
+/* grub-set-bootflag.c - tool to set boot-flags in the grubenv. */
+/*
+ * GRUB -- GRand Unified Bootloader
@ -98,6 +102,8 @@ index 00000000000..bb198f02351
+#include <string.h>
+#include <unistd.h>
+
+#include "progname.h"
+
+#define GRUBENV "/" GRUB_BOOT_DIR_NAME "/" GRUB_DIR_NAME "/" GRUB_ENVBLK_DEFCFG
+#define GRUBENV_SIZE 1024
+
@ -107,13 +113,13 @@ index 00000000000..bb198f02351
+ NULL
+};
+
+static void usage(void)
+static void usage(FILE *out)
+{
+ int i;
+
+ fprintf (stderr, "Usage: 'grub-set-bootflag <bootflag>', where <bootflag> is one of:\n");
+ fprintf (out, "Usage: 'grub-set-bootflag <bootflag>', where <bootflag> is one of:\n");
+ for (i = 0; bootflags[i]; i++)
+ fprintf (stderr, " %s\n", bootflags[i]);
+ fprintf (out, " %s\n", bootflags[i]);
+}
+
+int main(int argc, char *argv[])
@ -126,9 +132,19 @@ index 00000000000..bb198f02351
+
+ if (argc != 2)
+ {
+ usage();
+ usage (stderr);
+ return 1;
+ }
+ else if (!strcmp (argv[1], "--help"))
+ {
+ usage (stdout);
+ return 0;
+ }
+ else if (!strcmp (argv[1], "--version"))
+ {
+ printf ("grub-set-bootflag (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION);
+ return 0;
+ }
+
+ for (i = 0; bootflags[i]; i++)
+ if (!strcmp (argv[1], bootflags[i]))
@ -136,7 +152,7 @@ index 00000000000..bb198f02351
+ if (!bootflags[i])
+ {
+ fprintf (stderr, "Invalid bootflag: '%s'\n", argv[1]);
+ usage();
+ usage (stderr);
+ return 1;
+ }
+
@ -226,10 +242,10 @@ index 00000000000..bb198f02351
+ return 0;
+}
diff --git a/conf/Makefile.extra-dist b/conf/Makefile.extra-dist
index b909f2c073a..ea58362b555 100644
index 8f1485d52a..ad235de7fc 100644
--- a/conf/Makefile.extra-dist
+++ b/conf/Makefile.extra-dist
@@ -14,6 +14,9 @@ EXTRA_DIST += util/import_unicode.py
@@ -15,6 +15,9 @@ EXTRA_DIST += docs/man
EXTRA_DIST += docs/autoiso.cfg
EXTRA_DIST += docs/grub.cfg
EXTRA_DIST += docs/osdetect.cfg
@ -241,7 +257,7 @@ index b909f2c073a..ea58362b555 100644
diff --git a/docs/grub-boot-success.service b/docs/grub-boot-success.service
new file mode 100644
index 00000000000..80e79584c91
index 0000000000..80e79584c9
--- /dev/null
+++ b/docs/grub-boot-success.service
@@ -0,0 +1,6 @@
@ -253,39 +269,22 @@ index 00000000000..80e79584c91
+ExecStart=/usr/sbin/grub2-set-bootflag boot_success
diff --git a/docs/grub-boot-success.timer b/docs/grub-boot-success.timer
new file mode 100644
index 00000000000..5d8fcba21aa
index 0000000000..406f172005
--- /dev/null
+++ b/docs/grub-boot-success.timer
@@ -0,0 +1,6 @@
@@ -0,0 +1,7 @@
+[Unit]
+Description=Mark boot as successful after the user session has run 2 minutes
+ConditionUser=!@system
+ConditionVirtualization=!container
+
+[Timer]
+OnActiveSec=2min
diff --git a/util/grub-set-bootflag.1 b/util/grub-set-bootflag.1
diff --git a/docs/man/grub-set-bootflag.h2m b/docs/man/grub-set-bootflag.h2m
new file mode 100644
index 00000000000..57801da22a0
index 0000000000..94ec0b92ed
--- /dev/null
+++ b/util/grub-set-bootflag.1
@@ -0,0 +1,20 @@
+.TH GRUB-SET-BOOTFLAG 1 "Tue Jun 12 2018"
+.SH NAME
+\fBgrub-set-bootflag\fR \(em Set a bootflag in the GRUB environment block.
+
+.SH SYNOPSIS
+\fBgrub-set-bootflag\fR <\fIBOOTFLAG\fR>
+
+.SH DESCRIPTION
+\fBgrub-set-bootflag\fR is a command line to set bootflags in GRUB's
+stored environment.
+
+.SH COMMANDS
+.TP
+\fBBOOTFLAG\fR
+.RS 7
+Bootflag to set, one of \fIboot_success\fR or \fIshow_menu_once\fR.
+.RE
+
+.SH SEE ALSO
+.BR "info grub"
+++ b/docs/man/grub-set-bootflag.h2m
@@ -0,0 +1,2 @@
+[NAME]
+grub-set-bootflag \- set a bootflag in the GRUB environment block

View File

@ -16,7 +16,7 @@ Signed-off-by: Hans de Goede <hdegoede@redhat.com>
diff --git a/docs/grub-boot-indeterminate.service b/docs/grub-boot-indeterminate.service
new file mode 100644
index 00000000000..6c8dcb186b6
index 0000000000..6c8dcb186b
--- /dev/null
+++ b/docs/grub-boot-indeterminate.service
@@ -0,0 +1,11 @@

View File

@ -9,7 +9,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/gentpl.py b/gentpl.py
index 2cba0bbbd6f..628e8bec1d7 100644
index c86550d4f9..f3c5f84f85 100644
--- a/gentpl.py
+++ b/gentpl.py
@@ -592,11 +592,21 @@ def platform_conditional(platform, closure):

View File

@ -9,7 +9,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
1 file changed, 1 insertion(+)
diff --git a/gentpl.py b/gentpl.py
index 628e8bec1d7..34a4eba2b42 100644
index f3c5f84f85..f09b336869 100644
--- a/gentpl.py
+++ b/gentpl.py
@@ -51,6 +51,7 @@ GROUPS["riscv32"] = [ "riscv32_efi" ]

View File

@ -9,7 +9,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/grub-core/net/efi/net.c b/grub-core/net/efi/net.c
index 4bb308026ce..6603cd83edc 100644
index 4bb308026c..6603cd83ed 100644
--- a/grub-core/net/efi/net.c
+++ b/grub-core/net/efi/net.c
@@ -1324,7 +1324,9 @@ grub_efi_net_boot_from_https (void)

View File

@ -12,7 +12,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
1 file changed, 19 insertions(+)
diff --git a/grub-core/net/efi/http.c b/grub-core/net/efi/http.c
index 3f61fd2fa5b..243acbaa35b 100644
index 3f61fd2fa5..243acbaa35 100644
--- a/grub-core/net/efi/http.c
+++ b/grub-core/net/efi/http.c
@@ -4,6 +4,7 @@

View File

@ -17,10 +17,10 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
3 files changed, 64 insertions(+), 16 deletions(-)
diff --git a/configure.ac b/configure.ac
index b4455e4732d..3405348178a 100644
index 302300711f..008f6c273b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -877,11 +877,23 @@ if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ) && test "x$p
@@ -849,11 +849,23 @@ if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ) && test "x$p
TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow"
fi
@ -45,7 +45,7 @@ index b4455e4732d..3405348178a 100644
AC_CACHE_CHECK([for options to get soft-float], grub_cv_target_cc_soft_float, [
grub_cv_target_cc_soft_float=no
if test "x$target_cpu" = xarm64; then
@@ -2018,6 +2030,41 @@ HOST_CPPFLAGS="$HOST_CPPFLAGS -I\$(top_builddir)/include"
@@ -1954,6 +1966,41 @@ HOST_CPPFLAGS="$HOST_CPPFLAGS -I\$(top_builddir)/include"
TARGET_CPPFLAGS="$TARGET_CPPFLAGS -I\$(top_srcdir)/include"
TARGET_CPPFLAGS="$TARGET_CPPFLAGS -I\$(top_builddir)/include"
@ -88,7 +88,7 @@ index b4455e4732d..3405348178a 100644
GRUB_PLATFORM="${platform}"
diff --git a/conf/Makefile.common b/conf/Makefile.common
index 5f0ef969857..2ff9b39357c 100644
index 5f0ef96985..2ff9b39357 100644
--- a/conf/Makefile.common
+++ b/conf/Makefile.common
@@ -40,24 +40,25 @@ CPPFLAGS_KERNEL = $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM) -DGRUB_KERNEL=1
@ -129,7 +129,7 @@ index 5f0ef969857..2ff9b39357c 100644
# Other variables
diff --git a/gentpl.py b/gentpl.py
index 34a4eba2b42..59f62ef9522 100644
index f09b336869..0e62e14666 100644
--- a/gentpl.py
+++ b/gentpl.py
@@ -697,10 +697,10 @@ def module(defn, platform):

View File

@ -22,7 +22,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
3 files changed, 13 insertions(+)
diff --git a/util/grub-module-verifier32.c b/util/grub-module-verifier32.c
index 257229f8f08..ba7d41aafea 100644
index 257229f8f0..ba7d41aafe 100644
--- a/util/grub-module-verifier32.c
+++ b/util/grub-module-verifier32.c
@@ -1,2 +1,4 @@
@ -31,7 +31,7 @@ index 257229f8f08..ba7d41aafea 100644
#include "grub-module-verifierXX.c"
+#endif
diff --git a/util/grub-module-verifier64.c b/util/grub-module-verifier64.c
index 4db6b4bedd1..fc23ef800b3 100644
index 4db6b4bedd..fc23ef800b 100644
--- a/util/grub-module-verifier64.c
+++ b/util/grub-module-verifier64.c
@@ -1,2 +1,4 @@
@ -40,7 +40,7 @@ index 4db6b4bedd1..fc23ef800b3 100644
#include "grub-module-verifierXX.c"
+#endif
diff --git a/util/grub-module-verifierXX.c b/util/grub-module-verifierXX.c
index ceb24309aec..a98e2f9b1ac 100644
index ceb24309ae..a98e2f9b1a 100644
--- a/util/grub-module-verifierXX.c
+++ b/util/grub-module-verifierXX.c
@@ -1,3 +1,12 @@

View File

@ -13,16 +13,19 @@ grub_fdt_load in xen_boot is not defined
grub_fdt_unload in xen_boot is not defined
Signed-off-by: Peter Jones <pjones@redhat.com>
[javierm: Fix build with platform emu, aarch64, and risc-v]
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
grub-core/Makefile.core.def | 5 ++---
grub-core/lib/fdt.c | 2 --
grub-core/loader/efi/fdt.c | 2 ++
include/grub/fdt.h | 4 ++++
include/grub/fdt.h | 6 ++++++
grub-core/Makefile.am | 1 +
5 files changed, 9 insertions(+), 5 deletions(-)
5 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index c40170f2dd2..84a3d89de9a 100644
index 12797336c9..4e7d90da76 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -177,7 +177,6 @@ kernel = {
@ -50,7 +53,7 @@ index c40170f2dd2..84a3d89de9a 100644
common = loader/linux.c;
common = lib/cmdline.c;
@@ -1836,7 +1836,6 @@ module = {
@@ -1837,7 +1837,6 @@ module = {
module = {
name = fdt;
efi = loader/efi/fdt.c;
@ -59,7 +62,7 @@ index c40170f2dd2..84a3d89de9a 100644
};
diff --git a/grub-core/lib/fdt.c b/grub-core/lib/fdt.c
index 0d371c5633e..37e04bd69e7 100644
index 0d371c5633..37e04bd69e 100644
--- a/grub-core/lib/fdt.c
+++ b/grub-core/lib/fdt.c
@@ -21,8 +21,6 @@
@ -72,7 +75,7 @@ index 0d371c5633e..37e04bd69e7 100644
#define FDT_BEGIN_NODE 0x00000001
diff --git a/grub-core/loader/efi/fdt.c b/grub-core/loader/efi/fdt.c
index c86f283d756..c572415d38a 100644
index c86f283d75..c572415d38 100644
--- a/grub-core/loader/efi/fdt.c
+++ b/grub-core/loader/efi/fdt.c
@@ -27,6 +27,8 @@
@ -85,27 +88,29 @@ index c86f283d756..c572415d38a 100644
static void *fdt;
diff --git a/include/grub/fdt.h b/include/grub/fdt.h
index e609c7e4111..22b7c5463fc 100644
index e609c7e411..3514aa4a5b 100644
--- a/include/grub/fdt.h
+++ b/include/grub/fdt.h
@@ -19,6 +19,8 @@
@@ -19,6 +19,9 @@
#ifndef GRUB_FDT_HEADER
#define GRUB_FDT_HEADER 1
+#if defined(__arm__) || defined(__aarch64__)
+#if !defined(GRUB_MACHINE_EMU) && \
+ (defined(__arm__) || defined(__aarch64__) || defined(__riscv))
+
#include <grub/types.h>
#include <grub/symbol.h>
@@ -144,4 +146,6 @@ int EXPORT_FUNC(grub_fdt_set_prop) (void *fdt, unsigned int nodeoffset, const ch
@@ -144,4 +147,7 @@ int EXPORT_FUNC(grub_fdt_set_prop) (void *fdt, unsigned int nodeoffset, const ch
grub_fdt_set_prop ((fdt), (nodeoffset), "reg", reg_64, 16); \
})
+#endif /* defined(__arm__) || defined(__aarch64__) */
+#endif /* !defined(GRUB_MACHINE_EMU) && \
+ (defined(__arm__) || defined(__aarch64__) || defined(__riscv)) */
+
#endif /* ! GRUB_FDT_HEADER */
diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
index f512573c0da..dd49939aaa9 100644
index bfd29a3bf0..c2e8a82bce 100644
--- a/grub-core/Makefile.am
+++ b/grub-core/Makefile.am
@@ -76,6 +76,7 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/sb.h

View File

@ -9,10 +9,10 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
1 file changed, 20 insertions(+)
diff --git a/configure.ac b/configure.ac
index 3405348178a..152e7dba652 100644
index 008f6c273b..54462e0892 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1288,6 +1288,26 @@ if test "x$target_cpu" = xarm; then
@@ -1260,6 +1260,26 @@ if test "x$target_cpu" = xarm; then
done
])

View File

@ -8,13 +8,15 @@ http_path: /foo/bar
http_url: http://www.example.com/foo/bar
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Stephen Benjamin <stephen@redhat.com>
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
grub-core/kern/main.c | 10 +++++-
grub-core/net/efi/http.c | 82 ++++++++++++++++++++++++++++++++++++------------
2 files changed, 71 insertions(+), 21 deletions(-)
diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c
index 48058d983ce..4ec3f5e4d33 100644
index d1de9fa687..1c540fc8c2 100644
--- a/grub-core/kern/main.c
+++ b/grub-core/kern/main.c
@@ -131,11 +131,19 @@ grub_set_prefix_and_root (void)
@ -39,7 +41,7 @@ index 48058d983ce..4ec3f5e4d33 100644
}
}
diff --git a/grub-core/net/efi/http.c b/grub-core/net/efi/http.c
index 243acbaa35b..de351b2cd03 100644
index 243acbaa35..de351b2cd0 100644
--- a/grub-core/net/efi/http.c
+++ b/grub-core/net/efi/http.c
@@ -9,10 +9,52 @@

View File

@ -10,7 +10,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/grub-core/kern/err.c b/grub-core/kern/err.c
index 53c734de70e..aebfe0cf839 100644
index 53c734de70..aebfe0cf83 100644
--- a/grub-core/kern/err.c
+++ b/grub-core/kern/err.c
@@ -33,15 +33,24 @@ static struct grub_error_saved grub_error_stack_items[GRUB_ERROR_STACK_SIZE];
@ -41,7 +41,7 @@ index 53c734de70e..aebfe0cf839 100644
return n;
diff --git a/include/grub/err.h b/include/grub/err.h
index b08d5d0de4c..c0f90ef07c8 100644
index b08d5d0de4..c0f90ef07c 100644
--- a/include/grub/err.h
+++ b/include/grub/err.h
@@ -85,8 +85,12 @@ struct grub_error_saved

View File

@ -12,7 +12,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/grub-core/commands/reboot.c b/grub-core/commands/reboot.c
index 46d364c99a9..f5cc2283636 100644
index 46d364c99a..f5cc228363 100644
--- a/grub-core/commands/reboot.c
+++ b/grub-core/commands/reboot.c
@@ -32,15 +32,18 @@ grub_cmd_reboot (grub_command_t cmd __attribute__ ((unused)),

View File

@ -1,13 +1,15 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Tue, 11 Sep 2018 14:20:37 -0400
Subject: [PATCH] Add a "version" command.
Subject: [PATCH] Add a "version" command
This adds a command that shows you info about grub's version, the grub target
platform, the compiler version, and if you built with
This adds a command that shows you info about grub's version, the grub
target platform, the compiler version, and if you built with
--with-rpm-version=<string>, the rpm package version.
Signed-off-by: Peter Jones <pjones@redhat.com>
[rharwood: don't say GNU, commit message cleanup]
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
configure.ac | 13 ++++++++++
grub-core/Makefile.core.def | 5 ++++
@ -17,10 +19,10 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
create mode 100644 grub-core/commands/version.c
diff --git a/configure.ac b/configure.ac
index 152e7dba652..cfdac6bed5a 100644
index 54462e0892..7b4e1854d3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -312,6 +312,19 @@ AC_SUBST(target_cpu)
@@ -284,6 +284,19 @@ AC_SUBST(target_cpu)
AC_SUBST(platform)
# Define default variables
@ -41,7 +43,7 @@ index 152e7dba652..cfdac6bed5a 100644
have_with_bootdir=n
AC_ARG_WITH([bootdir],
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index 84a3d89de9a..498ca11762a 100644
index 4e7d90da76..4f203533f5 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -579,6 +579,11 @@ image = {
@ -58,7 +60,7 @@ index 84a3d89de9a..498ca11762a 100644
common = lib/disk.c;
diff --git a/grub-core/commands/version.c b/grub-core/commands/version.c
new file mode 100644
index 00000000000..f0966a518f7
index 0000000000..de0acb07ba
--- /dev/null
+++ b/grub-core/commands/version.c
@@ -0,0 +1,56 @@
@ -97,7 +99,7 @@ index 00000000000..f0966a518f7
+ if (argc != 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("no arguments expected"));
+
+ grub_printf (_("GNU GRUB version %s\n"), PACKAGE_VERSION);
+ grub_printf (_("GRUB version %s\n"), PACKAGE_VERSION);
+ grub_printf (_("Platform %s-%s\n"), GRUB_TARGET_CPU, GRUB_PLATFORM);
+ if (grub_strlen(GRUB_RPM_VERSION) != 0)
+ grub_printf (_("RPM package version %s\n"), GRUB_RPM_VERSION);
@ -119,7 +121,7 @@ index 00000000000..f0966a518f7
+ grub_unregister_command (cmd);
+}
diff --git a/config.h.in b/config.h.in
index 9e8f9911b18..c7e316f0f1f 100644
index 9e8f9911b1..c7e316f0f1 100644
--- a/config.h.in
+++ b/config.h.in
@@ -59,6 +59,7 @@

Some files were not shown because too many files have changed in this diff Show More