all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#55369] [PATCH 1/2] gnu: zfs: Use new package style.
@ 2022-05-11 13:37 Brian Cully via Guix-patches via
  2022-05-11 13:40 ` [bug#55369] [PATCH] gnu: Change OpenZFS home page to reflect new project ownership Brian Cully via Guix-patches via
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Brian Cully via Guix-patches via @ 2022-05-11 13:37 UTC (permalink / raw)
  To: 55369; +Cc: Brian Cully

From: Brian Cully <bjc@kublai.com>

* gnu/packages/file-systems.scm (zfs): Comment style.
[arguments]: Rewrite using gexps.
[inputs]: Remove labels.
Remove redundant ‘util-linux’ as ‘util-linux:lib’ has the required
mount/umount binaries.
---
 gnu/packages/file-systems.scm | 231 ++++++++++++++++------------------
 1 file changed, 111 insertions(+), 120 deletions(-)

diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm
index e6ec51fe40..9f4415ce18 100644
--- a/gnu/packages/file-systems.scm
+++ b/gnu/packages/file-systems.scm
@@ -1158,128 +1158,119 @@ (define-public zfs
            (base32 "1xmcy4f0damf1pkb1sy1339ir1jkky0dwzd8vhwgc1pqjgac0liv"))))
     (build-system linux-module-build-system)
     (arguments
-     `(;; The ZFS kernel module should not be downloaded since the license
-       ;; terms don't allow for distributing it, only building it locally.
-       #:substitutable? #f
-       ;; Tests cannot run in an unprivileged build environment.
-       #:tests? #f
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'configure 'really-configure
-           (lambda* (#:key outputs inputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
-               (substitute* "configure"
-                 (("-/bin/sh") (string-append "-" (which "sh"))))
-               (invoke "./configure"
-                       "--with-config=all"
-                       (string-append "--prefix=" out)
-                       (string-append "--with-dracutdir=" out "/lib/dracut")
-                       (string-append "--with-udevdir=" out "/lib/udev")
-                       (string-append "--with-mounthelperdir=" out "/sbin")
-                       (string-append "--with-linux="
-                                      (assoc-ref inputs "linux-module-builder")
-                                      "/lib/modules/build")))))
-         (add-after 'unpack 'patch-source
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (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"))
-                   (kmod       (assoc-ref inputs "kmod-runtime")))
-               ;; New feature "compatibility=" in 2.1.0.
-               ;; This feature looks up in two locations:
-               ;;   /etc/zfs/compatibility.d/
-               ;;   /usr/share/zfs/compatibility.d/
-               ;; The first is intended for system-specific compatibility
-               ;; sets, while the second is what is installed with the
-               ;; OpenZFS package, so use the absolute path for the first
-               ;; (which requires patching in the file) and the store path
-               ;; for the second (which it gets by default).
-               (substitute* "include/sys/fs/zfs.h"
-                 (("#define\tZPOOL_SYSCONF_COMPAT_D.*$")
-                  ; Use absolute path.
-                  "#define\tZPOOL_SYSCONF_COMPAT_D\t\"/etc/zfs/compatibility.d\"\n"))
-               ;; Also update the manual, which uses absolute paths, so that
-               ;; /usr/share/zfs/compatibility.d/ is referred via the store.
-               (substitute* '("man/man7/zpoolprops.7"
-                              "man/man7/zpool-features.7")
-                 (("/usr/share/zfs/compatibility.d")
-                  (string-append out "/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.
-                 (("\"/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/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/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/os/linux/nfs.c"
-                 (("/usr/sbin/exportfs")
-                  (string-append nfs-utils "/sbin/exportfs")))
-               (substitute* "config/zfs-build.m4"
-                 (("\\$sysconfdir/init.d") (string-append out "/etc/init.d")))
-               (substitute* '("etc/zfs/Makefile.am"
-                              "cmd/zed/Makefile.am")
-                 (("\\$\\(sysconfdir)") (string-append out "/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 src "/src")))
-               (substitute* (find-files "udev/rules.d/" ".rules.in$")
-                 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))))))
-         (replace 'build
-           (lambda _ (invoke "make")))
-         (replace 'install
-           (lambda* (#:key outputs inputs native-inputs #:allow-other-keys)
-             (let* ((out    (assoc-ref outputs "out"))
-                    (moddir (assoc-ref outputs "module"))
-                    (kmod   (assoc-ref (or native-inputs inputs) "kmod")))
-               (invoke "make" "install"
-                       (string-append "DEFAULT_INITCONF_DIR=" out "/etc/default")
-                       (string-append "DEPMOD=" kmod "/bin/depmod")
-                       (string-append "INSTALL_PATH=" out)
-                       (string-append "INSTALL_MOD_PATH=" moddir)
-                       "INSTALL_MOD_STRIP=1")
-               (install-file "contrib/bash_completion.d/zfs"
-                             (string-append out
-                                            "/share/bash-completion/completions"))))))))
+     (list
+      ;; The ZFS kernel module should not be downloaded since the license
+      ;; terms don't allow for distributing it, only building it locally.
+      #:substitutable? #f
+      ;; Tests cannot run in an unprivileged build environment.
+      #:tests? #f
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'configure 'really-configure
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* "configure"
+                (("-/bin/sh") (string-append "-" (which "sh"))))
+              (invoke "./configure"
+                      "--with-config=all"
+                      (string-append "--prefix=" #$output)
+                      (string-append "--with-dracutdir=" #$output "/lib/dracut")
+                      (string-append "--with-udevdir=" #$output "/lib/udev")
+                      (string-append "--with-mounthelperdir=" #$output "/sbin")
+                      (string-append "--with-linux="
+                                     (assoc-ref inputs "linux-module-builder")
+                                     "/lib/modules/build"))))
+          (add-after 'unpack 'patch-source
+            (lambda _
+              ;; New feature "compatibility=" in 2.1.0.
+              ;; This feature looks up in two locations:
+              ;;   /etc/zfs/compatibility.d/
+              ;;   /usr/share/zfs/compatibility.d/
+              ;; The first is intended for system-specific compatibility
+              ;; sets, while the second is what is installed with the
+              ;; OpenZFS package, so use the absolute path for the first
+              ;; (which requires patching in the file) and the store path
+              ;; for the second (which it gets by default).
+              (substitute* "include/sys/fs/zfs.h"
+                (("#define\tZPOOL_SYSCONF_COMPAT_D.*$")
+                 ;; Use absolute path.
+                 "#define\tZPOOL_SYSCONF_COMPAT_D\t\"/etc/zfs/compatibility.d\"\n"))
+              ;; Also update the manual, which uses absolute paths, so that
+              ;; /usr/share/zfs/compatibility.d/ is referred via the store.
+              (substitute* '("man/man7/zpoolprops.7"
+                             "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.
+                (("\"/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/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/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/os/linux/nfs.c"
+                (("/usr/sbin/exportfs")
+                 (string-append #$nfs-utils "/sbin/exportfs")))
+              (substitute* "config/zfs-build.m4"
+                (("\\$sysconfdir/init.d") (string-append #$output "/etc/init.d")))
+              (substitute* '("etc/zfs/Makefile.am"
+                             "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$")
+                (("/sbin/modprobe") (string-append #$kmod "/bin/modprobe")))))
+          (replace 'build
+            (lambda _ (invoke "make")))
+          (replace 'install
+            (lambda* (#:key inputs native-inputs #:allow-other-keys)
+              (let* ((kmod (assoc-ref (or native-inputs inputs) "kmod")))
+                (invoke "make" "install"
+                        (string-append "DEFAULT_INITCONF_DIR=" #$output "/etc/default")
+                        (string-append "DEPMOD=" kmod "/bin/depmod")
+                        (string-append "INSTALL_PATH=" #$output)
+                        (string-append "INSTALL_MOD_PATH=" #$output:module)
+                        "INSTALL_MOD_STRIP=1")
+                (install-file "contrib/bash_completion.d/zfs"
+                              (string-append #$output
+                                             "/share/bash-completion/completions"))))))))
     (native-inputs
      (list attr kmod pkg-config))
-    (inputs
-     `(("eudev" ,eudev)
-       ("kmod-runtime" ,kmod)
-       ("libaio" ,libaio)
-       ("libtirpc" ,libtirpc)
-       ("nfs-utils" ,nfs-utils)
-       ("openssl" ,openssl)
-       ("python" ,python)
-       ("python-cffi" ,python-cffi)
-       ("util-linux" ,util-linux)
-       ("util-linux:lib" ,util-linux "lib")
-       ("zlib" ,zlib)))
+    (inputs (list eudev
+                  kmod
+                  libaio
+                  libtirpc
+                  nfs-utils
+                  openssl
+                  python
+                  python-cffi
+                  `(,util-linux "lib")
+                  zlib))
     (home-page "https://zfsonlinux.org/")
     (synopsis "OpenZFS on Linux")
     (description
-- 
2.36.0





^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [bug#55369] [PATCH] gnu: Change OpenZFS home page to reflect new project ownership.
  2022-05-11 13:37 [bug#55369] [PATCH 1/2] gnu: zfs: Use new package style Brian Cully via Guix-patches via
@ 2022-05-11 13:40 ` Brian Cully via Guix-patches via
  2022-05-11 14:53 ` [bug#55369] [PATCH 1/2] gnu: zfs: Use new package style Maxime Devos
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 14+ messages in thread
From: Brian Cully via Guix-patches via @ 2022-05-11 13:40 UTC (permalink / raw)
  To: 55369; +Cc: Brian Cully

From: Brian Cully <bjc@kublai.com>

gnu/packages/file-systems.scm (zfs) [home-page]: Update URL.
---
 gnu/packages/file-systems.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm
index 9f4415ce18..9e68837562 100644
--- a/gnu/packages/file-systems.scm
+++ b/gnu/packages/file-systems.scm
@@ -1271,7 +1271,7 @@ (define-public zfs
                   python-cffi
                   `(,util-linux "lib")
                   zlib))
-    (home-page "https://zfsonlinux.org/")
+    (home-page "https://openzfs.org/")
     (synopsis "OpenZFS on Linux")
     (description
      "OpenZFS is an advanced file system and volume manager which was
-- 
2.36.0





^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [bug#55369] [PATCH 1/2] gnu: zfs: Use new package style.
  2022-05-11 13:37 [bug#55369] [PATCH 1/2] gnu: zfs: Use new package style Brian Cully via Guix-patches via
  2022-05-11 13:40 ` [bug#55369] [PATCH] gnu: Change OpenZFS home page to reflect new project ownership Brian Cully via Guix-patches via
@ 2022-05-11 14:53 ` Maxime Devos
  2022-05-11 14:57 ` Maxime Devos
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 14+ messages in thread
From: Maxime Devos @ 2022-05-11 14:53 UTC (permalink / raw)
  To: Brian Cully, 55369; +Cc: Brian Cully

[-- Attachment #1: Type: text/plain, Size: 351 bytes --]

Brian Cully via Guix-patches via schreef op wo 11-05-2022 om 09:37 [-
0400]:
> Remove redundant ‘util-linux’ as ‘util-linux:lib’ has the required
> mount/umount binaries.

It doesn't:
/gnu/store/7nlzk7n90ib3llblxlpz725ym3k05gdj-util-linux-2.37.2-lib/
(x86_64-linux) does not have a 'bin' or 'sbin' subdirectory.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [bug#55369] [PATCH 1/2] gnu: zfs: Use new package style.
  2022-05-11 13:37 [bug#55369] [PATCH 1/2] gnu: zfs: Use new package style Brian Cully via Guix-patches via
  2022-05-11 13:40 ` [bug#55369] [PATCH] gnu: Change OpenZFS home page to reflect new project ownership Brian Cully via Guix-patches via
  2022-05-11 14:53 ` [bug#55369] [PATCH 1/2] gnu: zfs: Use new package style Maxime Devos
@ 2022-05-11 14:57 ` Maxime Devos
  2022-05-11 15:43 ` [bug#55369] [PATCH v2 " Brian Cully via Guix-patches via
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 14+ messages in thread
From: Maxime Devos @ 2022-05-11 14:57 UTC (permalink / raw)
  To: Brian Cully, 55369; +Cc: Brian Cully

[-- Attachment #1: Type: text/plain, Size: 1332 bytes --]

Brian Cully via Guix-patches via schreef op wo 11-05-2022 om 09:37 [-
0400]:
> -         (add-after 'unpack 'patch-source
> -           (lambda* (#:key inputs outputs #:allow-other-keys)
> -             (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"))
> -                   (kmod       (assoc-ref inputs "kmod-runtime")))
[...]
> +          (add-after 'unpack 'patch-source
> +            (lambda _ [...]
> +              (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" "\""))

This breaks package transformations -- now the 'kmod' from (gnu
packages linux) is hardcoded, it cannot be replaced by something else
with --with-input or (package (inherit ...) (inputs (list custom-kmod
...)) or the like.  (Currently no mechanism exists to rewrite G-exps.)

Instead, do

  (lambda* (#:key inputs #:allow-other-keys)
    [...]
    (string-append "\"" (search-input-file inputs "bin/modprobe))
    [...])
Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [bug#55369] [PATCH v2 1/2] gnu: zfs: Use new package style.
  2022-05-11 13:37 [bug#55369] [PATCH 1/2] gnu: zfs: Use new package style Brian Cully via Guix-patches via
                   ` (2 preceding siblings ...)
  2022-05-11 14:57 ` Maxime Devos
@ 2022-05-11 15:43 ` Brian Cully via Guix-patches via
  2022-05-11 19:33   ` Maxime Devos
  2022-05-11 15:48 ` [bug#55369] [PATCH v2] gnu: Change OpenZFS home page to reflect new project ownership Brian Cully via Guix-patches via
  2022-05-12 15:05 ` [bug#55369] [PATCH v3 1/2] gnu: zfs: Use new package style Brian Cully via Guix-patches via
  5 siblings, 1 reply; 14+ messages in thread
From: Brian Cully via Guix-patches via @ 2022-05-11 15:43 UTC (permalink / raw)
  To: 55369; +Cc: Brian Cully

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 14754 bytes --]

From: Brian Cully <bjc@kublai.com>

* gnu/packages/file-systems.scm (zfs): Comment style.
[arguments]: Rewrite using gexps.
[inputs]: Remove labels.
---
This patch replaces ungexp'd package references with
(search-input-file …) and puts ‘util-linux’ back in the inputs.

As the previous patch referenced ‘util-linux’ directly (rather than
s-i-f), it accidentally pulled in the required binaries as a side-effect.
 gnu/packages/file-systems.scm | 247 +++++++++++++++++-----------------
 1 file changed, 127 insertions(+), 120 deletions(-)

diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm
index e6ec51fe40..f9309ebac2 100644
--- a/gnu/packages/file-systems.scm
+++ b/gnu/packages/file-systems.scm
@@ -1158,128 +1158,135 @@ (define-public zfs
            (base32 "1xmcy4f0damf1pkb1sy1339ir1jkky0dwzd8vhwgc1pqjgac0liv"))))
     (build-system linux-module-build-system)
     (arguments
-     `(;; The ZFS kernel module should not be downloaded since the license
-       ;; terms don't allow for distributing it, only building it locally.
-       #:substitutable? #f
-       ;; Tests cannot run in an unprivileged build environment.
-       #:tests? #f
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'configure 'really-configure
-           (lambda* (#:key outputs inputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
-               (substitute* "configure"
-                 (("-/bin/sh") (string-append "-" (which "sh"))))
-               (invoke "./configure"
-                       "--with-config=all"
-                       (string-append "--prefix=" out)
-                       (string-append "--with-dracutdir=" out "/lib/dracut")
-                       (string-append "--with-udevdir=" out "/lib/udev")
-                       (string-append "--with-mounthelperdir=" out "/sbin")
-                       (string-append "--with-linux="
-                                      (assoc-ref inputs "linux-module-builder")
-                                      "/lib/modules/build")))))
-         (add-after 'unpack 'patch-source
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (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"))
-                   (kmod       (assoc-ref inputs "kmod-runtime")))
-               ;; New feature "compatibility=" in 2.1.0.
-               ;; This feature looks up in two locations:
-               ;;   /etc/zfs/compatibility.d/
-               ;;   /usr/share/zfs/compatibility.d/
-               ;; The first is intended for system-specific compatibility
-               ;; sets, while the second is what is installed with the
-               ;; OpenZFS package, so use the absolute path for the first
-               ;; (which requires patching in the file) and the store path
-               ;; for the second (which it gets by default).
-               (substitute* "include/sys/fs/zfs.h"
-                 (("#define\tZPOOL_SYSCONF_COMPAT_D.*$")
-                  ; Use absolute path.
-                  "#define\tZPOOL_SYSCONF_COMPAT_D\t\"/etc/zfs/compatibility.d\"\n"))
-               ;; Also update the manual, which uses absolute paths, so that
-               ;; /usr/share/zfs/compatibility.d/ is referred via the store.
-               (substitute* '("man/man7/zpoolprops.7"
-                              "man/man7/zpool-features.7")
-                 (("/usr/share/zfs/compatibility.d")
-                  (string-append out "/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.
-                 (("\"/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/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/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/os/linux/nfs.c"
-                 (("/usr/sbin/exportfs")
-                  (string-append nfs-utils "/sbin/exportfs")))
-               (substitute* "config/zfs-build.m4"
-                 (("\\$sysconfdir/init.d") (string-append out "/etc/init.d")))
-               (substitute* '("etc/zfs/Makefile.am"
-                              "cmd/zed/Makefile.am")
-                 (("\\$\\(sysconfdir)") (string-append out "/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 src "/src")))
-               (substitute* (find-files "udev/rules.d/" ".rules.in$")
-                 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))))))
-         (replace 'build
-           (lambda _ (invoke "make")))
-         (replace 'install
-           (lambda* (#:key outputs inputs native-inputs #:allow-other-keys)
-             (let* ((out    (assoc-ref outputs "out"))
-                    (moddir (assoc-ref outputs "module"))
-                    (kmod   (assoc-ref (or native-inputs inputs) "kmod")))
-               (invoke "make" "install"
-                       (string-append "DEFAULT_INITCONF_DIR=" out "/etc/default")
-                       (string-append "DEPMOD=" kmod "/bin/depmod")
-                       (string-append "INSTALL_PATH=" out)
-                       (string-append "INSTALL_MOD_PATH=" moddir)
-                       "INSTALL_MOD_STRIP=1")
-               (install-file "contrib/bash_completion.d/zfs"
-                             (string-append out
-                                            "/share/bash-completion/completions"))))))))
+     (list
+      ;; The ZFS kernel module should not be downloaded since the license
+      ;; terms don't allow for distributing it, only building it locally.
+      #:substitutable? #f
+      ;; Tests cannot run in an unprivileged build environment.
+      #:tests? #f
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'configure 'really-configure
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* "configure"
+                (("-/bin/sh") (string-append "-" (which "sh"))))
+              (invoke "./configure"
+                      "--with-config=all"
+                      (string-append "--prefix=" #$output)
+                      (string-append "--with-dracutdir=" #$output
+                                     "/lib/dracut")
+                      (string-append "--with-udevdir=" #$output
+                                     "/lib/udev")
+                      (string-append "--with-mounthelperdir=" #$output
+                                     "/sbin")
+                      (string-append "--with-linux="
+                                     (assoc-ref inputs "linux-module-builder")
+                                     "/lib/modules/build"))))
+          (add-after 'unpack 'patch-source
+            (lambda* (#:key inputs #:allow-other-keys)
+              ;; New feature "compatibility=" in 2.1.0.
+              ;; This feature looks up in two locations:
+              ;;   /etc/zfs/compatibility.d/
+              ;;   /usr/share/zfs/compatibility.d/
+              ;; The first is intended for system-specific compatibility
+              ;; sets, while the second is what is installed with the
+              ;; OpenZFS package, so use the absolute path for the first
+              ;; (which requires patching in the file) and the store path
+              ;; for the second (which it gets by default).
+              (substitute* "include/sys/fs/zfs.h"
+                (("#define\tZPOOL_SYSCONF_COMPAT_D.*$")
+                 ;; Use absolute path.
+                 "#define\tZPOOL_SYSCONF_COMPAT_D\t\"/etc/zfs/compatibility.d\"\n"))
+              ;; Also update the manual, which uses absolute paths, so that
+              ;; /usr/share/zfs/compatibility.d/ is referred via the store.
+              (substitute* '("man/man7/zpoolprops.7"
+                             "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.
+                (("\"/sbin/modprobe\"")
+                 (string-append "\""
+                                (search-input-file inputs "/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/os/linux/zfs/zfs_ctldir.c"
+                (("/usr/bin/env\", \"umount")
+                 (string-append (search-input-file inputs "/bin/umount")
+                                "\", \"-n"))
+                (("/usr/bin/env\", \"mount")
+                 (string-append (search-input-file inputs "/bin/mount")
+                                "\", \"-n")))
+              (substitute* "lib/libzfs/os/linux/libzfs_mount_os.c"
+                (("/bin/mount") (search-input-file inputs "/bin/mount"))
+                (("/bin/umount") (search-input-file inputs "/bin/umount")))
+              (substitute* "lib/libshare/os/linux/nfs.c"
+                (("/usr/sbin/exportfs")
+                 (search-input-file inputs "/sbin/exportfs")))
+              (substitute* "config/zfs-build.m4"
+                (("\\$sysconfdir/init.d")
+                 (string-append #$output "/etc/init.d")))
+              (substitute* '("etc/zfs/Makefile.am"
+                             "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$")
+                (("/sbin/modprobe")
+                 (search-input-file inputs "/bin/modprobe")))))
+          (replace 'build
+            (lambda _ (invoke "make")))
+          (replace 'install
+            (lambda* (#:key inputs native-inputs #:allow-other-keys)
+              (let* ((kmod (assoc-ref (or native-inputs inputs) "kmod")))
+                (invoke "make" "install"
+                        (string-append "DEFAULT_INITCONF_DIR="
+                                       #$output "/etc/default")
+                        (string-append "DEPMOD="
+                                       (search-input-file
+                                        (or native-inputs inputs)
+                                        "/bin/depmod"))
+                        (string-append "INSTALL_PATH=" #$output)
+                        (string-append "INSTALL_MOD_PATH=" #$output:module)
+                        "INSTALL_MOD_STRIP=1")
+                (install-file
+                 "contrib/bash_completion.d/zfs"
+                 (string-append #$output
+                                "/share/bash-completion/completions"))))))))
     (native-inputs
      (list attr kmod pkg-config))
-    (inputs
-     `(("eudev" ,eudev)
-       ("kmod-runtime" ,kmod)
-       ("libaio" ,libaio)
-       ("libtirpc" ,libtirpc)
-       ("nfs-utils" ,nfs-utils)
-       ("openssl" ,openssl)
-       ("python" ,python)
-       ("python-cffi" ,python-cffi)
-       ("util-linux" ,util-linux)
-       ("util-linux:lib" ,util-linux "lib")
-       ("zlib" ,zlib)))
+    (inputs (list eudev
+                  kmod
+                  libaio
+                  libtirpc
+                  nfs-utils
+                  openssl
+                  python
+                  python-cffi
+                  util-linux
+                  `(,util-linux "lib")
+                  zlib))
     (home-page "https://zfsonlinux.org/")
     (synopsis "OpenZFS on Linux")
     (description
-- 
2.36.0





^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [bug#55369] [PATCH v2] gnu: Change OpenZFS home page to reflect new project ownership.
  2022-05-11 13:37 [bug#55369] [PATCH 1/2] gnu: zfs: Use new package style Brian Cully via Guix-patches via
                   ` (3 preceding siblings ...)
  2022-05-11 15:43 ` [bug#55369] [PATCH v2 " Brian Cully via Guix-patches via
@ 2022-05-11 15:48 ` Brian Cully via Guix-patches via
  2022-05-11 19:36   ` Maxime Devos
  2022-05-12 15:05 ` [bug#55369] [PATCH v3 1/2] gnu: zfs: Use new package style Brian Cully via Guix-patches via
  5 siblings, 1 reply; 14+ messages in thread
From: Brian Cully via Guix-patches via @ 2022-05-11 15:48 UTC (permalink / raw)
  To: 55369; +Cc: Brian Cully

From: Brian Cully <bjc@kublai.com>

gnu/packages/file-systems.scm (zfs) [home-page]: Update URL.
---
 gnu/packages/file-systems.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm
index f9309ebac2..1bebac2b85 100644
--- a/gnu/packages/file-systems.scm
+++ b/gnu/packages/file-systems.scm
@@ -1287,7 +1287,7 @@ (define-public zfs
                   util-linux
                   `(,util-linux "lib")
                   zlib))
-    (home-page "https://zfsonlinux.org/")
+    (home-page "https://openzfs.org/")
     (synopsis "OpenZFS on Linux")
     (description
      "OpenZFS is an advanced file system and volume manager which was
-- 
2.36.0





^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [bug#55369] [PATCH v2 1/2] gnu: zfs: Use new package style.
  2022-05-11 15:43 ` [bug#55369] [PATCH v2 " Brian Cully via Guix-patches via
@ 2022-05-11 19:33   ` Maxime Devos
  0 siblings, 0 replies; 14+ messages in thread
From: Maxime Devos @ 2022-05-11 19:33 UTC (permalink / raw)
  To: Brian Cully, 55369; +Cc: Brian Cully

[-- Attachment #1: Type: text/plain, Size: 805 bytes --]

Brian Cully via Guix-patches via schreef op wo 11-05-2022 om 11:43 [-
0400]:
> [inputs]: Remove labels.

Nice.

> ---
> This patch replaces ungexp'd package references with
> (search-input-file …) and puts ‘util-linux’ back in the inputs.

The uses of 'search-input-file' look good to me at first sight.
One additional nitpick:

> +                      (string-append "--with-linux="
> +                                     (assoc-ref inputs "linux-
module-builder")
> +                                     "/lib/modules/build"))))

You can remove an input label here as well, try 'search-input-
directory' (untested):

(string-append "--with-linux="
  ;; provided by 'linux-module-build-system'
  (search-input-directory inputs "lib/modules/build"))

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [bug#55369] [PATCH v2] gnu: Change OpenZFS home page to reflect new project ownership.
  2022-05-11 15:48 ` [bug#55369] [PATCH v2] gnu: Change OpenZFS home page to reflect new project ownership Brian Cully via Guix-patches via
@ 2022-05-11 19:36   ` Maxime Devos
  2022-05-12  3:05     ` Brian Cully via Guix-patches via
  0 siblings, 1 reply; 14+ messages in thread
From: Maxime Devos @ 2022-05-11 19:36 UTC (permalink / raw)
  To: Brian Cully, 55369; +Cc: Brian Cully

[-- Attachment #1: Type: text/plain, Size: 541 bytes --]

Brian Cully via Guix-patches via schreef op wo 11-05-2022 om 11:48 [-
0400]:
> -    (home-page "https://zfsonlinux.org/")
> +    (home-page "https://openzfs.org/")

I'm not sure about this change, since 'zfsonlinux' is more specific
than 'openzfs' and at least currently, Guix only supports ZFS on Linux
(I don't think there's a Hurd front-end?) and zfsonlinux.org seems to
be still in use (there's a new zfs release there for Mar 23 2022).
Is there some upstream document about zfsonlinux -> openzfs?

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [bug#55369] [PATCH v2] gnu: Change OpenZFS home page to reflect new project ownership.
  2022-05-11 19:36   ` Maxime Devos
@ 2022-05-12  3:05     ` Brian Cully via Guix-patches via
  2022-05-12 14:36       ` Brian Cully via Guix-patches via
  0 siblings, 1 reply; 14+ messages in thread
From: Brian Cully via Guix-patches via @ 2022-05-12  3:05 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 55369, Brian Cully


Maxime Devos <maximedevos@telenet.be> writes:

> [[PGP Signed Part:Undecided]]
> Brian Cully via Guix-patches via schreef op wo 11-05-2022 om 
> 11:48 [-
> 0400]:
>> -    (home-page "https://zfsonlinux.org/")
>> +    (home-page "https://openzfs.org/")
>
> I'm not sure about this change, since 'zfsonlinux' is more 
> specific
> than 'openzfs' and at least currently, Guix only supports ZFS on 
> Linux
> (I don't think there's a Hurd front-end?) and zfsonlinux.org 
> seems to
> be still in use (there's a new zfs release there for Mar 23 
> 2022).
> Is there some upstream document about zfsonlinux -> openzfs?

I’ll try to dig it up, but I want to say about a year ago, right 
before FreeBSD swapped over to using it (instead of their own fork 
from the Illumos/OpenSolaris upstream), they changed the 
organization.

-bjc




^ permalink raw reply	[flat|nested] 14+ messages in thread

* [bug#55369] [PATCH v2] gnu: Change OpenZFS home page to reflect new project ownership.
  2022-05-12  3:05     ` Brian Cully via Guix-patches via
@ 2022-05-12 14:36       ` Brian Cully via Guix-patches via
  2022-05-12 14:43         ` Maxime Devos
  0 siblings, 1 reply; 14+ messages in thread
From: Brian Cully via Guix-patches via @ 2022-05-12 14:36 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 55369, Brian Cully


Brian Cully <bjc@spork.org> writes:
> I’ll try to dig it up, but I want to say about a year ago, right
> before FreeBSD swapped over to using it (instead of their own 
> fork
> from the Illumos/OpenSolaris upstream), they changed the 
> organization.

So it looks like the github repository was renamed as things 
merged in from FreeBSD, but the ZFSonLinux project is still extant 
as a Linux-specific resource for ZFS issues: 
https://zfsonlinux.topicbox.com/groups/zfs-discuss/T13eedc32607dab41/zol-repo-move-to-openzfs

I’m ok with dropping this part of the patch. I’d only added it to 
align the github repo (which is openzfs) with the project home 
page. I think it still makes sense to do so, but I’m not terribly 
invested in having this patch applied one way or the other.

-bjc




^ permalink raw reply	[flat|nested] 14+ messages in thread

* [bug#55369] [PATCH v2] gnu: Change OpenZFS home page to reflect new project ownership.
  2022-05-12 14:36       ` Brian Cully via Guix-patches via
@ 2022-05-12 14:43         ` Maxime Devos
  2022-05-12 15:07           ` Brian Cully via Guix-patches via
  0 siblings, 1 reply; 14+ messages in thread
From: Maxime Devos @ 2022-05-12 14:43 UTC (permalink / raw)
  To: Brian Cully; +Cc: 55369, Brian Cully

[-- Attachment #1: Type: text/plain, Size: 880 bytes --]

Brian Cully schreef op do 12-05-2022 om 10:36 [-0400]:
> So it looks like the github repository was renamed as things 
> merged in from FreeBSD, but the ZFSonLinux project is still extant 
> as a Linux-specific resource for ZFS issues: 
> https://zfsonlinux.topicbox.com/groups/zfs-discuss/T13eedc32607dab41/zol-repo-move-to-openzfs
> 
> I’m ok with dropping this part of the patch. I’d only added it to 
> align the github repo (which is openzfs) with the project home 
> page. I think it still makes sense to do so, but I’m not terribly 
> invested in having this patch applied one way or the other.

Not sure which home page would be the best (the general cross-platform
home page, or the Linux-specific home page), but I'd guess that as
someone interested in OpenZFS you would know the best here. 
Summarised: maybe keep the patch?

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [bug#55369] [PATCH v3 1/2] gnu: zfs: Use new package style.
  2022-05-11 13:37 [bug#55369] [PATCH 1/2] gnu: zfs: Use new package style Brian Cully via Guix-patches via
                   ` (4 preceding siblings ...)
  2022-05-11 15:48 ` [bug#55369] [PATCH v2] gnu: Change OpenZFS home page to reflect new project ownership Brian Cully via Guix-patches via
@ 2022-05-12 15:05 ` Brian Cully via Guix-patches via
  2022-05-20 18:15   ` bug#55369: [PATCH " Ludovic Courtès
  5 siblings, 1 reply; 14+ messages in thread
From: Brian Cully via Guix-patches via @ 2022-05-12 15:05 UTC (permalink / raw)
  To: 55369; +Cc: Brian Cully

From: Brian Cully <bjc@kublai.com>

* gnu/packages/file-systems.scm (zfs): Comment style.
[arguments]: Rewrite using gexps.
[inputs]: Remove labels.
---

This changes the use of (assoc-ref inputs "linux-module-builder") to
an invocation of (search-input-directory inputs "lib/modules/build").

 gnu/packages/file-systems.scm | 248 ++++++++++++++++++----------------
 1 file changed, 128 insertions(+), 120 deletions(-)

diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm
index e6ec51fe40..3d93f59585 100644
--- a/gnu/packages/file-systems.scm
+++ b/gnu/packages/file-systems.scm
@@ -1158,128 +1158,136 @@ (define-public zfs
            (base32 "1xmcy4f0damf1pkb1sy1339ir1jkky0dwzd8vhwgc1pqjgac0liv"))))
     (build-system linux-module-build-system)
     (arguments
-     `(;; The ZFS kernel module should not be downloaded since the license
-       ;; terms don't allow for distributing it, only building it locally.
-       #:substitutable? #f
-       ;; Tests cannot run in an unprivileged build environment.
-       #:tests? #f
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'configure 'really-configure
-           (lambda* (#:key outputs inputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
-               (substitute* "configure"
-                 (("-/bin/sh") (string-append "-" (which "sh"))))
-               (invoke "./configure"
-                       "--with-config=all"
-                       (string-append "--prefix=" out)
-                       (string-append "--with-dracutdir=" out "/lib/dracut")
-                       (string-append "--with-udevdir=" out "/lib/udev")
-                       (string-append "--with-mounthelperdir=" out "/sbin")
-                       (string-append "--with-linux="
-                                      (assoc-ref inputs "linux-module-builder")
-                                      "/lib/modules/build")))))
-         (add-after 'unpack 'patch-source
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (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"))
-                   (kmod       (assoc-ref inputs "kmod-runtime")))
-               ;; New feature "compatibility=" in 2.1.0.
-               ;; This feature looks up in two locations:
-               ;;   /etc/zfs/compatibility.d/
-               ;;   /usr/share/zfs/compatibility.d/
-               ;; The first is intended for system-specific compatibility
-               ;; sets, while the second is what is installed with the
-               ;; OpenZFS package, so use the absolute path for the first
-               ;; (which requires patching in the file) and the store path
-               ;; for the second (which it gets by default).
-               (substitute* "include/sys/fs/zfs.h"
-                 (("#define\tZPOOL_SYSCONF_COMPAT_D.*$")
-                  ; Use absolute path.
-                  "#define\tZPOOL_SYSCONF_COMPAT_D\t\"/etc/zfs/compatibility.d\"\n"))
-               ;; Also update the manual, which uses absolute paths, so that
-               ;; /usr/share/zfs/compatibility.d/ is referred via the store.
-               (substitute* '("man/man7/zpoolprops.7"
-                              "man/man7/zpool-features.7")
-                 (("/usr/share/zfs/compatibility.d")
-                  (string-append out "/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.
-                 (("\"/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/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/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/os/linux/nfs.c"
-                 (("/usr/sbin/exportfs")
-                  (string-append nfs-utils "/sbin/exportfs")))
-               (substitute* "config/zfs-build.m4"
-                 (("\\$sysconfdir/init.d") (string-append out "/etc/init.d")))
-               (substitute* '("etc/zfs/Makefile.am"
-                              "cmd/zed/Makefile.am")
-                 (("\\$\\(sysconfdir)") (string-append out "/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 src "/src")))
-               (substitute* (find-files "udev/rules.d/" ".rules.in$")
-                 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))))))
-         (replace 'build
-           (lambda _ (invoke "make")))
-         (replace 'install
-           (lambda* (#:key outputs inputs native-inputs #:allow-other-keys)
-             (let* ((out    (assoc-ref outputs "out"))
-                    (moddir (assoc-ref outputs "module"))
-                    (kmod   (assoc-ref (or native-inputs inputs) "kmod")))
-               (invoke "make" "install"
-                       (string-append "DEFAULT_INITCONF_DIR=" out "/etc/default")
-                       (string-append "DEPMOD=" kmod "/bin/depmod")
-                       (string-append "INSTALL_PATH=" out)
-                       (string-append "INSTALL_MOD_PATH=" moddir)
-                       "INSTALL_MOD_STRIP=1")
-               (install-file "contrib/bash_completion.d/zfs"
-                             (string-append out
-                                            "/share/bash-completion/completions"))))))))
+     (list
+      ;; The ZFS kernel module should not be downloaded since the license
+      ;; terms don't allow for distributing it, only building it locally.
+      #:substitutable? #f
+      ;; Tests cannot run in an unprivileged build environment.
+      #:tests? #f
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'configure 'really-configure
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* "configure"
+                (("-/bin/sh") (string-append "-" (which "sh"))))
+              (invoke "./configure"
+                      "--with-config=all"
+                      (string-append "--prefix=" #$output)
+                      (string-append "--with-dracutdir=" #$output
+                                     "/lib/dracut")
+                      (string-append "--with-udevdir=" #$output
+                                     "/lib/udev")
+                      (string-append "--with-mounthelperdir=" #$output
+                                     "/sbin")
+                      (string-append "--with-linux="
+                                     (search-input-directory
+                                      inputs
+                                      "lib/modules/build")))))
+          (add-after 'unpack 'patch-source
+            (lambda* (#:key inputs #:allow-other-keys)
+              ;; New feature "compatibility=" in 2.1.0.
+              ;; This feature looks up in two locations:
+              ;;   /etc/zfs/compatibility.d/
+              ;;   /usr/share/zfs/compatibility.d/
+              ;; The first is intended for system-specific compatibility
+              ;; sets, while the second is what is installed with the
+              ;; OpenZFS package, so use the absolute path for the first
+              ;; (which requires patching in the file) and the store path
+              ;; for the second (which it gets by default).
+              (substitute* "include/sys/fs/zfs.h"
+                (("#define\tZPOOL_SYSCONF_COMPAT_D.*$")
+                 ;; Use absolute path.
+                 "#define\tZPOOL_SYSCONF_COMPAT_D\t\"/etc/zfs/compatibility.d\"\n"))
+              ;; Also update the manual, which uses absolute paths, so that
+              ;; /usr/share/zfs/compatibility.d/ is referred via the store.
+              (substitute* '("man/man7/zpoolprops.7"
+                             "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.
+                (("\"/sbin/modprobe\"")
+                 (string-append "\""
+                                (search-input-file inputs "/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/os/linux/zfs/zfs_ctldir.c"
+                (("/usr/bin/env\", \"umount")
+                 (string-append (search-input-file inputs "/bin/umount")
+                                "\", \"-n"))
+                (("/usr/bin/env\", \"mount")
+                 (string-append (search-input-file inputs "/bin/mount")
+                                "\", \"-n")))
+              (substitute* "lib/libzfs/os/linux/libzfs_mount_os.c"
+                (("/bin/mount") (search-input-file inputs "/bin/mount"))
+                (("/bin/umount") (search-input-file inputs "/bin/umount")))
+              (substitute* "lib/libshare/os/linux/nfs.c"
+                (("/usr/sbin/exportfs")
+                 (search-input-file inputs "/sbin/exportfs")))
+              (substitute* "config/zfs-build.m4"
+                (("\\$sysconfdir/init.d")
+                 (string-append #$output "/etc/init.d")))
+              (substitute* '("etc/zfs/Makefile.am"
+                             "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$")
+                (("/sbin/modprobe")
+                 (search-input-file inputs "/bin/modprobe")))))
+          (replace 'build
+            (lambda _ (invoke "make")))
+          (replace 'install
+            (lambda* (#:key inputs native-inputs #:allow-other-keys)
+              (let* ((kmod (assoc-ref (or native-inputs inputs) "kmod")))
+                (invoke "make" "install"
+                        (string-append "DEFAULT_INITCONF_DIR="
+                                       #$output "/etc/default")
+                        (string-append "DEPMOD="
+                                       (search-input-file
+                                        (or native-inputs inputs)
+                                        "/bin/depmod"))
+                        (string-append "INSTALL_PATH=" #$output)
+                        (string-append "INSTALL_MOD_PATH=" #$output:module)
+                        "INSTALL_MOD_STRIP=1")
+                (install-file
+                 "contrib/bash_completion.d/zfs"
+                 (string-append #$output
+                                "/share/bash-completion/completions"))))))))
     (native-inputs
      (list attr kmod pkg-config))
-    (inputs
-     `(("eudev" ,eudev)
-       ("kmod-runtime" ,kmod)
-       ("libaio" ,libaio)
-       ("libtirpc" ,libtirpc)
-       ("nfs-utils" ,nfs-utils)
-       ("openssl" ,openssl)
-       ("python" ,python)
-       ("python-cffi" ,python-cffi)
-       ("util-linux" ,util-linux)
-       ("util-linux:lib" ,util-linux "lib")
-       ("zlib" ,zlib)))
+    (inputs (list eudev
+                  kmod
+                  libaio
+                  libtirpc
+                  nfs-utils
+                  openssl
+                  python
+                  python-cffi
+                  util-linux
+                  `(,util-linux "lib")
+                  zlib))
     (home-page "https://zfsonlinux.org/")
     (synopsis "OpenZFS on Linux")
     (description
-- 
2.36.0





^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [bug#55369] [PATCH v2] gnu: Change OpenZFS home page to reflect new project ownership.
  2022-05-12 14:43         ` Maxime Devos
@ 2022-05-12 15:07           ` Brian Cully via Guix-patches via
  0 siblings, 0 replies; 14+ messages in thread
From: Brian Cully via Guix-patches via @ 2022-05-12 15:07 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 55369, Brian Cully


Maxime Devos <maximedevos@telenet.be> writes:
> Not sure which home page would be the best (the general 
> cross-platform
> home page, or the Linux-specific home page), but I'd guess that 
> as
> someone interested in OpenZFS you would know the best here. 
> Summarised: maybe keep the patch?

I’m extremely comfortable leaving this up to project leads, 
depending on what they think is most useful for the overall user 
base. My thinking on the subject is that the proposed URL is, in 
general, more useful than the previous one for finding 
information, aligns with the repository name (and should raise 
fewer eyebrows as a result), and who knows, maybe some day ZFS is 
ported to GNU Hurd so the Linux focus would be less 
appropriate. ;)

But right now this is Linux specific, so pointing at Linux 
specific resources also makes sense.

-bjc




^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#55369: [PATCH 1/2] gnu: zfs: Use new package style.
  2022-05-12 15:05 ` [bug#55369] [PATCH v3 1/2] gnu: zfs: Use new package style Brian Cully via Guix-patches via
@ 2022-05-20 18:15   ` Ludovic Courtès
  0 siblings, 0 replies; 14+ messages in thread
From: Ludovic Courtès @ 2022-05-20 18:15 UTC (permalink / raw)
  To: Brian Cully; +Cc: Maxime Devos, Brian Cully, 55369-done

Hi,

Brian Cully <bjc@spork.org> skribis:

> From: Brian Cully <bjc@kublai.com>
>
> * gnu/packages/file-systems.scm (zfs): Comment style.
> [arguments]: Rewrite using gexps.
> [inputs]: Remove labels.

Applied, thanks, and thanks Maxime as well!

Ludo’.




^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-05-20 18:18 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-11 13:37 [bug#55369] [PATCH 1/2] gnu: zfs: Use new package style Brian Cully via Guix-patches via
2022-05-11 13:40 ` [bug#55369] [PATCH] gnu: Change OpenZFS home page to reflect new project ownership Brian Cully via Guix-patches via
2022-05-11 14:53 ` [bug#55369] [PATCH 1/2] gnu: zfs: Use new package style Maxime Devos
2022-05-11 14:57 ` Maxime Devos
2022-05-11 15:43 ` [bug#55369] [PATCH v2 " Brian Cully via Guix-patches via
2022-05-11 19:33   ` Maxime Devos
2022-05-11 15:48 ` [bug#55369] [PATCH v2] gnu: Change OpenZFS home page to reflect new project ownership Brian Cully via Guix-patches via
2022-05-11 19:36   ` Maxime Devos
2022-05-12  3:05     ` Brian Cully via Guix-patches via
2022-05-12 14:36       ` Brian Cully via Guix-patches via
2022-05-12 14:43         ` Maxime Devos
2022-05-12 15:07           ` Brian Cully via Guix-patches via
2022-05-12 15:05 ` [bug#55369] [PATCH v3 1/2] gnu: zfs: Use new package style Brian Cully via Guix-patches via
2022-05-20 18:15   ` bug#55369: [PATCH " Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.