gnu: ntfs-3g: Do not generate static libraries.
[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
65 `("--without-tcp-wrappers"
66 ,(string-append "--with-start-statd="
67 (assoc-ref %outputs "out") "/sbin/start-statd")
b224ff4a
RW
68 ,(string-append "--with-krb5=" (assoc-ref %build-inputs "mit-krb5"))
69 ,(string-append "--with-pluginpath="
70 (assoc-ref %outputs "out")
53904f74
RW
71 "/lib/libnfsidmap")
72 "--enable-svcgss")
d14b8dbb
LF
73 #:phases
74 (modify-phases %standard-phases
75 (add-before 'configure 'adjust-command-file-names
76 (lambda _
77 ;; Remove assumptions of FHS from start-statd script
78 (substitute* `("utils/statd/start-statd")
79 (("^PATH=.*") "")
80 (("^flock")
81 (string-append
82 (assoc-ref %build-inputs "util-linux")
83 "/bin/flock"))
84 (("^exec rpc.statd")
85 (string-append "exec "
86 (assoc-ref %outputs "out") "/sbin/rpc.statd")))
e9aba1ea 87
b224ff4a
RW
88 ;; find rpcgen
89 (substitute* "configure"
90 (("/usr/local/bin/rpcgen")
91 (which "rpcgen")))
92
d14b8dbb
LF
93 ;; This hook tries to write to /var
94 ;; That needs to be done by a service too.
95 (substitute* `("Makefile.in")
96 (("^install-data-hook:")
97 "install-data-hook-disabled-for-guix:"))
e9aba1ea 98
d14b8dbb
LF
99 ;; Replace some hard coded paths.
100 (substitute* `("utils/nfsd/nfssvc.c")
101 (("/bin/mount")
102 (string-append
103 (assoc-ref %build-inputs "util-linux")
104 "/bin/mount")))
105 (substitute* `("utils/statd/statd.c")
106 (("/usr/sbin/")
107 (string-append (assoc-ref %outputs "out") "/sbin/")))
b224ff4a
RW
108 (substitute* `("utils/mount/Makefile.in"
109 "utils/nfsdcld/Makefile.in"
d14b8dbb
LF
110 "utils/nfsdcltrack/Makefile.in")
111 (("^sbindir = /sbin")
112 (string-append "sbindir = "
113 (assoc-ref %outputs "out") "/sbin")))
114 #t)))))
b224ff4a
RW
115 (inputs
116 `(("keyutils" ,keyutils)
117 ("libevent" ,libevent)
118 ("libnfsidmap" ,libnfsidmap)
119 ("rpcsvc-proto" ,rpcsvc-proto) ;for 'rpcgen'
120 ("sqlite" ,sqlite)
121 ("lvm2" ,lvm2)
bb93042c 122 ("util-linux" ,util-linux "lib")
b224ff4a 123 ("mit-krb5" ,mit-krb5)
084d1565
MC
124 ("libtirpc" ,libtirpc)
125 ("python-wrapper" ,python-wrapper))) ;for the Python based tools
e9aba1ea
JD
126 (native-inputs
127 `(("pkg-config" ,pkg-config)))
a76e49ad 128 (home-page "https://www.kernel.org/pub/linux/utils/nfs-utils/")
e9aba1ea
JD
129 (synopsis "Tools for loading and managing Linux NFS mounts")
130 (description "The Network File System (NFS) was developed to allow
131machines to mount a disk partition on a remote machine as if it were a local
132disk. It allows for fast, seamless sharing of files across a network.")
133 ;; It is hard to be sure what the licence is. Most of the source files
134 ;; contain no licence notice at all. A few have a licence notice for a 3
135 ;; clause non-copyleft licence. However the tarball has a COPYING file
136 ;; with the text of GPLv2 -- It seems then that GLPv2 is the most
137 ;; restrictive licence, and until advice to the contrary we must assume
138 ;; that is what is intended.
139 (license license:gpl2)))
d4a04423
LDB
140
141(define-public nfs4-acl-tools
142 (package
143 (name "nfs4-acl-tools")
144 (version "0.3.7")
145 (source (origin
146 (method git-fetch)
147 ;; tarballs are available here:
148 ;; http://linux-nfs.org/~bfields/nfs4-acl-tools/
149 (uri (git-reference
150 (url "git://git.linux-nfs.org/projects/bfields/nfs4-acl-tools.git")
151 (commit (string-append name "-" version))))
152 (file-name (git-file-name name version))
153 (sha256
154 (base32
155 "0lq9xdaskxysggs918vs8x42xvmg9nj7lla21ni2scw5ljld3h1i"))
156 (patches (search-patches "nfs4-acl-tools-0.3.7-fixpaths.patch"))))
157 (build-system gnu-build-system)
158 (arguments
159 `(#:tests? #f ; no tests
160 #:phases
161 (modify-phases %standard-phases
162 (add-after 'unpack 'fix-bin-sh
163 (lambda _
164 (substitute* "include/buildmacros"
165 (("/bin/sh") (which "sh")))
166 #t)))))
167 (native-inputs
168 `(("automake" ,automake)
169 ("autoconf" ,autoconf)
170 ("libtool" ,libtool)))
171 (inputs
172 `(("attr" ,attr)))
173 (home-page "https://linux-nfs.org/wiki/index.php/Main_Page")
174 (synopsis "Commandline ACL utilities for the Linux NFSv4 client")
175 (description "This package provides the commandline utilities
176@command{nfs4_getfacl} and @command{nfs4_setfacl}, which are similar to their
177POSIX equivalents @command{getfacl} and @command{setfacl}. They fetch and
178manipulate access control lists for files and directories on NFSv4 mounts.")
179 (license license:bsd-3)))