Blame SOURCES/0003-Revert-templates-Disable-the-os-prober-by-default.patch

5593c8
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
5593c8
From: Javier Martinez Canillas <javierm@redhat.com>
5593c8
Date: Fri, 11 Jun 2021 12:10:58 +0200
5593c8
Subject: [PATCH] Revert "templates: Disable the os-prober by default"
5593c8
5593c8
This reverts commit e346414725a70e5c74ee87ca14e580c66f517666.
5593c8
---
5593c8
 docs/grub.texi              | 18 ++++++++----------
5593c8
 util/grub.d/30_os-prober.in |  5 +----
5593c8
 2 files changed, 9 insertions(+), 14 deletions(-)
5593c8
5593c8
diff --git a/docs/grub.texi b/docs/grub.texi
5593c8
index f8b4b3b21a7..69f08d289f9 100644
5593c8
--- a/docs/grub.texi
5593c8
+++ b/docs/grub.texi
5593c8
@@ -1519,13 +1519,10 @@ boot sequence.  If you have problems, set this option to @samp{text} and
5593c8
 GRUB will tell Linux to boot in normal text mode.
5593c8
 
5593c8
 @item GRUB_DISABLE_OS_PROBER
5593c8
-The @command{grub-mkconfig} has a feature to use the external
5593c8
-@command{os-prober} program to discover other operating systems installed on
5593c8
-the same machine and generate appropriate menu entries for them. It is disabled
5593c8
-by default since automatic and silent execution of @command{os-prober}, and
5593c8
-creating boot entries based on that data, is a potential attack vector. Set
5593c8
-this option to @samp{false} to enable this feature in the
5593c8
-@command{grub-mkconfig} command.
5593c8
+Normally, @command{grub-mkconfig} will try to use the external
5593c8
+@command{os-prober} program, if installed, to discover other operating
5593c8
+systems installed on the same system and generate appropriate menu entries
5593c8
+for them.  Set this option to @samp{true} to disable this.
5593c8
 
5593c8
 @item GRUB_OS_PROBER_SKIP_LIST
5593c8
 List of space-separated FS UUIDs of filesystems to be ignored from os-prober
5593c8
@@ -1853,9 +1850,10 @@ than zero; otherwise 0.
5593c8
 @section Multi-boot manual config
5593c8
 
5593c8
 Currently autogenerating config files for multi-boot environments depends on
5593c8
-os-prober and has several shortcomings. Due to that it is disabled by default.
5593c8
-It is advised to use the power of GRUB syntax and do it yourself. A possible
5593c8
-configuration is detailed here, feel free to adjust to your needs.
5593c8
+os-prober and has several shortcomings. While fixing it is scheduled for the
5593c8
+next release, meanwhile you can make use of the power of GRUB syntax and do it
5593c8
+yourself. A possible configuration is detailed here, feel free to adjust to your
5593c8
+needs.
5593c8
 
5593c8
 First create a separate GRUB partition, big enough to hold GRUB. Some of the
5593c8
 following entries show how to load OS installer images from this same partition,
5593c8
diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
5593c8
index 80685b15f4d..1b91c102f35 100644
5593c8
--- a/util/grub.d/30_os-prober.in
5593c8
+++ b/util/grub.d/30_os-prober.in
5593c8
@@ -26,8 +26,7 @@ export TEXTDOMAINDIR="@localedir@"
5593c8
 
5593c8
 . "$pkgdatadir/grub-mkconfig_lib"
5593c8
 
5593c8
-if [ "x${GRUB_DISABLE_OS_PROBER}" = "xfalse" ]; then
5593c8
-  gettext_printf "os-prober will not be executed to detect other bootable partitions.\nSystems on them will not be added to the GRUB boot configuration.\nCheck GRUB_DISABLE_OS_PROBER documentation entry.\n"
5593c8
+if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
5593c8
   exit 0
5593c8
 fi
5593c8
 
5593c8
@@ -40,8 +39,6 @@ OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
5593c8
 if [ -z "${OSPROBED}" ] ; then
5593c8
   # empty os-prober output, nothing doing
5593c8
   exit 0
5593c8
-else
5593c8
-  grub_warn "$(gettext_printf "os-prober was executed to detect other bootable partitions.\nIt's output will be used to detect bootable binaries on them and create new boot entries.")"
5593c8
 fi
5593c8
 
5593c8
 osx_entry() {