Compare commits

...

4 Commits

Author SHA1 Message Date
Peter Jones 407b98f625 Radically rework the build. 2016-03-04 19:56:10 -05:00
Peter Jones e229c7b688 Update debuginfo too
Signed-off-by: Peter Jones <pjones@redhat.com>
2016-03-04 19:47:13 -05:00
Peter Jones 133f7eab29 Minor fixup to our bzrignore fix.
Signed-off-by: Peter Jones <pjones@redhat.com>
2016-03-04 19:39:57 -05:00
Peter Jones 83affdbaa1 make the sb thing work 2016-03-04 19:38:41 -05:00
24 changed files with 776 additions and 490 deletions

View File

@ -0,0 +1,30 @@
From b7a53a6db07b95a94a86a3ceec742a368328fbb1 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Fri, 4 Mar 2016 16:29:13 -0500
Subject: [PATCH] Make grub-editenv build again.
36212460d3565b18439a3a8130b28e6c97702c6a split how some of the mkimage
utility functions are defined, and they wind up being linked into
grub-editenv. Most utilities got fixed, but this one was missed.
Signed-off-by: Peter Jones <pjones@redhat.com>
---
Makefile.util.def | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Makefile.util.def b/Makefile.util.def
index 5598b03..a6d6f6f 100644
--- a/Makefile.util.def
+++ b/Makefile.util.def
@@ -236,6 +236,8 @@ program = {
extra_dist = grub-core/osdep/unix/compress.c;
extra_dist = grub-core/osdep/basic/compress.c;
common = util/mkimage.c;
+ common = util/grub-mkimage32.c;
+ common = util/grub-mkimage64.c;
common = grub-core/osdep/config.c;
common = util/config.c;
common = util/resolve.c;
--
2.5.0

View File

@ -8,14 +8,14 @@ system and .gitignore, so solve that slightly better.
Signed-off-by: Peter Jones <pjones@redhat.com>
---
.gitignore | 265 ++++++++++++++++++++++++++++---------------------------------
1 file changed, 120 insertions(+), 145 deletions(-)
.gitignore | 256 ++++++++++++++++++++++++++++---------------------------------
1 file changed, 118 insertions(+), 138 deletions(-)
diff --git a/.gitignore b/.gitignore
index 18ab8e8..06c9f3a 100644
index 2b0156a..523ee65 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,93 +1,154 @@
@@ -1,32 +1,57 @@
-00_header
-10_*
-20_linux_xen
@ -82,11 +82,9 @@ index 18ab8e8..06c9f3a 100644
-DISTLIST
+depcomp
docs/*.info
+docs/stamp-1
docs/stamp-vti
+docs/version-dev.texi
docs/version.texi
ehci_test
@@ -34,56 +59,94 @@ ehci_test
example_grub_script_test
example_scripted_test
example_unit_test
@ -177,8 +175,6 @@ index 18ab8e8..06c9f3a 100644
-grub-emu-lite.exe
grub_emu_init.c
grub_emu_init.h
-/grub-file
-/grub-file.exe
-grub-fstest
-grub-fstest.exe
grub_fstest_init.c
@ -187,8 +183,6 @@ index 18ab8e8..06c9f3a 100644
-grub-install
-grub-install.exe
-grub-kbdcomp
-/grub-macbless
-/grub-macbless.exe
-grub-macho2img
-/grub-menulst2cfg
-/grub-menulst2cfg.exe
@ -214,7 +208,7 @@ index 18ab8e8..06c9f3a 100644
grub_script_check_init.c
grub_script_check_init.h
grub_script_comments
@@ -113,136 +174,50 @@ grub_script_strcmp
@@ -109,133 +172,50 @@ grub_script_strcmp
grub_script_test
grub_script_vars1
grub_script_while1
@ -229,8 +223,6 @@ index 18ab8e8..06c9f3a 100644
-grub-shell-tester
-grub-sparc64-setup
-grub-sparc64-setup.exe
-/grub-syslinux2cfg
-/grub-syslinux2cfg.exe
gzcompress_test
hddboot_test
help_test
@ -318,7 +310,6 @@ index 18ab8e8..06c9f3a 100644
-grub-core/*.module
-grub-core/*.module.exe
-grub-core/*.pp
-grub-core/kernel.img.bin
+update-grub_lib
util/bash-completion.d/grub
-grub-core/gnulib/alloca.h
@ -365,7 +356,7 @@ index 18ab8e8..06c9f3a 100644
-/garbage-gen
-/garbage-gen.exe
-/grub-fs-tester
+xzcompress_test
+xcompress_test
--
2.5.0

View File

@ -1,4 +1,4 @@
From f1896dc881b276559079773ba666266979df2f74 Mon Sep 17 00:00:00 2001
From 4e639612f9fc52febf43a070a845d4ab2d6c8c39 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Tue, 6 Oct 2015 16:09:25 -0400
Subject: [PATCH 74/85] Make any of the loaders that link in efi mode honor
@ -24,9 +24,17 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
grub-core/loader/xnu.c | 7 +++++
include/grub/efi/efi.h | 1 -
include/grub/efi/sb.h | 29 +++++++++++++++++++
15 files changed, 146 insertions(+), 29 deletions(-)
include/grub/ia64/linux.h | 0
include/grub/mips/linux.h | 0
include/grub/powerpc/linux.h | 0
include/grub/sparc64/linux.h | 0
19 files changed, 146 insertions(+), 29 deletions(-)
create mode 100644 grub-core/kern/efi/sb.c
create mode 100644 include/grub/efi/sb.h
create mode 100644 include/grub/ia64/linux.h
create mode 100644 include/grub/mips/linux.h
create mode 100644 include/grub/powerpc/linux.h
create mode 100644 include/grub/sparc64/linux.h
diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
index 04e9395..fd715a8 100644
@ -469,6 +477,18 @@ index 0000000..9629fbb
+int EXPORT_FUNC (grub_efi_secure_boot) (void);
+
+#endif /* ! GRUB_EFI_SB_HEADER */
diff --git a/include/grub/ia64/linux.h b/include/grub/ia64/linux.h
new file mode 100644
index 0000000..e69de29
diff --git a/include/grub/mips/linux.h b/include/grub/mips/linux.h
new file mode 100644
index 0000000..e69de29
diff --git a/include/grub/powerpc/linux.h b/include/grub/powerpc/linux.h
new file mode 100644
index 0000000..e69de29
diff --git a/include/grub/sparc64/linux.h b/include/grub/sparc64/linux.h
new file mode 100644
index 0000000..e69de29
--
2.5.0

View File

@ -1,4 +1,4 @@
From a33e256429267872f469a2d3d1e36ac3721369b3 Mon Sep 17 00:00:00 2001
From dda55cb76ec00d2c2adab83153a7e423f37a13cc Mon Sep 17 00:00:00 2001
From: Hector Marco-Gisbert <hecmargi@upv.es>
Date: Fri, 13 Nov 2015 16:21:09 +0100
Subject: [PATCH 75/85] Fix security issue when reading username and password

View File

@ -1,4 +1,4 @@
From 9e51bd34baf8c705380abb4dc4b3847c11c93829 Mon Sep 17 00:00:00 2001
From 306ae3bc0f75dd256369a7fd276e7514960ac1e5 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Wed, 27 Jan 2016 09:22:42 -0500
Subject: [PATCH 76/85] Make grub_fatal() also backtrace.

View File

@ -1,4 +1,4 @@
From 59e54f473afa4e4f67dde8f11a33cb8490496086 Mon Sep 17 00:00:00 2001
From 2769effc6c6748bc052fba1ef056f947ec18ce13 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg59@coreos.com>
Date: Tue, 14 Jul 2015 17:06:35 -0700
Subject: [PATCH 77/85] Core TPM support

View File

@ -1,4 +1,4 @@
From 878a4bed6479ccfbde4ba8dc3c2c029f12fba708 Mon Sep 17 00:00:00 2001
From bbe1cc401422d94afcafe038214ce913d9b6f62d Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg59@coreos.com>
Date: Thu, 16 Jul 2015 15:22:34 -0700
Subject: [PATCH 78/85] Measure kernel + initrd

View File

@ -1,4 +1,4 @@
From b727ffaee53c9f3ee9ab1497441e378d77a5af6d Mon Sep 17 00:00:00 2001
From e8bfb815e20c465300f35cdda330538f914db53f Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg59@coreos.com>
Date: Sun, 9 Aug 2015 15:48:51 -0700
Subject: [PATCH 79/85] Add BIOS boot measurement

View File

@ -1,4 +1,4 @@
From 6ef376d234cf06ef3e92d77b03fa4060516a218c Mon Sep 17 00:00:00 2001
From e0a789bd0dd376e62dbf42c42f878c42013a36f6 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg59@coreos.com>
Date: Sun, 9 Aug 2015 16:12:39 -0700
Subject: [PATCH 80/85] Rework linux command

View File

@ -1,4 +1,4 @@
From 9992eed98ad0d7d66444185a9cd2c81df5b4e1b2 Mon Sep 17 00:00:00 2001
From 63cb42a79b680f354397313345941ca614279be6 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg59@coreos.com>
Date: Sun, 9 Aug 2015 16:20:58 -0700
Subject: [PATCH 81/85] Rework linux16 command

View File

@ -1,4 +1,4 @@
From f4d862215e8d693018f419be33a0a3a7c3e79d29 Mon Sep 17 00:00:00 2001
From abfa3755dd87461d33b884520747983ad938b4d4 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg59@coreos.com>
Date: Sun, 9 Aug 2015 16:28:29 -0700
Subject: [PATCH 82/85] Measure kernel and initrd on BIOS systems

View File

@ -1,4 +1,4 @@
From 6bcfc6f286d099a26cc0c7a00a6458d1d7993485 Mon Sep 17 00:00:00 2001
From 97d4a9d6f5432130dde624c99e8402cb8b641394 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg59@coreos.com>
Date: Sun, 9 Aug 2015 16:32:29 -0700
Subject: [PATCH 83/85] Measure the kernel commandline

View File

@ -1,4 +1,4 @@
From 4f316cbb70563a26a8cb42ce5122c198cfd3636d Mon Sep 17 00:00:00 2001
From 6bd3eaeac50254fdb0c6830fb4e1808a8ba465d6 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg59@srcf.ucam.org>
Date: Mon, 10 Aug 2015 15:27:12 -0700
Subject: [PATCH 84/85] Measure commands

View File

@ -1,4 +1,4 @@
From 85e100453d04e56088e4b9782d2f06dc0122587f Mon Sep 17 00:00:00 2001
From c2b1a3b2cb9ec3d9f8f0b45d6a7c8564d4d64742 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg59@coreos.com>
Date: Tue, 1 Sep 2015 16:02:55 -0700
Subject: [PATCH 85/85] Measure multiboot images and modules

View File

@ -1,7 +1,7 @@
From b29ab8b194e3543aa481568e4af0e9ffbad01636 Mon Sep 17 00:00:00 2001
From 1b2af2de1b5d9d5780cf6803124c18f460466c3c Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Tue, 21 Jul 2015 20:30:00 -0400
Subject: [PATCH 1/6] Put the correct .file directives in our .S files.
Subject: [PATCH 10001/10006] Put the correct .file directives in our .S files.
The wrong path makes generating debuginfo not work correctly.
@ -41,10 +41,10 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
31 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/grub-core/boot/i386/pc/boot.S b/grub-core/boot/i386/pc/boot.S
index ea167fe..96ced2f 100644
index c1df86d..8eb8fc8 100644
--- a/grub-core/boot/i386/pc/boot.S
+++ b/grub-core/boot/i386/pc/boot.S
@@ -108,7 +108,7 @@ cylinder_start:
@@ -112,7 +112,7 @@ cylinder_start:
/* more space... */
.endm
@ -67,10 +67,10 @@ index de4f809..d30b4be 100644
#define CODE_ADDR 0x6000
#define DATA_ADDR ((GRUB_BOOT_MACHINE_KERNEL_ADDR) + 0x200)
diff --git a/grub-core/boot/i386/pc/diskboot.S b/grub-core/boot/i386/pc/diskboot.S
index c8b87ed..14c6d83 100644
index 05dd7fa..9c0b32a 100644
--- a/grub-core/boot/i386/pc/diskboot.S
+++ b/grub-core/boot/i386/pc/diskboot.S
@@ -25,7 +25,7 @@
@@ -27,7 +27,7 @@
#define MSG(x) movw $x, %si; call LOCAL(message)
@ -360,7 +360,7 @@ index a5373d3..6f58685 100644
GRUB_MOD_LICENSE "GPLv3+"
diff --git a/grub-core/lib/arm64/setjmp.S b/grub-core/lib/arm64/setjmp.S
index eabfd99..006660b 100644
index ffcabf6..7755d06 100644
--- a/grub-core/lib/arm64/setjmp.S
+++ b/grub-core/lib/arm64/setjmp.S
@@ -19,7 +19,7 @@
@ -399,12 +399,12 @@ index a0382d8..dba2cbf 100644
GRUB_MOD_LICENSE "GPLv2+"
diff --git a/grub-core/lib/mips/setjmp.S b/grub-core/lib/mips/setjmp.S
index f012945..365824c 100644
index 895235b..fa9c16e 100644
--- a/grub-core/lib/mips/setjmp.S
+++ b/grub-core/lib/mips/setjmp.S
@@ -19,7 +19,7 @@
#include <grub/symbol.h>
@@ -20,7 +20,7 @@
#include <grub/dl.h>
#include <grub/mips/asm.h>
- .file "setjmp.S"
+ .file "grub-core/lib/mips/setjmp.S"
@ -451,5 +451,5 @@ index 6b151bc..c975897 100644
GRUB_MOD_LICENSE "GPLv3+"
--
2.4.3
2.5.0

View File

@ -1,79 +0,0 @@
From 5804ce3d46ef5792ea4aa53e1460c341137961e9 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Thu, 25 Jun 2015 11:59:09 -0400
Subject: [PATCH 2/6] Make efi machines load an env block from a variable
Signed-off-by: Peter Jones <pjones@redhat.com>
---
grub-core/Makefile.core.def | 1 +
grub-core/kern/efi/init.c | 32 ++++++++++++++++++++++++++++++++
2 files changed, 33 insertions(+)
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index 38291ce..b3ba5ed 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -174,6 +174,7 @@ kernel = {
efi = kern/efi/init.c;
efi = kern/efi/mm.c;
efi = term/efi/console.c;
+ efi = lib/envblk.c;
x86 = kern/i386/tsc.c;
diff --git a/grub-core/kern/efi/init.c b/grub-core/kern/efi/init.c
index e9c85de..d17d18e 100644
--- a/grub-core/kern/efi/init.c
+++ b/grub-core/kern/efi/init.c
@@ -25,9 +25,40 @@
#include <grub/env.h>
#include <grub/mm.h>
#include <grub/kernel.h>
+#include <grub/lib/envblk.h>
grub_addr_t grub_modbase;
+#define GRUB_EFI_GRUB_VARIABLE_GUID \
+ { 0x91376aff, 0xcba6, 0x42be, \
+ { 0x94, 0x9d, 0x06, 0xfd, 0xe8, 0x11, 0x28, 0xe8 } \
+ }
+
+/* Helper for grub_efi_env_init */
+static int
+set_var (const char *name, const char *value,
+ void *whitelist __attribute__((__unused__)))
+{
+ grub_env_set (name, value);
+ return 0;
+}
+
+static void
+grub_efi_env_init (void)
+{
+ grub_efi_guid_t efi_grub_guid = GRUB_EFI_GRUB_VARIABLE_GUID;
+ struct grub_envblk envblk_s = { NULL, 0 };
+ grub_envblk_t envblk = &envblk_s;
+
+ envblk_s.buf = grub_efi_get_variable ("GRUB_ENV", &efi_grub_guid,
+ &envblk_s.size);
+ if (!envblk_s.buf || envblk_s.size < 1)
+ return;
+
+ grub_envblk_iterate (envblk, NULL, set_var);
+ grub_free (envblk_s.buf);
+}
+
void
grub_efi_init (void)
{
@@ -42,6 +73,7 @@ grub_efi_init (void)
efi_call_4 (grub_efi_system_table->boot_services->set_watchdog_timer,
0, 0, 0, NULL);
+ grub_efi_env_init ();
grub_efidisk_init ();
}
--
2.4.3

View File

@ -1,7 +1,7 @@
From bdcd66a767a861370e55a3c2d624383a1f2ec2f5 Mon Sep 17 00:00:00 2001
From 5334ed8ae9c8f15928139be986a1e877e9837630 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Thu, 25 Jun 2015 15:41:06 -0400
Subject: [PATCH 3/6] Make it possible to enabled --build-id=sha1
Subject: [PATCH 10002/10006] Make it possible to enabled --build-id=sha1
Signed-off-by: Peter Jones <pjones@redhat.com>
---
@ -10,7 +10,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
2 files changed, 27 insertions(+)
diff --git a/acinclude.m4 b/acinclude.m4
index 609c4f2..8dd0989 100644
index 526f97a..48ccecc 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -136,6 +136,25 @@ if test "x$grub_cv_prog_ld_build_id_none" = xyes; then
@ -40,10 +40,10 @@ index 609c4f2..8dd0989 100644
AC_DEFUN([grub_PROG_NM_WORKS],
[AC_MSG_CHECKING([whether nm works])
diff --git a/configure.ac b/configure.ac
index 991cb15..8d780e3 100644
index d6ef6c3..3e897bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1202,7 +1202,15 @@ grub_PROG_TARGET_CC
@@ -1323,7 +1323,15 @@ grub_PROG_TARGET_CC
if test "x$TARGET_APPLE_LINKER" != x1 ; then
grub_PROG_OBJCOPY_ABSOLUTE
fi
@ -60,5 +60,5 @@ index 991cb15..8d780e3 100644
if test "$platform" != emu && test "x$TARGET_APPLE_LINKER" != x1 ; then
if test ! -z "$TARGET_IMG_LDSCRIPT"; then
--
2.4.3
2.5.0

View File

@ -1,14 +1,15 @@
From 22ba237a041b493cd0b7bb3e1c3fcd0a34dbdc2d Mon Sep 17 00:00:00 2001
From ddc6702d0b258e12f67f0df7c3c915a04ede1067 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Sun, 28 Jun 2015 17:57:24 -0400
Subject: [PATCH 4/6] Don't tell the compiler to do annoying things with -f.
Subject: [PATCH 10003/10006] Don't tell the compiler to do annoying things
with -f.
---
configure.ac | 34 ++--------------------------------
1 file changed, 2 insertions(+), 32 deletions(-)
configure.ac | 48 ++----------------------------------------------
1 file changed, 2 insertions(+), 46 deletions(-)
diff --git a/configure.ac b/configure.ac
index 8d780e3..5e2529a 100644
index 3e897bd..65f7f43 100644
--- a/configure.ac
+++ b/configure.ac
@@ -548,8 +548,8 @@ LDFLAGS="$TARGET_LDFLAGS"
@ -22,7 +23,7 @@ index 8d780e3..5e2529a 100644
if test "x$target_cpu" != xi386 && test "x$target_cpu" != xx86_64; then
TARGET_CFLAGS="$TARGET_CFLAGS -Wcast-align"
@@ -809,21 +809,6 @@ if test x"$target_cpu" = xsparc64 ; then
@@ -908,21 +908,6 @@ if test x"$target_cpu" = xsparc64 ; then
TARGET_LDFLAGS="$TARGET_LDFLAGS $grub_cv_target_cc_mno_relax"
fi
@ -44,16 +45,17 @@ index 8d780e3..5e2529a 100644
if test x"$target_os" = xcygwin; then
AC_CACHE_CHECK([whether option -fno-reorder-functions works], grub_cv_cc_no_reorder_functions, [
CFLAGS="$TARGET_CFLAGS -fno-reorder-functions"
@@ -837,21 +822,6 @@ if test x"$target_os" = xcygwin && test "x$grub_cv_cc_no_reorder_functions" = xy
TARGET_CFLAGS="$TARGET_CFLAGS -fno-reorder-functions"
@@ -947,37 +932,8 @@ if test "x$grub_cv_cc_mno_stack_arg_probe" = xyes; then
TARGET_CFLAGS="$TARGET_CFLAGS -mno-stack-arg-probe"
fi
-
-# By default, GCC 4.6 generates .eh_frame sections containing unwind
-# information in some cases where it previously did not. GRUB doesn't need
-# these and they just use up vital space. Restore the old compiler
-# behaviour.
-AC_CACHE_CHECK([whether -fno-asynchronous-unwind-tables works], [grub_cv_cc_fno_asynchronous_unwind_tables], [
- CFLAGS="$TARGET_CFLAGS -fno-dwarf2-cfi-asm"
- CFLAGS="$TARGET_CFLAGS -fno-asynchronous-unwind-tables"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
- [grub_cv_cc_fno_asynchronous_unwind_tables=yes],
- [grub_cv_cc_fno_asynchronous_unwind_tables=no])
@ -63,9 +65,24 @@ index 8d780e3..5e2529a 100644
- TARGET_CFLAGS="$TARGET_CFLAGS -fno-asynchronous-unwind-tables"
-fi
-
AC_ARG_ENABLE([efiemu],
[AS_HELP_STRING([--enable-efiemu],
[build and install the efiemu runtimes (default=guessed)])])
-AC_CACHE_CHECK([whether -fno-unwind-tables works], [grub_cv_cc_fno_unwind_tables], [
- CFLAGS="$TARGET_CFLAGS -fno-unwind-tables"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
- [grub_cv_cc_fno_unwind_tables=yes],
- [grub_cv_cc_fno_unwind_tables=no])
-])
-
-if test "x$grub_cv_cc_fno_unwind_tables" = xyes; then
- TARGET_CFLAGS="$TARGET_CFLAGS -fno-unwind-tables"
-fi
-
-
CFLAGS="$TARGET_CFLAGS"
-
if test x"$platform" = xemu ; then
TARGET_OBJ2ELF=
grub_cv_target_cc_link_format=
--
2.4.3
2.5.0

View File

@ -1,7 +1,7 @@
From fa89f53a982350e80fcabbceb8c7066636b30761 Mon Sep 17 00:00:00 2001
From 5e50fc35ba1c2f03cc9ccbd6ae2f49dcb0ffd560 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Sun, 28 Jun 2015 13:09:58 -0400
Subject: [PATCH 5/6] Add grub_qdprintf() - grub_dprintf() without the
Subject: [PATCH 10004/10006] Add grub_qdprintf() - grub_dprintf() without the
file+line number.
This just makes copy+paste of our debug loading info easier.
@ -13,10 +13,10 @@ 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 be6aa63..71f597d 100644
index d7dcd97..8e12a62 100644
--- a/grub-core/kern/misc.c
+++ b/grub-core/kern/misc.c
@@ -178,6 +178,24 @@ grub_real_dprintf (const char *file, const int line, const char *condition,
@@ -179,6 +179,24 @@ grub_real_dprintf (const char *file, const int line, const char *condition,
}
}
@ -42,7 +42,7 @@ index be6aa63..71f597d 100644
int
diff --git a/include/grub/misc.h b/include/grub/misc.h
index 2a9f87c..da44520 100644
index 0620814..4cb1ba5 100644
--- a/include/grub/misc.h
+++ b/include/grub/misc.h
@@ -326,6 +326,8 @@ void EXPORT_FUNC(grub_real_dprintf) (const char *file,
@ -55,5 +55,5 @@ index 2a9f87c..da44520 100644
int EXPORT_FUNC(grub_snprintf) (char *str, grub_size_t n, const char *fmt, ...)
__attribute__ ((format (GNU_PRINTF, 3, 4)));
--
2.4.3
2.5.0

View File

@ -1,7 +1,8 @@
From 2053c4610482deff681feb96f2637933c44f8f3f Mon Sep 17 00:00:00 2001
From 5dbc4254266d8d8d64d5d2fe2ad02ff200f4a7a6 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Thu, 25 Jun 2015 15:11:36 -0400
Subject: [PATCH 6/6] Make a "gdb" dprintf that tells us load addresses.
Subject: [PATCH 10005/10006] Make a "gdb" dprintf that tells us load
addresses.
This makes a grub_dprintf() call during platform init and during module
loading that tells us the virtual addresses of the .text and .data
@ -20,10 +21,10 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
4 files changed, 81 insertions(+), 4 deletions(-)
diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
index 58931fa..82c7abd 100644
index 247cd0a..f29691c 100644
--- a/grub-core/kern/dl.c
+++ b/grub-core/kern/dl.c
@@ -453,6 +453,24 @@ grub_dl_find_section (Elf_Ehdr *e, const char *name)
@@ -457,6 +457,24 @@ grub_dl_find_section (Elf_Ehdr *e, const char *name)
return NULL;
}
@ -48,7 +49,7 @@ index 58931fa..82c7abd 100644
/* Me, Vladimir Serbinenko, hereby I add this module check as per new
GNU module policy. Note that this license check is informative only.
Modules have to be licensed under GPLv3 or GPLv3+ (optionally
@@ -593,6 +611,38 @@ grub_dl_relocate_symbols (grub_dl_t mod, void *ehdr)
@@ -600,6 +618,38 @@ grub_dl_relocate_symbols (grub_dl_t mod, void *ehdr)
return GRUB_ERR_NONE;
}
@ -87,7 +88,7 @@ index 58931fa..82c7abd 100644
/* Load a module from core memory. */
grub_dl_t
grub_dl_load_core_noinit (void *addr, grub_size_t size)
@@ -651,6 +701,8 @@ grub_dl_load_core_noinit (void *addr, grub_size_t size)
@@ -658,6 +708,8 @@ grub_dl_load_core_noinit (void *addr, grub_size_t size)
grub_dprintf ("modules", "module name: %s\n", mod->name);
grub_dprintf ("modules", "init function: %p\n", mod->init);
@ -97,10 +98,10 @@ index 58931fa..82c7abd 100644
{
grub_dl_unload (mod);
diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
index 95c75d4..d757b2a 100644
index 101307f..7492f9d 100644
--- a/grub-core/kern/efi/efi.c
+++ b/grub-core/kern/efi/efi.c
@@ -298,7 +298,7 @@ grub_efi_secure_boot (void)
@@ -274,7 +274,7 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid,
/* Search the mods section from the PE32/PE32+ image. This code uses
a PE32 header, but should work with PE32+ as well. */
grub_addr_t
@ -109,7 +110,7 @@ index 95c75d4..d757b2a 100644
{
grub_efi_loaded_image_t *image;
struct grub_pe32_header *header;
@@ -312,6 +312,7 @@ grub_efi_modules_addr (void)
@@ -288,6 +288,7 @@ grub_efi_modules_addr (void)
if (! image)
return 0;
@ -117,7 +118,7 @@ index 95c75d4..d757b2a 100644
header = image->image_base;
coff_header = &(header->coff_header);
sections
@@ -323,7 +324,7 @@ grub_efi_modules_addr (void)
@@ -299,7 +300,7 @@ grub_efi_modules_addr (void)
i < coff_header->num_sections;
i++, section++)
{
@ -127,7 +128,7 @@ index 95c75d4..d757b2a 100644
}
diff --git a/grub-core/kern/efi/init.c b/grub-core/kern/efi/init.c
index d17d18e..86935c6 100644
index a5b6c1d..9939fde 100644
--- a/grub-core/kern/efi/init.c
+++ b/grub-core/kern/efi/init.c
@@ -59,10 +59,33 @@ grub_efi_env_init (void)
@ -174,10 +175,10 @@ index d17d18e..86935c6 100644
}
diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h
index 2245632..6aa0106 100644
index 9a2da0e..37d57d8 100644
--- a/include/grub/efi/efi.h
+++ b/include/grub/efi/efi.h
@@ -85,7 +85,7 @@ extern void (*EXPORT_VAR(grub_efi_net_config)) (grub_efi_handle_t hnd,
@@ -84,7 +84,7 @@ extern void (*EXPORT_VAR(grub_efi_net_config)) (grub_efi_handle_t hnd,
char **device,
char **path);
@ -187,5 +188,5 @@ index 2245632..6aa0106 100644
void grub_efi_mm_init (void);
void grub_efi_mm_fini (void);
--
2.4.3
2.5.0

View File

@ -0,0 +1,66 @@
From ede25cf0ee4a6078f21d580f10d62de238b1729b Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Wed, 22 Jul 2015 16:09:59 -0400
Subject: [PATCH 10006/10006] Try it in gentpl again...
---
grub-core/Makefile.core.def | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index 9fa9790..eed40d2 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -44,6 +44,18 @@ transform_data = {
enable = powerpc_ieee1275;
};
+library = {
+ name = kernel_noemu_nodist_symlist.a;
+ noemu_nodist = symlist.c;
+ ia64_efi_cflags = '-fno-builtin -fpic -minline-int-divide-max-throughput -g0';
+ x86_64_xen_cppflags = '$(CPPFLAGS_XEN) -g0';
+ i386_xen_cppflags = '$(CPPFLAGS_XEN) -g0';
+ mips_arc_cppflags = '-DGRUB_DECOMPRESSOR_LINK_ADDR=$(TARGET_DECOMPRESSOR_LINK_ADDR) -g0';
+ i386_qemu_cppflags = '-DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR) -g0';
+ emu_cflags = '$(CFLAGS_GNULIB) -g0';
+ emu_cppflags = '$(CPPFLAGS_GNULIB) -g0';
+};
+
kernel = {
name = kernel;
@@ -133,7 +145,7 @@ kernel = {
noemu = kern/time.c;
noemu = kern/generic/millisleep.c;
- noemu_nodist = symlist.c;
+ ldadd = kernel_noemu_nodist_symlist.a;
mips = kern/generic/rtc_get_time_ms.c;
@@ -350,6 +362,13 @@ program = {
enable = emu;
};
+library = {
+ name = emu_nodist_symlist.a;
+ emu_nodist = symlist.c;
+ cflags = '-g0';
+ cppflags = '-g0';
+};
+
program = {
name = grub-emu-lite;
@@ -357,6 +376,7 @@ program = {
emu_nodist = symlist.c;
ldadd = 'kernel.exec$(EXEEXT)';
+ ldadd = emu_nodist_symlist.a;
ldadd = 'gnulib/libgnu.a $(LIBINTL) $(LIBUTIL) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
enable = emu;
--
2.5.0

405
grub.macros Normal file
View File

@ -0,0 +1,405 @@
# vim:filetype=spec
# Modules always contain just 32-bit code
%global _libdir %{_exec_prefix}/lib
%global _binaries_in_noarch_packages_terminate_build 0
#%%undefine _missing_build_ids_terminate_build
%{expand:%%{!?buildsubdir:%%global buildsubdir grub-%{tarversion}}}
%{expand:%%{!?_licensedir:%%global license %%%%doc}}
%if %{?_with_ccache: 1}%{?!_with_ccache: 0}
%global cc_equals CC=/usr/%{_lib}/ccache/gcc
%else
%global cc_equals %{nil}
%endif
%global with_efi_arch 0
%global with_alt_efi_arch 0
%global with_legacy_arch 0
%global grubefiarch %{nil}
%global grublegacyarch %{nil}
# sparc is always compiled 64 bit
%ifarch %{sparc}
%global target_cpu_name sparc64
%global _target_platform %{target_cpu_name}-%{_vendor}-%{_target_os}%{?_gnu}
%global legacy_target_cpu_name %{_arch}
%global platform ieee1275
%endif
# ppc is always compiled 64 bit
%ifarch ppc ppc64 ppc64le
%global target_cpu_name %{_arch}
%global legacy_target_cpu_name %{_arch}
%global _target_platform %{target_cpu_name}-%{_vendor}-%{_target_os}%{?_gnu}
%global platform ieee1275
%endif
%global efi_only aarch64 %{arm}
%global efi_arch x86_64 ia64 %{efi_only}
%ifnarch %{efi_arch}
%global no_efi_arch %{_arch}
%else
%global no_efi_arch blah_blah_blah_this_is_not_your_arch_blah_blah_blah
%endif
### fixme
%ifarch aarch64 %{arm}
%global efi_modules " linux "
%else
%global efi_modules " backtrace usb usbserial_common usbserial_pl2303 usbserial_ftdi usbserial_usbdebug linuxefi "
%endif
%ifarch x86_64
%global efiarch x64
%global target_cpu_name %{_arch}
%global legacy_target_cpu_name i386
%global platform pc
%global alt_efi_arch ia32
%global alt_target_cpu_name i386
%global alt_platform efi
%endif
%ifarch aarch64
%global efiarch aa64
%global target_cpu_name arm64
%endif
%ifarch %{arm}
%global efiarch arm
%global target_cpu_name arm
%endif
%global _target_platform %{target_cpu_name}-%{_vendor}-%{_target_os}%{?_gnu}
%global grub2_tools_files "grub2-tools-files.list"
%global grub2_tools_debugfiles_ignore "%{expand:%%{?buildsubdir:%%{buildsubdir}/}}grub2-tools-debugfiles.list"
%global grub2_tools_debugfiles "grub2-tools-debugfiles.list"
%global grub2_files "grub2-files.list"
%global grub2_debugfiles_ignore "%{expand:%%{?buildsubdir:%%{buildsubdir}/}}grub2-other-debugfiles.list"
%global grub2_debugfiles "grub2-debugfiles.list"
%global _find_debuginfo_opts \\\
-l %{grub2_files} \\\
-o %{grub2_debugfiles} \\\
-l %{grub2_tools_files} \\\
-o %{grub2_tools_debugfiles} \\\
%{nil}
%ifarch %{efi_arch}
%global with_efi_arch 1
%global grubefiname grub%{efiarch}.efi
%global grubeficdname gcd%{efiarch}.efi
%global grubefiarch %{target_cpu_name}-efi
%endif
%if 0%{?alt_efi_arch:1}
%global with_alt_efi_arch 1
%global grubaltefiname grub%{alt_efi_arch}.efi
%global grubalteficdname gcd%{alt_efi_arch}.efi
%global grubaltefiarch %{alt_target_cpu_name}-efi
%endif
# Figure out the right file path to use
%global efidir %(eval echo $(grep ^ID= /etc/os-release | sed -e 's/^ID=//' -e 's/rhel/redhat/'))
%global grub2_efi_files "grub2-efi-files.list"
%if 0
%global grub2_efi_debugfiles_ignore "%{expand:%%{?buildsubdir:%%{buildsubdir}/}}%{name}-modules-%{grubefiarch}-debugfiles.list"
%global grub2_efi_debugfiles "%{name}-modules-%{grubefiarch}-debugfiles.list"
%global _find_debuginfo_opts %{_find_debuginfo_opts} \\\
-l %{expand:%%{grub2_efi_files}} \\\
-o %{expand:%%{grub2_efi_debugfiles}} \\\
%{nil}
%else
%global _find_debuginfo_opts %{_find_debuginfo_opts} \\\
%{nil}
%endif
%ifnarch %{efi_only}
%global with_legacy_arch 1
%global grublegacyarch %{legacy_target_cpu_name}-%{platform}
%global grub2_legacy_files "grub2-legacy-files.list"
%global grub2_legacy_debugfiles_ignore "%{expand:%%{?buildsubdir:%%{buildsubdir}/}}%{name}-modules-%{grublegacyarch}-debugfiles.list"
%global grub2_legacy_debugfiles "%{name}-modules-%{grublegacyarch}-debugfiles.list"
%global _find_debuginfo_opts %{_find_debuginfo_opts} \\\
-l %{expand:%%{grub2_legacy_files}} \\\
-o %{expand:%%{grub2_legacy_debugfiles}} \\\
-l %{expand:%%{grub2_files}} \\\
-o %{expand:%%{grub2_debugfiles}} \\\
%{nil}
%endif
%global efi_cflags %(echo %{optflags} | \\\
sed \\\
-e 's/-O./-g3/g' \\\
-e 's/-fstack-protector[[:alpha:]-]\\+//g' \\\
-e 's/-Wp,-D_FORTIFY_SOURCE=[[:digit:]]\\+//g' \\\
-e 's/--param=ssp-buffer-size=4//g' \\\
-e 's/-mregparm=3/-mregparm=4/g' \\\
-e 's/-fexceptions//g' \\\
-e 's/-fasynchronous-unwind-tables//g' \\\
-e 's/^/ -fno-strict-aliasing /' ) %{nil}
%global legacy_cflags %(echo %{efi_cflags} | \\\
sed \\\
-e 's/-m64//g' \\\
-e 's/-mcpu=power7/-mcpu=power6/g' \\\
) %{nil}
%if 0
%global debug_package %{nil}
%global __debug_package 1
%global __debug_install_post \
bash -x %{SOURCE2} %{?_missing_build_ids_terminate_build:--strict-build-id} %{?_include_minidebuginfo:-m} %{?_find_debuginfo_opts} "%{expand:%%{expand:%%%%{_builddir}/%%%%{?buildsubdir}}}"
%endif
%global debug_package %{nil}
%global __debug_package 0
%define define_legacy_variant() \
%if %{1} \
%{expand:%%package %{2}} \
Summary: Bootloader with support for Linux, Multiboot, and more \
Group: System Environment/Base \
Requires: %{name}-tools-%{1} = %{epoch}:%{version}-%{release}.%{arch}\
Requires: %{name}-modules-%{1} = %{epoch}:%{version}-%{release}.noarch\
Requires: gettext which file \
Requires(pre): dracut \
Requires(post): dracut \
Obsoletes: grub2 <= 1:2.00-20%{?dist} \
Suggests: os-prober >= 1.58-11 \
Provides: %{name} = %{epoch}:%{version}-%{release}.%{arch} \
%{expand:%%description %{2}} \
%{desc} \
This subpackage provides support for %{2} systems. \
%endif \
%{nil}
%define define_efi_variant() \
%if %{1} \
%{expand:%%package %{2}} \
Summary: GRUB for EFI systems. \
Group: System Environment/Base \
Suggests: %{name}-tools = %{epoch}:%{version}-%{release}.%{arch} \
Provides: %{name}-efi = %{epoch}:%{version}-%{release}.%{arch} \
%{expand:%%description %{2}} \
%{desc} \
This subpackage provides support for %{2} systems. \
%{expand:%%{?!buildsubdir:%%define buildsubdir grub-%{2}-%{tarversion}}}\
%{expand:%%package modules-%{2}} \
Summary: Modules used to build custom grub.efi images \
Group: System Environment/Base \
BuildArch: noarch \
Enhances: %{name}-tools-%{2} = %{epoch}:%{version}-%{release} \
%{expand:%%description modules-%{2}} \
%{desc} \
This subpackage provides support for rebuilding your own grub.efi. \
%{expand:%%package extras-%{2}} \
Summary: Extras files used with EFI grub builds \
Group: System Environment/Base \
Enhances: %{name}-%{grubefiarch} = %{epoch}:%{version}-%{release} \
%{expand:%%description extras-%{2}} \
%{desc} \
This subpackage provides extra optional components of grub on %{2} systems.\
%endif \
%{nil}
%global do_setup() \
%if %{1} \
%setup -D -q -T -a 0 -n grub-%{tarversion} \
cd grub-%{tarversion} \
cp %{SOURCE4} unifont.pcf.gz \
cp %{SOURCE6} .gitignore \
git init \
echo '![[:digit:]][[:digit:]]_*.in' > util/grub.d/.gitignore \
echo '!*.[[:digit:]]' > util/.gitignore \
git config user.email "%{name}-owner@fedoraproject.org" \
git config user.name "Fedora Ninjas" \
git config gc.auto 0 \
git add . \
git commit -a -q -m "%{tarversion} baseline." \
git am %{patches} </dev/null \
git config --unset user.email \
git config --unset user.name \
cd .. \
mv grub-%{tarversion} grub-%{2}-%{tarversion} \
%endif \
%{nil}
%global do_common_build() \
%if %{1} \
%ifarch %{2} \
cd grub-%{3}-%{tarversion} \
sed -i -e 's,(grub),(%{name}),g' \\\
-e 's,grub.info,%{name}.info,g' \\\
-e 's,\* GRUB:,* GRUB2:,g' \\\
-e 's,/boot/grub/,/boot/%{name}/,g' \\\
-e 's,\([^-]\)grub-\([a-z]\),\1%{name}-\2,g' \\\
docs/grub.info \
sed -i -e 's,grub-dev,%{name}-dev,g' docs/grub-dev.info \
makeinfo --html --no-split -I docs -o grub-dev.html \\\
docs/grub-dev.texi \
makeinfo --html --no-split -I docs -o grub.html \\\
docs/grub.texi \
sed -i -e 's,/boot/grub/,/boot/%{name}/,g' \\\
-e 's,\([^-]\)grub-\([a-z]\),\1%{name}-\2,g' \\\
grub.html \
cd .. \
%endif \
%endif \
%{nil}
%define do_efi_build() \
%if %{1} \
cd grub-%{2}-%{tarversion} \
./autogen.sh \
%configure \\\
CFLAGS="%{efi_cflags}" \\\
TARGET_LDFLAGS=-static \\\
--with-platform=efi \\\
--target=%{_target_platform} \\\
--with-grubdir=%{name} \\\
--program-transform-name=s,grub,%{name}, \\\
--disable-grub-mount \\\
--disable-werror \
make %{?_smp_mflags} \
GRUB_MODULES=" all_video boot btrfs cat chain configfile echo \\\
efifwsetup efinet ext2 fat font gfxmenu gfxterm \\\
gzio halt hfsplus iso9660 jpeg loadenv loopback \\\
lvm mdraid09 mdraid1x minicmd normal part_apple \\\
part_msdos part_gpt password_pbkdf2 png reboot \\\
search search_fs_uuid search_fs_file \\\
search_label serial sleep syslinuxcfg test tftp \\\
video xfs" \
GRUB_MODULES+=%{efi_modules} \
./grub-mkimage -O %{grubefiarch} -o %{3}.orig \\\
-p /EFI/%{efidir} -d grub-core ${GRUB_MODULES} \
./grub-mkimage -O %{grubefiarch} -o %{4}.orig \\\
-p /EFI/BOOT -d grub-core ${GRUB_MODULES} \
%{pesign -s -i %{3}.orig -o %{3}} \
%{pesign -s -i %{4}.orig -o %{4}} \
cd .. \
%endif \
%{nil}
%define do_legacy_build() \
%if %{1} \
cd grub-%{2}-%{tarversion} \
./autogen.sh \
%configure \\\
CFLAGS="%{legacy_cflags}" \\\
TARGET_LDFLAGS=-static \\\
--with-platform=%{platform} \\\
--target=%{_target_platform} \\\
--with-grubdir=%{name} \\\
--program-transform-name=s,grub,%{name}, \\\
--disable-grub-mount \\\
--disable-werror \
make %{?_smp_mflags} \
cd .. \
%endif \
%{nil}
%define do_efi_install() \
%if %{1} \
cd grub-%{2}-%{tarversion} \
make DESTDIR=$RPM_BUILD_ROOT install \
find $RPM_BUILD_ROOT -iname "*.module" -exec chmod a-x {} \; \
install -m 755 -d $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/ \
touch $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/grub.cfg \
ln -s ../boot/efi/EFI/%{efidir}/grub.cfg \\\
$RPM_BUILD_ROOT%{_sysconfdir}/%{name}-efi.cfg \
install -m 755 %{3} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{3} \
install -m 755 %{4} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{4} \
install -D -m 644 unicode.pf2 \\\
$RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/fonts/unicode.pf2\
cd .. \
mkdir -p $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/ \
ln -s /boot/efi/EFI/%{efidir}/grubenv \\\
$RPM_BUILD_ROOT/boot/grub2/grubenv \
%endif \
%{nil}
%define do_legacy_install() \
%if %{1} \
cd grub-%{2}-%{tarversion} \
make DESTDIR=$RPM_BUILD_ROOT install \
# Ghost config file \
install -d $RPM_BUILD_ROOT/boot/%{name} \
touch $RPM_BUILD_ROOT/boot/%{name}/grub.cfg \
ln -s ../boot/%{name}/grub.cfg \\\
$RPM_BUILD_ROOT%{_sysconfdir}/%{name}.cfg \
cd .. \
%endif \
%{nil}
%define do_common_install() \
%if %{1} \
%ifarch %{2} \
cd grub-%{3}-%{tarversion} \
cp -a $RPM_BUILD_ROOT%{_datarootdir}/locale/en\@quot \\\
$RPM_BUILD_ROOT%{_datarootdir}/locale/en \
mv $RPM_BUILD_ROOT%{_infodir}/grub.info \\\
$RPM_BUILD_ROOT%{_infodir}/%{name}.info \
mv $RPM_BUILD_ROOT%{_infodir}/grub-dev.info \\\
$RPM_BUILD_ROOT%{_infodir}/%{name}-dev.info \
rm $RPM_BUILD_ROOT%{_infodir}/dir \
# Defaults \
mkdir ${RPM_BUILD_ROOT}%{_sysconfdir}/default \
touch ${RPM_BUILD_ROOT}%{_sysconfdir}/default/grub \
mkdir ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig \
ln -sf %{_sysconfdir}/default/grub \\\
${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/grub \
cd .. \
%endif \
%endif \
%{nil}
%define define_legacy_variant_files() \
%if %{1} \
%{expand:%%files %{2}} \
%defattr(-,root,root,-) \
%{!?_licensedir:%global license %%doc} \
%license grub-%{tarversion}/COPYING \
%config(noreplace) %{_sysconfdir}/%{name}.cfg \
%ghost %config(noreplace) /boot/%{name}/grub.cfg \
%config(noreplace) %ghost /boot/grub2/grubenv \
%{expand:%%files modules-%{2}} \
%defattr(-,root,root) \
%{!?_licensedir:%global license %%doc} \
%license grub-%{tarversion}/COPYING \
%dir %{_libdir}/grub/%{2}/ \
%{_libdir}/grub/%{2}/* \
%endif \
%{nil}
%define define_efi_variant_files() \
%if %{1} \
%{expand:%%files %{2} -f grub.lang} \
%defattr(-,root,root,-) \
%config(noreplace) %{_sysconfdir}/%{name}-efi.cfg \
%dir %attr(0755,root,root)/boot/efi/EFI/%{efidir} \
/boot/efi/EFI/%{efidir}/%{3} \
%attr(0755,root,root)/boot/efi/EFI/%{efidir}/fonts \
%ghost %config(noreplace) /boot/efi/EFI/%{efidir}/grub.cfg \
%{!?_licensedir:%global license %%doc} \
%license grub-%{tarversion}/COPYING \
/boot/grub2/grubenv \
%config(noreplace) \\\
%ghost %attr(0700,root,root)/boot/efi/EFI/%{efidir}/grubenv \
# ewww. \
%ifarch x86_64 \
%{_sbindir}/%{name}-macbless \
%{_bindir}/%{name}-glue-efi \
%{_bindir}/%{name}-render-label \
%else \
%exclude %{_sbindir}/%{name}-macbless \
%exclude %{_bindir}/%{name}-glue-efi \
%exclude %{_bindir}/%{name}-render-label \
%endif \
%{expand:%%files modules-%{2}} \
%defattr(-,root,root,-) \
%{_libdir}/grub/%{2} \
%{expand:%%files extras-%{2}} \
%defattr(-,root,root,-) \
%attr(0755,root,root)/boot/efi/EFI/%{efidir}/%{4} \
%endif \
%{nil}

View File

@ -84,3 +84,4 @@ Patch0082: 0082-Measure-kernel-and-initrd-on-BIOS-systems.patch
Patch0083: 0083-Measure-the-kernel-commandline.patch
Patch0084: 0084-Measure-commands.patch
Patch0085: 0085-Measure-multiboot-images-and-modules.patch
Patch0086: 0001-Make-grub-editenv-build-again.patch

View File

@ -1,44 +1,5 @@
%undefine _hardened_build
# Modules always contain just 32-bit code
%define _libdir %{_exec_prefix}/lib
# 64bit intel machines use 32bit boot loader
# (We cannot just redefine _target_cpu, as we'd get i386.rpm packages then)
%ifarch x86_64
%define _target_platform i386-%{_vendor}-%{_target_os}%{?_gnu}
%endif
# sparc is always compiled 64 bit
%ifarch %{sparc}
%define _target_platform sparc64-%{_vendor}-%{_target_os}%{?_gnu}
%endif
%if ! 0%{?efi}
%global efi_only aarch64
%global efiarchs %{ix86} x86_64 ia64 %{efi_only}
%ifarch %{ix86}
%global grubefiarch i386-efi
%global grubefiname grubia32.efi
%global grubeficdname gcdia32.efi
%endif
%ifarch x86_64
%global grubefiarch %{_arch}-efi
%global grubefiname grubx64.efi
%global grubeficdname gcdx64.efi
%endif
%ifarch aarch64
%global grubefiarch arm64-efi
%global grubefiname grubaa64.efi
%global grubeficdname gcdaa64.efi
%endif
# Figure out the right file path to use
%global efidir %(eval echo $(grep ^ID= /etc/os-release | sed -e 's/^ID=//' -e 's/rhel/redhat/'))
%endif
%global tarversion 2.02~beta3
%undefine _missing_build_ids_terminate_build
@ -47,111 +8,132 @@ Epoch: 1
Version: 2.02
Release: 0.26%{?dist}
Summary: Bootloader with support for Linux, Multiboot and more
Group: System Environment/Base
License: GPLv3+
URL: http://www.gnu.org/software/grub/
Obsoletes: grub < 1:0.98
Source0: ftp://alpha.gnu.org/gnu/grub/grub-%{tarversion}.tar.xz
Source1: grub.macros
Source2: grub.patches
#Source0: ftp://ftp.gnu.org/gnu/grub/grub-%%{tarversion}.tar.xz
Source4: http://unifoundry.com/unifont-5.1.20080820.pcf.gz
Source5: theme.tar.bz2
Source6: gitignore
Source7: grub.patches
%include %{SOURCE1}
# generate with do-rebase
%include %{SOURCE7}
%include %{SOURCE2}
# And these are:
# git checkout debuginfo
# git format-patch fedora-23..
# git format-patch fedora-24..
Patch10001: 10001-Put-the-correct-.file-directives-in-our-.S-files.patch
Patch10002: 10002-Make-efi-machines-load-an-env-block-from-a-variable.patch
Patch10003: 10003-Make-it-possible-to-enabled-build-id-sha1.patch
#Patch10004: 10004-Don-t-tell-the-compiler-to-do-annoying-things-with-f.patch
Patch10005: 10005-Add-grub_qdprintf-grub_dprintf-without-the-file-line.patch
Patch10006: 10006-Make-a-gdb-dprintf-that-tells-us-load-addresses.patch
Patch10002: 10002-Make-it-possible-to-enabled-build-id-sha1.patch
#Patch10003: 10003-Don-t-tell-the-compiler-to-do-annoying-things-with-.patch
Patch10004: 10004-Add-grub_qdprintf-grub_dprintf-without-the-file-lin.patch
Patch10005: 10005-Make-a-gdb-dprintf-that-tells-us-load-addresses.patch
#Patch10006: 10006-Try-it-in-gentpl-again.patch
BuildRequires: flex bison binutils python
BuildRequires: ncurses-devel xz-devel bzip2-devel
BuildRequires: freetype-devel libusb-devel
BuildRequires: rpm-devel
%ifarch %{sparc} x86_64 aarch64 ppc64le
BuildRequires: rpm-devel rpm-libs
%ifarch %{sparc} aarch64 ppc64le ppc64
# sparc builds need 64 bit glibc-devel - also for 32 bit userland
BuildRequires: /usr/lib64/crt1.o glibc-static
BuildRequires: /usr/lib64/crt1.o glibc-static glibc-devel
%else
%ifarch x86_64 %{ix86}
BuildRequires: /usr/lib/crt1.o glibc-static(x86-32) glibc-devel(x86-32)
BuildRequires: /usr/lib64/crt1.o glibc-static(x86-64) glibc-devel(x86-64)
%else
# ppc64 builds need the ppc crt1.o
BuildRequires: /usr/lib/crt1.o glibc-static
BuildRequires: /usr/lib/crt1.o glibc-static glibc-devel
%endif
%endif
BuildRequires: autoconf automake autogen device-mapper-devel
BuildRequires: freetype-devel gettext-devel git
BuildRequires: texinfo
BuildRequires: dejavu-sans-fonts
BuildRequires: help2man
%ifarch %{efiarchs}
%ifnarch aarch64
%ifarch %{efi_arch}
BuildRequires: pesign >= 0.99-8
%endif
%endif
Requires: gettext which file
Requires: %{name}-tools = %{epoch}:%{version}-%{release}
Requires: os-prober >= 1.58-11
Requires(pre): dracut
Requires(post): dracut
ExcludeArch: s390 s390x
ExcludeArch: s390 s390x %{arm}
Obsoletes: grub2 <= 1:2.00-20%{?dist}
%global desc \
The GRand Unified Bootloader (GRUB) is a highly configurable and customizable\n\
bootloader with modular architecture. It supports a rich variety of kernel\n\
formats, file systems, computer architectures and hardware devices.\n\
%{nil}
%description
The GRand Unified Bootloader (GRUB) is a highly configurable and customizable
bootloader with modular architecture. It support rich varietyof kernel formats,
file systems, computer architectures and hardware devices. This subpackage
provides support for PC BIOS systems.
%{desc}
%ifarch %{efiarchs}
%package efi
Summary: GRUB for EFI systems.
Group: System Environment/Base
Requires: %{name}-tools = %{epoch}:%{version}-%{release}
Obsoletes: grub2-efi <= 1:2.00-20%{?dist}
%package debuginfo
Summary: Debug information for package grub2
Group: Development/Debug
%description efi
The GRand Unified Bootloader (GRUB) is a highly configurable and customizable
bootloader with modular architecture. It support rich varietyof kernel formats,
file systems, computer architectures and hardware devices. This subpackage
provides support for EFI systems.
%package efi-modules
Summary: Modules used to build custom grub.efi images
Group: System Environment/Base
Requires: %{name}-tools = %{epoch}:%{version}-%{release}
Obsoletes: grub2-efi <= 1:2.00-20%{?dist}
%description efi-modules
The GRand Unified Bootloader (GRUB) is a highly configurable and customizable
bootloader with modular architecture. It support rich varietyof kernel formats,
file systems, computer architectures and hardware devices. This subpackage
provides support for rebuilding your own grub.efi on EFI systems.
%endif
%description debuginfo
This package provides debug information for package grub2.
Debug information is useful when developing applications that use this
package or when debugging this package.
%package tools
Summary: Support tools for GRUB.
Group: System Environment/Base
Requires: gettext os-prober which file system-logos
Requires: %{name}-tools-minimal = %{epoch}:%{version}-%{release}.%{arch}
%description tools
The GRand Unified Bootloader (GRUB) is a highly configurable and customizable
bootloader with modular architecture. It support rich varietyof kernel formats,
file systems, computer architectures and hardware devices. This subpackage
provides tools for support of all platforms.
%{desc}
This subpackage provides tools for support of all platforms.
%package tools-minimal
Summary: Support tools for GRUB.
Group: System Environment/Base
Requires: gettext os-prober which file system-logos
%description tools-minimal
%{desc}
This subpackage provides tools for support of all platforms.
%package tools-extra
Summary: Support tools for GRUB.
Group: System Environment/Base
Requires: gettext os-prober which file system-logos
%description tools-extra
%{desc}
This subpackage provides tools for support of all platforms.
%package modules-%{grublegacyarch}
Summary: Modules for %{name}-%{grublegacyarch}
Group: System Environment/Base
BuildArch: noarch
Supplements: %{name}-%{grublegacyarch} = %{epoch}:%{version}-%{release}
%description modules-%{grublegacyarch}
%{desc}
This subpackage provides modules for use on %{grublegacyarch} systems.
%package tools-%{grublegacyarch}
Summary: Support tools for GRUB.
Group: System Environment/Base
Requires: gettext os-prober which file system-logos
Requires: %{name}-tools-minimal = %{epoch}:%{version}-%{release}.%{arch}
Recommends: %{name}-tools = %{epoch}:%{version}-%{release}.%{arch}
%description tools-%{grublegacyarch}
%{desc}
This subpackage provides tools for support of %{grublegacyarch} platforms.
%package starfield-theme
Summary: An example theme for GRUB.
Group: System Environment/Base
Requires: system-logos
Obsoletes: grub2 <= 1:2.00-20%{?dist}
Obsoletes: grub2-efi <= 1:2.00-20%{?dist}
BuildArch: noarch
%description starfield-theme
The GRand Unified Bootloader (GRUB) is a highly configurable and customizable
@ -159,190 +141,34 @@ bootloader with modular architecture. It support rich varietyof kernel formats,
file systems, computer architectures and hardware devices. This subpackage
provides an example theme for the grub screen.
%define_efi_variant %{with_efi_arch} %{grubefiarch} %{grubefiname} %{grubeficdname}
%define_efi_variant %{with_alt_efi_arch} %{grubaltefiarch} %{grubaltefiname} %{grubalteficdname}
%define_legacy_variant %{with_legacy_arch} %{grublegacyarch}
%prep
%setup -T -c -n grub-%{tarversion}
%ifarch %{efiarchs}
%setup -D -q -T -a 0 -n grub-%{tarversion}
cd grub-%{tarversion}
# place unifont in the '.' from which configure is run
cp %{SOURCE4} unifont.pcf.gz
cp %{SOURCE6} .gitignore
git init
echo '![[:digit:]][[:digit:]]_*.in' > util/grub.d/.gitignore
echo '!*.[[:digit:]]' > util/.gitignore
git config user.email "%{name}-owner@fedoraproject.org"
git config user.name "Fedora Ninjas"
git config gc.auto 0
git add .
git commit -a -q -m "%{tarversion} baseline."
git am %{patches} </dev/null
git config --unset user.email
git config --unset user.name
cd ..
mv grub-%{tarversion} grub-efi-%{tarversion}
%endif
%ifarch %{efi_only}
ln -s grub-efi-%{tarversion} grub-%{tarversion}
%else
%setup -D -q -T -a 0 -n grub-%{tarversion}
cd grub-%{tarversion}
# place unifont in the '.' from which configure is run
cp %{SOURCE4} unifont.pcf.gz
cp %{SOURCE6} .gitignore
git init
echo '![[:digit:]][[:digit:]]_*.in' > util/grub.d/.gitignore
echo '!*.[[:digit:]]' > util/.gitignore
git config user.email "%{name}-owner@fedoraproject.org"
git config user.name "Fedora Ninjas"
git config gc.auto 0
git add .
git commit -a -q -m "%{tarversion} baseline."
git am %{patches} </dev/null
git config --unset user.email
git config --unset user.name
%endif
%do_setup %{with_efi_arch} %{grubefiarch}
%do_setup %{with_alt_efi_arch} %{grubaltefiarch}
%do_setup %{with_legacy_arch} %{grublegacyarch}
%build
%ifarch %{efiarchs}
cd grub-efi-%{tarversion}
./autogen.sh
%configure \
CFLAGS="$(echo $RPM_OPT_FLAGS | sed \
-e 's/-O.//g' \
-e 's/-fstack-protector[[:alpha:]-]\+//g' \
-e 's/-Wp,-D_FORTIFY_SOURCE=[[:digit:]]\+//g' \
-e 's/--param=ssp-buffer-size=4//g' \
-e 's/-mregparm=3/-mregparm=4/g' \
-e 's/-fexceptions//g' \
-e 's/-fasynchronous-unwind-tables//g' \
-e 's/^/ -fno-strict-aliasing /' )" \
TARGET_LDFLAGS=-static \
--with-platform=efi \
--with-grubdir=%{name} \
--program-transform-name=s,grub,%{name}, \
--disable-grub-mount \
--disable-werror
make %{?_smp_mflags}
GRUB_MODULES=" all_video boot btrfs cat chain configfile echo \
efifwsetup efinet ext2 fat font gfxmenu gfxterm gzio halt \
hfsplus iso9660 jpeg loadenv loopback lvm mdraid09 mdraid1x \
minicmd normal part_apple part_msdos part_gpt \
password_pbkdf2 png \
reboot search search_fs_uuid search_fs_file search_label \
serial sleep syslinuxcfg test tftp video xfs"
%ifarch aarch64
GRUB_MODULES+=" linux "
%else
GRUB_MODULES+=" backtrace usb usbserial_common "
GRUB_MODULES+=" usbserial_pl2303 usbserial_ftdi usbserial_usbdebug "
GRUB_MODULES+=" linuxefi"
%endif
./grub-mkimage -O %{grubefiarch} -o %{grubefiname}.orig -p /EFI/%{efidir} \
-d grub-core ${GRUB_MODULES}
./grub-mkimage -O %{grubefiarch} -o %{grubeficdname}.orig -p /EFI/BOOT \
-d grub-core ${GRUB_MODULES}
%ifarch aarch64
mv %{grubefiname}.orig %{grubefiname}
mv %{grubeficdname}.orig %{grubeficdname}
%else
%pesign -s -i %{grubeficdname}.orig -o %{grubeficdname}
%pesign -s -i %{grubefiname}.orig -o %{grubefiname}
%endif
cd ..
%endif
cd grub-%{tarversion}
%ifnarch %{efi_only}
./autogen.sh
# -static is needed so that autoconf script is able to link
# test that looks for _start symbol on 64 bit platforms
%ifarch %{sparc} ppc ppc64 ppc64le
%define platform ieee1275
%else
%define platform pc
%endif
%configure \
CFLAGS="$(echo $RPM_OPT_FLAGS | sed \
-e 's/-O.//g' \
-e 's/-fstack-protector[[:alpha:]-]\+//g' \
-e 's/-Wp,-D_FORTIFY_SOURCE=[[:digit:]]\+//g' \
-e 's/--param=ssp-buffer-size=4//g' \
-e 's/-mregparm=3/-mregparm=4/g' \
-e 's/-fexceptions//g' \
-e 's/-m64//g' \
-e 's/-fasynchronous-unwind-tables//g' \
-e 's/-mcpu=power7/-mcpu=power6/g' \
-e 's/^/ -fno-strict-aliasing /' )" \
TARGET_LDFLAGS=-static \
--with-platform=%{platform} \
--with-grubdir=%{name} \
--program-transform-name=s,grub,%{name}, \
--disable-grub-mount \
--disable-werror
make %{?_smp_mflags}
%endif
sed -i -e 's,(grub),(%{name}),g' \
-e 's,grub.info,%{name}.info,g' \
-e 's,\* GRUB:,* GRUB2:,g' \
-e 's,/boot/grub/,/boot/%{name}/,g' \
-e 's,\([^-]\)grub-\([a-z]\),\1%{name}-\2,g' \
docs/grub.info
sed -i -e 's,grub-dev,%{name}-dev,g' docs/grub-dev.info
/usr/bin/makeinfo --html --no-split -I docs -o grub-dev.html docs/grub-dev.texi
/usr/bin/makeinfo --html --no-split -I docs -o grub.html docs/grub.texi
sed -i -e 's,/boot/grub/,/boot/%{name}/,g' \
-e 's,\([^-]\)grub-\([a-z]\),\1%{name}-\2,g' \
grub.html
%do_efi_build %{with_efi_arch} %{grubefiarch} %{grubefiname} %{grubeficdname}
%do_common_build %{with_efi_arch} %{efi_only} %{grubefiarch}
%do_efi_build %{with_alt_efi_arch} %{grubaltefiarch} %{grubaltefiname} %{grubalteficdname}
%do_legacy_build %{with_legacy_arch} %{grublegacyarch}
%do_common_build %{with_legacy_arch} %{no_efi_arch} %{grublegacyarch}
%install
set -e
rm -fr $RPM_BUILD_ROOT
%ifarch %{efiarchs}
cd grub-efi-%{tarversion}
make DESTDIR=$RPM_BUILD_ROOT install
find $RPM_BUILD_ROOT -iname "*.module" -exec chmod a-x {} \;
%do_efi_install %{with_efi_arch} %{grubefiarch} %{grubefiname} %{grubeficdname}
%do_common_install %{with_efi_arch} %{efi_only} %{grubefiarch}
%do_efi_install %{with_alt_efi_arch} %{grubaltefiarch} %{grubaltefiname} %{grubalteficdname}
%do_legacy_install %{with_legacy_arch} %{grublegacyarch}
%do_common_install %{with_legacy_arch} %{no_efi_arch} %{grublegacyarch}
# Ghost config file
install -m 755 -d $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/
touch $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/grub.cfg
ln -s ../boot/efi/EFI/%{efidir}/grub.cfg $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-efi.cfg
install -m 755 %{grubefiname} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{grubefiname}
install -m 755 %{grubeficdname} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{grubeficdname}
install -D -m 644 unicode.pf2 $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/fonts/unicode.pf2
cd ..
%endif
cd grub-%{tarversion}
%ifnarch %{efi_only}
make DESTDIR=$RPM_BUILD_ROOT install
# Ghost config file
install -d $RPM_BUILD_ROOT/boot/%{name}
touch $RPM_BUILD_ROOT/boot/%{name}/grub.cfg
ln -s ../boot/%{name}/grub.cfg $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.cfg
%endif
cp -a $RPM_BUILD_ROOT%{_datarootdir}/locale/en\@quot $RPM_BUILD_ROOT%{_datarootdir}/locale/en
mv $RPM_BUILD_ROOT%{_infodir}/grub.info $RPM_BUILD_ROOT%{_infodir}/%{name}.info
mv $RPM_BUILD_ROOT%{_infodir}/grub-dev.info $RPM_BUILD_ROOT%{_infodir}/%{name}-dev.info
rm $RPM_BUILD_ROOT%{_infodir}/dir
# Defaults
mkdir ${RPM_BUILD_ROOT}%{_sysconfdir}/default
touch ${RPM_BUILD_ROOT}%{_sysconfdir}/default/grub
mkdir ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
ln -sf %{_sysconfdir}/default/grub \
${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/grub
cd ..
%find_lang grub
# Fedora theme in /boot/grub2/themes/system/
@ -364,11 +190,6 @@ cat << EOF > ${RPM_BUILD_ROOT}%{_sysconfdir}/prelink.conf.d/grub2.conf
-b /usr/sbin/grub2-sparc64-setup
EOF
%ifarch %{efiarchs}
mkdir -p boot/efi/EFI/%{efidir}/
ln -s /boot/efi/EFI/%{efidir}/grubenv boot/grub2/grubenv
%endif
# Don't run debuginfo on all the grub modules and whatnot; it just
# rejects them, complains, and slows down extraction.
%global finddebugroot "%{_builddir}/%{?buildsubdir}/debug"
@ -387,7 +208,7 @@ cp -a ${RPM_BUILD_ROOT}/usr/sbin %{finddebugroot}/usr/sbin
%clean
rm -rf $RPM_BUILD_ROOT
%pre tools
%pre tools-minimal
if [ -f /boot/grub2/user.cfg ]; then
if grep -q '^GRUB_PASSWORD=' /boot/grub2/user.cfg ; then
sed -i 's/^GRUB_PASSWORD=/GRUB2_PASSWORD=/' /boot/grub2/user.cfg
@ -452,85 +273,91 @@ if [ "$1" = 0 ]; then
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/%{name}-dev.info.gz || :
fi
%if 0
%ifnarch %{efi_only}
%files -f grub.lang
%defattr(-,root,root,-)
%{_libdir}/grub/*-%{platform}/
%files %{grublegacyarch} -f grub.lang
%config(noreplace) %{_sysconfdir}/%{name}.cfg
%ghost %config(noreplace) /boot/%{name}/grub.cfg
%doc grub-%{tarversion}/COPYING
%config(noreplace) %ghost /boot/grub2/grubenv
%endif
%ifarch %{efiarchs}
%files efi
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/%{name}-efi.cfg
%attr(0755,root,root)/boot/efi/EFI/%{efidir}
%attr(0755,root,root)/boot/efi/EFI/%{efidir}/fonts
%ghost %config(noreplace) /boot/efi/EFI/%{efidir}/grub.cfg
%doc grub-%{tarversion}/COPYING
/boot/grub2/grubenv
# I know 0700 seems strange, but it lives on FAT so that's what it'll
# get no matter what we do.
%config(noreplace) %ghost %attr(0700,root,root)/boot/efi/EFI/%{efidir}/grubenv
%files efi-modules
%defattr(-,root,root,-)
%{_libdir}/grub/%{grubefiarch}
%endif
%files tools -f grub.lang
%files tools-minimal
%defattr(-,root,root,-)
%dir %{_libdir}/grub/
%dir %{_datarootdir}/grub/
%dir %{_datarootdir}/grub/themes
%{_datarootdir}/grub/*
%{_sbindir}/%{name}-bios-setup
%{_sbindir}/%{name}-install
%{_sbindir}/%{name}-macbless
%{_sbindir}/%{name}-mkconfig
%{_sbindir}/%{name}-ofpathname
%{_sbindir}/%{name}-probe
%{_sbindir}/%{name}-reboot
%{_sbindir}/%{name}-rpm-sort
%{_sbindir}/%{name}-set-default
%{_sbindir}/%{name}-setpassword
%{_sbindir}/%{name}-sparc64-setup
%{_bindir}/%{name}-editenv
%{_bindir}/%{name}-file
%{_bindir}/%{name}-fstest
%{_bindir}/%{name}-glue-efi
%{_bindir}/%{name}-kbdcomp
%{_bindir}/%{name}-menulst2cfg
%{_bindir}/%{name}-mkfont
%{_bindir}/%{name}-mkimage
%{_bindir}/%{name}-mklayout
%{_bindir}/%{name}-mknetdir
%{_bindir}/%{name}-mkpasswd-pbkdf2
%{_bindir}/%{name}-mkrelpath
%ifnarch %{sparc}
%{_bindir}/%{name}-mkrescue
%endif
%{_bindir}/%{name}-mkstandalone
%{_bindir}/%{name}-render-label
%{_bindir}/%{name}-script-check
%{_bindir}/%{name}-syslinux2cfg
%{_datarootdir}/bash-completion/completions/grub
%{_sysconfdir}/prelink.conf.d/grub2.conf
%attr(0700,root,root) %dir %{_sysconfdir}/grub.d
%config %{_sysconfdir}/grub.d/??_*
%{_sysconfdir}/grub.d/README
%attr(0644,root,root) %ghost %config(noreplace) %{_sysconfdir}/default/grub
%{_datarootdir}/grub/*
%{_sbindir}/%{name}-mkconfig
%{_sbindir}/%{name}-probe
%{_sbindir}/%{name}-reboot
%{_sbindir}/%{name}-rpm-sort
%{_sbindir}/%{name}-setpassword
%{_sbindir}/%{name}-set-default
%{_bindir}/%{name}-editenv
%{_bindir}/%{name}-file
%{_bindir}/%{name}-mkpasswd-pbkdf2
%{_bindir}/%{name}-mkrelpath
%{_bindir}/%{name}-script-check
%files tools
%defattr(-,root,root,-)
%{_infodir}/%{name}*
%{_datarootdir}/bash-completion/completions/grub
%{_sbindir}/%{name}-install
%{_bindir}/%{name}-menulst2cfg
%{_datadir}/man/man?/*
%if %{with_legacy_arch}
%files tools-%{grublegacyarch}
%defattr(-,root,root,-)
%{_sbindir}/%{name}-install
%ifarch %{ix86} x86_64
%{_sbindir}/%{name}-bios-setup
%else
%exclude %{_sbindir}/%{name}-bios-setup
%endif
%ifarch %{sparc}
%{_sbindir}/%{name}-sparc64-setup
%else
%exclude %{_sbindir}/%{name}-sparc64-setup
%endif
%ifarch %{sparc} ppc ppc64 ppc64le
%{_sbindir}/%{name}-ofpathname
%else
%exclude %{_sbindir}/%{name}-ofpathname
%endif
%endif
%files tools-extra
%{_sbindir}/%{name}-install
%{_sbindir}/%{name}-macbless
%{_bindir}/%{name}-fstest
%{_bindir}/%{name}-glue-efi
%{_bindir}/%{name}-kbdcomp
%{_bindir}/%{name}-mkfont
%{_bindir}/%{name}-mkimage
%{_bindir}/%{name}-mklayout
%{_bindir}/%{name}-mknetdir
%ifnarch %{sparc}
%{_bindir}/%{name}-mkrescue
%endif
%{_bindir}/%{name}-mkstandalone
%{_bindir}/%{name}-render-label
%{_bindir}/%{name}-syslinux2cfg
%{_sysconfdir}/sysconfig/grub
%dir /boot/%{name}
%dir /boot/%{name}/themes/
%dir /boot/%{name}/themes/system
%exclude /boot/%{name}/themes/system/*
%exclude %{_datarootdir}/grub/themes/
%{_infodir}/%{name}*
%{_datadir}/man/man?/*
%doc grub-%{tarversion}/COPYING grub-%{tarversion}/INSTALL
%doc grub-%{tarversion}/INSTALL
%doc grub-%{tarversion}/NEWS grub-%{tarversion}/README
%doc grub-%{tarversion}/THANKS grub-%{tarversion}/TODO
%doc grub-%{tarversion}/grub.html
@ -543,6 +370,13 @@ fi
%dir %{_datarootdir}/grub/themes
%{_datarootdir}/grub/themes/starfield
%files debuginfo -f debugfiles.list
%defattr(-,root,root)
%define_efi_variant_files %{with_efi_arch} %{grubefiarch} %{grubefiname} %{grubeficdname}
%define_efi_variant_files %{with_alt_efi_arch} %{grubaltefiarch} %{grubaltefiname} %{grubalteficdname}
%define_legacy_variant_files %{with_legacy_arch} %{grublegacyarch}
%changelog
* Fri Mar 04 2016 Peter Jones <pjones@redhat.com> - 2.02-0.26
- Rebased to newer upstream (grub-2.02-beta3) for fedora-24