gnu: emacs-consult: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / nfs.scm
CommitLineData
e9aba1ea
JD
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2016 John Darrington <jmd@gnu.org>
606e2468 3;;; Copyright © 2017, 2018 Leo Famulari <leo@famulari.name>
1a392ee7 4;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
b224ff4a 5;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
6302b5da 6;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
d4a04423 7;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
e9aba1ea
JD
8;;;
9;;; This file is part of GNU Guix.
10;;;
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.
15;;;
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.
20;;;
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/>.
23
24(define-module (gnu packages nfs)
25 #:use-module (gnu packages)
d4a04423
LDB
26 #:use-module (gnu packages attr)
27 #:use-module (gnu packages autotools)
b224ff4a 28 #:use-module (gnu packages crypto)
e9aba1ea 29 #:use-module (gnu packages linux)
e9aba1ea 30 #:use-module (gnu packages libevent)
89e34644 31 #:use-module (gnu packages kerberos)
e9aba1ea
JD
32 #:use-module (gnu packages onc-rpc)
33 #:use-module (gnu packages pkg-config)
084d1565 34 #:use-module (gnu packages python)
cd0322a3 35 #:use-module (gnu packages sqlite)
e9aba1ea
JD
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)
d4a04423 41 #:use-module (guix git-download)
e9aba1ea
JD
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))
49
50(define-public nfs-utils
51 (package
52 (name "nfs-utils")
6302b5da 53 (version "2.4.3")
e9aba1ea
JD
54 (source (origin
55 (method url-fetch)
56 (uri (string-append
57 "mirror://kernel.org/linux/utils/nfs-utils/" version
58 "/nfs-utils-" version ".tar.xz"))
59 (sha256
60 (base32
6302b5da 61 "16b5y82cjy1cvijg5zmdvivc6sfdlv2slyynxbwwyw43vpjzqrdg"))))
e9aba1ea
JD
62 (build-system gnu-build-system)
63 (arguments
64 `(#:configure-flags
d14a3e5c
MC
65 `("--disable-static"
66 "--without-tcp-wrappers"
e9aba1ea
JD
67 ,(string-append "--with-start-statd="
68 (assoc-ref %outputs "out") "/sbin/start-statd")
b224ff4a
RW
69 ,(string-append "--with-krb5=" (assoc-ref %build-inputs "mit-krb5"))
70 ,(string-append "--with-pluginpath="
71 (assoc-ref %outputs "out")
53904f74
RW
72 "/lib/libnfsidmap")
73 "--enable-svcgss")
d14b8dbb
LF
74 #:phases
75 (modify-phases %standard-phases
76 (add-before 'configure 'adjust-command-file-names
77 (lambda _
78 ;; Remove assumptions of FHS from start-statd script
79 (substitute* `("utils/statd/start-statd")
80 (("^PATH=.*") "")
81 (("^flock")
82 (string-append
83 (assoc-ref %build-inputs "util-linux")
84 "/bin/flock"))
85 (("^exec rpc.statd")
86 (string-append "exec "
87 (assoc-ref %outputs "out") "/sbin/rpc.statd")))
e9aba1ea 88
b224ff4a
RW
89 ;; find rpcgen
90 (substitute* "configure"
91 (("/usr/local/bin/rpcgen")
92 (which "rpcgen")))
93
d14b8dbb
LF
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:"))
e9aba1ea 99
d14b8dbb
LF
100 ;; Replace some hard coded paths.
101 (substitute* `("utils/nfsd/nfssvc.c")
102 (("/bin/mount")
103 (string-append
104 (assoc-ref %build-inputs "util-linux")
105 "/bin/mount")))
106 (substitute* `("utils/statd/statd.c")
107 (("/usr/sbin/")
108 (string-append (assoc-ref %outputs "out") "/sbin/")))
b224ff4a
RW
109 (substitute* `("utils/mount/Makefile.in"
110 "utils/nfsdcld/Makefile.in"
d14b8dbb
LF
111 "utils/nfsdcltrack/Makefile.in")
112 (("^sbindir = /sbin")
113 (string-append "sbindir = "
114 (assoc-ref %outputs "out") "/sbin")))
115 #t)))))
b224ff4a
RW
116 (inputs
117 `(("keyutils" ,keyutils)
118 ("libevent" ,libevent)
119 ("libnfsidmap" ,libnfsidmap)
64098437 120 ("rpcsvc-proto" ,rpcsvc-proto) ;for 'rpcgen'
b224ff4a
RW
121 ("sqlite" ,sqlite)
122 ("lvm2" ,lvm2)
64098437
TGR
123 ("util-linux" ,util-linux) ; only for above substitutions
124 ("util-linux:lib" ,util-linux "lib") ; for libblkid
b224ff4a 125 ("mit-krb5" ,mit-krb5)
084d1565
MC
126 ("libtirpc" ,libtirpc)
127 ("python-wrapper" ,python-wrapper))) ;for the Python based tools
e9aba1ea
JD
128 (native-inputs
129 `(("pkg-config" ,pkg-config)))
a76e49ad 130 (home-page "https://www.kernel.org/pub/linux/utils/nfs-utils/")
e9aba1ea
JD
131 (synopsis "Tools for loading and managing Linux NFS mounts")
132 (description "The Network File System (NFS) was developed to allow
133machines to mount a disk partition on a remote machine as if it were a local
134disk. 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)))
d4a04423
LDB
142
143(define-public nfs4-acl-tools
144 (package
145 (name "nfs4-acl-tools")
146 (version "0.3.7")
147 (source (origin
148 (method git-fetch)
149 ;; tarballs are available here:
150 ;; http://linux-nfs.org/~bfields/nfs4-acl-tools/
151 (uri (git-reference
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))
155 (sha256
156 (base32
157 "0lq9xdaskxysggs918vs8x42xvmg9nj7lla21ni2scw5ljld3h1i"))
158 (patches (search-patches "nfs4-acl-tools-0.3.7-fixpaths.patch"))))
159 (build-system gnu-build-system)
160 (arguments
161 `(#:tests? #f ; no tests
162 #:phases
163 (modify-phases %standard-phases
164 (add-after 'unpack 'fix-bin-sh
165 (lambda _
166 (substitute* "include/buildmacros"
167 (("/bin/sh") (which "sh")))
168 #t)))))
169 (native-inputs
170 `(("automake" ,automake)
171 ("autoconf" ,autoconf)
172 ("libtool" ,libtool)))
173 (inputs
174 `(("attr" ,attr)))
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
179POSIX equivalents @command{getfacl} and @command{setfacl}. They fetch and
180manipulate access control lists for files and directories on NFSv4 mounts.")
181 (license license:bsd-3)))