Merge pull request #894 from vtoc/master
grub: fallback for failed grub-probe on zfs in mkconfig
This commit is contained in:
commit
371117bc96
2 changed files with 15 additions and 3 deletions
12
srcpkgs/grub/patches/mkconfig_zfs.patch
Normal file
12
srcpkgs/grub/patches/mkconfig_zfs.patch
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
--- ./util/grub.d/10_linux.in 2015-01-19 13:30:29.490090317 +0200
|
||||||
|
+++ ./util/grub.d/10_linux.in 2015-01-19 13:29:41.234754594 +0200
|
||||||
|
@@ -67,6 +67,9 @@
|
||||||
|
xzfs)
|
||||||
|
rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true`
|
||||||
|
bootfs="`make_system_path_relative_to_its_root / | sed -e "s,@$,,"`"
|
||||||
|
+ if [ -z "${rpool}" ]; then
|
||||||
|
+ rpool=$(zfs list -Ho name -t filesystem | grep -m1 "${bootfs}$" | sed 's/\/.*//')
|
||||||
|
+ fi
|
||||||
|
LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs}"
|
||||||
|
;;
|
||||||
|
esac
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'grub'
|
# Template file for 'grub'
|
||||||
pkgname=grub
|
pkgname=grub
|
||||||
version=2.00
|
version=2.00
|
||||||
revision=17
|
revision=18
|
||||||
hostmakedepends="flex"
|
hostmakedepends="flex"
|
||||||
makedepends="libusb-compat-devel ncurses-devel freetype-devel
|
makedepends="libusb-compat-devel ncurses-devel freetype-devel
|
||||||
liblzma-devel device-mapper-devel font-unifont-bdf fuse-devel"
|
liblzma-devel device-mapper-devel font-unifont-bdf fuse-devel"
|
||||||
|
@ -22,8 +22,8 @@ esac
|
||||||
|
|
||||||
post_extract() {
|
post_extract() {
|
||||||
sed -i -e 's,freetype/ftsynth.h,freetype2/ftsynth.h,' util/grub-mkfont.c
|
sed -i -e 's,freetype/ftsynth.h,freetype2/ftsynth.h,' util/grub-mkfont.c
|
||||||
}
|
}
|
||||||
|
|
||||||
do_configure() {
|
do_configure() {
|
||||||
unset CC AS LD RANLIB CPP
|
unset CC AS LD RANLIB CPP
|
||||||
CFLAGS="$CFLAGS -fno-stack-protector"
|
CFLAGS="$CFLAGS -fno-stack-protector"
|
||||||
|
|
Loading…
Reference in a new issue