gnu: unbound: Update to 1.10.1.
[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>
e9aba1ea
JD
7;;;
8;;; This file is part of GNU Guix.
9;;;
10;;; GNU Guix is free software; you can redistribute it and/or modify it
11;;; under the terms of the GNU General Public License as published by
12;;; the Free Software Foundation; either version 3 of the License, or (at
13;;; your option) any later version.
14;;;
15;;; GNU Guix is distributed in the hope that it will be useful, but
16;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;;; GNU General Public License for more details.
19;;;
20;;; You should have received a copy of the GNU General Public License
21;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23(define-module (gnu packages nfs)
24 #:use-module (gnu packages)
b224ff4a 25 #:use-module (gnu packages crypto)
e9aba1ea 26 #:use-module (gnu packages linux)
e9aba1ea 27 #:use-module (gnu packages libevent)
89e34644 28 #:use-module (gnu packages kerberos)
e9aba1ea
JD
29 #:use-module (gnu packages onc-rpc)
30 #:use-module (gnu packages pkg-config)
084d1565 31 #:use-module (gnu packages python)
cd0322a3 32 #:use-module (gnu packages sqlite)
e9aba1ea
JD
33 #:use-module (guix build-system cmake)
34 #:use-module (guix build-system gnu)
35 #:use-module (guix build-system python)
36 #:use-module (guix build-system trivial)
37 #:use-module (guix download)
38 #:use-module ((guix licenses) #:prefix license:)
39 #:use-module (guix packages)
40 #:use-module (guix utils)
41 #:use-module (srfi srfi-1)
42 #:use-module (srfi srfi-2)
43 #:use-module (srfi srfi-26)
44 #:use-module (ice-9 match))
45
46(define-public nfs-utils
47 (package
48 (name "nfs-utils")
6302b5da 49 (version "2.4.3")
e9aba1ea
JD
50 (source (origin
51 (method url-fetch)
52 (uri (string-append
53 "mirror://kernel.org/linux/utils/nfs-utils/" version
54 "/nfs-utils-" version ".tar.xz"))
55 (sha256
56 (base32
6302b5da 57 "16b5y82cjy1cvijg5zmdvivc6sfdlv2slyynxbwwyw43vpjzqrdg"))))
e9aba1ea
JD
58 (build-system gnu-build-system)
59 (arguments
60 `(#:configure-flags
61 `("--without-tcp-wrappers"
62 ,(string-append "--with-start-statd="
63 (assoc-ref %outputs "out") "/sbin/start-statd")
b224ff4a
RW
64 ,(string-append "--with-krb5=" (assoc-ref %build-inputs "mit-krb5"))
65 ,(string-append "--with-pluginpath="
66 (assoc-ref %outputs "out")
53904f74
RW
67 "/lib/libnfsidmap")
68 "--enable-svcgss")
d14b8dbb
LF
69 #:phases
70 (modify-phases %standard-phases
71 (add-before 'configure 'adjust-command-file-names
72 (lambda _
73 ;; Remove assumptions of FHS from start-statd script
74 (substitute* `("utils/statd/start-statd")
75 (("^PATH=.*") "")
76 (("^flock")
77 (string-append
78 (assoc-ref %build-inputs "util-linux")
79 "/bin/flock"))
80 (("^exec rpc.statd")
81 (string-append "exec "
82 (assoc-ref %outputs "out") "/sbin/rpc.statd")))
e9aba1ea 83
b224ff4a
RW
84 ;; find rpcgen
85 (substitute* "configure"
86 (("/usr/local/bin/rpcgen")
87 (which "rpcgen")))
88
d14b8dbb
LF
89 ;; This hook tries to write to /var
90 ;; That needs to be done by a service too.
91 (substitute* `("Makefile.in")
92 (("^install-data-hook:")
93 "install-data-hook-disabled-for-guix:"))
e9aba1ea 94
d14b8dbb
LF
95 ;; Replace some hard coded paths.
96 (substitute* `("utils/nfsd/nfssvc.c")
97 (("/bin/mount")
98 (string-append
99 (assoc-ref %build-inputs "util-linux")
100 "/bin/mount")))
101 (substitute* `("utils/statd/statd.c")
102 (("/usr/sbin/")
103 (string-append (assoc-ref %outputs "out") "/sbin/")))
b224ff4a
RW
104 (substitute* `("utils/mount/Makefile.in"
105 "utils/nfsdcld/Makefile.in"
d14b8dbb
LF
106 "utils/nfsdcltrack/Makefile.in")
107 (("^sbindir = /sbin")
108 (string-append "sbindir = "
109 (assoc-ref %outputs "out") "/sbin")))
110 #t)))))
b224ff4a
RW
111 (inputs
112 `(("keyutils" ,keyutils)
113 ("libevent" ,libevent)
114 ("libnfsidmap" ,libnfsidmap)
115 ("rpcsvc-proto" ,rpcsvc-proto) ;for 'rpcgen'
116 ("sqlite" ,sqlite)
117 ("lvm2" ,lvm2)
bb93042c 118 ("util-linux" ,util-linux "lib")
b224ff4a 119 ("mit-krb5" ,mit-krb5)
084d1565
MC
120 ("libtirpc" ,libtirpc)
121 ("python-wrapper" ,python-wrapper))) ;for the Python based tools
e9aba1ea
JD
122 (native-inputs
123 `(("pkg-config" ,pkg-config)))
a76e49ad 124 (home-page "https://www.kernel.org/pub/linux/utils/nfs-utils/")
e9aba1ea
JD
125 (synopsis "Tools for loading and managing Linux NFS mounts")
126 (description "The Network File System (NFS) was developed to allow
127machines to mount a disk partition on a remote machine as if it were a local
128disk. It allows for fast, seamless sharing of files across a network.")
129 ;; It is hard to be sure what the licence is. Most of the source files
130 ;; contain no licence notice at all. A few have a licence notice for a 3
131 ;; clause non-copyleft licence. However the tarball has a COPYING file
132 ;; with the text of GPLv2 -- It seems then that GLPv2 is the most
133 ;; restrictive licence, and until advice to the contrary we must assume
134 ;; that is what is intended.
135 (license license:gpl2)))