diff mbox series

[bug#45723] gnu: Correct ZFS udev rules.

Message ID ZMJg6M4vSHx2ED9-xAmuL-HFmgOTkXfaradEy90zBlySrdlZLihA_UU5QAzvH2XJ-WNesygZc5FGSbeISP8FdsA44G6Xjlb7OpuWQ2gcMP4=@protonmail.com
State New
Headers show
Series [bug#45723] gnu: Correct ZFS udev rules. | expand

Checks

Context Check Description
cbaines/submitting builds success
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

raid5atemyhomework Jan. 8, 2021, 5:31 a.m. UTC
So ZFS has some udev rules, except one of them uses `/sbin/modprobe`, so we need to substitute it with an appropriate `modprobe`.

Slowly and surely ZFS is coming to Guix...


From 14322771ca333ff269f67cc41c4dcff8809da03b Mon Sep 17 00:00:00 2001
From: raid5atemyhomework <raid5atemyhomework@protonmail.com>
Date: Fri, 8 Jan 2021 13:11:53 +0800
Subject: [PATCH] gnu: Correct ZFS udev rules.

* gnu/packages/file-systems.scm (zfs): Add substitutions for /sbin/modprobe
in udev rules.
---
 gnu/packages/file-systems.scm | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

--
2.30.0
diff mbox series

Patch

diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm
index 2c5ad95d63..f74d519b33 100644
--- a/gnu/packages/file-systems.scm
+++ b/gnu/packages/file-systems.scm
@@ -885,7 +885,8 @@  APFS.")
              (let ((out        (assoc-ref outputs "out"))
                    (src        (assoc-ref outputs "src"))
                    (util-linux (assoc-ref inputs "util-linux"))
-                   (nfs-utils  (assoc-ref inputs "nfs-utils")))
+                   (nfs-utils  (assoc-ref inputs "nfs-utils"))
+                   (kmod       (assoc-ref inputs "kmod-runtime")))
                (substitute* "contrib/Makefile.in"
                  ;; This is not configurable nor is its hard-coded /usr prefix.
                  ((" initramfs") ""))
@@ -915,7 +916,9 @@  APFS.")
                (substitute* "contrib/pyzfs/Makefile.in"
                  ((".*install-lib.*") ""))
                (substitute* '("Makefile.am" "Makefile.in")
-                 (("\\$\\(prefix)/src") (string-append src "/src"))))
+                 (("\\$\\(prefix)/src") (string-append src "/src")))
+               (substitute* (find-files "udev/rules.d/" ".rules.in$")
+                 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))))
              #t))
          (replace 'build
            (lambda _ (invoke "make")))
@@ -947,7 +950,8 @@  APFS.")
        ("python-cffi" ,python-cffi)
        ("util-linux" ,util-linux)
        ("util-linux:lib" ,util-linux "lib")
-       ("zlib" ,zlib)))
+       ("zlib" ,zlib)
+       ("kmod-runtime" ,kmod)))
     (home-page "https://zfsonlinux.org/")
     (synopsis "Native ZFS on Linux")
     (description