Commits

Uelsk8s committed 13ec258 Merge

Merged in m0e_lnx/m0e-vabs (pull request #93)

grub2 update to 2.00

Comments (0)

Files changed (11)

var/vabs/grub2/src/05_vectorlinux_theme

 #!/bin/bash -e
 
 libdir=/usr/lib
-. ${libdir}/grub/grub-mkconfig_lib
+. /usr/share/grub/grub-mkconfig_lib
 
 set_blue_theme()
 {
 }
 
 # check for usable backgrounds
-#GRUB_TERMINAL_OUTPUT="gfxterm"
 use_bg=false
-#if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then
- #convert /etc/bootsplash/themes/current/images/silent-$( echo $GRUB_GFXMODE|cut -dx -f1-2).jpg /boot/grub/silent-$(echo $GRUB_GFXMODE|cut -dx -f1-2).png	
-  #for i in /boot/grub/silent-$( echo $GRUB_GFXMODE|cut -dx -f1-2).{png,tga,jpg} ; do
   for i in /etc/bootsplash/themes/current/images/silent-$( echo $GRUB_GFXMODE|cut -dx -f1-2).{png,tga,jpg} ; do
-  #for i in /usr/share/images/grub/VL-STD-Blue.{png,tga,jpg} ; do
     if is_path_readable_by_grub $i ; then 
       bg=$i
       case ${bg} in
         *.tga)          reader=tga ;;
         *.jpg|*.jpeg)   reader=jpeg ;;
       esac
-      if test -e /boot/grub/${reader}.mod ; then
+      if test -e /boot/grub/i386-pc/${reader}.mod ; then
         echo "Found background image: `basename ${bg}`" >&2
         use_bg=true
         break

var/vabs/grub2/src/10_linux

 exec_prefix=${prefix}
 bindir=${exec_prefix}/bin
 libdir=/usr/lib
-. ${libdir}/grub/grub-mkconfig_lib
+. /usr/share/grub/grub-mkconfig_lib
 . /etc/default/grub
 
 if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then

var/vabs/grub2/src/etc.default.grub

+export GRUB_GFXMODE=800x600x16
+export GRUB_DISTRIBUTOR=Vlocity
+export GRUB_TERMINAL=gfxterm
+export GRUB_TERMINAL_OUTPUT=gfxterm
+export GRUB_FONT=/usr/share/grub/unifont.pf2
+export GRUB_DISABLE_LINUX_UUID=true
+if [ "$GRUB_GFXMODE" = "1024x768x16" ];then
+  VGA=791
+elif [ "$GRUB_GFXMODE" = "800x600x16" ];then
+  VGA=788
+elif [ "$GRUB_GFXMODE" = "1280x1024x16" ];then
+  VGA=794
+else
+ VGA=normal
+fi
+
+

var/vabs/grub2/src/grub

-export GRUB_GFXMODE=800x600x16
-export GRUB_DISTRIBUTOR=Vlocity
-export GRUB_TERMINAL=gfxterm
-export GRUB_DISABLE_LINUX_UUID=true
-if [ "$GRUB_GFXMODE" = "1024x768x16" ];then
-  VGA=791
-elif [ "$GRUB_GFXMODE" = "800x600x16" ];then
-  VGA=788
-elif [ "$GRUB_GFXMODE" = "1280x1024x16" ];then
-  VGA=794
-else
- VGA=normal
-fi
-
-

var/vabs/grub2/src/grub-mkconfig_lib

-# Helper library for grub-mkconfig
-# Copyright (C) 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/>.
-
-transform="s&$$&&;s&^&&"
-
-prefix="/usr"
-exec_prefix="${prefix}"
-datarootdir="${prefix}/share"
-datadir="${datarootdir}"
-bindir="${exec_prefix}/bin"
-sbindir="${exec_prefix}/sbin"
-pkgdatadir="${datadir}/`echo "grub" | sed "${transform}"`"
-
-if test "x$grub_probe" = x; then
-  grub_probe="${sbindir}/`echo grub-probe | sed "${transform}"`"
-fi
-if test "x$grub_mkrelpath" = x; then
-  grub_mkrelpath="${bindir}/`echo grub-mkrelpath | sed "${transform}"`"
-fi
-
-if $(which gettext >/dev/null 2>/dev/null) ; then
-  gettext="gettext"
-else
-  gettext="echo"
-fi
-
-grub_warn ()
-{
-  echo "Warning: $@" >&2
-}
-
-make_system_path_relative_to_its_root ()
-{
-  "${grub_mkrelpath}" "$1"
-}
-
-is_path_readable_by_grub ()
-{
-  path="$1"
-
-  # abort if path doesn't exist
-  if test -e "$path" ; then : ;else
-    return 1
-  fi
-
-  # abort if file is in a filesystem we can't read
-  if "${grub_probe}" -t fs "$path" > /dev/null 2>&1 ; then : ; else
-    return 1
-  fi
-
-  # ... or if we can't figure out the abstraction module, for example if
-  # memberlist fails on an LVM volume group.
-  if ${grub_probe} -t abstraction $path > /dev/null 2>&1 ; then : ; else
-    return 1
-  fi
-
-  return 0
-}
-
-convert_system_path_to_grub_path ()
-{
-  path="$1"
-
-  grub_warn "convert_system_path_to_grub_path() is deprecated.  Use prepare_grub_to_access_device() instead."
-
-  # abort if GRUB can't access the path
-  if is_path_readable_by_grub "${path}" ; then : ; else
-    return 1
-  fi
-
-  if drive="`"${grub_probe}" -t drive "$path"`" ; then : ; else
-    return 1
-  fi
-
-  if relative_path="`make_system_path_relative_to_its_root "$path"`" ; then : ; else
-    return 1
-  fi
-
-  echo "${drive}${relative_path}"
-}
-
-save_default_entry ()
-{
-  if [ "x${GRUB_SAVEDEFAULT}" = "xtrue" ] ; then
-    cat << EOF
-savedefault
-EOF
-  fi
-}
-
-prepare_grub_to_access_device ()
-{
-  device="$1"
-
-  # Abstraction modules aren't auto-loaded.
-  abstraction="`"${grub_probe}" --device "${device}" --target=abstraction`"
-  for module in ${abstraction} ; do
-    echo "insmod ${module}"
-  done
-
-  partmap="`"${grub_probe}" --device "${device}" --target=partmap`"
-  for module in ${partmap} ; do
-    case "${module}" in
-      netbsd | openbsd)
-        echo "insmod part_bsd";;
-      *)
-        echo "insmod part_${module}";;
-    esac
-  done
-
-  fs="`"${grub_probe}" --device "${device}" --target=fs`"
-  for module in ${fs} ; do
-    echo "insmod ${module}"
-  done
-
-  # If there's a filesystem UUID that GRUB is capable of identifying, use it;
-  # otherwise set root as per value in device.map.
-  echo "set root='`"${grub_probe}" --device "${device}" --target=drive`'"
-  if fs_uuid="`"${grub_probe}" --device "${device}" --target=fs_uuid 2> /dev/null`" ; then
-    echo "search --no-floppy --fs-uuid --set=root ${fs_uuid}"
-  fi
-}
-
-grub_file_is_not_garbage ()
-{
-  if test -f "$1" ; then
-    case "$1" in
-      *.dpkg-*) return 1 ;; # debian dpkg
-      README*)  return 1 ;; # documentation
-    esac
-  else
-    return 1
-  fi
-  return 0
-}
-
-version_test_numeric ()
-{
-  local a="$1"
-  local cmp="$2"
-  local b="$3"
-  if [ "$a" = "$b" ] ; then
-    case "$cmp" in
-      ge|eq|le) return 0 ;;
-      gt|lt) return 1 ;;
-    esac
-  fi
-  if [ "$cmp" = "lt" ] ; then
-    c="$a"
-    a="$b"
-    b="$c"
-  fi
-  if (echo "$a" ; echo "$b") | sort -n | head -n 1 | grep -qx "$b" ; then
-    return 0
-  else
-    return 1
-  fi
-}
-
-version_test_gt ()
-{
-  local a="`echo "$1" | sed -e "s/[^-]*-//"`"
-  local b="`echo "$2" | sed -e "s/[^-]*-//"`"
-  local cmp=gt
-  if [ "x$b" = "x" ] ; then
-    return 0
-  fi
-  case "$a:$b" in
-    *.old:*.old) ;;
-    *.old:*) a="`echo -n "$a" | sed -e 's/\.old$//'`" ; cmp=gt ;;
-    *:*.old) b="`echo -n "$b" | sed -e 's/\.old$//'`" ; cmp=ge ;;
-  esac
-  version_test_numeric "$a" "$cmp" "$b"
-  return "$?"
-}
-
-version_find_latest ()
-{
-  local a=""
-  for i in "$@" ; do
-    if version_test_gt "$i" "$a" ; then
-      a="$i"
-    fi
-  done
-  echo "$a"
-}
-
-# One layer of quotation is eaten by "", the second by sed, and the third by
-# printf; so this turns ' into \'.  Note that you must use the output of
-# this function in a printf format string.
-gettext_quoted () {
-  "$gettext" "$@" | sed "s/'/'\\\\\\\\''/g"
-}
-
-# Run the first argument through gettext_quoted, and then pass that and all
-# remaining arguments to printf.  This is a useful abbreviation and tends to
-# be easier to type.
-gettext_printf () {
-  local format="$1"
-  shift
-  printf "$(gettext_quoted "$format")" "$@"
-}
-
-uses_abstraction () {
-  device="$1"
-
-  abstraction="`"${grub_probe}" --device "${device}" --target=abstraction`"
-  for module in ${abstraction}; do
-    if test "x${module}" = "x$2"; then
-      return 0
-    fi
-  done
-  return 1
-}

var/vabs/grub2/src/grub2.SlackBuild

 
 name="grub"
 NAME="grub2"            #Enter package Name!
-VERSION=${VERSION:-"1.99"}      #Enter package Version!
+VERSION=${VERSION:-"2.00"}      #Enter package Version!
 VER=$(echo $VERSION|sed 's/-/_/') #this fixes - in version
 VL_PACKAGER=${VL_PACKAGER:-"Uelsk8s"}   #Enter your Name!
 LINK=${LINK:-"ftp://ftp.gnu.org/gnu/grub/grub-$VERSION.tar.xz"}  #Enter URL for package here!
 LDFLAG_OPTIONS=${LDFLAG_OPTIONS:-""}
 ADDRB=${ADDRB:-"os-prober >= 1.49"} #Add deps that need to be added to the slack-required file here
 EXRB=${EXRB:-""} #Add deps that need to be excluded from the slack-required file here
+MAKEDEPENDS=${MAKEDEPENDS:-"dejavu-fonts-ttf"}
 #----------------------------------------------------------------------------
 
 
   #SLKCFLAGS="-O2 -fpic"
   SLKCFLAGS="-O2"
   CONFIGURE_TRIPLET="x86_64-vlocity-linux"
+  EFI_FLAGS=" --with-platform=efi --target=x86_64 --program-prefix= "
   LIBDIRSUFFIX="64"
 elif [ "$ARCH" = "powerpc" ]; then
   SLKCFLAGS="-O2"
 
 # Put any Patches here
 #-----------------------------------------------------
-patch -p1 <$CWD/patches/grub2-VL.patch || exit 1
-patch -p1 <$CWD/patches/lazy_stat.patch|| exit 1
+mkdir -p $PKG/usr/doc/$NAME-$VERSION/patches
+cp $CWD/patches/* $PKG/usr/doc/$NAME-$VERSION/patches
+# Use /boot/initrd.gz as a valid initrd name:
+zcat $CWD/patches/initrd_naming.patch | patch -p1 --verbose || exit 1
+# Patch for recent glibc:
+zcat $CWD/patches/txtHRnXiHYUrM.txt.gz | patch -p0 --verbose || exit 1
+# Support DejaVuSansMono font by default:
+zcat $CWD/patches/grub.dejavusansmono.gfxterm.font.diff.gz | patch -p1 --verbose || exi$
+
 #-----------------------------------------------------
 
 
 #-----------------------------------------------------------------------
 
 echo "Configuring source..."
+for i in 1 2; do
+	# Only do EFI when requested
+	if [ i = 1 -a -z "$EFI_FLAGS" ]; then
+		continue;
+	fi
 
-#fix build with glibc-2.16
-sed -i '/gets is a security hole/d' grub-core/gnulib/stdio.in.h
-
-./autogen.sh
-
-./configure --with-platform=pc --prefix=/usr \
+./configure --prefix=/usr \
   --libdir=/usr/lib${LIBDIRSUFFIX} \
   --infodir=/usr/info \
   --sysconfdir=/etc \
   --localstatedir=/var \
   --mandir=/usr/man \
   --with-included-gettext \
-  --disable-debug --disable-werror \
+  --disable-werror \
   --program-prefix="" \
   --program-suffix="" \
   --build=$CONFIGURE_TRIPLET \
-  $CONFIG_OPTIONS || exit 1
+  $CONFIG_OPTIONS $EFI_FLAGS || exit 1
 
+make clean
 make || exit 1
 
 make install DESTDIR=$PKG || exit
 
+# clear EFI_FLAGS for a regular build
+	unset EFI_FLAGS
+done
 
 #######################################################################
 #Miscellenious tweaks and things outside a normal ./configure go here #
 #######################################################################
 
-#cp $CWD/grub-mkconfig_lib $PKG/usr/lib$LIBDIRSUFFIX/grub/
+#Add fonts, if found on the build system
+FONT_SIZE=${FONT_SIZE:-19}
+if [ -r /usr/share/fonts/TTF/unifont.ttf ]; then
+	$PKG/usr/bin/grub-mkfont -o $PKG/usr/share/grub/unifont.pf2 -abv \
+	-s $FONT_SIZE /usr/share/fonts/TTF/unifont.ttf || exit 1
+fi
+if [ -r /usr/share/fonts/TTF/DejaVuSansMono.ttf ]; then
+	$PKG/usr/bin/grub-mkfont -o $PKG/usr/share/grub/dejavusansmono.pf2 -abv \
+	-s $FONT_SIZE /usr/share/fonts/TTF/DejaVuSansMono.ttf || exit 1
+fi
+# Install our default font
+cat $CWD/unifont.pf2 > $PKG/usr/share/grub/unifont.pf2 | exit 1
 mkdir -p $PKG/etc/default/
-cp $CWD/grub $PKG/etc/default/
+cat $CWD/etc.default.grub > $PKG/etc/default/grub
 if [ $LIBDIRSUFFIX ];then
 	sed -i s"|Vector|Vlocity|"g $PKG/etc/default/grub
 fi
-cp $CWD/05_vectorlinux_theme $PKG/etc/grub.d/ 	
-cp $CWD/10_linux $PKG/etc/grub.d/ 	
+cp $CWD/05_vectorlinux_theme $PKG/etc/grub.d/
+cp $CWD/10_linux $PKG/etc/grub.d/
 sed -i s"|/usr/lib|/usr/lib${LIBDIRSUFFIX}|"g $PKG/etc/grub.d/05_vectorlinux_theme 
-sed -i s"|/usr/lib|/usr/lib${LIBDIRSUFFIX}|"g $PKG/etc/grub.d/10_linux 
+sed -i s"|/usr/lib|/usr/lib${LIBDIRSUFFIX}|"g $PKG/etc/grub.d/10_linux
+
+# Create a default grub dir
 mkdir -p $PKG/boot/grub/
-cp $CWD/unifont.pf2 $PKG/boot/grub/ 	
 
 mkdir -p $PKG/usr/doc/$NAME-$VERSION
 cp -a ANNOUNCE* AUTHORS* BUGS* COPYING* ChangeLog* CHANGELOG* Credits* DEVELOPERS \

var/vabs/grub2/src/patches/grub.dejavusansmono.gfxterm.font.diff.gz

Binary file added.

var/vabs/grub2/src/patches/grub2-VL.patch

-diff -Naur grub-1.99/util/grub.d/10_linux.in grub-1.99.patched//util/grub.d/10_linux.in
---- grub-1.99/util/grub.d/10_linux.in	2011-12-13 14:02:22.141285975 -0700
-+++ grub-1.99.patched//util/grub.d/10_linux.in	2011-12-16 17:00:52.751609532 -0700
-@@ -1,8 +1,7 @@
--#! /bin/sh
--set -e
-+#! /bin/sh -e
- 
- # grub-mkconfig helper script.
--# Copyright (C) 2006,2007,2008,2009,2010  Free Software Foundation, Inc.
-+# Copyright (C) 2006,2007,2008,2009  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
-@@ -22,17 +21,12 @@
- bindir=@bindir@
- libdir=@libdir@
- . ${libdir}/grub/grub-mkconfig_lib
--
--export TEXTDOMAIN=@PACKAGE@
--export TEXTDOMAINDIR=@localedir@
--
--CLASS="--class gnu-linux --class gnu --class os"
-+. /etc/default/grub
- 
- if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
-   OS=GNU/Linux
- else
-   OS="${GRUB_DISTRIBUTOR} GNU/Linux"
--  CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1) ${CLASS}"
- fi
- 
- # loop-AES arranges things so that /dev/loop/X can be our root device, but
-@@ -44,85 +38,24 @@
- esac
- 
- if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
--    || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
--    || uses_abstraction "${GRUB_DEVICE}" lvm; then
-+    || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ; then
-   LINUX_ROOT_DEVICE=${GRUB_DEVICE}
- else
-   LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
- fi
- 
--if [ "x`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2>/dev/null || true`" = xbtrfs ]; then
--  rootsubvol="`make_system_path_relative_to_its_root /`"
--  rootsubvol="${rootsubvol#/}"
--  if [ "x${rootsubvol}" != x ]; then
--    GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}"
--  fi
--fi
--
- linux_entry ()
- {
--  os="$1"
--  version="$2"
--  recovery="$3"
--  args="$4"
--  if ${recovery} ; then
--    title="$(gettext_quoted "%s, with Linux %s (recovery mode)")"
--  else
--    title="$(gettext_quoted "%s, with Linux %s")"
--  fi
--  printf "menuentry '${title}' ${CLASS} {\n" "${os}" "${version}"
--  if ! ${recovery} ; then
--      save_default_entry | sed -e "s/^/\t/"
--  fi
--
--  # Use ELILO's generic "efifb" when it's known to be available.
--  # FIXME: We need an interface to select vesafb in case efifb can't be used.
--  if [ "x$GRUB_GFXPAYLOAD_LINUX" = x ]; then
--      cat << EOF
--	load_video
--EOF
--      if grep -qx "CONFIG_FB_EFI=y" "${config}" 2> /dev/null \
--	  && grep -qx "CONFIG_VT_HW_CONSOLE_BINDING=y" "${config}" 2> /dev/null; then
--	  cat << EOF
--	set gfxpayload=keep
--EOF
--      fi
--  else
--      if [ "x$GRUB_GFXPAYLOAD_LINUX" != xtext ]; then
--	  cat << EOF
--	load_video
--EOF
--      fi
--	  cat << EOF
--	set gfxpayload=$GRUB_GFXPAYLOAD_LINUX
--EOF
--  fi
--
-   cat << EOF
--	insmod gzio
-+menuentry "$1" {
- EOF
--
--  if [ x$dirname = x/ ]; then
--    if [ -z "${prepare_root_cache}" ]; then
--      prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/\t/")"
--    fi
--    printf '%s\n' "${prepare_root_cache}"
--  else
--    if [ -z "${prepare_boot_cache}" ]; then
--      prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
--    fi
--    printf '%s\n' "${prepare_boot_cache}"
--  fi
--  message="$(gettext_printf "Loading Linux %s ..." ${version})"
-+  prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
-   cat << EOF
--	echo	'$message'
--	linux	${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
-+	linux16	${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro splash=silent vga=$VGA $2
- EOF
-   if test -n "${initrd}" ; then
--    message="$(gettext_printf "Loading initial ramdisk ...")"
-     cat << EOF
--	echo	'$message'
--	initrd	${rel_dirname}/${initrd}
-+	initrd16 ${rel_dirname}/${initrd}
- EOF
-   fi
-   cat << EOF
-@@ -130,19 +63,9 @@
- EOF
- }
- 
--case x`uname -m` in
--    xi?86 | xx86_64)
--	list=`for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do
--                  if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
--              done` ;;
--    *) 
--	list=`for i in /boot/vmlinuz-* /boot/vmlinux-* /vmlinuz-* /vmlinux-* /boot/kernel-* ; do
--                  if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
--	     done` ;;
--esac
--
--prepare_boot_cache=
--prepare_root_cache=
-+list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
-+        if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
-+      done`
- 
- while [ "x$list" != "x" ] ; do
-   linux=`version_find_latest $list`
-@@ -156,43 +79,26 @@
- 
-   initrd=
-   for i in "initrd.img-${version}" "initrd-${version}.img" \
--	   "initrd-${version}" "initramfs-${version}.img" \
--	   "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
--	   "initrd-${alt_version}" "initramfs-${alt_version}.img" \
--	   "initramfs-genkernel-${version}" \
--	   "initramfs-genkernel-${alt_version}"; do
-+	   "initrd.img" "initrd-${version}" "initrd.img-${alt_version}" \
-+	   "initrd-${alt_version}.img" "initrd-${alt_version}" \
-+	   "initrd" "initrd.gz"; do
-     if test -e "${dirname}/${i}" ; then
-       initrd="$i"
-       break
-     fi
-   done
--
--  config=
--  for i in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do
--    if test -e "${i}" ; then
--      config="${i}"
--      break
--    fi
--  done
--
--  initramfs=
--  if test -n "${config}" ; then
--      initramfs=`grep CONFIG_INITRAMFS_SOURCE= "${config}" | cut -f2 -d= | tr -d \"`
--  fi
--
-   if test -n "${initrd}" ; then
-     echo "Found initrd image: ${dirname}/${initrd}" >&2
--  elif test -z "${initramfs}" ; then
--    # "UUID=" magic is parsed by initrd or initramfs.  Since there's
--    # no initrd or builtin initramfs, it can't work here.
-+  else
-+    # "UUID=" magic is parsed by initrds.  Since there's no initrd, it can't work here.
-     linux_root_device_thisversion=${GRUB_DEVICE}
-   fi
- 
--  linux_entry "${OS}" "${version}" false \
-+  linux_entry "${OS}, Linux ${version}" \
-       "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
--  if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
--    linux_entry "${OS}" "${version}" true \
--	"single ${GRUB_CMDLINE_LINUX}"
-+  if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
-+    linux_entry "${OS}, Linux ${version} (TUI)" \
-+	"2 ${GRUB_CMDLINE_LINUX}"
-   fi
- 
-   list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
-diff -Naur grub-1.99/util/grub.d/30_os-prober.in grub-1.99.patched//util/grub.d/30_os-prober.in
---- grub-1.99/util/grub.d/30_os-prober.in	2011-12-13 14:02:22.127285976 -0700
-+++ grub-1.99.patched//util/grub.d/30_os-prober.in	2011-12-13 14:02:16.420286366 -0700
-@@ -22,6 +22,7 @@
- libdir=@libdir@
- 
- . ${libdir}/grub/grub-mkconfig_lib
-+. /etc/default/grub
- 
- if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
-   exit 0
-@@ -155,11 +156,11 @@
- 	fi
- 	printf '%s\n' "${prepare_boot_cache}"
- 	cat <<  EOF
--	linux ${LKERNEL} ${LPARAMS}
-+	linux16 ${LKERNEL} ${LPARAMS} splash=silent vga=$VGA
- EOF
-         if [ -n "${LINITRD}" ] ; then
-           cat << EOF
--	initrd ${LINITRD}
-+	initrd16 ${LINITRD}
- EOF
-         fi
-         cat << EOF

var/vabs/grub2/src/patches/initrd_naming.patch.gz

Binary file added.

var/vabs/grub2/src/patches/lazy_stat.patch

-Description: Don't stat devices unless we have to
-Author: Vladimir Serbinenko <phcoder@gmail.com>
-Author: Colin Watson <cjwatson@ubuntu.com>
-Bug-Debian: http://bugs.debian.org/627587
-Forwarded: yes
-Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3318
-Last-Update: 2011-05-31
-
-Index: b/grub-core/kern/emu/getroot.c
-===================================================================
---- a/grub-core/kern/emu/getroot.c
-+++ b/grub-core/kern/emu/getroot.c
-@@ -358,7 +358,7 @@
- 
-       if (S_ISLNK (st.st_mode)) {
- #ifdef __linux__
--	if (strcmp (dir, "mapper") == 0) {
-+	if (strcmp (dir, "mapper") == 0 || strcmp (dir, "/dev/mapper") == 0) {
- 	  /* Follow symbolic links under /dev/mapper/; the canonical name
- 	     may be something like /dev/dm-0, but the names under
- 	     /dev/mapper/ are more human-readable and so we prefer them if
-@@ -609,20 +609,27 @@
- 
-   if (os_dev)
-     {
--      if (stat (os_dev, &st) >= 0)
--	dev = st.st_rdev;
--      else
--	grub_util_error ("cannot stat `%s'", os_dev);
--      free (os_dev);
-+      char *tmp = os_dev;
-+      os_dev = canonicalize_file_name (os_dev);
-+      free (tmp);
-     }
--  else
-+
-+  if (os_dev)
-     {
--      if (stat (dir, &st) >= 0)
--	dev = st.st_dev;
--      else
--	grub_util_error ("cannot stat `%s'", dir);
-+      if (strncmp (os_dev, "/dev/dm-", sizeof ("/dev/dm-") - 1) != 0)
-+	return os_dev;
-+      if (stat (os_dev, &st) < 0)
-+	grub_util_error ("cannot stat `%s'", os_dev);
-+      free (os_dev);
-+      dev = st.st_rdev;
-+      return grub_find_device ("/dev/mapper", dev);
-     }
- 
-+  if (stat (dir, &st) < 0)
-+    grub_util_error ("cannot stat `%s'", dir);
-+
-+  dev = st.st_dev;
-+  
- #ifdef __CYGWIN__
-   /* Cygwin specific function.  */
-   os_dev = grub_find_device (dir, dev);

var/vabs/grub2/src/patches/txtHRnXiHYUrM.txt.gz

Binary file added.