[arch-commits] Commit in grub/trunk (3 files)

2019-05-03 Thread Christian Hesse via arch-commits
Date: Friday, May 3, 2019 @ 20:43:18
  Author: eworm
Revision: 352446

commit pending changes for next release

Modified:
  grub/trunk/0003-10_linux-detect-archlinux-initramfs.patch
  grub/trunk/PKGBUILD
  grub/trunk/grub.default

+
 0003-10_linux-detect-archlinux-initramfs.patch |3 -
 PKGBUILD   |   39 ---
 grub.default   |2 -
 3 files changed, 15 insertions(+), 29 deletions(-)

Modified: 0003-10_linux-detect-archlinux-initramfs.patch
===
--- 0003-10_linux-detect-archlinux-initramfs.patch  2019-05-03 18:39:51 UTC 
(rev 352445)
+++ 0003-10_linux-detect-archlinux-initramfs.patch  2019-05-03 20:43:18 UTC 
(rev 352446)
@@ -39,6 +39,3 @@
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
  linux_entry "${OS}" "${version}" recovery \
  "single ${GRUB_CMDLINE_LINUX}"
--- 
-2.9.2
-

Modified: PKGBUILD
===
--- PKGBUILD2019-05-03 18:39:51 UTC (rev 352445)
+++ PKGBUILD2019-05-03 20:43:18 UTC (rev 352446)
@@ -10,7 +10,7 @@
 _GRUB_EMU_BUILD="0"
 
 _GRUB_EXTRAS_COMMIT="f2a079441939eee7251bf141986cdd78946e1d20"
-
+_GNULIB_COMMIT="3f14b27dec6f4a590d8ae0ffcbb7cf7714815a05"
 _UNIFONT_VER="12.0.01"
 
 [[ "${CARCH}" == "x86_64" ]] && _EFI_ARCH="x86_64"
@@ -21,8 +21,9 @@
 
 pkgname='grub'
 pkgdesc='GNU GRand Unified Bootloader (2)'
-pkgver=2.02
-pkgrel=8
+_pkgver=2.04-rc1
+pkgver=${_pkgver/-/}
+pkgrel=1
 epoch=2
 url='https://www.gnu.org/software/grub/'
 arch=('x86_64')
@@ -56,8 +57,9 @@
 validpgpkeys=('E53D497F3FA42AD8C9B4D1E835A93B74E82E4209'  # Vladimir 'phcoder' 
Serbinenko 
   '95D2E9AB8740D8046387FD151A09227B1F435A33') # Paul Hardy 

 
-source=("git+https://git.savannah.gnu.org/git/grub.git#tag=${pkgver}?signed;
+source=("git+https://git.savannah.gnu.org/git/grub.git#tag=grub-${_pkgver}?signed;
 
"git+https://git.savannah.gnu.org/git/grub-extras.git#commit=${_GRUB_EXTRAS_COMMIT};
+
"git+https://git.savannah.gnu.org/git/gnulib.git#commit=${_GNULIB_COMMIT};
 
"https://ftp.gnu.org/gnu/unifont/unifont-${_UNIFONT_VER}/unifont-${_UNIFONT_VER}.bdf.gz"{,.sig}
 '0003-10_linux-detect-archlinux-initramfs.patch'
 '0004-add-GRUB_COLOR_variables.patch'
@@ -65,30 +67,14 @@
 
 sha256sums=('SKIP'
 'SKIP'
+'SKIP'
 'f48450d3ca0ae0ca9f1c6e81cf1af60e5b0dfa87cc3a72520ce2ef15d54de6dd'
 'SKIP'
-'b41e4438319136b5e74e0abdfcb64ae115393e4e15207490272c425f54026dd3'
+'171415ab075d1ac806f36c454feeb060f870416f24279b70104bba94bd6076d4'
 'a5198267ceb04dceb6d2ea7800281a42b3f91fd02da55d2cc9ea20d47273ca29'
-'9ca2414266fadd0b1aafc850c1c26a48760fbc95f1913ab8b36f1e54483b31fd')
+'fd2e5f5453f3e44a2cb640c796b85cd70da8359c703f94cd531d457ede8c77fa')
 
 _backports=(
-   # Allow GRUB to mount ext2/3/4 filesystems that have the encryption 
feature.
-   '734668238fcc0ef691a080839e04f33854fa133a'
-
-   # tsc: Change default tsc calibration method to pmtimer on EFI systems
-   '446794de8da4329ea532cbee4ca877bcafd0e534'
-
-   # grub-mkconfig/10_linux: Support multiple early initrd images
-   'a698240df0c43278b2d1d7259c8e7a6926c63112'
-
-   # Fix packed-not-aligned error on GCC 8
-   '563b1da6e6ae7af46cc8354cadb5dab416989f0a'
-
-   # xfs: Accept filesystem with sparse inodes
-   'cda0a857dd7a27cd5d621747464bfe71e8727fff'
-
-   # x86-64: Treat R_X86_64_PLT32 as R_X86_64_PC32
-   '842c390469e2c2e10b5aa36700324cd3bde25875'
 )
 
 _configure_options=(
@@ -120,6 +106,7 @@
echo "Apply backports..."
local _c
for _c in "${_backports[@]}"; do
+   git log --oneline -1 "${_c}"
git cherry-pick -n "${_c}"
done
 
@@ -149,8 +136,10 @@
# http://savannah.gnu.org/bugs/?40330 and 
https://bugs.archlinux.org/task/37847
cp "${srcdir}/unifont-${_UNIFONT_VER}.bdf" "unifont.bdf"
 
-   echo "Run autogen.sh..."
-   ./autogen.sh
+   echo "Run bootstrap..."
+   ./bootstrap \
+   --gnulib-srcdir="${srcdir}/gnulib/" \
+   --no-git
 }
 
 _build_grub-common_and_bios() {

Modified: grub.default
===
--- grub.default2019-05-03 18:39:51 UTC (rev 352445)
+++ grub.default2019-05-03 20:43:18 UTC (rev 352446)
@@ -3,7 +3,7 @@
 GRUB_DEFAULT=0
 GRUB_TIMEOUT=5
 GRUB_DISTRIBUTOR="Arch"
-GRUB_CMDLINE_LINUX_DEFAULT="quiet"
+GRUB_CMDLINE_LINUX_DEFAULT="audit=0 loglevel=3 quiet"
 GRUB_CMDLINE_LINUX=""
 
 # Preload both GPT and MBR modules so that they are not missed


[arch-commits] Commit in grub/trunk (3 files)

2018-03-14 Thread Christian Hesse via arch-commits
Date: Wednesday, March 14, 2018 @ 21:13:14
  Author: eworm
Revision: 319143

upgpkg: grub 2:2.02-5

use upstream patch to support multiple early initrd images

Added:
  
grub/trunk/0007-grub-mkconfig_10_linux_Support_multiple_early_initrd_images.patch
Modified:
  grub/trunk/PKGBUILD
Deleted:
  grub/trunk/0002-intel-ucode.patch

+
 0002-intel-ucode.patch |   52 
--
 0007-grub-mkconfig_10_linux_Support_multiple_early_initrd_images.patch |  177 
++
 PKGBUILD   |   13 
 3 files changed, 183 insertions(+), 59 deletions(-)

Deleted: 0002-intel-ucode.patch
===
--- 0002-intel-ucode.patch  2018-03-14 21:04:55 UTC (rev 319142)
+++ 0002-intel-ucode.patch  2018-03-14 21:13:14 UTC (rev 319143)
@@ -1,52 +0,0 @@
-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
-

Added: 0007-grub-mkconfig_10_linux_Support_multiple_early_initrd_images.patch
===
--- 0007-grub-mkconfig_10_linux_Support_multiple_early_initrd_images.patch  
(rev 0)
+++ 0007-grub-mkconfig_10_linux_Support_multiple_early_initrd_images.patch  
2018-03-14 21:13:14 UTC (rev 319143)
@@ -0,0 +1,177 @@
+From a698240df0c43278b2d1d7259c8e7a6926c63112 Mon Sep 17 00:00:00 2001
+From: "Matthew S. Turnbull" 
+Date: Sat, 24 Feb 2018 17:44:58 -0500
+Subject: grub-mkconfig/10_linux: Support multiple early initrd images
+
+Add support for multiple, shared, early initrd images. These early
+images will be loaded in the order declared, and all will be loaded
+before the initrd image.
+
+While many classes of data can be provided by early images, the
+immediate use case would be for distributions to provide CPU
+microcode to mitigate the Meltdown and Spectre vulnerabilities.
+
+There are two environment variables provided for declaring the early
+images.
+
+* GRUB_EARLY_INITRD_LINUX_STOCK is for the distribution declare
+  images that are provided by the distribution or installed packages.
+  If undeclared, this will default to a set of common microcode image
+  names.
+
+* GRUB_EARLY_INITRD_LINUX_CUSTOM is for user created images. User
+  images will be loaded after the stock images.
+
+These separate configurations allow the distribution and user to
+declare different image sets without clobbering each other.
+
+This also makes a minor update to ensure that UUID partition labels
+stay disabled when no initrd image is found, even if early images are
+present.
+
+This is a continuation of a previous patch published by Christian
+Hesse in 2016:
+http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00025.html
+
+Down stream Gentoo bug:
+https://bugs.gentoo.org/645088
+
+Signed-off-by: Robin H. Johnson 
+Signed-off-by: 

[arch-commits] Commit in grub/trunk (3 files)

2013-12-21 Thread Tobias Powalowski
Date: Saturday, December 21, 2013 @ 19:42:03
  Author: tpowa
Revision: 202423

upgpkg: grub 1:2.02.beta1-1

1) Removal of archlinux_grub_mkconfig_fixes.patch, replaced with 10_archlinux 
helper script, and grub-add-GRUB_COLOR_variables.patch (small non-Arch specific 
part of the earlier patch). Fixes https://bugs.archlinux.org/task/37904 .

2) Bump directly used unifont bdf file to working ver 6.3.20131217 as mentioned 
at http://savannah.gnu.org/bugs/?40330

3) grub-extras is now available as GIT repo, so removed bzr from makedepends. 
As a consequence removed python2 and used python(3) in makedepends. Incorrect 
GRUB_CONTRIB var also fixed.

4) grub-extras LUA and ntldr-img are set to be deprecated, so they are not 
built. The only grub-extras version built is 915resolution (for grub-bios aka 
target i386-pc alone)

5) PKGBUILD directly used GIT TAG support by makepkg to checkout the souce 
instead of downloading the upstream tarball

6) https://bugs.archlinux.org/task/38054 already fixed in 2.02-beta1.

7) https://bugs.archlinux.org/task/38053 also fixed in 2.02-beta1. I personally 
never experienced this issue so cannot comment on this

8) Added  suffix grub-efi build dir so that it is easy for users to modify the 
PKGBUILD to build i386-efi in Arch x86_64 if required (not officially 
supported).

Added:
  grub/trunk/10_archlinux
  grub/trunk/grub-add-GRUB_COLOR_variables.patch
Modified:
  grub/trunk/PKGBUILD

-+
 10_archlinux|  142 ++
 PKGBUILD|   99 +++
 grub-add-GRUB_COLOR_variables.patch |   32 +++
 3 files changed, 220 insertions(+), 53 deletions(-)

Added: 10_archlinux
===
--- 10_archlinux(rev 0)
+++ 10_archlinux2013-12-21 18:42:03 UTC (rev 202423)
@@ -0,0 +1,142 @@
+#!/usr/bin/env bash
+
+##
+## grub-mkconfig helper script specific to Arch Linux
+## Contributed by Keshav Padram Amburay the ddoott ridikulus ddoott rat 
aatt geemmayil ddoott ccoomm
+##
+## Script based on do_grub_config() function in Arch Linux Archboot ISO 
Installer/Setup script 
+## Some parts taken from /etc/grub.d/10_linux script shipped by GRUB(2) 
upstream
+##
+## This script can be freely distributed and/or modified 
+## 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.
+##
+## This script 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.
+##
+
+set -e
+
+prefix=/usr
+exec_prefix=/usr
+datarootdir=/usr/share
+sysconfdir=/etc
+
+. ${datarootdir}/grub/grub-mkconfig_lib
+
+. ${sysconfdir}/default/grub
+
+export TEXTDOMAIN=grub
+export TEXTDOMAINDIR=${datarootdir}/locale
+
+CLASS=--class arch-linux --class arch --class gnu-linux --class gnu --class 
os
+
+BOOT_PART_FS_UUID=$(grub-probe --target=fs_uuid /boot 2/dev/null)
+BOOT_PART_HINTS_STRING=$(grub-probe --target=hints_string /boot 
2/dev/null)
+BOOT_PART_FS=$(grub-probe --target=fs /boot 2/dev/null)
+
+ROOT_PART_FS_UUID=$(grub-probe --target=fs_uuid / 2/dev/null)
+ROOT_PART_HINTS_STRING=$(grub-probe --target=hints_string / 2/dev/null)
+ROOT_PART_FS=$(grub-probe --target=fs / 2/dev/null)
+
+if [[ ${ROOT_PART_FS_UUID} == ${BOOT_PART_FS_UUID} ]]; then
+SUBDIR=/boot
+else
+SUBDIR=
+fi
+
+if [[ ${GRUB_LINUX_ROOT_DEVICE} ==  ]]; then
+if [[ ${GRUB_DEVICE_UUID} ==  ]] || \
+   [[ ${GRUB_DISABLE_LINUX_UUID} == true ]] || \
+   [[ ! -e /dev/disk/by-uuid/${GRUB_DEVICE_UUID} ]] || \
+   uses_abstraction ${GRUB_DEVICE} lvm ; then
+   GRUB_LINUX_ROOT_DEVICE=${GRUB_DEVICE}
+else
+   GRUB_LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
+fi
+fi
+
+[[ ${GRUB_LINUX_PARAMS} ==  ]]  GRUB_LINUX_PARAMS=${GRUB_CMDLINE_LINUX} 
${GRUB_CMDLINE_LINUX_DEFAULT}
+
+for _KERNEL_ in $(ls /boot/vmlinuz-linux*) ; do
+
+echo Found linux image: ${_KERNEL_} 2
+
+_KERNEL_FILE_=$(echo ${_KERNEL_} | sed 's,/boot/,,g')
+_KERNEL_PKG_=pkg-$(echo ${_KERNEL_FILE_} | sed 's,vmlinuz-,,g')
+
+_INITRAMFS_=${_KERNEL_FILE_/vmlinuz-/initramfs-}.img
+
+if [[ -e /boot/${_INITRAMFS_} ]]; then
+
+echo Found initramfs image: /boot/${_INITRAMFS_} 2
+
+cat  EOF
+
+menuentry Arch Linux ${_KERNEL_PKG_} kernel ${CLASS} {
+load_video
+set gfxpayload=keep
+insmod ${BOOT_PART_FS}
+if [ x\$feature_platform_search_hint = xy ]; then
+search --no-floppy --fs-uuid  --set=root ${BOOT_PART_HINTS_STRING} 
${BOOT_PART_FS_UUID}
+else
+search --no-floppy --fs-uuid  --set=root ${BOOT_PART_FS_UUID}
+fi
+echo 'Loading Arch Linux ${_KERNEL_PKG_} kernel ...'
+linux 

[arch-commits] Commit in grub/trunk (3 files)

2013-05-21 Thread Tobias Powalowski
Date: Tuesday, May 21, 2013 @ 14:42:18
  Author: tpowa
Revision: 186158

upgpkg: grub 2.00-2

add build patches, move /usr/sbin to /usr/bin

Added:
  grub/trunk/0069-Backport-gnulib-fixes-for-C11.-Fixes-Savannah-bug-37.patch
  grub/trunk/grub-2.00-fix-docs.patch
Modified:
  grub/trunk/PKGBUILD

-+
 0069-Backport-gnulib-fixes-for-C11.-Fixes-Savannah-bug-37.patch |   50 
++
 PKGBUILD|   44 ++--
 grub-2.00-fix-docs.patch|   21 
 3 files changed, 101 insertions(+), 14 deletions(-)

Added: 0069-Backport-gnulib-fixes-for-C11.-Fixes-Savannah-bug-37.patch
===
--- 0069-Backport-gnulib-fixes-for-C11.-Fixes-Savannah-bug-37.patch 
(rev 0)
+++ 0069-Backport-gnulib-fixes-for-C11.-Fixes-Savannah-bug-37.patch 
2013-05-21 12:42:18 UTC (rev 186158)
@@ -0,0 +1,50 @@
+From d09689a5a2863043d007c1acb9bf0a8d1d3b776d Mon Sep 17 00:00:00 2001
+From: Colin Watson cjwat...@ubuntu.com
+Date: Fri, 28 Dec 2012 06:43:35 +
+Subject: [PATCH 069/364] Backport gnulib fixes for C11.  Fixes Savannah bug
+ #37738.
+
+* grub-core/gnulib/stdio.in.h (gets): Warn on use only if
+HAVE_RAW_DECL_GETS.
+* m4/stdio_h.m4 (gl_STDIO_H): Check for gets.
+---
+ ChangeLog   | 8 
+ grub-core/gnulib/stdio.in.h | 6 --
+ m4/stdio_h.m4   | 2 +-
+ 3 files changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/grub-core/gnulib/stdio.in.h b/grub-core/gnulib/stdio.in.h
+index 80b9dbf..a8b00c6 100644
+--- a/grub-core/gnulib/stdio.in.h
 b/grub-core/gnulib/stdio.in.h
+@@ -138,10 +138,12 @@ _GL_WARN_ON_USE (fflush, fflush is not always POSIX 
compliant - 
+ #endif
+ 
+ /* It is very rare that the developer ever has full control of stdin,
+-   so any use of gets warrants an unconditional warning.  Assume it is
+-   always declared, since it is required by C89.  */
++   so any use of gets warrants an unconditional warning; besides, C11
++   removed it.  */
+ #undef gets
++#if HAVE_RAW_DECL_GETS
+ _GL_WARN_ON_USE (gets, gets is a security hole - use fgets instead);
++#endif
+ 
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
+diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4
+index f5650cd..8458bec 100644
+--- a/m4/stdio_h.m4
 b/m4/stdio_h.m4
+@@ -37,7 +37,7 @@ AC_DEFUN([gl_STDIO_H],
+   dnl corresponding gnulib module is not in use, and which is not
+   dnl guaranteed by C89.
+   gl_WARN_ON_USE_PREPARE([[#include stdio.h
+-]], [dprintf fpurge fseeko ftello getdelim getline popen renameat
++]], [dprintf fpurge fseeko ftello getdelim getline gets popen renameat
+ snprintf tmpfile vdprintf vsnprintf])
+ ])
+ 
+-- 
+1.8.1.4
+

Modified: PKGBUILD
===
--- PKGBUILD2013-05-21 10:21:01 UTC (rev 186157)
+++ PKGBUILD2013-05-21 12:42:18 UTC (rev 186158)
@@ -8,7 +8,7 @@
 pkgname=('grub-common' 'grub-bios' 'grub-efi-i386')
 pkgbase=grub
 pkgver=2.00
-pkgrel=1
+pkgrel=2
 url=https://www.gnu.org/software/grub/;
 arch=('i686' 'x86_64')
 license=('GPL3')
@@ -23,21 +23,14 @@
 'grub.default'
 'grub.cfg'
 '20_memtest86+'
-'grub_bzr_export.sh')
+'grub_bzr_export.sh'
+'0069-Backport-gnulib-fixes-for-C11.-Fixes-Savannah-bug-37.patch'
+'grub-2.00-fix-docs.patch')
 
 noextract=(grub2_extras_lua_r${_grub_lua_ver}.tar.xz
grub2_extras_ntldr-img_r${_grub_ntldr_ver}.tar.xz
grub2_extras_915resolution_r${_grub_915_ver}.tar.xz)
 
-sha1sums=('274d91e96b56a5b9dd0a07accff69dbb6dfb596b'
-  '89290031b974780c6df76893836d2477d4add895'
-  'eb4b35b4c36b64f9405cbcbc538cb205171c1c0a'
-  'd5ae2efec25616028a9d89e98b6e454f1c4c415f'
-  '26e4e946190bea1f03632658cf08ba90e11dec57'
-  'dbf493dec4722feb11f0b5c71ad453a18daf0fc5'
-  '76ae862a945a8848e6999adf8ad1847f0f7008b9'
-  'ce35d7ae75cd1b5b677e894e528f96add40e77b9'
-  '0cfd4e51cdb14a92f06cfd3c607f2aa21f3e55fc')
 
 _build_grub-common_and_bios() {
 
@@ -71,7 +64,13 @@
## Requires python2
# sed 's|python |python2 |g' -i 
${srcdir}/grub_bios-${pkgver}/autogen.sh
 
-   ## start the actual build process
+   # fix compiling with gcc48
+patch -Np1 -i 
${srcdir}/0069-Backport-gnulib-fixes-for-C11.-Fixes-Savannah-bug-37.patch
+
+   #fix docs compiling
+patch -Np1 -i ${srcdir}/grub-2.00-fix-docs.patch
+
+## start the actual build process
cd ${srcdir}/grub_bios-${pkgver}
./autogen.sh
echo
@@ -89,7 +88,7 @@
--enable-grub-mount \
--prefix=/usr \
--bindir=/usr/bin \
-   --sbindir=/usr/sbin \
+   --sbindir=/usr/bin \
--mandir=/usr/share/man \
--infodir=/usr/share/info \