gnu: grub: Support for the Hurd.

* gnu/packages/virtualization.scm (qemu)[supported-systems]: Remove the Hurd.
* gnu/packages/linux.scm (mdadm)[supported-systems]: Likewise.
(lvm2)[supported-systems]: Likewise.
(fuse)[supported-systems]: Likewise.
* gnu/packages/patches/grub-verifiers-Blocklist-fallout-cleanup.patch:
New file
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/bootloaders.scm (grub): Use it.
[inputs, native-inputs]: Remove non-supported dependencies on non-supported
systems.  Fixes build for the Hurd.
This commit is contained in:
Jan Nieuwenhuizen 2020-03-11 00:33:24 +01:00
parent eac54126fb
commit 654de94e74
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
5 changed files with 68 additions and 6 deletions

View File

@ -994,6 +994,7 @@ dist_patch_DATA = \
%D%/packages/patches/grep-timing-sensitive-test.patch \
%D%/packages/patches/groovy-add-exceptionutilsgenerator.patch \
%D%/packages/patches/grub-efi-fat-serial-number.patch \
%D%/packages/patches/grub-verifiers-Blocklist-fallout-cleanup.patch \
%D%/packages/patches/gspell-dash-test.patch \
%D%/packages/patches/guile-1.8-cpp-4.5.patch \
%D%/packages/patches/guile-2.2-default-utf8.patch \

View File

@ -91,7 +91,9 @@
(sha256
(base32
"0zgp5m3hmc9jh8wpjx6czzkh5id2y8n1k823x2mjvm2sk6b28ag5"))
(patches (search-patches "grub-efi-fat-serial-number.patch"))))
(patches (search-patches
"grub-efi-fat-serial-number.patch"
"grub-verifiers-Blocklist-fallout-cleanup.patch"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags
@ -152,11 +154,19 @@
;; Depend on LVM2 for libdevmapper, used by 'grub-probe' and
;; 'grub-install' to recognize mapped devices (LUKS, etc.)
("lvm2" ,lvm2)
,@(if (member (or (%current-target-system)
(%current-system))
(package-supported-systems lvm2))
`(("lvm2" ,lvm2))
'())
;; Depend on mdadm, which is invoked by 'grub-probe' and 'grub-install'
;; to determine whether the root file system is RAID.
("mdadm" ,mdadm)
,@(if (member (or (%current-target-system)
(%current-system))
(package-supported-systems mdadm))
`(("mdadm" ,mdadm))
'())
;; Console-setup's ckbcomp is invoked by grub-kbdcomp. It is required
;; for generating alternative keyboard layouts.
@ -164,7 +174,11 @@
;; Needed for grub-mount, the only reliable way to tell whether a given
;; file system will be readable by GRUB without rebooting.
("fuse" ,fuse)
,@(if (member (or (%current-target-system)
(%current-system))
(package-supported-systems fuse))
`(("fuse" ,fuse))
'())
("freetype" ,freetype)
;; ("libusb" ,libusb)
@ -196,7 +210,9 @@
;; Dependencies for the test suite. The "real" QEMU is needed here,
;; because several targets are used.
("parted" ,parted)
("qemu" ,qemu-minimal)
,@(if (member (%current-system) (package-supported-systems qemu-minimal))
`(("qemu" ,qemu-minimal))
'())
("xorriso" ,xorriso)))
(home-page "https://www.gnu.org/software/grub/")
(synopsis "GRand Unified Boot loader")

View File

@ -2401,6 +2401,7 @@ processes currently causing I/O.")
(("-DFUSERMOUNT_DIR=[[:graph:]]+")
"-DFUSERMOUNT_DIR=\\\"/var/empty\\\""))
#t)))))
(supported-systems (delete "i586-gnu" %supported-systems))
(home-page "https://github.com/libfuse/libfuse")
(synopsis "Support file systems implemented in user space")
(description
@ -3009,6 +3010,7 @@ time.")
;; The tests use 'mknod', which requires root access.
#:tests? #f))
(supported-systems (delete "i586-gnu" %supported-systems))
(home-page "https://sourceware.org/lvm2/")
(synopsis "Logical volume management for Linux")
(description
@ -3920,6 +3922,7 @@ MPEG-2 and audio over Linux IEEE 1394.")
(delete 'configure))
;;tests must be done as root
#:tests? #f))
(supported-systems (delete "i586-gnu" %supported-systems))
(home-page "http://neil.brown.name/blog/mdadm")
(synopsis "Tool for managing Linux Software RAID arrays")
(description

View File

@ -0,0 +1,41 @@
This patch is needed to build Grub on the Hurd.
Taken from upstream: https://git.savannah.gnu.org/cgit/grub.git/commit//?id=dabdfa1c6a80639197d05f683a445fa8615517fe
From 7606547586b2d6ca1b384e15e0358d3a3ddc48a6 Mon Sep 17 00:00:00 2001
From: David Michael <fedora.dm0@gmail.com>
Date: Fri, 5 Jul 2019 07:45:59 -0400
Subject: verifiers: Blocklist fallout cleanup
Blocklist fallout cleanup after commit 5c6f9bc15 (generic/blocklist: Fix
implicit declaration of function grub_file_filter_disable_compression()).
Signed-off-by: David Michael <fedora.dm0@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
---
grub-core/osdep/generic/blocklist.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/grub-core/osdep/generic/blocklist.c b/grub-core/osdep/generic/blocklist.c
index ea2a511b6..2d9040302 100644
--- a/grub-core/osdep/generic/blocklist.c
+++ b/grub-core/osdep/generic/blocklist.c
@@ -59,7 +59,7 @@ grub_install_get_blocklist (grub_device_t root_dev,
grub_disk_cache_invalidate_all ();
- file = grub_file_open (core_path_dev, GRUB_FILE_TYPE_NONE | FILE_TYPE_NO_DECOMPRESS);
+ file = grub_file_open (core_path_dev, GRUB_FILE_TYPE_NONE | GRUB_FILE_TYPE_NO_DECOMPRESS);
if (file)
{
if (grub_file_size (file) != core_size)
@@ -116,7 +116,7 @@ grub_install_get_blocklist (grub_device_t root_dev,
grub_file_t file;
/* Now read the core image to determine where the sectors are. */
- file = grub_file_open (core_path_dev, GRUB_FILE_TYPE_NONE | FILE_TYPE_NO_DECOMPRESS);
+ file = grub_file_open (core_path_dev, GRUB_FILE_TYPE_NONE | GRUB_FILE_TYPE_NO_DECOMPRESS);
if (! file)
grub_util_error ("%s", grub_errmsg);

View File

@ -285,7 +285,8 @@ server and embedded PowerPC, and S390 guests.")
(license license:gpl2)
;; Several tests fail on MIPS; see <http://hydra.gnu.org/build/117914>.
(supported-systems (delete "mips64el-linux" %supported-systems))))
(supported-systems (fold delete %supported-systems
'("mips64el-linux" "i586-gnu")))))
(define-public qemu-minimal
;; QEMU without GUI support.