[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
163/285: gnu: Add zfs.
From: |
guix-commits |
Subject: |
163/285: gnu: Add zfs. |
Date: |
Sun, 29 Dec 2019 20:44:22 -0500 (EST) |
kkebreau pushed a commit to branch wip-gnome3.34
in repository guix.
commit 8ded6ace565bb520ef4f522634e37c54be4682ad
Author: Efraim Flashner <address@hidden>
Date: Thu Dec 19 11:47:49 2019 +0200
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 fd62bf2..cb0a2a2 100644
--- a/gnu/packages/file-systems.scm
+++ b/gnu/packages/file-systems.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2017 Gábor Boskovits <address@hidden>
;;; Copyright © 2017, 2018 Ricardo Wurmus <address@hidden>
;;; Copyright © 2018 Leo Famulari <address@hidden>
+;;; Copyright © 2019 Efraim Flashner <address@hidden>
;;;
;;; 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
+ ;; 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)))
- 213/285: gnu: r-foreign: Update to 0.8-74., (continued)
- 213/285: gnu: r-foreign: Update to 0.8-74., guix-commits, 2019/12/29
- 162/285: build-system: linux-module: Add substitutable keyword., guix-commits, 2019/12/29
- 161/285: gnu: python-funcparserlib: Fix typo., guix-commits, 2019/12/29
- 168/285: gnu: axoloti-patcher-next: Remove commented expression., guix-commits, 2019/12/29
- 169/285: gnu: Remove squashfs-tools-next., guix-commits, 2019/12/29
- 176/285: gnu: libspatialindex: Update to 1.9.3., guix-commits, 2019/12/29
- 190/285: gnu: Add kmix., guix-commits, 2019/12/29
- 192/285: gnu: Add kwave., guix-commits, 2019/12/29
- 203/285: git-authenticate: Keep a local cache of previously-authenticated commits., guix-commits, 2019/12/29
- 155/285: gnu: nethack: Update to 3.6.4., guix-commits, 2019/12/29
- 163/285: gnu: Add zfs.,
guix-commits <=
- 160/285: gnu: python-pathos: Run test suite., guix-commits, 2019/12/29
- 167/285: gnu: guix-data-service: Update to 0.0.1-11.7342280., guix-commits, 2019/12/29
- 171/285: gnu: geos: Update to 3.8.0., guix-commits, 2019/12/29
- 181/285: download: Enable TLS 1.3., guix-commits, 2019/12/29
- 144/285: gnu: libdvbpsi: Update to 1.3.3., guix-commits, 2019/12/29
- 172/285: gnu: Add proj., guix-commits, 2019/12/29
- 179/285: gnu: gdal: Enable netCDF format driver., guix-commits, 2019/12/29
- 177/285: gnu: gdal: Enable ODS format driver., guix-commits, 2019/12/29
- 202/285: git: 'commit-difference' takes a list of excluded commits., guix-commits, 2019/12/29
- 184/285: gnu: Add audiofile., guix-commits, 2019/12/29