[PATCH v0] gnu: zfs: Update to 2.2.3

  • Done
  • quality assurance status badge
Details
2 participants
  • antlers
  • Christopher Baines
Owner
unassigned
Submitted by
antlers
Severity
normal
A
A
antlers wrote on 29 Apr 10:22 +0200
(address . guix-patches@gnu.org)(name . antlers)(address . antlers@illucid.net)
20240429082604.2329-1-antlers@illucid.net
* gnu/packages/file-systems.scm (zfs): Update to 2.2.3
---
I did the bare minimum to build v2.2.x after mounting my array elsewhere and
inadvertently catching a dependance on feature 'com.klarasystems:vdev_zaps_v2'.
Specifically, I removed substitutions on files which no longer exist and added
new ones until it built. Hence I can make no claim that this is exaustive, but
I can mount the array and nothing's broken that wasn't already (ie. ZED).

I've made a habit of mentioning how to run this because it's not documented.
You have to:

a.) build it against your current kernel (<=v6.7, lts is currently 6.6) by
setting the package's '#:linux' argument.

b.) ensure that the module is loaded by either creating a
'kernel-module-loader' service or building the module into the kernel.

A few additional notes-to-self:

- Combining 'a' with the latter approach to 'b' means building the kernel
twice, when (IIRC) 'linux-module-build-system' packages often depend on
target sources rather than outputs? We should probably be able to set
`#:linux` to (or infer from it) the headers or whatever's needed without
depending on a full kernel build.

- ZFS Event Daemon (ZED) fails to start because it thinks it lives in
'/gnu/store/...-zfs-2.x.x/var/run', and I don't even see an option to
override it from the command-line. Seems to have been like that for a while.
Should be a quick fix by setting '@runstatedir@' correctly, but I doubt
anyone's clamoring for it and am moving on for now -- could toss in a fix for
that with the next point release?

gnu/packages/file-systems.scm | 36 ++++++++++++++---------------------
1 file changed, 14 insertions(+), 22 deletions(-)

Toggle diff (78 lines)
diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm
index 8afd853350..8e85b295cf 100644
--- a/gnu/packages/file-systems.scm
+++ b/gnu/packages/file-systems.scm
@@ -1442,7 +1442,7 @@ (define args
(define-public zfs
(package
(name "zfs")
- (version "2.1.14")
+ (version "2.2.3")
(outputs '("out" "module" "src"))
(source
(origin
@@ -1451,7 +1451,7 @@ (define-public zfs
"/download/zfs-" version
"/zfs-" version ".tar.gz"))
(sha256
- (base32 "0gzansmin40llxxh2zkgpdyp41ikd8s5hv5mpwhpcivk1q8fv7sh"))))
+ (base32 "1hqsv2skymrhzg9n94bcna8r7m1zl30wjb5knaw43j659vri599h"))))
(build-system linux-module-build-system)
(arguments
(list
@@ -1500,12 +1500,6 @@ (define-public zfs
"man/man7/zpool-features.7")
(("/usr/share/zfs/compatibility.d")
(string-append #$output "/share/zfs/compatibility.d")))
- (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.
@@ -1516,9 +1510,17 @@ (define-public zfs
;; 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* "configure"
+ (("/etc/default")
+ (string-append #$output "/etc/default"))
+ (("/etc/bash_completion.d")
+ (string-append #$output "/etc/bash_completion.d")))
+ (substitute* "Makefile.in"
+ (("/usr/share/initramfs-tools")
+ (string-append #$output "/usr/share/initramfs-tools")))
+ (substitute* "contrib/initramfs/Makefile.am"
+ (("/usr/share/initramfs-tools")
+ (string-append #$output "/usr/share/initramfs-tools")))
(substitute* "module/os/linux/zfs/zfs_ctldir.c"
(("/usr/bin/env\", \"umount")
(string-append (search-input-file inputs "/bin/umount")
@@ -1535,18 +1537,8 @@ (define-public zfs
(substitute* "config/zfs-build.m4"
(("\\$sysconfdir/init.d")
(string-append #$output "/etc/init.d")))
- (substitute* '("etc/zfs/Makefile.am"
- "cmd/zed/Makefile.am")
+ (substitute* '("cmd/zed/Makefile.am")
(("\\$\\(sysconfdir)") (string-append #$output "/etc")))
- (substitute* "cmd/vdev_id/vdev_id"
- (("PATH=/bin:/sbin:/usr/bin:/usr/sbin")
- (string-append "PATH="
- (dirname (which "chmod")) ":"
- (dirname (which "grep")) ":"
- (dirname (which "sed")) ":"
- (dirname (which "gawk")))))
- (substitute* "contrib/pyzfs/Makefile.in"
- ((".*install-lib.*") ""))
(substitute* '("Makefile.am" "Makefile.in")
(("\\$\\(prefix)/src") (string-append #$output:src "/src")))
(substitute* (find-files "udev/rules.d/" ".rules.in$")
--
2.41.0
C
C
Christopher Baines wrote 3 days ago
(name . antlers)(address . antlers@illucid.net)(address . 70642-done@debbugs.gnu.org)
87ttj23x97.fsf@cbaines.net
antlers via Guix-patches via <guix-patches@gnu.org> writes:

Toggle quote (4 lines)
> gnu/packages/file-systems.scm | 36 ++++++++++++++---------------------
> 1 file changed, 14 insertions(+), 22 deletions(-)
>

...

Toggle quote (32 lines)
> @@ -1500,12 +1500,6 @@ (define-public zfs
> "man/man7/zpool-features.7")
> (("/usr/share/zfs/compatibility.d")
> (string-append #$output "/share/zfs/compatibility.d")))
> - (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.
> @@ -1516,9 +1510,17 @@ (define-public zfs
> ;; 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* "configure"
> + (("/etc/default")
> + (string-append #$output "/etc/default"))
> + (("/etc/bash_completion.d")
> + (string-append #$output "/etc/bash_completion.d")))
> + (substitute* "Makefile.in"
> + (("/usr/share/initramfs-tools")
> + (string-append #$output "/usr/share/initramfs-tools")))
> + (substitute* "contrib/initramfs/Makefile.am"
> + (("/usr/share/initramfs-tools")
> + (string-append #$output "/usr/share/initramfs-tools")))

You had a bunch of tabs here which guix lint should tell you about.

Toggle quote (13 lines)
> (substitute* "module/os/linux/zfs/zfs_ctldir.c"
> (("/usr/bin/env\", \"umount")
> (string-append (search-input-file inputs "/bin/umount")
> @@ -1535,18 +1537,8 @@ (define-public zfs
> (substitute* "config/zfs-build.m4"
> (("\\$sysconfdir/init.d")
> (string-append #$output "/etc/init.d")))
> - (substitute* '("etc/zfs/Makefile.am"
> - "cmd/zed/Makefile.am")
> + (substitute* '("cmd/zed/Makefile.am")
> (("\\$\\(sysconfdir)") (string-append #$output "/etc")))
> - (substitute* "cmd/vdev_id/vdev_id"

I've restored this substitute* and just corrected the file location.

Toggle quote (12 lines)
> - (("PATH=/bin:/sbin:/usr/bin:/usr/sbin")
> - (string-append "PATH="
> - (dirname (which "chmod")) ":"
> - (dirname (which "grep")) ":"
> - (dirname (which "sed")) ":"
> - (dirname (which "gawk")))))
> - (substitute* "contrib/pyzfs/Makefile.in"
> - ((".*install-lib.*") ""))
> (substitute* '("Makefile.am" "Makefile.in")
> (("\\$\\(prefix)/src") (string-append #$output:src "/src")))
> (substitute* (find-files "udev/rules.d/" ".rules.in$")

Thanks for the patch, I've made the tweaks above and pushed this to
master as 0309080ffcb1d6a124f672275316a76bcda2e211.

Chris
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmZB1eRfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9Xckug/7BReraYFm3Di/QBBGQZiQ5Z+Ivd/3oCQx
PI8LCckyeFn7LJqrt4daIwTtdS91nVReZjPsCjuMXuDL06zh07fVJ+YjNghcYlCh
RDBvpzj4CHJ07Lhs12d9W6Psk/YO1jjR6KS260BH/SKBvVG30jG3+wiFwls/iTkj
K6kEPC3184hAL0Puqs1qsFVsgDKwT7aNdBtN2a0iWw1AuQXIbReKu3CNpNnegwlG
tNttZsnCxIZKB2Wzauu2Vm8SOvpt58xw6N/pPO/EtLQkvBXo/yoht6kBmYbCZByo
kYZ2f9rZx7/VUkuXUB9fBSUaJSrs8FtPtoaoX/SKFgACkjTa33GvutYuvQ539TuZ
zSFsvFsMFMYVPoDesFgpY8Uq0FVKI1VhY6vd11zNJQtpRFIl/+1qNxRseQu4TMMi
20/5f4qNV36uxDRd40yfkNgUd1iI+ynzfGsjIaC/Rt/AkYB77zEFq4wV0L4ToJbG
wl+bxfMKTzlEjbMk0zo+fdTfxXsIl8Oh+x+Vt/7aY7GNzNbNwlYdEG8WAeRMXft8
+chkqx7+htXlkvFDAXMHAlpqgiEkpn/biEa9Th1MYYQNF85I0ADy6GobxUJ5Qk8X
EKt0DUoc9eeUOzBHc5yoo4PcOEXbf5G22SzuajQqbPFrTE9rrmLEgIOWZTHWDtzY
m2M26LoYH8U=
=Wjyb
-----END PGP SIGNATURE-----

Closed
?