[arch-commits] Commit in grub/repos (10 files)

Christian Hesse eworm at archlinux.org
Fri Dec 1 07:58:29 UTC 2017


    Date: Friday, December 1, 2017 @ 07:58:26
  Author: eworm
Revision: 311207

archrelease: copy trunk to testing-x86_64

Added:
  grub/repos/testing-x86_64/
  grub/repos/testing-x86_64/0002-intel-ucode.patch
    (from rev 311206, grub/trunk/0002-intel-ucode.patch)
  grub/repos/testing-x86_64/0003-10_linux-detect-archlinux-initramfs.patch
    (from rev 311206, grub/trunk/0003-10_linux-detect-archlinux-initramfs.patch)
  grub/repos/testing-x86_64/0004-add-GRUB_COLOR_variables.patch
    (from rev 311206, grub/trunk/0004-add-GRUB_COLOR_variables.patch)
  grub/repos/testing-x86_64/0005-Allow_GRUB_to_mount_ext234_filesystems_that_have_the_encryption_feature.patch
    (from rev 311206, grub/trunk/0005-Allow_GRUB_to_mount_ext234_filesystems_that_have_the_encryption_feature.patch)
  grub/repos/testing-x86_64/0006-tsc-Change-default-tsc-calibration-method-to-pmtimer-on-EFI-systems.patch
    (from rev 311206, grub/trunk/0006-tsc-Change-default-tsc-calibration-method-to-pmtimer-on-EFI-systems.patch)
  grub/repos/testing-x86_64/PKGBUILD
    (from rev 311206, grub/trunk/PKGBUILD)
  grub/repos/testing-x86_64/grub.cfg
    (from rev 311206, grub/trunk/grub.cfg)
  grub/repos/testing-x86_64/grub.default
    (from rev 311206, grub/trunk/grub.default)
  grub/repos/testing-x86_64/grub.install
    (from rev 311206, grub/trunk/grub.install)

------------------------------------------------------------------------------------+
 0002-intel-ucode.patch                                                             |   52 +
 0003-10_linux-detect-archlinux-initramfs.patch                                     |   44 +
 0004-add-GRUB_COLOR_variables.patch                                                |   32 
 0005-Allow_GRUB_to_mount_ext234_filesystems_that_have_the_encryption_feature.patch |  140 +++
 0006-tsc-Change-default-tsc-calibration-method-to-pmtimer-on-EFI-systems.patch     |   31 
 PKGBUILD                                                                           |  373 ++++++++++
 grub.cfg                                                                           |  139 +++
 grub.default                                                                       |   54 +
 grub.install                                                                       |   15 
 9 files changed, 880 insertions(+)

Copied: grub/repos/testing-x86_64/0002-intel-ucode.patch (from rev 311206, grub/trunk/0002-intel-ucode.patch)
===================================================================
--- testing-x86_64/0002-intel-ucode.patch	                        (rev 0)
+++ testing-x86_64/0002-intel-ucode.patch	2017-12-01 07:58:26 UTC (rev 311207)
@@ -0,0 +1,52 @@
+diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
+index de9044c..f5d3e78 100644
+--- a/util/grub.d/10_linux.in
++++ b/util/grub.d/10_linux.in
+@@ -133,13 +133,15 @@ linux_entry ()
+ 	echo	'$(echo "$message" | grub_quote)'
+ 	linux	${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
+ EOF
+-  if test -n "${initrd}" ; then
++  if test -n "${initrd}" -o -n "${initrd_extra}" ; then
+     # TRANSLATORS: ramdisk isn't identifier. Should be translated.
+     message="$(gettext_printf "Loading initial ramdisk ...")"
+-    sed "s/^/$submenu_indentation/" << EOF
+-	echo	'$(echo "$message" | grub_quote)'
+-	initrd	${rel_dirname}/${initrd}
+-EOF
++    printf '	%s\n' "echo	'$(echo "$message" | grub_quote)'" | sed "s/^/$submenu_indentation/"
++    printf '	%s ' 'initrd' | sed "s/^/$submenu_indentation/"
++    for i in ${initrd_extra} ${initrd}; do
++	printf ' %s/%s' "${rel_dirname}" "${i}"
++    done
++    printf '\n'
+   fi
+   sed "s/^/$submenu_indentation/" << EOF
+ }
+@@ -202,6 +204,12 @@ while [ "x$list" != "x" ] ; do
+       break
+     fi
+   done
++  initrd_extra=
++  for i in intel-ucode.img; do
++    if test -e "${dirname}/${i}" ; then
++      initrd_extra="${initrd_extra} ${i}"
++    fi
++  done
+ 
+   config=
+   for i in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do
+@@ -216,8 +224,8 @@ while [ "x$list" != "x" ] ; do
+       initramfs=`grep CONFIG_INITRAMFS_SOURCE= "${config}" | cut -f2 -d= | tr -d \"`
+   fi
+ 
+-  if test -n "${initrd}" ; then
+-    gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2
++  if test -n "${initrd}" -o -n "${initrd_extra}" ; then
++    gettext_printf "Found initrd image(s) in %s:%s\n" "${dirname}" "${initrd_extra} ${initrd}" >&2
+   elif test -z "${initramfs}" ; then
+     # "UUID=" and "ZFS=" magic is parsed by initrd or initramfs.  Since there's
+     # no initrd or builtin initramfs, it can't work here.
+-- 
+2.9.2
+

Copied: grub/repos/testing-x86_64/0003-10_linux-detect-archlinux-initramfs.patch (from rev 311206, grub/trunk/0003-10_linux-detect-archlinux-initramfs.patch)
===================================================================
--- testing-x86_64/0003-10_linux-detect-archlinux-initramfs.patch	                        (rev 0)
+++ testing-x86_64/0003-10_linux-detect-archlinux-initramfs.patch	2017-12-01 07:58:26 UTC (rev 311207)
@@ -0,0 +1,44 @@
+diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
+index f5d3e78..ef59c8c 100644
+--- a/util/grub.d/10_linux.in
++++ b/util/grub.d/10_linux.in
+@@ -83,6 +83,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
+@@ -186,7 +188,7 @@ while [ "x$list" != "x" ] ; do
+   basename=`basename $linux`
+   dirname=`dirname $linux`
+   rel_dirname=`make_system_path_relative_to_its_root $dirname`
+-  version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
++  version=`echo $basename | sed -e "s,vmlinuz-,,g"`
+   alt_version=`echo $version | sed -e "s,\.old$,,g"`
+   linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
+ 
+@@ -248,6 +250,18 @@ while [ "x$list" != "x" ] ; do
+ 
+   linux_entry "${OS}" "${version}" advanced \
+               "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
++
++  if test -e "${dirname}/initramfs-${version}-fallback.img" ; then
++    initrd="initramfs-${version}-fallback.img"
++
++    if test -n "${initrd}" ; then
++      gettext_printf "Found fallback initrd image(s) in %s:%s\n" "${dirname}" "${initrd_extra} ${initrd}" >&2
++    fi
++
++    linux_entry "${OS}" "${version}" fallback \
++                "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
++  fi
++
+   if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
+     linux_entry "${OS}" "${version}" recovery \
+                 "single ${GRUB_CMDLINE_LINUX}"
+-- 
+2.9.2
+

Copied: grub/repos/testing-x86_64/0004-add-GRUB_COLOR_variables.patch (from rev 311206, grub/trunk/0004-add-GRUB_COLOR_variables.patch)
===================================================================
--- testing-x86_64/0004-add-GRUB_COLOR_variables.patch	                        (rev 0)
+++ testing-x86_64/0004-add-GRUB_COLOR_variables.patch	2017-12-01 07:58:26 UTC (rev 311207)
@@ -0,0 +1,32 @@
+diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
+index 3390ba9..c416489 100644
+--- a/util/grub-mkconfig.in
++++ b/util/grub-mkconfig.in
+@@ -218,6 +218,8 @@ export GRUB_DEFAULT \
+   GRUB_THEME \
+   GRUB_GFXPAYLOAD_LINUX \
+   GRUB_DISABLE_OS_PROBER \
++  GRUB_COLOR_NORMAL \
++  GRUB_COLOR_HIGHLIGHT \
+   GRUB_INIT_TUNE \
+   GRUB_SAVEDEFAULT \
+   GRUB_ENABLE_CRYPTODISK \
+diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
+index d2e7252..8259f45 100644
+--- a/util/grub.d/00_header.in
++++ b/util/grub.d/00_header.in
+@@ -125,6 +125,14 @@ cat <<EOF
+ 
+ EOF
+ 
++if [ x$GRUB_COLOR_NORMAL != x ] && [ x$GRUB_COLOR_HIGHLIGHT != x ] ; then
++    cat << EOF
++set menu_color_normal=$GRUB_COLOR_NORMAL
++set menu_color_highlight=$GRUB_COLOR_HIGHLIGHT
++
++EOF
++fi
++
+ serial=0;
+ gfxterm=0;
+ for x in ${GRUB_TERMINAL_INPUT} ${GRUB_TERMINAL_OUTPUT}; do

Copied: grub/repos/testing-x86_64/0005-Allow_GRUB_to_mount_ext234_filesystems_that_have_the_encryption_feature.patch (from rev 311206, grub/trunk/0005-Allow_GRUB_to_mount_ext234_filesystems_that_have_the_encryption_feature.patch)
===================================================================
--- testing-x86_64/0005-Allow_GRUB_to_mount_ext234_filesystems_that_have_the_encryption_feature.patch	                        (rev 0)
+++ testing-x86_64/0005-Allow_GRUB_to_mount_ext234_filesystems_that_have_the_encryption_feature.patch	2017-12-01 07:58:26 UTC (rev 311207)
@@ -0,0 +1,140 @@
+From 734668238fcc0ef691a080839e04f33854fa133a Mon Sep 17 00:00:00 2001
+From: Eric Biggers <ebiggers at google.com>
+Date: Thu, 29 Jun 2017 13:27:49 +0000
+Subject: Allow GRUB to mount ext2/3/4 filesystems that have the encryption
+ feature.
+
+On such a filesystem, inodes may have EXT4_ENCRYPT_FLAG set.
+For a regular file, this means its contents are encrypted; for a
+directory, this means the filenames in its directory entries are
+encrypted; and for a symlink, this means its target is encrypted.  Since
+GRUB cannot decrypt encrypted contents or filenames, just issue an error
+if it would need to do so.  This is sufficient to allow unencrypted boot
+files to co-exist with encrypted files elsewhere on the filesystem.
+
+(Note that encrypted regular files and symlinks will not normally be
+encountered outside an encrypted directory; however, it's possible via
+hard links, so they still need to be handled.)
+
+Tested by booting from an ext4 /boot partition on which I had run
+'tune2fs -O encrypt'.  I also verified that the expected error messages
+are printed when trying to access encrypted directories, files, and
+symlinks from the GRUB command line.  Also ran 'sudo ./grub-fs-tester
+ext4_encrypt'; note that this requires e2fsprogs v1.43+ and Linux v4.1+.
+
+Signed-off-by: Eric Biggers <ebiggers at google.com>
+---
+ grub-core/fs/ext2.c          | 23 ++++++++++++++++++++++-
+ tests/ext234_test.in         |  1 +
+ tests/util/grub-fs-tester.in | 10 ++++++++++
+ 3 files changed, 33 insertions(+), 1 deletion(-)
+
+diff --git a/grub-core/fs/ext2.c b/grub-core/fs/ext2.c
+index cdce63b..b8ad75a 100644
+--- a/grub-core/fs/ext2.c
++++ b/grub-core/fs/ext2.c
+@@ -102,6 +102,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
+ #define EXT4_FEATURE_INCOMPAT_64BIT		0x0080
+ #define EXT4_FEATURE_INCOMPAT_MMP		0x0100
+ #define EXT4_FEATURE_INCOMPAT_FLEX_BG		0x0200
++#define EXT4_FEATURE_INCOMPAT_ENCRYPT          0x10000
+ 
+ /* The set of back-incompatible features this driver DOES support. Add (OR)
+  * flags here as the related features are implemented into the driver.  */
+@@ -109,7 +110,8 @@ GRUB_MOD_LICENSE ("GPLv3+");
+                                        | EXT4_FEATURE_INCOMPAT_EXTENTS  \
+                                        | EXT4_FEATURE_INCOMPAT_FLEX_BG \
+                                        | EXT2_FEATURE_INCOMPAT_META_BG \
+-                                       | EXT4_FEATURE_INCOMPAT_64BIT)
++                                       | EXT4_FEATURE_INCOMPAT_64BIT \
++                                       | EXT4_FEATURE_INCOMPAT_ENCRYPT)
+ /* List of rationales for the ignored "incompatible" features:
+  * needs_recovery: Not really back-incompatible - was added as such to forbid
+  *                 ext2 drivers from mounting an ext3 volume with a dirty
+@@ -138,6 +140,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
+ #define EXT3_JOURNAL_FLAG_DELETED	4
+ #define EXT3_JOURNAL_FLAG_LAST_TAG	8
+ 
++#define EXT4_ENCRYPT_FLAG              0x800
+ #define EXT4_EXTENTS_FLAG		0x80000
+ 
+ /* The ext2 superblock.  */
+@@ -706,6 +709,12 @@ grub_ext2_read_symlink (grub_fshelp_node_t node)
+       grub_ext2_read_inode (diro->data, diro->ino, &diro->inode);
+       if (grub_errno)
+ 	return 0;
++
++      if (diro->inode.flags & grub_cpu_to_le32_compile_time (EXT4_ENCRYPT_FLAG))
++       {
++         grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, "symlink is encrypted");
++         return 0;
++       }
+     }
+ 
+   symlink = grub_malloc (grub_le_to_cpu32 (diro->inode.size) + 1);
+@@ -749,6 +758,12 @@ grub_ext2_iterate_dir (grub_fshelp_node_t dir,
+ 	return 0;
+     }
+ 
++  if (diro->inode.flags & grub_cpu_to_le32_compile_time (EXT4_ENCRYPT_FLAG))
++    {
++      grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, "directory is encrypted");
++      return 0;
++    }
++
+   /* Search the file.  */
+   while (fpos < grub_le_to_cpu32 (diro->inode.size))
+     {
+@@ -859,6 +874,12 @@ grub_ext2_open (struct grub_file *file, const char *name)
+ 	goto fail;
+     }
+ 
++  if (fdiro->inode.flags & grub_cpu_to_le32_compile_time (EXT4_ENCRYPT_FLAG))
++    {
++      err = grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, "file is encrypted");
++      goto fail;
++    }
++
+   grub_memcpy (data->inode, &fdiro->inode, sizeof (struct grub_ext2_inode));
+   grub_free (fdiro);
+ 
+diff --git a/tests/ext234_test.in b/tests/ext234_test.in
+index 892b99c..4f1eb52 100644
+--- a/tests/ext234_test.in
++++ b/tests/ext234_test.in
+@@ -30,3 +30,4 @@ fi
+ "@builddir@/grub-fs-tester" ext3
+ "@builddir@/grub-fs-tester" ext4
+ "@builddir@/grub-fs-tester" ext4_metabg
++"@builddir@/grub-fs-tester" ext4_encrypt
+diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in
+index 88cbe73..fd7e0f1 100644
+--- a/tests/util/grub-fs-tester.in
++++ b/tests/util/grub-fs-tester.in
+@@ -156,6 +156,12 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
+ 		# Could go further but what's the point?
+ 	    MAXBLKSIZE=$((65536*1024))
+ 	    ;;
++       xext4_encrypt)
++           # OS LIMITATION: Linux currently only allows the 'encrypt' feature
++           # in combination with block_size = PAGE_SIZE (4096 bytes on x86).
++           MINBLKSIZE=$(getconf PAGE_SIZE)
++           MAXBLKSIZE=$MINBLKSIZE
++           ;;
+ 	xext*)
+ 	    MINBLKSIZE=1024
+ 	    if [ $MINBLKSIZE -lt $SECSIZE ]; then
+@@ -796,6 +802,10 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
+ 		    MKE2FS_DEVICE_SECTSIZE=$SECSIZE "mkfs.ext4" -O meta_bg,^resize_inode -b $BLKSIZE -L "$FSLABEL" -q "${MOUNTDEVICE}"
+ 		    MOUNTFS=ext4
+ 		    ;;
++               xext4_encrypt)
++                   MKE2FS_DEVICE_SECTSIZE=$SECSIZE "mkfs.ext4" -O encrypt -b $BLKSIZE -L "$FSLABEL" -q "${MOUNTDEVICE}"
++                   MOUNTFS=ext4
++                   ;;
+ 		xext*)
+ 		    MKE2FS_DEVICE_SECTSIZE=$SECSIZE "mkfs.$fs" -b $BLKSIZE -L "$FSLABEL" -q "${MOUNTDEVICE}" ;;
+ 		xxfs)
+-- 
+cgit v1.0-41-gc330
+

Copied: grub/repos/testing-x86_64/0006-tsc-Change-default-tsc-calibration-method-to-pmtimer-on-EFI-systems.patch (from rev 311206, grub/trunk/0006-tsc-Change-default-tsc-calibration-method-to-pmtimer-on-EFI-systems.patch)
===================================================================
--- testing-x86_64/0006-tsc-Change-default-tsc-calibration-method-to-pmtimer-on-EFI-systems.patch	                        (rev 0)
+++ testing-x86_64/0006-tsc-Change-default-tsc-calibration-method-to-pmtimer-on-EFI-systems.patch	2017-12-01 07:58:26 UTC (rev 311207)
@@ -0,0 +1,31 @@
+From 446794de8da4329ea532cbee4ca877bcafd0e534 Mon Sep 17 00:00:00 2001
+From: "David E. Box" <david.e.box at linux.intel.com>
+Date: Fri, 15 Sep 2017 15:37:05 -0700
+Subject: tsc: Change default tsc calibration method to pmtimer on EFI systems
+
+On efi systems, make pmtimer based tsc calibration the default over the
+pit. This prevents Grub from hanging on Intel SoC systems that power gate
+the pit.
+
+Signed-off-by: David E. Box <david.e.box at linux.intel.com>
+Reviewed-by: Daniel Kiper <daniel.kiper at oracle.com>
+---
+ grub-core/kern/i386/tsc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/grub-core/kern/i386/tsc.c b/grub-core/kern/i386/tsc.c
+index 2e85289d8..f266eb131 100644
+--- a/grub-core/kern/i386/tsc.c
++++ b/grub-core/kern/i386/tsc.c
+@@ -68,7 +68,7 @@ grub_tsc_init (void)
+ #ifdef GRUB_MACHINE_XEN
+   (void) (grub_tsc_calibrate_from_xen () || calibrate_tsc_hardcode());
+ #elif defined (GRUB_MACHINE_EFI)
+-  (void) (grub_tsc_calibrate_from_pit () || grub_tsc_calibrate_from_pmtimer () || grub_tsc_calibrate_from_efi() || calibrate_tsc_hardcode());
++  (void) (grub_tsc_calibrate_from_pmtimer () || grub_tsc_calibrate_from_pit () || grub_tsc_calibrate_from_efi() || calibrate_tsc_hardcode());
+ #elif defined (GRUB_MACHINE_COREBOOT)
+   (void) (grub_tsc_calibrate_from_pmtimer () || grub_tsc_calibrate_from_pit () || calibrate_tsc_hardcode());
+ #else
+-- 
+cgit v1.1-26-g67d0
+

Copied: grub/repos/testing-x86_64/PKGBUILD (from rev 311206, grub/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2017-12-01 07:58:26 UTC (rev 311207)
@@ -0,0 +1,373 @@
+# Maintainer : Christian Hesse <mail at eworm.de>
+# Maintainer : Ronald van Haren <ronald.archlinux.org>
+# Contributor: Tobias Powalowski <tpowa at archlinux.org>
+# Contributor: Keshav Amburay <(the ddoott ridikulus ddoott rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)>
+
+## "1" to enable IA32-EFI build in Arch x86_64, "0" to disable
+_IA32_EFI_IN_ARCH_X64="1"
+
+## "1" to enable EMU build, "0" to disable
+_GRUB_EMU_BUILD="0"
+
+_GRUB_EXTRAS_COMMIT="f2a079441939eee7251bf141986cdd78946e1d20"
+
+_UNIFONT_VER="10.0.06"
+
+[[ "${CARCH}" == "x86_64" ]] && _EFI_ARCH="x86_64"
+[[ "${CARCH}" == "i686" ]] && _EFI_ARCH="i386"
+
+[[ "${CARCH}" == "x86_64" ]] && _EMU_ARCH="x86_64"
+[[ "${CARCH}" == "i686" ]] && _EMU_ARCH="i386"
+
+pkgname="grub"
+pkgdesc="GNU GRand Unified Bootloader (2)"
+pkgver=2.02
+pkgrel=4
+epoch=2
+url="https://www.gnu.org/software/grub/"
+arch=('x86_64')
+license=('GPL3')
+backup=('boot/grub/grub.cfg'
+        'etc/default/grub'
+        'etc/grub.d/40_custom')
+install="${pkgname}.install"
+options=('!makeflags')
+
+conflicts=('grub-common' 'grub-bios' 'grub-emu' "grub-efi-${_EFI_ARCH}" 'grub-legacy')
+replaces=('grub-common' 'grub-bios' 'grub-emu' "grub-efi-${_EFI_ARCH}")
+provides=('grub-common' 'grub-bios' 'grub-emu' "grub-efi-${_EFI_ARCH}")
+
+makedepends=('git' 'rsync' 'xz' 'freetype2' 'ttf-dejavu' 'python' 'autogen'
+             'texinfo' 'help2man' 'gettext' 'device-mapper' 'fuse2')
+depends=('sh' 'xz' 'gettext' 'device-mapper')
+optdepends=('freetype2: For grub-mkfont usage'
+            'fuse2: For grub-mount usage'
+            'dosfstools: For grub-mkrescue FAT FS and EFI support'
+            'efibootmgr: For grub-install EFI support'
+            'libisoburn: Provides xorriso for generating grub rescue iso using grub-mkrescue'
+            'os-prober: To detect other OSes when generating grub.cfg in BIOS systems'
+            'mtools: For grub-mkrescue FAT FS support')
+
+if [[ "${_GRUB_EMU_BUILD}" == "1" ]]; then
+    makedepends+=('libusbx' 'sdl')
+    optdepends+=('libusbx: For grub-emu USB support'
+                 'sdl: For grub-emu SDL support')
+fi
+
+validpgpkeys=('E53D497F3FA42AD8C9B4D1E835A93B74E82E4209'  # Vladimir 'phcoder' Serbinenko <phcoder at gmail.com>
+              '95D2E9AB8740D8046387FD151A09227B1F435A33') # Paul Hardy <unifoundry at unifoundry.com>
+
+source=("https://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz"{,.sig}
+        "https://git.savannah.nongnu.org/cgit/grub-extras.git/snapshot/grub-extras-${_GRUB_EXTRAS_COMMIT}.tar.gz"
+        "https://ftp.gnu.org/gnu/unifont/unifont-${_UNIFONT_VER}/unifont-${_UNIFONT_VER}.bdf.gz"{,.sig}
+        '0002-intel-ucode.patch'
+        '0003-10_linux-detect-archlinux-initramfs.patch'
+        '0004-add-GRUB_COLOR_variables.patch'
+        '0005-Allow_GRUB_to_mount_ext234_filesystems_that_have_the_encryption_feature.patch'
+        '0006-tsc-Change-default-tsc-calibration-method-to-pmtimer-on-EFI-systems.patch'
+        'grub.default'
+        'grub.cfg')
+
+sha256sums=('810b3798d316394f94096ec2797909dbf23c858e48f7b3830826b8daa06b7b0f'
+            'SKIP'
+            '2844601914cea6b1231eca0104853a93c4d67a5209933a0766f1475953300646'
+            '0d81571fc519573057b7641d26a31ead55cc0b02a931589fb346a3a534c3dcc1'
+            'SKIP'
+            '37adb95049f6cdcbdbf60ed6b6440c5be99a4cd307a0f96c3c3837b6c2e07f3c'
+            'b41e4438319136b5e74e0abdfcb64ae115393e4e15207490272c425f54026dd3'
+            'a5198267ceb04dceb6d2ea7800281a42b3f91fd02da55d2cc9ea20d47273ca29'
+            '535422c510a050d41efe7720dbe54de29e04bdb8f86fd5aea5feb0b24f7abe46'
+            'c38f2b2caae33008b35a37d8293d8bf13bf6fd779a4504925da1837fd007aeb5'
+            '74e5dd2090a153c10a7b9599b73bb09e70fddc6a019dd41641b0f10b9d773d82'
+            'c5e4f3836130c6885e9273c21f057263eba53f4b7c0e2f111f6e5f2e487a47ad')
+
+prepare() {
+	cd "${srcdir}/grub-${pkgver}/"
+
+	msg "Patch to load Intel microcode"
+	patch -Np1 -i "${srcdir}/0002-intel-ucode.patch"
+	echo
+
+	msg "Patch to detect of Arch Linux initramfs images by grub-mkconfig"
+	patch -Np1 -i "${srcdir}/0003-10_linux-detect-archlinux-initramfs.patch"
+	echo
+
+	msg "Patch to enable GRUB_COLOR_* variables in grub-mkconfig"
+	## Based on http://lists.gnu.org/archive/html/grub-devel/2012-02/msg00021.html
+	patch -Np1 -i "${srcdir}/0004-add-GRUB_COLOR_variables.patch"
+	echo
+
+	msg "Patch to allow GRUB to mount ext2/3/4 filesystems that have the encryption feature"
+	patch -Np1 -i "${srcdir}/0005-Allow_GRUB_to_mount_ext234_filesystems_that_have_the_encryption_feature.patch"
+	echo
+
+	msg "Patch to change default tsc calibration method to pmtimer on EFI systems"
+	patch -Np1 -i "${srcdir}/0006-tsc-Change-default-tsc-calibration-method-to-pmtimer-on-EFI-systems.patch"
+	echo
+
+	msg "Fix DejaVuSans.ttf location so that grub-mkfont can create *.pf2 files for starfield theme"
+	sed 's|/usr/share/fonts/dejavu|/usr/share/fonts/dejavu /usr/share/fonts/TTF|g' -i "configure.ac"
+
+	msg "Fix mkinitcpio 'rw' FS#36275"
+	sed 's| ro | rw |g' -i "util/grub.d/10_linux.in"
+
+	msg "Fix OS naming FS#33393"
+	sed 's|GNU/Linux|Linux|' -i "util/grub.d/10_linux.in"
+
+	msg "Pull in latest language files"
+	./linguas.sh
+	echo
+
+	msg "Remove not working langs which need LC_ALL=C.UTF-8"
+	sed -e 's#en at cyrillic en at greek##g' -i "po/LINGUAS"
+
+	msg "Avoid problem with unifont during compile of grub"
+	# http://savannah.gnu.org/bugs/?40330 and https://bugs.archlinux.org/task/37847
+	cp "${srcdir}/unifont-${_UNIFONT_VER}.bdf" "unifont.bdf"
+}
+
+_build_grub-common_and_bios() {
+	msg "Set ARCH dependent variables for bios build"
+	if [[ "${CARCH}" == 'x86_64' ]]; then
+		_EFIEMU="--enable-efiemu"
+	else
+		_EFIEMU="--disable-efiemu"
+	fi
+
+	msg "Copy the source for building the bios part"
+	cp -r "${srcdir}/grub-${pkgver}" "${srcdir}/grub-${pkgver}-bios"
+	cd "${srcdir}/grub-${pkgver}-bios/"
+
+	msg "Add the grub-extra sources for bios build"
+	install -d "${srcdir}/grub-${pkgver}-bios/grub-extras"
+	cp -r "${srcdir}/grub-extras-${_GRUB_EXTRAS_COMMIT}/915resolution" \
+		"${srcdir}/grub-${pkgver}-bios/grub-extras/915resolution"
+	export GRUB_CONTRIB="${srcdir}/grub-${pkgver}-bios/grub-extras/"
+
+	msg "Unset all compiler FLAGS for bios build"
+	unset CFLAGS
+	unset CPPFLAGS
+	unset CXXFLAGS
+	unset LDFLAGS
+	unset MAKEFLAGS
+
+	msg "Run autogen.sh for bios build"
+	./autogen.sh
+	echo
+
+	msg "Run ./configure for bios build"
+	./configure \
+		--with-platform="pc" \
+		--target="i386" \
+		"${_EFIEMU}" \
+		--enable-mm-debug \
+		--enable-nls \
+		--enable-device-mapper \
+		--enable-cache-stats \
+		--enable-boot-time \
+		--enable-grub-mkfont \
+		--enable-grub-mount \
+		--prefix="/usr" \
+		--bindir="/usr/bin" \
+		--sbindir="/usr/bin" \
+		--mandir="/usr/share/man" \
+		--infodir="/usr/share/info" \
+		--datarootdir="/usr/share" \
+		--sysconfdir="/etc" \
+	 	--program-prefix="" \
+		--with-bootdir="/boot" \
+		--with-grubdir="grub" \
+		--disable-silent-rules \
+		--disable-werror
+	echo
+
+	msg "Run make for bios build"
+	make
+	echo
+}
+
+_build_grub-efi() {
+	msg "Copy the source for building the ${_EFI_ARCH} efi part"
+	cp -r "${srcdir}/grub-${pkgver}" "${srcdir}/grub-${pkgver}-efi-${_EFI_ARCH}"
+	cd "${srcdir}/grub-${pkgver}-efi-${_EFI_ARCH}/"
+
+	msg "Unset all compiler FLAGS for ${_EFI_ARCH} efi build"
+	unset CFLAGS
+	unset CPPFLAGS
+	unset CXXFLAGS
+	unset LDFLAGS
+	unset MAKEFLAGS
+
+	msg "Run autogen.sh for ${_EFI_ARCH} efi build"
+	./autogen.sh
+	echo
+
+	msg "Run ./configure for ${_EFI_ARCH} efi build"
+	./configure \
+		--with-platform="efi" \
+		--target="${_EFI_ARCH}" \
+		--disable-efiemu \
+		--enable-mm-debug \
+		--enable-nls \
+		--enable-device-mapper \
+		--enable-cache-stats \
+		--enable-boot-time \
+		--enable-grub-mkfont \
+		--enable-grub-mount \
+		--prefix="/usr" \
+		--bindir="/usr/bin" \
+		--sbindir="/usr/bin" \
+		--mandir="/usr/share/man" \
+		--infodir="/usr/share/info" \
+		--datarootdir="/usr/share" \
+		--sysconfdir="/etc" \
+		--program-prefix="" \
+		--with-bootdir="/boot" \
+		--with-grubdir="grub" \
+		--disable-silent-rules \
+		--disable-werror
+	echo
+
+	msg "Run make for ${_EFI_ARCH} efi build"
+	make
+	echo
+}
+
+_build_grub-emu() {
+	msg "Copy the source for building the emu part"
+	cp -r "${srcdir}/grub-${pkgver}/" "${srcdir}/grub-${pkgver}-emu/"
+	cd "${srcdir}/grub-${pkgver}-emu/"
+
+	msg "Unset all compiler FLAGS for emu build"
+	unset CFLAGS
+	unset CPPFLAGS
+	unset CXXFLAGS
+	unset LDFLAGS
+	unset MAKEFLAGS
+
+	msg "Run autogen.sh for emu build"
+	./autogen.sh
+	echo
+
+	msg "Run ./configure for emu build"
+	./configure \
+		--with-platform="emu" \
+		--target="${_EMU_ARCH}" \
+		--enable-mm-debug \
+		--enable-nls \
+		--enable-device-mapper \
+		--enable-cache-stats \
+		--enable-grub-mkfont \
+		--enable-grub-mount \
+		--enable-grub-emu-usb=no \
+		--enable-grub-emu-sdl=no \
+		--disable-grub-emu-pci \
+		--prefix="/usr" \
+		--bindir="/usr/bin" \
+		--sbindir="/usr/bin" \
+		--mandir="/usr/share/man" \
+		--infodir="/usr/share/info" \
+		--datarootdir="/usr/share" \
+		--sysconfdir="/etc" \
+		--program-prefix="" \
+		--with-bootdir="/boot" \
+		--with-grubdir="grub" \
+		--disable-silent-rules \
+		--disable-werror
+	echo
+
+	msg "Run make for emu build"
+	make
+	echo
+}
+
+build() {
+	cd "${srcdir}/grub-${pkgver}/"
+
+	msg "Build grub bios stuff"
+	_build_grub-common_and_bios
+	echo
+
+	msg "Build grub ${_EFI_ARCH} efi stuff"
+	_build_grub-efi
+	echo
+
+	if [[ "${CARCH}" == "x86_64" ]] && [[ "${_IA32_EFI_IN_ARCH_X64}" == "1" ]]; then
+		msg "Build grub i386 efi stuff"
+		_EFI_ARCH="i386" _build_grub-efi
+		echo
+	fi
+
+	if [[ "${_GRUB_EMU_BUILD}" == "1" ]]; then
+		msg "Build grub emu stuff"
+		_build_grub-emu
+		echo
+	fi
+}
+
+_package_grub-common_and_bios() {
+	cd "${srcdir}/grub-${pkgver}-bios/"
+
+	msg "Run make install for bios build"
+	make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install
+	echo
+
+	msg "Remove gdb debugging related files for bios build"
+	rm -f "${pkgdir}/usr/lib/grub/i386-pc"/*.module || true
+	rm -f "${pkgdir}/usr/lib/grub/i386-pc"/*.image || true
+	rm -f "${pkgdir}/usr/lib/grub/i386-pc"/{kernel.exec,gdb_grub,gmodule.pl} || true
+
+	msg "Install /etc/default/grub (used by grub-mkconfig)"
+	install -D -m0644 "${srcdir}/grub.default" "${pkgdir}/etc/default/grub"
+
+	msg "Install grub.cfg for backup array"
+	install -D -m0644 "${srcdir}/grub.cfg" "${pkgdir}/boot/grub/grub.cfg"
+}
+
+_package_grub-efi() {
+	cd "${srcdir}/grub-${pkgver}-efi-${_EFI_ARCH}/"
+
+	msg "Run make install for ${_EFI_ARCH} efi build"
+	make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install
+	echo
+
+	msg "Remove gdb debugging related files for ${_EFI_ARCH} efi build"
+	rm -f "${pkgdir}/usr/lib/grub/${_EFI_ARCH}-efi"/*.module || true
+	rm -f "${pkgdir}/usr/lib/grub/${_EFI_ARCH}-efi"/*.image || true
+	rm -f "${pkgdir}/usr/lib/grub/${_EFI_ARCH}-efi"/{kernel.exec,gdb_grub,gmodule.pl} || true
+}
+
+_package_grub-emu() {
+	cd "${srcdir}/grub-${pkgver}-emu/"
+
+	msg "Run make install for emu build"
+	make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install
+	echo
+
+	msg "Remove gdb debugging related files for emu build"
+	rm -f "${pkgdir}/usr/lib/grub/${_EMU_ARCH}-emu"/*.module || true
+	rm -f "${pkgdir}/usr/lib/grub/${_EMU_ARCH}-emu"/*.image || true
+	rm -f "${pkgdir}/usr/lib/grub/${_EMU_ARCH}-emu"/{kernel.exec,gdb_grub,gmodule.pl} || true
+}
+
+package() {
+	cd "${srcdir}/grub-${pkgver}/"
+
+	msg "Package grub ${_EFI_ARCH} efi stuff"
+	_package_grub-efi
+
+	if [[ "${CARCH}" == "x86_64" ]] && [[ "${_IA32_EFI_IN_ARCH_X64}" == "1" ]]; then
+		msg "Package grub i386 efi stuff"
+		_EFI_ARCH="i386" _package_grub-efi
+		echo
+	fi
+
+	if [[ "${_GRUB_EMU_BUILD}" == "1" ]]; then
+		msg "Package grub emu stuff"
+		_package_grub-emu
+		echo
+	fi
+
+	msg "Package grub bios stuff"
+	_package_grub-common_and_bios
+}

Copied: grub/repos/testing-x86_64/grub.cfg (from rev 311206, grub/trunk/grub.cfg)
===================================================================
--- testing-x86_64/grub.cfg	                        (rev 0)
+++ testing-x86_64/grub.cfg	2017-12-01 07:58:26 UTC (rev 311207)
@@ -0,0 +1,139 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically generated by grub-mkconfig using templates
+# from /etc/grub.d and settings from /etc/default/grub
+#
+
+### BEGIN /etc/grub.d/00_header ###
+insmod part_gpt
+insmod part_msdos
+if [ -s $prefix/grubenv ]; then
+  load_env
+fi
+set default="0"
+
+if [ x"${feature_menuentry_id}" = xy ]; then
+  menuentry_id_option="--id"
+else
+  menuentry_id_option=""
+fi
+
+export menuentry_id_option
+
+if [ "${prev_saved_entry}" ]; then
+  set saved_entry="${prev_saved_entry}"
+  save_env saved_entry
+  set prev_saved_entry=
+  save_env prev_saved_entry
+  set boot_once=true
+fi
+
+function savedefault {
+  if [ -z "${boot_once}" ]; then
+    saved_entry="${chosen}"
+    save_env saved_entry
+  fi
+}
+
+function load_video {
+  if [ x$feature_all_video_module = xy ]; then
+    insmod all_video
+  else
+    insmod efi_gop
+    insmod efi_uga
+    insmod ieee1275_fb
+    insmod vbe
+    insmod vga
+    insmod video_bochs
+    insmod video_cirrus
+  fi
+}
+
+if [ x$feature_default_font_path = xy ] ; then
+   font=unicode
+else
+insmod part_msdos
+insmod ext2
+set root='hd0,msdos5'
+if [ x$feature_platform_search_hint = xy ]; then
+  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  ad4103fa-d940-47ca-8506-301d8071d467
+else
+  search --no-floppy --fs-uuid --set=root ad4103fa-d940-47ca-8506-301d8071d467
+fi
+    font="/usr/share/grub/unicode.pf2"
+fi
+
+if loadfont $font ; then
+  set gfxmode=auto
+  load_video
+  insmod gfxterm
+  set locale_dir=$prefix/locale
+  set lang=en_US
+  insmod gettext
+fi
+terminal_input console
+terminal_output gfxterm
+set timeout=5
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'Arch Linux, with Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-ad4103fa-d940-47ca-8506-301d8071d467' {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod ext2
+	set root='hd0,msdos5'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  ad4103fa-d940-47ca-8506-301d8071d467
+	else
+	  search --no-floppy --fs-uuid --set=root ad4103fa-d940-47ca-8506-301d8071d467
+	fi
+	echo	'Loading Linux core repo kernel ...'
+	linux	/boot/vmlinuz-linux root=UUID=ad4103fa-d940-47ca-8506-301d8071d467 rw  quiet
+	echo	'Loading initial ramdisk ...'
+	initrd	/boot/initramfs-linux.img
+}
+menuentry 'Arch Linux, with Linux core repo kernel (Fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-fallback-ad4103fa-d940-47ca-8506-301d8071d467' {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod ext2
+	set root='hd0,msdos5'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  ad4103fa-d940-47ca-8506-301d8071d467
+	else
+	  search --no-floppy --fs-uuid --set=root ad4103fa-d940-47ca-8506-301d8071d467
+	fi
+	echo	'Loading Linux core repo kernel ...'
+	linux	/boot/vmlinuz-linux root=UUID=ad4103fa-d940-47ca-8506-301d8071d467 rw  quiet
+	echo	'Loading initial ramdisk ...'
+	initrd	/boot/initramfs-linux-fallback.img
+}
+
+### END /etc/grub.d/10_linux ###
+
+### BEGIN /etc/grub.d/20_linux_xen ###
+### END /etc/grub.d/20_linux_xen ###
+
+### BEGIN /etc/grub.d/20_memtest86+ ###
+### END /etc/grub.d/20_memtest86+ ###
+
+### BEGIN /etc/grub.d/30_os-prober ###
+### END /etc/grub.d/30_os-prober ###
+
+### BEGIN /etc/grub.d/40_custom ###
+# This file provides an easy way to add custom menu entries.  Simply type the
+# menu entries you want to add after this comment.  Be careful not to change
+# the 'exec tail' line above.
+### END /etc/grub.d/40_custom ###
+
+### BEGIN /etc/grub.d/41_custom ###
+if [ -f  ${config_directory}/custom.cfg ]; then
+  source ${config_directory}/custom.cfg
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###

Copied: grub/repos/testing-x86_64/grub.default (from rev 311206, grub/trunk/grub.default)
===================================================================
--- testing-x86_64/grub.default	                        (rev 0)
+++ testing-x86_64/grub.default	2017-12-01 07:58:26 UTC (rev 311207)
@@ -0,0 +1,54 @@
+# GRUB boot loader configuration
+
+GRUB_DEFAULT=0
+GRUB_TIMEOUT=5
+GRUB_DISTRIBUTOR="Arch"
+GRUB_CMDLINE_LINUX_DEFAULT="quiet"
+GRUB_CMDLINE_LINUX=""
+
+# Preload both GPT and MBR modules so that they are not missed
+GRUB_PRELOAD_MODULES="part_gpt part_msdos"
+
+# Uncomment to enable booting from LUKS encrypted devices
+#GRUB_ENABLE_CRYPTODISK=y
+
+# Uncomment to enable Hidden Menu, and optionally hide the timeout count
+#GRUB_HIDDEN_TIMEOUT=5
+#GRUB_HIDDEN_TIMEOUT_QUIET=true
+
+# Uncomment to use basic console
+GRUB_TERMINAL_INPUT=console
+
+# Uncomment to disable graphical terminal
+#GRUB_TERMINAL_OUTPUT=console
+
+# The resolution used on graphical terminal
+# note that you can use only modes which your graphic card supports via VBE
+# you can see them in real GRUB with the command `vbeinfo'
+GRUB_GFXMODE=auto
+
+# Uncomment to allow the kernel use the same resolution used by grub
+GRUB_GFXPAYLOAD_LINUX=keep
+
+# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
+# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
+#GRUB_DISABLE_LINUX_UUID=true
+
+# Uncomment to disable generation of recovery mode menu entries
+GRUB_DISABLE_RECOVERY=true
+
+# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
+# modes only.  Entries specified as foreground/background.
+#GRUB_COLOR_NORMAL="light-blue/black"
+#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"
+
+# Uncomment one of them for the gfx desired, a image background or a gfxtheme
+#GRUB_BACKGROUND="/path/to/wallpaper"
+#GRUB_THEME="/path/to/gfxtheme"
+
+# Uncomment to get a beep at GRUB start
+#GRUB_INIT_TUNE="480 440 1"
+
+# Uncomment to make GRUB remember the last selection. This requires to
+# set 'GRUB_DEFAULT=saved' above.
+#GRUB_SAVEDEFAULT="true"

Copied: grub/repos/testing-x86_64/grub.install (from rev 311206, grub/trunk/grub.install)
===================================================================
--- testing-x86_64/grub.install	                        (rev 0)
+++ testing-x86_64/grub.install	2017-12-01 07:58:26 UTC (rev 311207)
@@ -0,0 +1,15 @@
+post_install() {
+  if [ -f /boot/grub/grub.cfg.pacsave ]; then
+    echo "Copying /boot/grub/grub.cfg.pacsave to /boot/grub/grub.cfg"
+    install -D -m0644 /boot/grub/grub.cfg.pacsave /boot/grub/grub.cfg
+  fi
+
+  cat << 'EOM'
+Generating grub.cfg.example config file...
+This may fail on some machines running a custom kernel.
+EOM
+
+  grub-mkconfig -o /boot/grub/grub.cfg.example 2> /dev/null
+  echo "done."
+}
+



More information about the arch-commits mailing list