gnu: zfs: update to 2.0.1.

* gnu/packages/file-systems.scm (zfs): Update version to 2.0.1.
[arguments]: Adjust 'patch-source phase for changes in tarball.

Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
This commit is contained in:
raid5atemyhomework 2021-01-10 09:58:03 +00:00 committed by Efraim Flashner
parent 849e3dd043
commit e2fe05284d
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -847,7 +847,7 @@ (define-public apfs-fuse
(define-public zfs
(package
(name "zfs")
(version "0.8.5")
(version "2.0.1")
(outputs '("out" "module" "src"))
(source
(origin
@ -856,7 +856,7 @@ (define-public zfs
"/download/zfs-" version
"/zfs-" version ".tar.gz"))
(sha256
(base32 "0gfdnynmsxbhi97q73smrgmcw1k8zmlr1hgljfn38sk0kimivd6v"))))
(base32 "0y3992l4nzr67q18lz1kizw0za1shvqbpmsjz9shv4frh5ihllbi"))))
(build-system linux-module-build-system)
(arguments
`(;; The ZFS kernel module should not be downloaded since the license
@ -887,18 +887,31 @@ (define-public zfs
(util-linux (assoc-ref inputs "util-linux"))
(nfs-utils (assoc-ref inputs "nfs-utils"))
(kmod (assoc-ref inputs "kmod-runtime")))
(substitute* "etc/Makefile.in"
;; This just contains an example configuration file for
;; configuring ZFS on traditional init systems, skip it
;; since we cannot use it anyway; the install target becomes
;; misdirected.
(("= default ") "= "))
(substitute* "lib/libzfs/os/linux/libzfs_util_os.c"
;; Use path to /gnu/store/*-kmod in actual path that is exec'ed.
(("\"/sbin/modprobe\"")
(string-append "\"" kmod "/bin/modprobe" "\""))
;; Just use 'modprobe' in message to user, since Guix
;; does not have a traditional /sbin/
(("'/sbin/modprobe ") "'modprobe "))
(substitute* "contrib/Makefile.in"
;; This is not configurable nor is its hard-coded /usr prefix.
((" initramfs") ""))
(substitute* "module/zfs/zfs_ctldir.c"
(substitute* "module/os/linux/zfs/zfs_ctldir.c"
(("/usr/bin/env\", \"umount")
(string-append util-linux "/bin/umount\", \"-n"))
(("/usr/bin/env\", \"mount")
(string-append util-linux "/bin/mount\", \"-n")))
(substitute* "lib/libzfs/libzfs_mount.c"
(substitute* "lib/libzfs/os/linux/libzfs_mount_os.c"
(("/bin/mount") (string-append util-linux "/bin/mount"))
(("/bin/umount") (string-append util-linux "/bin/umount")))
(substitute* "lib/libshare/nfs.c"
(substitute* "lib/libshare/os/linux/nfs.c"
(("/usr/sbin/exportfs")
(string-append nfs-utils "/sbin/exportfs")))
(substitute* "config/zfs-build.m4"