gnu: swi-prolog: Update to 8.1.20.
[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>
e9aba1ea
JD
5;;;
6;;; This file is part of GNU Guix.
7;;;
8;;; GNU Guix is free software; you can redistribute it and/or modify it
9;;; under the terms of the GNU General Public License as published by
10;;; the Free Software Foundation; either version 3 of the License, or (at
11;;; your option) any later version.
12;;;
13;;; GNU Guix is distributed in the hope that it will be useful, but
14;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; GNU General Public License for more details.
17;;;
18;;; You should have received a copy of the GNU General Public License
19;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21(define-module (gnu packages nfs)
22 #:use-module (gnu packages)
23 #:use-module (gnu packages linux)
e9aba1ea 24 #:use-module (gnu packages libevent)
89e34644 25 #:use-module (gnu packages kerberos)
e9aba1ea
JD
26 #:use-module (gnu packages onc-rpc)
27 #:use-module (gnu packages pkg-config)
cd0322a3 28 #:use-module (gnu packages sqlite)
e9aba1ea
JD
29 #:use-module (guix build-system cmake)
30 #:use-module (guix build-system gnu)
31 #:use-module (guix build-system python)
32 #:use-module (guix build-system trivial)
33 #:use-module (guix download)
34 #:use-module ((guix licenses) #:prefix license:)
35 #:use-module (guix packages)
36 #:use-module (guix utils)
37 #:use-module (srfi srfi-1)
38 #:use-module (srfi srfi-2)
39 #:use-module (srfi srfi-26)
40 #:use-module (ice-9 match))
41
42(define-public nfs-utils
43 (package
44 (name "nfs-utils")
a472f0d0 45 (version "2.1.1")
e9aba1ea
JD
46 (source (origin
47 (method url-fetch)
48 (uri (string-append
49 "mirror://kernel.org/linux/utils/nfs-utils/" version
50 "/nfs-utils-" version ".tar.xz"))
606e2468 51 (patches (search-patches "nfs-utils-missing-headers.patch"))
e9aba1ea
JD
52 (sha256
53 (base32
a472f0d0 54 "1vqrqzhg9nh2wj1icp7k8v9dibgnn521b45np79nnkmqf16bbbhg"))))
e9aba1ea
JD
55 (build-system gnu-build-system)
56 (arguments
57 `(#:configure-flags
58 `("--without-tcp-wrappers"
59 ,(string-append "--with-start-statd="
60 (assoc-ref %outputs "out") "/sbin/start-statd")
61 ,(string-append "--with-krb5=" (assoc-ref %build-inputs "mit-krb5")))
d14b8dbb
LF
62 #:phases
63 (modify-phases %standard-phases
1a392ee7
EF
64 (add-after 'unpack 'fix-glibc-compatability
65 (lambda _
66 (substitute* '("utils/blkmapd/device-discovery.c"
67 "utils/blkmapd/dm-device.c")
68 (("<sys/stat.h>")
69 "<sys/stat.h>\n#include <sys/sysmacros.h>"))
70 #t))
d14b8dbb
LF
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
d14b8dbb
LF
84 ;; This hook tries to write to /var
85 ;; That needs to be done by a service too.
86 (substitute* `("Makefile.in")
87 (("^install-data-hook:")
88 "install-data-hook-disabled-for-guix:"))
e9aba1ea 89
d14b8dbb
LF
90 ;; Replace some hard coded paths.
91 (substitute* `("utils/nfsd/nfssvc.c")
92 (("/bin/mount")
93 (string-append
94 (assoc-ref %build-inputs "util-linux")
95 "/bin/mount")))
96 (substitute* `("utils/statd/statd.c")
97 (("/usr/sbin/")
98 (string-append (assoc-ref %outputs "out") "/sbin/")))
99 (substitute* `("utils/osd_login/Makefile.in"
100 "utils/mount/Makefile.in"
101 "utils/nfsdcltrack/Makefile.in")
102 (("^sbindir = /sbin")
103 (string-append "sbindir = "
104 (assoc-ref %outputs "out") "/sbin")))
105 #t)))))
e9aba1ea
JD
106 (inputs `(("libevent" ,libevent)
107 ("libnfsidmap" ,libnfsidmap)
108 ("sqlite" ,sqlite)
109 ("lvm2" ,lvm2)
e9aba1ea
JD
110 ("util-linux" ,util-linux)
111 ("mit-krb5" ,mit-krb5)
112 ("libtirpc" ,libtirpc)))
113 (native-inputs
114 `(("pkg-config" ,pkg-config)))
115 (home-page "http://www.kernel.org/pub/linux/utils/nfs-utils/")
116 (synopsis "Tools for loading and managing Linux NFS mounts")
117 (description "The Network File System (NFS) was developed to allow
118machines to mount a disk partition on a remote machine as if it were a local
119disk. It allows for fast, seamless sharing of files across a network.")
120 ;; It is hard to be sure what the licence is. Most of the source files
121 ;; contain no licence notice at all. A few have a licence notice for a 3
122 ;; clause non-copyleft licence. However the tarball has a COPYING file
123 ;; with the text of GPLv2 -- It seems then that GLPv2 is the most
124 ;; restrictive licence, and until advice to the contrary we must assume
125 ;; that is what is intended.
126 (license license:gpl2)))