forked from pool/grub2
Accepting request 162973 from Base:System
- add grub2-secureboot-use-linuxefi-on-uefi-in-os-prober.patch (bnc#810912) * use linuxefi in 30_os-prober if secure boot is enabled (forwarded request 162967 from arvidjaar) OBS-URL: https://build.opensuse.org/request/show/162973 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=66
This commit is contained in:
parent
1659629910
commit
e96960f1de
54
grub2-secureboot-use-linuxefi-on-uefi-in-os-prober.patch
Normal file
54
grub2-secureboot-use-linuxefi-on-uefi-in-os-prober.patch
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
From: Andrey Borzenkov <arvidjaar@gmail.com>
|
||||||
|
Subject: use linuxefi/initrdefi for Linux in 30_os-prober if secure boot is enabled
|
||||||
|
Reference: bnc#810912
|
||||||
|
|
||||||
|
Emit linuxefi/initrdefi for os-prober detected Linux installations if
|
||||||
|
secure boot is enabled.
|
||||||
|
Index: grub-2.00/util/grub.d/30_os-prober.in
|
||||||
|
===================================================================
|
||||||
|
--- grub-2.00.orig/util/grub.d/30_os-prober.in
|
||||||
|
+++ grub-2.00/util/grub.d/30_os-prober.in
|
||||||
|
@@ -41,6 +41,15 @@ if [ -z "${OSPROBED}" ] ; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
+# If secure boot is enabled, use linuxefi/initrdefi for Linux (bnc#810912)
|
||||||
|
+if [ -d /sys/firmware/efi ] && [ "x${GRUB_USE_LINUXEFI}" = "xtrue" ]; then
|
||||||
|
+ LINUX_LOADER_CMD=linuxefi
|
||||||
|
+ LINUX_INITRD_CMD=initrdefi
|
||||||
|
+else
|
||||||
|
+ LINUX_LOADER_CMD=linux
|
||||||
|
+ LINUX_INITRD_CMD=initrd
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
osx_entry() {
|
||||||
|
if [ x$2 = x32 ]; then
|
||||||
|
# TRANSLATORS: it refers to kernel architecture (32-bit)
|
||||||
|
@@ -207,11 +216,11 @@ EOF
|
||||||
|
save_default_entry | sed -e "s/^/\t/"
|
||||||
|
printf '%s\n' "${prepare_boot_cache}"
|
||||||
|
cat << EOF
|
||||||
|
- linux ${LKERNEL} ${LPARAMS}
|
||||||
|
+ ${LINUX_LOADER_CMD} ${LKERNEL} ${LPARAMS}
|
||||||
|
EOF
|
||||||
|
if [ -n "${LINITRD}" ] ; then
|
||||||
|
cat << EOF
|
||||||
|
- initrd ${LINITRD}
|
||||||
|
+ ${LINUX_INITRD_CMD} ${LINITRD}
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
cat << EOF
|
||||||
|
@@ -227,11 +236,11 @@ EOF
|
||||||
|
save_default_entry | sed -e "s/^/\t\t/"
|
||||||
|
printf '%s\n' "${prepare_boot_cache}" | sed -e "s/^/\t/"
|
||||||
|
cat << EOF
|
||||||
|
- linux ${LKERNEL} ${LPARAMS}
|
||||||
|
+ ${LINUX_LOADER_CMD} ${LKERNEL} ${LPARAMS}
|
||||||
|
EOF
|
||||||
|
if [ -n "${LINITRD}" ] ; then
|
||||||
|
cat << EOF
|
||||||
|
- initrd ${LINITRD}
|
||||||
|
+ ${LINUX_INITRD_CMD} ${LINITRD}
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
cat << EOF
|
@ -1,3 +1,17 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Apr 5 17:01:42 UTC 2013 - arvidjaar@gmail.com
|
||||||
|
|
||||||
|
- add grub2-secureboot-use-linuxefi-on-uefi-in-os-prober.patch (bnc#810912)
|
||||||
|
* use linuxefi in 30_os-prober if secure boot is enabled
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 3 17:56:20 UTC 2013 - arvidjaar@gmail.com
|
||||||
|
|
||||||
|
- update rename-grub-info-file-to-grub2.patch
|
||||||
|
* do not rename docs/grub2.texi here, do it in %%prep (we do it there
|
||||||
|
conditionally already). It simplifies patch refreshing using quilt
|
||||||
|
which does not support file rename.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Apr 3 06:55:52 UTC 2013 - mchang@suse.com
|
Wed Apr 3 06:55:52 UTC 2013 - mchang@suse.com
|
||||||
|
|
||||||
|
@ -138,6 +138,7 @@ Patch30: grub2-cdpath.patch
|
|||||||
Patch31: efidisk-ahci-workaround
|
Patch31: efidisk-ahci-workaround
|
||||||
Patch32: grub2-grub-mount-return-failure-if-FUSE-failed.patch
|
Patch32: grub2-grub-mount-return-failure-if-FUSE-failed.patch
|
||||||
Patch33: grub2-fix-tftp-endianness.patch
|
Patch33: grub2-fix-tftp-endianness.patch
|
||||||
|
Patch34: grub2-secureboot-use-linuxefi-on-uefi-in-os-prober.patch
|
||||||
Requires: gettext-runtime
|
Requires: gettext-runtime
|
||||||
%if 0%{?suse_version} >= 1140
|
%if 0%{?suse_version} >= 1140
|
||||||
Requires: os-prober
|
Requires: os-prober
|
||||||
@ -221,10 +222,9 @@ provides support for EFI systems.
|
|||||||
(cd po && ls *.po | cut -d. -f1 | xargs) >po/LINGUAS
|
(cd po && ls *.po | cut -d. -f1 | xargs) >po/LINGUAS
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
# Workaround SLE11's patch utility did not rename the file for us
|
# This simplifies patch handling without need to use git to create patch
|
||||||
%if 0%{?suse_version} == 1110
|
# that renames file
|
||||||
mv docs/grub.texi docs/grub2.texi
|
mv docs/grub.texi docs/grub2.texi
|
||||||
%endif
|
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
@ -259,6 +259,7 @@ mv docs/grub.texi docs/grub2.texi
|
|||||||
%patch31 -p1
|
%patch31 -p1
|
||||||
%patch32 -p1
|
%patch32 -p1
|
||||||
%patch33 -p1
|
%patch33 -p1
|
||||||
|
%patch34 -p1
|
||||||
|
|
||||||
# README.openSUSE
|
# README.openSUSE
|
||||||
cp %{SOURCE3} .
|
cp %{SOURCE3} .
|
||||||
|
@ -4,6 +4,12 @@ Date: Sun, 24 Jun 2012 15:40:40 +0200
|
|||||||
Subject: [PATCH] rename grub info file to grub2
|
Subject: [PATCH] rename grub info file to grub2
|
||||||
|
|
||||||
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
||||||
|
|
||||||
|
From: Andrey Borzenkov <arvidjaar@gmail.com>
|
||||||
|
Do not rename file here. quilt does not support it and creates the
|
||||||
|
whole file if patch needs refreshing. It means that to regenerate two
|
||||||
|
files - Makefile.core.am and Makefile.util.am - it may be necessary to
|
||||||
|
manually rename it.
|
||||||
---
|
---
|
||||||
docs/Makefile.am | 2 +-
|
docs/Makefile.am | 2 +-
|
||||||
docs/Makefile.in | 46 ++++++++++++++++++++--------------------
|
docs/Makefile.in | 46 ++++++++++++++++++++--------------------
|
||||||
@ -116,12 +122,9 @@ index 217ea7e..49dc477 100644
|
|||||||
|
|
||||||
maintainer-clean-aminfo:
|
maintainer-clean-aminfo:
|
||||||
diff --git a/docs/grub.texi b/docs/grub2.texi
|
diff --git a/docs/grub.texi b/docs/grub2.texi
|
||||||
similarity index 99%
|
|
||||||
rename from docs/grub.texi
|
|
||||||
rename to docs/grub2.texi
|
|
||||||
index 26944ac..fb7fb0e 100644
|
index 26944ac..fb7fb0e 100644
|
||||||
--- a/docs/grub.texi
|
--- a/docs/grub.texi
|
||||||
+++ b/docs/grub2.texi
|
+++ b/docs/grub.texi
|
||||||
@@ -1,7 +1,7 @@
|
@@ -1,7 +1,7 @@
|
||||||
\input texinfo
|
\input texinfo
|
||||||
@c -*-texinfo-*-
|
@c -*-texinfo-*-
|
||||||
|
Loading…
Reference in New Issue
Block a user