GNU bug report logs -
#38669
[PATCH] gnu: Add zfs.
Previous Next
Reported by: Efraim Flashner <efraim <at> flashner.co.il>
Date: Thu, 19 Dec 2019 09:51:02 UTC
Severity: normal
Tags: patch
Done: Efraim Flashner <efraim <at> flashner.co.il>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 38669 in the body.
You can then email your comments to 38669 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#38669
; Package
guix-patches
.
(Thu, 19 Dec 2019 09:51:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Efraim Flashner <efraim <at> flashner.co.il>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Thu, 19 Dec 2019 09:51:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I don't actually have a use case for this patch myself but I know there
are others who are interested in using ZFS. I found the Nix
implementation¹ to be very helpful when I was working on it.
¹ https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/zfs/default.nix¬
--
Efraim Flashner <efraim <at> flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[0001-gnu-Add-zfs.patch (text/plain, attachment)]
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#38669
; Package
guix-patches
.
(Wed, 25 Dec 2019 06:57:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 38669 <at> debbugs.gnu.org (full text, mbox):
Efraim Flashner <efraim <at> flashner.co.il> writes:
> I don't actually have a use case for this patch myself but I know there
> are others who are interested in using ZFS. I found the Nix
> implementation¹ to be very helpful when I was working on it.
>
> ¹ https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/zfs/default.nix¬
>
>
> --
> Efraim Flashner <efraim <at> flashner.co.il> אפרים פלשנר
> GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
> Confidentiality cannot be guaranteed on emails sent or received unencrypted
>
> From b7efd268c040e8a68c7a81a5edfc76f142aefd50 Mon Sep 17 00:00:00 2001
> From: Efraim Flashner <efraim <at> flashner.co.il>
> Date: Thu, 19 Dec 2019 11:47:49 +0200
> Subject: [PATCH] gnu: Add zfs.
>
> * gnu/packages/file-systems.scm (zfs): New variable.
> ---
> gnu/packages/file-systems.scm | 114 ++++++++++++++++++++++++++++++++++
> 1 file changed, 114 insertions(+)
>
> diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm
> index fd62bf29ed..a820c159da 100644
> --- a/gnu/packages/file-systems.scm
> +++ b/gnu/packages/file-systems.scm
> @@ -3,6 +3,7 @@
> ;;; Copyright © 2017 Gábor Boskovits <boskovits <at> gmail.com>
> ;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado <at> elephly.net>
> ;;; Copyright © 2018 Leo Famulari <leo <at> famulari.name>
> +;;; Copyright © 2019 Efraim Flashner <efraim <at> flashner.co.il>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -26,6 +27,7 @@
> #:use-module (guix git-download)
> #:use-module (guix build-system cmake)
> #:use-module (guix build-system gnu)
> + #:use-module (guix build-system linux-module)
> #:use-module (guix utils)
> #:use-module (gnu packages)
> #:use-module (gnu packages acl)
> @@ -40,7 +42,9 @@
> #:use-module (gnu packages docbook)
> #:use-module (gnu packages flex)
> #:use-module (gnu packages glib)
> + #:use-module (gnu packages libffi)
> #:use-module (gnu packages linux)
> + #:use-module (gnu packages nfs)
> #:use-module (gnu packages onc-rpc)
> #:use-module (gnu packages pkg-config)
> #:use-module (gnu packages python)
> @@ -322,3 +326,113 @@ to read all files, and it does not support all the compression methods in
> APFS.")
> (home-page "https://github.com/sgan81/apfs-fuse")
> (license license:gpl2+))))
> +
> +(define-public zfs
> + (package
> + (name "zfs")
> + (version "0.8.2")
> + (outputs '("out" "module" "src"))
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append "https://github.com/zfsonlinux/zfs/releases"
> + "/download/zfs-" version
> + "/zfs-" version ".tar.gz"))
> + (sha256
> + (base32
> + "1f7aig15q3z832pr2n48j3clafic2yk1vvqlh28vpklfghjqwq27"))))
> + (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 ; Unrecognized with the linux-module-build-system.
> + ;; 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")))
> + ((" /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")))
> + (substitute* "module/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"
> + (("/bin/mount") (string-append util-linux "/bin/mount"))
> + (("/bin/umount") (string-append util-linux "/bin/umount")))
> + (substitute* "lib/libshare/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"))))
> + #t))
> + (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"))
> + (symlink "../share/pkgconfig/" (string-append out "/lib/pkgconfig"))
> + #t))))))
> + (native-inputs
> + `(("attr" ,attr)
> + ("pkg-config" ,pkg-config)))
> + (inputs
> + `(("eudev" ,eudev)
> + ("libaio" ,libaio)
> + ("libtirpc" ,libtirpc)
> + ("nfs-utils" ,nfs-utils)
> + ("openssl" ,openssl)
> + ("python" ,python)
> + ("python-cffi" ,python-cffi)
> + ("util-linux" ,util-linux)
> + ("zlib" ,zlib)))
> + (home-page "https://zfsonlinux.org/")
> + (synopsis "Native ZFS on Linux")
> + (description
> + "ZFS on Linux is an advanced file system and volume manager which was
> +originally developed for Solaris and is now maintained by the OpenZFS
> +community.")
> + (license license:cddl1.0)))
Hey Efraim,
Just reviewed this and checked it. It looks and works fine for me. I
think this is ready for a commit and push. :) I'll leave that to you.
Thank you for your effort!
--
Brett M. Gilio
GNU Guix, Contributor | GNU Project, Webmaster
[DFC0 C7F7 9EE6 0CA7 AE55 5E19 6722 43C4 A03F 0EEE]
<brettg <at> gnu.org> <brettg <at> posteo.net>
Reply sent
to
Efraim Flashner <efraim <at> flashner.co.il>
:
You have taken responsibility.
(Thu, 26 Dec 2019 08:44:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Efraim Flashner <efraim <at> flashner.co.il>
:
bug acknowledged by developer.
(Thu, 26 Dec 2019 08:44:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 38669-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Thanks. I patched the linux-module-build-system to add the
'substitutable?' keyword, updated the package and pushed it.
--
Efraim Flashner <efraim <at> flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 23 Jan 2020 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 146 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.