aboutsummaryrefslogtreecommitdiffstats
path: root/main/grub
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2019-01-23 16:35:31 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2019-01-23 16:37:12 +0000
commitff380303911cac10d9feb4141287977d474d365e (patch)
tree7d348c8cb327d3b8f40218d2faf94a5c6f9a0b02 /main/grub
parent225f1e4cbbdaa674835444d868af98d37c5dd18e (diff)
downloadaports-ff380303911cac10d9feb4141287977d474d365e.tar.bz2
aports-ff380303911cac10d9feb4141287977d474d365e.tar.xz
main/grub: fix use of UUID on alpine without udev
use uuid for root even if /dev/disk/by-uuid also fix trigger when /boot/grub is missing
Diffstat (limited to 'main/grub')
-rw-r--r--main/grub/APKBUILD6
-rw-r--r--main/grub/alpine-use-uuid.patch12
-rw-r--r--main/grub/grub.trigger1
3 files changed, 17 insertions, 2 deletions
diff --git a/main/grub/APKBUILD b/main/grub/APKBUILD
index 9169e35a97..64cef337e6 100644
--- a/main/grub/APKBUILD
+++ b/main/grub/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=grub
pkgver=2.02
-pkgrel=11
+pkgrel=12
pkgdesc="Bootloader with support for Linux, Multiboot and more"
url="https://www.gnu.org/software/grub/"
arch="all !s390x"
@@ -39,6 +39,7 @@ source="https://ftp.gnu.org/gnu/grub/grub-$pkgver.tar.xz
0008-Fix-packed-not-aligned-error-on-GCC-8.patch
0009-xfs-Accept-filesystem-with-sparse-inodes.patch
x86-64-Treat-R_X86_64_PLT32-as-R_X86_64_PC32.patch
+ alpine-use-uuid.patch
"
builddir="$srcdir/grub-$pkgver"
@@ -173,4 +174,5 @@ f2a7d9ab6c445f4e402e790db56378cecd6631b5c367451aa6ce5c01cd95b95c83c3dd24d6d4b857
065453d336d3c6a2943690faab7d05c09ac307bc360957976a08d88d6a57742dd068a6839bcb31c7dbb703d3ef19ae2f7f44844f1bef2a1a6c19a871544bddb5 2.02_beta3-mkconfig-alpine.patch
088455205f2f397d60e43eab19ed73994880ea1f442661f7975846cceaf2b112d92fd1341119d7dbfad3af2174dfd4d4721f31dead1ac35f4a3cb7c0d92f8a04 0008-Fix-packed-not-aligned-error-on-GCC-8.patch
4723c5dd9fd6e9b6c8677e32e4906c7995d695c7e85e834b1b29eb1d9a024678f8fa75846c7b929d1db9b5911b604c69c1b0379cb3b9adc98d5bb6d6719eb2c4 0009-xfs-Accept-filesystem-with-sparse-inodes.patch
-e11f62b5012ecc8abf9d4912db12a263470887671b05ccb4de54981fb3b32a52d4557439a160e69e0654e35a57fdb0afd5fe801709b8037a6ea4a50d8b8455ec x86-64-Treat-R_X86_64_PLT32-as-R_X86_64_PC32.patch"
+e11f62b5012ecc8abf9d4912db12a263470887671b05ccb4de54981fb3b32a52d4557439a160e69e0654e35a57fdb0afd5fe801709b8037a6ea4a50d8b8455ec x86-64-Treat-R_X86_64_PLT32-as-R_X86_64_PC32.patch
+ce788fa909bb89a3ccabbc144bb46226373cf846ffe1f315b0bf8b02403220d95c8fe67baf3c37c4e12cb36f22d70f62bbd2d0c5ff6b7230f05e5964b5c548ac alpine-use-uuid.patch"
diff --git a/main/grub/alpine-use-uuid.patch b/main/grub/alpine-use-uuid.patch
new file mode 100644
index 0000000000..cf5750bdf5
--- /dev/null
+++ b/main/grub/alpine-use-uuid.patch
@@ -0,0 +1,12 @@
+diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
+index 60f36be..dbef9bf 100644
+--- a/util/grub.d/10_linux.in
++++ b/util/grub.d/10_linux.in
+@@ -55,7 +55,6 @@ esac
+ # btrfs may reside on multiple devices. We cannot pass them as value of root= parameter
+ # 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
+ LINUX_ROOT_DEVICE=${GRUB_DEVICE}
+ else
diff --git a/main/grub/grub.trigger b/main/grub/grub.trigger
index 747f7950db..740dfcb813 100644
--- a/main/grub/grub.trigger
+++ b/main/grub/grub.trigger
@@ -2,6 +2,7 @@
if [ -e /boot/grub/grub.cfg ]; then
cp /boot/grub/grub.cfg /boot/grub/grub.cfg.backup
fi
+mkdir -p /boot/grub
grub-mkconfig -o /boot/grub/grub.cfg.new \
&& mv /boot/grub/grub.cfg.new /boot/grub/grub.cfg