guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: grub: Make dependency on mdadm explicit.


From: Ludovic Courtès
Subject: 02/02: gnu: grub: Make dependency on mdadm explicit.
Date: Wed, 5 Oct 2016 13:11:14 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit 358db0041f090ac0264c0a5ff906bce401512702
Author: Ludovic Courtès <address@hidden>
Date:   Wed Oct 5 15:08:38 2016 +0200

    gnu: grub: Make dependency on mdadm explicit.
    
    * gnu/packages/grub.scm (grub)[arguments]: Path getroot.c in
    'patch-stuff' phase.
    [inputs]: Add MDADM.
---
 gnu/packages/grub.scm |   15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/grub.scm b/gnu/packages/grub.scm
index 302fd0e..ffce1bf 100644
--- a/gnu/packages/grub.scm
+++ b/gnu/packages/grub.scm
@@ -98,13 +98,23 @@
     (arguments
      '(;; Two warnings: suggest braces, signed/unsigned comparison.
        #:configure-flags '("--disable-werror")
+
        #:phases (modify-phases %standard-phases
-                  (add-after
-                   'unpack 'patch-stuff
+                  (add-after 'unpack 'patch-stuff
                    (lambda* (#:key inputs #:allow-other-keys)
                      (substitute* "grub-core/Makefile.in"
                        (("/bin/sh") (which "sh")))
 
+                     ;; Give the absolute file name of 'mdadm', used to
+                     ;; determine the root file system when it's a RAID
+                     ;; device.  Failing to do that, 'grub-probe' silently
+                     ;; fails if 'mdadm' is not in $PATH.
+                     (substitute* "grub-core/osdep/linux/getroot.c"
+                       (("argv\\[0\\] = \"mdadm\"")
+                        (string-append "argv[0] = \""
+                                       (assoc-ref inputs "mdadm")
+                                       "/sbin/mdadm\"")))
+
                      ;; Make the font visible.
                      (copy-file (assoc-ref inputs "unifont") "unifont.bdf.gz")
                      (system* "gunzip" "unifont.bdf.gz")
@@ -118,6 +128,7 @@
                      #t)))))
     (inputs
      `(;; ("lvm2" ,lvm2)
+       ("mdadm" ,mdadm)
        ("gettext" ,gnu-gettext)
        ("freetype" ,freetype)
        ;; ("libusb" ,libusb)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]