]> git.pld-linux.org Git - packages/grub2.git/blobdiff - grub-mkconfig-diagnostics.patch
started upgrade to 2.04
[packages/grub2.git] / grub-mkconfig-diagnostics.patch
index ada105d1d3b749834e8d0ce0b4a232fba4e1d833..9a4e28207244b2803feb54dc5a7deda7309175d3 100644 (file)
---- grub-1.97.2/util/grub-mkconfig.in~ 2010-03-10 18:09:58.858434588 +0200
-+++ grub-1.97.2/util/grub-mkconfig.in  2010-03-10 18:11:34.197928250 +0200
-@@ -243,14 +243,19 @@
+diff -dur -x '*~' -x '*.orig' grub-2.02~beta2.orig/util/grub-mkconfig.in grub-2.02~beta2/util/grub-mkconfig.in
+--- grub-2.02~beta2.orig/util/grub-mkconfig.in 2014-01-04 11:34:32.715240491 +0100
++++ grub-2.02~beta2/util/grub-mkconfig.in      2014-01-04 11:34:50.135240649 +0100
+@@ -250,11 +250,16 @@
  if test "x${grub_cfg}" != "x"; then
-   rm -f ${grub_cfg}.new
+   rm -f "${grub_cfg}.new"
+   oldumask=$(umask); umask 077
 +  # open fd &3 for diagnostic messages
 +  exec 3>&1
-   exec > ${grub_cfg}.new
-   # Allow this to fail, since /boot/grub/ might need to be fatfs to support some
-   # firmware implementations (e.g. OFW or EFI).
-   chmod 400 ${grub_cfg}.new || grub_warn "Could not make ${grub_cfg}.new readable by only root.\
-   This means that if the generated config contains a password it is readable by everyone"
+   exec > "${grub_cfg}.new"
+   umask $oldumask
 +else
 +  # open fd &3 for diagnostic messages
 +  exec 3>&2
  fi
--echo "Generating grub.cfg ..." >&2
-+echo "Generating grub.cfg ..." >&3
+-gettext "Generating grub configuration file ..." >&2
+-echo >&2
++gettext "Generating grub configuration file ..." >&3
++echo >&3
  
  cat << EOF
  #
-@@ -275,4 +280,7 @@
-   mv -f ${grub_cfg}.new ${grub_cfg}
+@@ -286,7 +291,7 @@
+     gettext_printf "Syntax errors are detected in generated GRUB config file.
+ Ensure that there are no errors in /etc/sysconfig/grub
+ and /etc/grub.d/* files or please file a bug report with
+-%s file attached." "${grub_cfg}.new" >&2
++%s file attached." "${grub_cfg}.new" >&3
+     echo >&2
+     exit 1
+   else
+@@ -295,5 +300,8 @@
+   fi
  fi
  
--echo "done" >&2
-+echo "done" >&3
+-gettext "done" >&2
+-echo >&2
++gettext "done" >&3
++echo >&3
 +
 +# close diagnostic stream
 +exec 3>&-
---- grub-1.97.2/util/grub.d/10_linux.in~       2010-03-10 18:09:58.838434522 +0200
-+++ grub-1.97.2/util/grub.d/10_linux.in        2010-03-10 18:12:47.478176169 +0200
-@@ -67,7 +67,7 @@
- while [ "x$list" != "x" ] ; do
-   linux=`version_find_latest $list`
--  echo "Found linux image: $linux" >&2
-+  echo "Found linux image: $linux" >&3
-   basename=`basename $linux`
-   dirname=`dirname $linux`
-   rel_dirname=`make_system_path_relative_to_its_root $dirname`
-@@ -85,7 +85,7 @@
-     fi
-   done
-   if test -n "${initrd}" ; then
--    echo "Found initrd image: ${dirname}/${initrd}" >&2
-+    echo "Found initrd image: ${dirname}/${initrd}" >&3
-   else
-     # "UUID=" magic is parsed by initrds.  Since there's no initrd, it can't work here.
-     linux_root_device_thisversion=${GRUB_DEVICE}
---- grub-1.97.2/util/grub.d/30_os-prober.in~   2010-03-10 18:09:58.838434522 +0200
-+++ grub-1.97.2/util/grub.d/30_os-prober.in    2010-03-10 18:13:43.784870350 +0200
-@@ -47,7 +47,7 @@
-     LONGNAME="${LABEL}"
-   fi
+diff -dur -x '*~' -x '*.orig' grub-2.02~beta2.orig/util/grub.d/00_header.in grub-2.02~beta2/util/grub.d/00_header.in
+--- grub-2.02~beta2.orig/util/grub.d/00_header.in      2014-01-04 10:50:51.000000000 +0100
++++ grub-2.02~beta2/util/grub.d/00_header.in   2014-01-04 11:34:50.135240649 +0100
+@@ -229,7 +229,7 @@
+ if [ "x$gfxterm" = x1 ]; then
+     if [ "x$GRUB_THEME" != x ] && [ -f "$GRUB_THEME" ] \
+       && is_path_readable_by_grub "$GRUB_THEME"; then
+-      gettext_printf "Found theme: %s\n" "$GRUB_THEME" >&2
++      gettext_printf "Found theme: %s\n" "$GRUB_THEME" >&3
  
--  echo "Found ${LONGNAME} on ${DEVICE}" >&2
-+  echo "Found ${LONGNAME} on ${DEVICE}" >&3
-   case ${BOOT} in
-     chain)
---- grub-1.97.2/util/grub.d/10_hurd.in~        2010-03-10 18:15:07.000000000 +0200
-+++ grub-1.97.2/util/grub.d/10_hurd.in 2010-03-10 18:23:36.364190317 +0200
-@@ -37,7 +37,7 @@
+       prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_THEME"`
+       cat << EOF
+@@ -265,12 +265,12 @@
+ EOF
+     elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
+           && is_path_readable_by_grub "$GRUB_BACKGROUND"; then
+-      gettext_printf "Found background: %s\n" "$GRUB_BACKGROUND" >&2
++      gettext_printf "Found background: %s\n" "$GRUB_BACKGROUND" >&3
+       case "$GRUB_BACKGROUND" in 
+           *.png)         reader=png ;;
+           *.tga)         reader=tga ;;
+           *.jpg|*.jpeg)  reader=jpeg ;;
+-          *)             gettext "Unsupported image format" >&2; echo >&2; exit 1 ;;
++          *)             gettext "Unsupported image format" >&3; echo >&3; exit 1 ;;
+       esac
+       prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_BACKGROUND"`
+       cat << EOF
+diff -dur -x '*~' -x '*.orig' grub-2.02~beta2.orig/util/grub.d/10_hurd.in grub-2.02~beta2/util/grub.d/10_hurd.in
+--- grub-2.02~beta2.orig/util/grub.d/10_hurd.in        2013-12-17 18:25:57.000000000 +0100
++++ grub-2.02~beta2/util/grub.d/10_hurd.in     2014-01-04 11:35:59.171907965 +0100
+@@ -45,8 +45,8 @@
      basename=`basename $i`
      dirname=`dirname $i`
      rel_dirname=`make_system_path_relative_to_its_root $dirname`
--    echo "Found GNU Mach: $i" >&2
-+    echo "Found GNU Mach: $i" >&3
-     kernel=${rel_dirname}/${basename}
+-    gettext_printf "Found GNU Mach: %s" "$i" >&2
+-    echo >&2
++    gettext_printf "Found GNU Mach: %s" "$i" >&3
++    echo >&3
+     kernels="${kernels} ${rel_dirname}/${basename}"
      at_least_one=true
    fi
-@@ -51,7 +51,7 @@
+@@ -60,8 +60,8 @@
  
  for i in /hurd/${hurd_fs}.static /hurd/exec ; do
    if test -e "$i" ; then
--    echo "Found Hurd module: $i" >&2
-+    echo "Found Hurd module: $i" >&3
+-    gettext_printf "Found Hurd module: %s" "$i" >&2
+-    echo >&2
++    gettext_printf "Found Hurd module: %s" "$i" >&3
++    echo >&3
      at_least_one=true
    else
      all_of_them=false
---- grub-1.97.2/util/grub.d/10_windows.in~     2010-03-10 18:15:07.000000000 +0200
-+++ grub-1.97.2/util/grub.d/10_windows.in      2010-03-10 18:24:57.464181349 +0200
-@@ -68,7 +68,7 @@
-   # Get boot /dev/ice.
+@@ -74,8 +74,8 @@
+ fi
+ if ${all_of_them} && test -e /lib/ld.so.1 ; then : ; else
+-  gettext "Some Hurd stuff found, but not enough to boot." >&2
+-  echo >&2
++  gettext "Some Hurd stuff found, but not enough to boot." >&3
++  echo >&3
+   exit 1
+ fi
+diff -dur -x '*~' -x '*.orig' grub-2.02~beta2.orig/util/grub.d/10_kfreebsd.in grub-2.02~beta2/util/grub.d/10_kfreebsd.in
+--- grub-2.02~beta2.orig/util/grub.d/10_kfreebsd.in    2013-12-17 18:25:57.000000000 +0100
++++ grub-2.02~beta2/util/grub.d/10_kfreebsd.in 2014-01-04 11:34:50.135240649 +0100
+@@ -158,7 +158,7 @@
+ while [ "x$list" != "x" ] ; do
+   kfreebsd=`version_find_latest $list`
+-  gettext_printf "Found kernel of FreeBSD: %s\n" "$kfreebsd" >&2
++  gettext_printf "Found kernel of FreeBSD: %s\n" "$kfreebsd" >&3
+   basename=`basename $kfreebsd`
+   dirname=`dirname $kfreebsd`
+   rel_dirname=`make_system_path_relative_to_its_root $dirname`
+@@ -207,7 +207,7 @@
+     fi
+   done
+   if test -n "${module_dir}" ; then
+-    gettext_printf "Found kernel module directory: %s\n" "${module_dir}" >&2
++    gettext_printf "Found kernel module directory: %s\n" "${module_dir}" >&3
+     module_dir_rel=$(make_system_path_relative_to_its_root $module_dir)
+   fi
+--- grub-2.04/util/grub.d/10_linux.in.orig     2018-11-24 18:13:02.000000000 +0100
++++ grub-2.04/util/grub.d/10_linux.in  2019-07-05 13:53:33.737370014 +0200
+@@ -194,7 +194,7 @@
+ is_top_level=true
+ while [ "x$list" != "x" ] ; do
+   linux=`version_find_latest $list`
+-  gettext_printf "Found linux image: %s\n" "$linux" >&2
++  gettext_printf "Found linux image: %s\n" "$linux" >&3
+   basename=`basename $linux`
+   dirname=`dirname $linux`
+   rel_dirname=`make_system_path_relative_to_its_root $dirname`
+@@ -233,7 +233,7 @@
+     for i in ${initrd}; do
+       initrd_display="${initrd_display} ${dirname}/${i}"
+     done
+-    gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&2
++    gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&3
+   fi
+   config=
+diff -dur -x '*~' -x '*.orig' grub-2.02~beta2.orig/util/grub.d/10_netbsd.in grub-2.02~beta2/util/grub.d/10_netbsd.in
+--- grub-2.02~beta2.orig/util/grub.d/10_netbsd.in      2013-12-17 18:25:57.000000000 +0100
++++ grub-2.02~beta2/util/grub.d/10_netbsd.in   2014-01-04 11:34:50.135240649 +0100
+@@ -155,7 +155,7 @@
+     continue
+   fi
+-  gettext_printf "Found NetBSD kernel: %s\n" "$k" >&2
++  gettext_printf "Found NetBSD kernel: %s\n" "$k" >&3
+   if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then
+       netbsd_entry "knetbsd"   "$k" simple "${GRUB_CMDLINE_NETBSD_DEFAULT}"
+diff -dur -x '*~' -x '*.orig' grub-2.02~beta2.orig/util/grub.d/10_windows.in grub-2.02~beta2/util/grub.d/10_windows.in
+--- grub-2.02~beta2.orig/util/grub.d/10_windows.in     2013-12-17 18:25:57.000000000 +0100
++++ grub-2.02~beta2/util/grub.d/10_windows.in  2014-01-04 11:34:50.135240649 +0100
+@@ -82,7 +82,7 @@
+   # Get boot device.
    dev=`${grub_probe} -t device "$dir" 2>/dev/null` || continue
  
--  echo "Found $OS on $dir ($dev)" >&2
-+  echo "Found $OS on $dir ($dev)" >&3
+-  gettext_printf "Found %s on %s (%s)\n" "$OS" "$drv" "$dev" >&2
++  gettext_printf "Found %s on %s (%s)\n" "$OS" "$drv" "$dev" >&3
    cat << EOF
- menuentry "$OS" {
+ menuentry '$(echo "$OS" | grub_quote)' \$menuentry_id_option '$osid-$(grub_get_device_id "${dev}")' {
  EOF
+--- grub-2.04/util/grub.d/20_linux_xen.in.orig 2019-04-23 10:54:47.000000000 +0200
++++ grub-2.04/util/grub.d/20_linux_xen.in      2019-07-05 13:55:11.220267798 +0200
+@@ -243,7 +243,7 @@
+     while [ "x$list" != "x" ] ; do
+       linux=`version_find_latest $list`
+-      gettext_printf "Found linux image: %s\n" "$linux" >&2
++      gettext_printf "Found linux image: %s\n" "$linux" >&3
+       basename=`basename $linux`
+       dirname=`dirname $linux`
+       rel_dirname=`make_system_path_relative_to_its_root $dirname`
+@@ -274,7 +274,7 @@
+           for i in ${initrd}; do
+               initrd_display="${initrd_display} ${dirname}/${i}"
+           done
+-          gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&2
++          gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&3
+       fi
+       if test -z "${initrd_real}"; then
+diff -dur -x '*~' -x '*.orig' grub-2.02~beta2.orig/util/grub.d/30_os-prober.in grub-2.02~beta2/util/grub.d/30_os-prober.in
+--- grub-2.02~beta2.orig/util/grub.d/30_os-prober.in   2014-01-04 10:50:51.000000000 +0100
++++ grub-2.02~beta2/util/grub.d/30_os-prober.in        2014-01-04 11:34:50.135240649 +0100
+@@ -134,7 +134,7 @@
+     LONGNAME="${LABEL}"
+   fi
+-  gettext_printf "Found %s on %s\n" "${LONGNAME}" "${DEVICE}" >&2
++  gettext_printf "Found %s on %s\n" "${LONGNAME}" "${DEVICE}" >&3
+   case ${BOOT} in
+     chain)
+@@ -329,7 +329,7 @@
+     ;;
+     *)
+       # TRANSLATORS: %s is replaced by OS name.
+-      gettext_printf "%s is not yet supported by grub-mkconfig.\n" "  ${LONGNAME}" >&2
++      gettext_printf "%s is not yet supported by grub-mkconfig.\n" "  ${LONGNAME}" >&3
+     ;;
+   esac
+ done
This page took 0.225333 seconds and 4 git commands to generate.