1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
3 ;;; Copyright © 2017, 2018 Leo Famulari <leo@famulari.name>
4 ;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
6 ;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
7 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
9 ;;; This file is part of GNU Guix.
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24 (define-module (gnu packages nfs)
25 #:use-module (gnu packages)
26 #:use-module (gnu packages attr)
27 #:use-module (gnu packages autotools)
28 #:use-module (gnu packages crypto)
29 #:use-module (gnu packages linux)
30 #:use-module (gnu packages libevent)
31 #:use-module (gnu packages kerberos)
32 #:use-module (gnu packages onc-rpc)
33 #:use-module (gnu packages pkg-config)
34 #:use-module (gnu packages python)
35 #:use-module (gnu packages sqlite)
36 #:use-module (guix build-system cmake)
37 #:use-module (guix build-system gnu)
38 #:use-module (guix build-system python)
39 #:use-module (guix build-system trivial)
40 #:use-module (guix download)
41 #:use-module (guix git-download)
42 #:use-module ((guix licenses) #:prefix license:)
43 #:use-module (guix packages)
44 #:use-module (guix utils)
45 #:use-module (srfi srfi-1)
46 #:use-module (srfi srfi-2)
47 #:use-module (srfi srfi-26)
48 #:use-module (ice-9 match))
50 (define-public nfs-utils
57 "mirror://kernel.org/linux/utils/nfs-utils/" version
58 "/nfs-utils-" version ".tar.xz"))
61 "16b5y82cjy1cvijg5zmdvivc6sfdlv2slyynxbwwyw43vpjzqrdg"))))
62 (build-system gnu-build-system)
66 "--without-tcp-wrappers"
67 ,(string-append "--with-start-statd="
68 (assoc-ref %outputs "out") "/sbin/start-statd")
69 ,(string-append "--with-krb5=" (assoc-ref %build-inputs "mit-krb5"))
70 ,(string-append "--with-pluginpath="
71 (assoc-ref %outputs "out")
75 (modify-phases %standard-phases
76 (add-before 'configure 'adjust-command-file-names
78 ;; Remove assumptions of FHS from start-statd script
79 (substitute* `("utils/statd/start-statd")
83 (assoc-ref %build-inputs "util-linux")
86 (string-append "exec "
87 (assoc-ref %outputs "out") "/sbin/rpc.statd")))
90 (substitute* "configure"
91 (("/usr/local/bin/rpcgen")
94 ;; This hook tries to write to /var
95 ;; That needs to be done by a service too.
96 (substitute* `("Makefile.in")
97 (("^install-data-hook:")
98 "install-data-hook-disabled-for-guix:"))
100 ;; Replace some hard coded paths.
101 (substitute* `("utils/nfsd/nfssvc.c")
104 (assoc-ref %build-inputs "util-linux")
106 (substitute* `("utils/statd/statd.c")
108 (string-append (assoc-ref %outputs "out") "/sbin/")))
109 (substitute* `("utils/mount/Makefile.in"
110 "utils/nfsdcld/Makefile.in"
111 "utils/nfsdcltrack/Makefile.in")
112 (("^sbindir = /sbin")
113 (string-append "sbindir = "
114 (assoc-ref %outputs "out") "/sbin")))
117 `(("keyutils" ,keyutils)
118 ("libevent" ,libevent)
119 ("libnfsidmap" ,libnfsidmap)
120 ("rpcsvc-proto" ,rpcsvc-proto) ;for 'rpcgen'
123 ("util-linux" ,util-linux) ; only for above substitutions
124 ("util-linux:lib" ,util-linux "lib") ; for libblkid
125 ("mit-krb5" ,mit-krb5)
126 ("libtirpc" ,libtirpc)
127 ("python-wrapper" ,python-wrapper))) ;for the Python based tools
129 `(("pkg-config" ,pkg-config)))
130 (home-page "https://www.kernel.org/pub/linux/utils/nfs-utils/")
131 (synopsis "Tools for loading and managing Linux NFS mounts")
132 (description "The Network File System (NFS) was developed to allow
133 machines to mount a disk partition on a remote machine as if it were a local
134 disk. It allows for fast, seamless sharing of files across a network.")
135 ;; It is hard to be sure what the licence is. Most of the source files
136 ;; contain no licence notice at all. A few have a licence notice for a 3
137 ;; clause non-copyleft licence. However the tarball has a COPYING file
138 ;; with the text of GPLv2 -- It seems then that GLPv2 is the most
139 ;; restrictive licence, and until advice to the contrary we must assume
140 ;; that is what is intended.
141 (license license:gpl2)))
143 (define-public nfs4-acl-tools
145 (name "nfs4-acl-tools")
149 ;; tarballs are available here:
150 ;; http://linux-nfs.org/~bfields/nfs4-acl-tools/
152 (url "git://git.linux-nfs.org/projects/bfields/nfs4-acl-tools.git")
153 (commit (string-append name "-" version))))
154 (file-name (git-file-name name version))
157 "0lq9xdaskxysggs918vs8x42xvmg9nj7lla21ni2scw5ljld3h1i"))
158 (patches (search-patches "nfs4-acl-tools-0.3.7-fixpaths.patch"))))
159 (build-system gnu-build-system)
161 `(#:tests? #f ; no tests
163 (modify-phases %standard-phases
164 (add-after 'unpack 'fix-bin-sh
166 (substitute* "include/buildmacros"
167 (("/bin/sh") (which "sh")))
170 `(("automake" ,automake)
171 ("autoconf" ,autoconf)
172 ("libtool" ,libtool)))
175 (home-page "https://linux-nfs.org/wiki/index.php/Main_Page")
176 (synopsis "Commandline ACL utilities for the Linux NFSv4 client")
177 (description "This package provides the commandline utilities
178 @command{nfs4_getfacl} and @command{nfs4_setfacl}, which are similar to their
179 POSIX equivalents @command{getfacl} and @command{setfacl}. They fetch and
180 manipulate access control lists for files and directories on NFSv4 mounts.")
181 (license license:bsd-3)))