summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorJan Nieuwenhuizen <janneke@gnu.org>2020-03-11 00:33:24 +0100
committerJan Nieuwenhuizen <janneke@gnu.org>2020-03-24 23:31:29 +0100
commit654de94e74547f61a0996cae70ddba2826bfd8d4 (patch)
treeed5aa40f7fd90bb6f560dcec6f3451d5f4e3322b /gnu/packages
parenteac54126fbb0712a436eaa1b152a55efb32046ab (diff)
downloadguix-654de94e74547f61a0996cae70ddba2826bfd8d4.tar.gz
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.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/bootloaders.scm26
-rw-r--r--gnu/packages/linux.scm3
-rw-r--r--gnu/packages/patches/grub-verifiers-Blocklist-fallout-cleanup.patch41
-rw-r--r--gnu/packages/virtualization.scm3
4 files changed, 67 insertions, 6 deletions
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 44808e1225..afbd1909bf 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -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")
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 69c2818355..b73b86b0e8 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -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
diff --git a/gnu/packages/patches/grub-verifiers-Blocklist-fallout-cleanup.patch b/gnu/packages/patches/grub-verifiers-Blocklist-fallout-cleanup.patch
new file mode 100644
index 0000000000..2bea74ea95
--- /dev/null
+++ b/gnu/packages/patches/grub-verifiers-Blocklist-fallout-cleanup.patch
@@ -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);
+ 
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index c04ff8810e..9fcea5f7ea 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -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.