[arch-commits] Commit in grub2/trunk (PKGBUILD archlinux_grub_mkconfig_fixes.patch)

Ronald van Haren ronald at archlinux.org
Wed Mar 21 04:05:35 EDT 2012


    Date: Wednesday, March 21, 2012 @ 04:05:34
  Author: ronald
Revision: 153983

upgpkg: grub 1:2.00beta2-2

FS#25453

Modified:
  grub2/trunk/PKGBUILD
  grub2/trunk/archlinux_grub_mkconfig_fixes.patch

-------------------------------------+
 PKGBUILD                            |   30 ++-----
 archlinux_grub_mkconfig_fixes.patch |  128 ++++++++++++++++++++++------------
 2 files changed, 95 insertions(+), 63 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-03-21 07:47:25 UTC (rev 153982)
+++ PKGBUILD	2012-03-21 08:05:34 UTC (rev 153983)
@@ -1,24 +1,24 @@
 # Maintainer: Ronald van Haren <ronald.archlinux.org>
 # Contributor: Keshav P R <(the.ridikulus.rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)>
 
-_grub_bzr_rev="4174"
+_grub_bzr_rev="4169"
 _pkgver="2.00~beta2"
 
-_grub_lua_ver="23"
-_grub_gpxe_ver="12"
-_grub_ntldr_ver="21"
-_grub_915_ver="9"
+_grub_lua_ver=24
+_grub_gpxe_ver=12
+_grub_ntldr_ver=21
+_grub_915_ver=9
 
 pkgname=('grub2-common' 'grub2-bios' 'grub2-efi-i386')
-pkgbase="grub2"
-pkgver="2.00beta2"
-pkgrel="1"
+pkgbase=grub
+pkgver=2.00beta2
+pkgrel=2
 url="http://www.gnu.org/software/grub/"
 arch=('i686' 'x86_64')
 license=('GPL3')
 epoch="1"
 makedepends=('rsync' 'xz' 'bdf-unifont' 'python' 'autogen' 'texinfo'
-	'help2man' 'gettext' 'device-mapper' 'fuse')
+	'help2man' 'gettext' 'device-mapper' 'fuse' 'dosfstools' 'efibootmgr')
 
 # source=("ftp://ftp.archlinux.org/other/grub2/grub_r${_grub_bzr_rev}.tar.xz"
 source=("http://alpha.gnu.org/gnu/grub/grub-${_pkgver}".tar.xz
@@ -27,7 +27,6 @@
         "ftp://ftp.archlinux.org/other/grub2/grub2_extras_ntldr-img_r${_grub_ntldr_ver}.tar.xz"
         "ftp://ftp.archlinux.org/other/grub2/grub2_extras_915resolution_r${_grub_915_ver}.tar.xz"
         'archlinux_grub_mkconfig_fixes.patch'
-        'grub_extras_lua_args_fix.patch'
         'grub.default'
         'grub.cfg'
         '20_memtest86+')
@@ -38,12 +37,11 @@
            "grub2_extras_915resolution_r${_grub_915_ver}.tar.xz")
 
 sha1sums=('2ba583f9466fb676b0ae3d7a9a82d1299b153a98'
-          'a09a4cbfd2f23699028ecd09c397bdc1bebf16aa'
+          '89290031b974780c6df76893836d2477d4add895'
           'b04994c005910b4bf123f034b30109d5c8d6fd86'
           'eb4b35b4c36b64f9405cbcbc538cb205171c1c0a'
           'd5ae2efec25616028a9d89e98b6e454f1c4c415f'
-          'e29559b3b97b773386364d8f99334ca0c60ee98a'
-          'f7d4014d71aa2e693c57920b504f64bc792217ef'
+          '3323e6167878ee123ebc0c63c6880df95c5604cc'
           'a76b251b110c9c2d49d2340e4ae932db13ad75bd'
           'fd422806c87905f9cabe1f0dc13e544e5fc09e53'
           'ce35d7ae75cd1b5b677e894e528f96add40e77b9')
@@ -74,9 +72,6 @@
 	bsdtar xf "${srcdir}/grub2_extras_915resolution_r${_grub_915_ver}.tar.xz" \
 		-C "${srcdir}/grub_bios-${_pkgver}/grub-extras"
 
-	## Fix args lua grub-extras
-	patch -Np1 -i "${srcdir}/grub_extras_lua_args_fix.patch"
-
 	## Requires python2
 	# sed 's|python |python2 |g' -i "${srcdir}/grub_bios-${_pkgver}/autogen.sh"
 
@@ -132,9 +127,6 @@
 	bsdtar xf "${srcdir}/grub2_extras_gpxe_r${_grub_gpxe_ver}.tar.xz" \
 		-C "${srcdir}/grub_efi-${_pkgver}/grub-extras"
 
-	## Fix args lua grub-extras
-	patch -Np1 -i "${srcdir}/grub_extras_lua_args_fix.patch"
-
 	## Requires python2
 	# sed 's|python |python2 |g' -i "${srcdir}/grub_efi-${_pkgver}/autogen.sh"
 

Modified: archlinux_grub_mkconfig_fixes.patch
===================================================================
--- archlinux_grub_mkconfig_fixes.patch	2012-03-21 07:47:25 UTC (rev 153982)
+++ archlinux_grub_mkconfig_fixes.patch	2012-03-21 08:05:34 UTC (rev 153983)
@@ -31,60 +31,54 @@
  gfxterm=0;
  for x in ${GRUB_TERMINAL_INPUT} ${GRUB_TERMINAL_OUTPUT}; do
 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
-index 8c75fab..62e87e1 100644
+index 8c75fab..0e00d19 100644
 --- a/util/grub.d/10_linux.in
 +++ b/util/grub.d/10_linux.in
-@@ -31,8 +31,8 @@ CLASS="--class gnu-linux --class gnu --class os"
- 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}"
-+  OS="${GRUB_DISTRIBUTOR}"
-+  CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | tr -d ' ') ${CLASS}"
- fi
+@@ -87,6 +87,8 @@ linux_entry ()
+       case $type in
+ 	  recovery)
+ 	      title="$(gettext_printf "%s, with Linux %s (recovery mode)" "${os}" "${version}")" ;;
++	  fallback)
++	      title="$(gettext_printf "%s, with Linux %s (Fallback initramfs)" "${os}" "${version}")" ;;
+ 	  *)
+ 	      title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;;
+       esac
+@@ -100,7 +102,7 @@ linux_entry ()
+   else
+       echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
+   fi      
+-  if [ x$type != xrecovery ] ; then
++  if [ x$type != xrecovery ] && [ x$type != xfallback ] ; then
+       save_default_entry | sed -e "s/^/\t/"
+   fi
  
- # loop-AES arranges things so that /dev/loop/X can be our root device, but
-@@ -48,7 +48,7 @@ if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue"
-     || uses_abstraction "${GRUB_DEVICE}" lvm; then
-   LINUX_ROOT_DEVICE=${GRUB_DEVICE}
- else
--  LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
-+  LINUX_ROOT_DEVICE="/dev/disk/by-uuid/${GRUB_DEVICE_UUID}"
- fi
- 
- GRUBFS="`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2>/dev/null || true`"
-@@ -132,6 +132,7 @@ linux_entry ()
+@@ -132,7 +134,8 @@ linux_entry ()
      fi
      printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
    fi
+-  message="$(gettext_printf "Loading Linux %s ..." ${version})"
 +
-   message="$(gettext_printf "Loading Linux %s ..." ${version})"
++  message="$(gettext_printf "Loading Linux %s ..." "${version}")"
    sed "s/^/$submenu_indentation/" << EOF
  	echo	'$message'
-@@ -152,11 +153,11 @@ EOF
- 
- case x`uname -m` in
-     xi?86 | xx86_64)
--	list=`for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do
-+	list=`for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* /boot/vmlinuz26-* ; 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
-+	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
-@@ -178,16 +179,19 @@ while [ "x$list" != "x" ] ; do
-   dirname=`dirname $linux`
-   rel_dirname=`make_system_path_relative_to_its_root $dirname`
-   version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
--  alt_version=`echo $version | sed -e "s,\.old$,,g"`
-+  base_init=`echo $basename | sed -e "s,vmlinuz,initramfs,g"`
-+  alt_version="${base_init}-fallback"
+ 	linux	${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
+@@ -181,13 +184,28 @@ while [ "x$list" != "x" ] ; do
+   alt_version=`echo $version | sed -e "s,\.old$,,g"`
    linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
  
++  if [[ "$(grep "Arch Linux" /etc/os-release)" ]]; then
++    if [[ "$(echo "${basename}" | grep "vmlinuz-linux")" ]]; then
++      version="$(echo "${basename}" | sed -e "s,vmlinuz-linux,,g")"
++      
++      if [[ "${version}" == "" ]]; then
++        version="core repo kernel"
++      else
++        version="$(echo "${version}" | sed -e "s,-,,g")"
++        version="${version} kernel"
++      fi
++    fi
++  fi
++  
    initrd=
 +
    for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \
@@ -94,7 +88,53 @@
  	   "initramfs-genkernel-${version}" \
 -	   "initramfs-genkernel-${alt_version}"; do
 +	   "initramfs-genkernel-${alt_version}" \
-+	   "${basename/vmlinuz/initramfs}.img" "${basename/vmlinuz/kernel}.img"; do
++	   "${basename/vmlinuz/initramfs}.img"; do
      if test -e "${dirname}/${i}" ; then
        initrd="$i"
        break
+@@ -215,6 +233,22 @@ while [ "x$list" != "x" ] ; do
+     linux_root_device_thisversion=${GRUB_DEVICE}
+   fi
+ 
++  if [[ "$(grep "Arch Linux" /etc/os-release)" ]]; then
++    is_first_entry="false"
++    
++    linux_entry "${OS}" "${version}" true \
++              "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
++    
++    for i in "${basename/vmlinuz/initramfs}-fallback.img" "initramfs-${version}-fallback.img" ; do
++      if test -e "${dirname}/${i}"; then
++        initrd="${i}"
++        linux_entry "${OS}" "${version}" fallback \
++                    "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
++        break
++      fi
++    done
++  fi
++
+   if [ "x$is_first_entry" = xtrue ]; then
+     linux_entry "${OS}" "${version}" simple \
+     "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
+@@ -228,8 +262,11 @@ while [ "x$list" != "x" ] ; do
+     echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {"
+   fi
+ 
++  if [[ ! "$(grep "Arch Linux" /etc/os-release)" ]]; then
+   linux_entry "${OS}" "${version}" advanced \
+               "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
++  fi
++
+   if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
+     linux_entry "${OS}" "${version}" recovery \
+                 "single ${GRUB_CMDLINE_LINUX}"
+@@ -241,8 +278,10 @@ done
+ 
+ # If at least one kernel was found, then we need to
+ # add a closing '}' for the submenu command.
++if [[ ! "$(grep "Arch Linux" /etc/os-release)" ]]; then
+ if [ x"$is_first_entry" != xtrue ]; then
+   echo '}'
+ fi
++fi
+ 
+ echo "$title_correction_code"



More information about the arch-commits mailing list