10_linux: Fix grouping of tests for GRUB_DEVICE

This commit is contained in:
Christian Hesse 2016-08-04 19:49:29 +00:00
parent 1c26892702
commit 009d8f99ff
2 changed files with 32 additions and 2 deletions

View File

@ -0,0 +1,22 @@
commit 082bc9f77b200eb48a5f1147163dea9c9d02d44c
Author: Mike Gilbert <floppym@gentoo.org>
Date: Sat Mar 5 17:30:48 2016 -0500
10_linux: Fix grouping of tests for GRUB_DEVICE
Commit 7290bb562 causes GRUB_DISABLE_LINUX_UUID to be ignored due to
mixing of || and && operators. Add some parens to help with that.
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 5a78513..de9044c 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -47,7 +47,7 @@ esac
# and mounting btrfs requires user space scanning, so force UUID in this case.
if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
|| ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
- || test -e "${GRUB_DEVICE}" && uses_abstraction "${GRUB_DEVICE}" lvm; then
+ || ( test -e "${GRUB_DEVICE}" && uses_abstraction "${GRUB_DEVICE}" lvm ); then
LINUX_ROOT_DEVICE=${GRUB_DEVICE}
else
LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}

View File

@ -23,7 +23,7 @@ _UNIFONT_VER="6.3.20131217"
pkgname="grub" pkgname="grub"
pkgdesc="GNU GRand Unified Bootloader (2)" pkgdesc="GNU GRand Unified Bootloader (2)"
pkgver=2.02.beta3 pkgver=2.02.beta3
pkgrel=2 pkgrel=3
epoch=1 epoch=1
url="https://www.gnu.org/software/grub/" url="https://www.gnu.org/software/grub/"
arch=('x86_64' 'i686') arch=('x86_64' 'i686')
@ -61,6 +61,7 @@ source=("grub-${_pkgver}::git+git://git.sv.gnu.org/grub.git#tag=${_GRUB_GIT_TAG}
'0002-intel-ucode.patch' '0002-intel-ucode.patch'
'0003-10_linux-detect-archlinux-initramfs.patch' '0003-10_linux-detect-archlinux-initramfs.patch'
'0004-add-GRUB_COLOR_variables.patch' '0004-add-GRUB_COLOR_variables.patch'
'0005-10_linux-fix-grouping-of-tests.patch'
'grub.default' 'grub.default'
'grub.cfg') 'grub.cfg')
@ -72,6 +73,7 @@ md5sums=('SKIP'
'ff3b8524983ce02fc48fce38f96b1a82' 'ff3b8524983ce02fc48fce38f96b1a82'
'ba9d27c44b677bf329e5b96933bdbde8' 'ba9d27c44b677bf329e5b96933bdbde8'
'e506ae4a9f9f7d1b765febfa84e10d48' 'e506ae4a9f9f7d1b765febfa84e10d48'
'f1999315bbd25b4b9359919ce9b36144'
'a03ffd56324520393bf574cefccb893d' 'a03ffd56324520393bf574cefccb893d'
'c8b9511586d57d6f2524ae7898397a46') 'c8b9511586d57d6f2524ae7898397a46')
validpgpkeys=('95D2E9AB8740D8046387FD151A09227B1F435A33') #Paul Hardy validpgpkeys=('95D2E9AB8740D8046387FD151A09227B1F435A33') #Paul Hardy
@ -84,8 +86,10 @@ _pkgver() {
prepare() { prepare() {
cd "${srcdir}/grub-${_pkgver}/" cd "${srcdir}/grub-${_pkgver}/"
msg "Patch to fix CVE-2015-8370"
# CVE-2015-8370 # CVE-2015-8370
patch -Np1 -i ../0001-Fix-security-issue-when-reading-username-and-passwor.patch patch -Np1 -i "${srcdir}/0001-Fix-security-issue-when-reading-username-and-passwor.patch"
echo
msg "Patch to load Intel microcode" msg "Patch to load Intel microcode"
patch -Np1 -i "${srcdir}/0002-intel-ucode.patch" patch -Np1 -i "${srcdir}/0002-intel-ucode.patch"
@ -100,6 +104,10 @@ prepare() {
patch -Np1 -i "${srcdir}/0004-add-GRUB_COLOR_variables.patch" patch -Np1 -i "${srcdir}/0004-add-GRUB_COLOR_variables.patch"
echo echo
msg "Patch to fix grouping of tests for GRUB_DEVICE"
patch -Np1 -i "${srcdir}/0005-10_linux-fix-grouping-of-tests.patch"
echo
msg "Fix DejaVuSans.ttf location so that grub-mkfont can create *.pf2 files for starfield theme" 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 "${srcdir}/grub-${_pkgver}/configure.ac" sed 's|/usr/share/fonts/dejavu|/usr/share/fonts/dejavu /usr/share/fonts/TTF|g' -i "${srcdir}/grub-${_pkgver}/configure.ac"