gnu: deutex: Update to 5.2.1.
[jackhill/guix/guix.git] / gnu / packages / file-systems.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
3 ;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
4 ;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
5 ;;; Copyright © 2018 Leo Famulari <leo@famulari.name>
6 ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
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 file-systems)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix git-download)
28 #:use-module (guix build-system cmake)
29 #:use-module (guix build-system gnu)
30 #:use-module (guix build-system linux-module)
31 #:use-module (guix utils)
32 #:use-module (gnu packages)
33 #:use-module (gnu packages acl)
34 #:use-module (gnu packages attr)
35 #:use-module (gnu packages autotools)
36 #:use-module (gnu packages bison)
37 #:use-module (gnu packages check)
38 #:use-module (gnu packages compression)
39 #:use-module (gnu packages curl)
40 #:use-module (gnu packages datastructures)
41 #:use-module (gnu packages documentation)
42 #:use-module (gnu packages docbook)
43 #:use-module (gnu packages flex)
44 #:use-module (gnu packages glib)
45 #:use-module (gnu packages libffi)
46 #:use-module (gnu packages linux)
47 #:use-module (gnu packages nfs)
48 #:use-module (gnu packages onc-rpc)
49 #:use-module (gnu packages pkg-config)
50 #:use-module (gnu packages python)
51 #:use-module (gnu packages readline)
52 #:use-module (gnu packages sqlite)
53 #:use-module (gnu packages tls)
54 #:use-module (gnu packages xml))
55
56 (define-public httpfs2
57 (package
58 (name "httpfs2")
59 (version "0.1.5")
60 (source
61 (origin
62 (method url-fetch)
63 (uri (string-append "mirror://sourceforge/httpfs/httpfs2/"
64 "httpfs2-" version ".tar.gz"))
65 (sha256
66 (base32
67 "1h8ggvhw30n2r6w11n1s458ypggdqx6ldwd61ma4yd7binrlpjq1"))))
68 (build-system gnu-build-system)
69 (native-inputs
70 `(("asciidoc" ,asciidoc)
71 ("docbook-xml" ,docbook-xml)
72 ("libxml2" ,libxml2)
73 ("libxslt" ,libxslt)
74 ("pkg-config" ,pkg-config)))
75 (inputs
76 `(("fuse" ,fuse)
77 ("gnutls" ,gnutls)))
78 (arguments
79 `(#:phases
80 (modify-phases %standard-phases
81 (delete 'configure) ; no configure script
82 (replace 'install
83 ;; There's no ‘install’ target. Install all variants manually.
84 (lambda* (#:key outputs #:allow-other-keys)
85 (let* ((out (assoc-ref outputs "out"))
86 (bin (string-append out "/bin"))
87 (man1 (string-append out "/share/man/man1")))
88 (mkdir-p bin)
89 (mkdir-p man1)
90 (for-each
91 (lambda (variant)
92 (let ((man1-page (string-append variant ".1")))
93 (install-file variant bin)
94 (install-file man1-page man1)))
95 (list "httpfs2"
96 "httpfs2-mt"
97 "httpfs2-ssl"
98 "httpfs2-ssl-mt")))
99 #t)))
100 #:make-flags (list "CC=gcc")
101 #:parallel-build? #f ; can result in missing man pages
102 #:tests? #f)) ; no tests
103 (home-page "https://sourceforge.net/projects/httpfs/")
104 (synopsis "Mount remote files over HTTP")
105 (description "httpfs2 is a @code{fuse} file system for mounting any
106 @dfn{HyperText} (HTTP or HTTPS) URL. It uses HTTP/1.1 byte ranges to request
107 arbitrary bytes from the web server, without needing to download the entire
108 file. This is particularly useful with large archives such as ZIP files and
109 ISO images when you only need to inspect their contents or extract specific
110 files. Since the HTTP protocol itself has no notion of directories, only a
111 single file can be mounted.")
112 (license license:gpl2+)))
113
114 (define-public jfsutils
115 (package
116 (name "jfsutils")
117 (version "1.1.15")
118 (source
119 (origin
120 (method url-fetch)
121 (uri (string-append "http://jfs.sourceforge.net/project/pub/jfsutils-"
122 version ".tar.gz"))
123 (sha256
124 (base32 "0kbsy2sk1jv4m82rxyl25gwrlkzvl3hzdga9gshkxkhm83v1aji4"))
125 (patches (search-patches "jfsutils-add-sysmacros.patch"
126 "jfsutils-include-systypes.patch"))))
127 (build-system gnu-build-system)
128 (inputs
129 `(("util-linux" ,util-linux)))
130 (home-page "http://jfs.sourceforge.net/home.html")
131 (synopsis "Utilities for managing JFS file systems")
132 (description
133 "The JFSutils are a collection of utilities for managing the @acronym{JFS,
134 Journaled File System}, a 64-bit journaling file system created by IBM and later
135 ported to the kernel Linux. The following commands are available:
136 @enumerate
137 @item @command{fsck.jfs}: check and repair a JFS file system or replay its
138 transaction log.
139 @item @command{logdump}: dump the JFS journal log.
140 @item @command{logredo}: replay the JFS journal log.
141 @item @command{mkfs.jfs}: create a new JFS file system.
142 @item @command{xchklog}: save a JFS fsck log to a file.
143 @item @command{xchkdmp}: dump the contents of such a log file.
144 @item @command{xpeek}: a JFS file system editor with a shell-like interface.
145 @end enumerate\n")
146 (license license:gpl3+))) ; no explicit version given
147
148 (define-public disorderfs
149 (package
150 (name "disorderfs")
151 (version "0.5.6")
152 (source
153 (origin
154 (method git-fetch)
155 (uri (git-reference
156 (url "https://salsa.debian.org/reproducible-builds/disorderfs.git")
157 (commit version)))
158 (file-name (git-file-name name version))
159 (sha256
160 (base32
161 "1zn2ydap8k9fwjl3ivgrg6l32s5p4ik6ca6j1idp7c77znlv6cpp"))))
162 (build-system gnu-build-system)
163 (native-inputs
164 `(("pkg-config" ,pkg-config)))
165 (inputs
166 `(("fuse" ,fuse)
167 ("attr" ,attr)))
168 (arguments
169 `(#:phases (modify-phases %standard-phases
170 (delete 'configure)) ; no configure script
171 #:make-flags (let ((out (assoc-ref %outputs "out")))
172 (list (string-append "PREFIX=" out)))
173 #:test-target "test"
174 ;; FIXME: Tests require 'run-parts' which is not in Guix yet.
175 #:tests? #f))
176 (home-page "https://github.com/ReproducibleBuilds/disorderfs")
177 (synopsis "FUSE file system that introduces non-determinism")
178 (description
179 "An overlay FUSE file system that introduces non-determinism
180 into file system metadata. For example, it can randomize the order
181 in which directory entries are read. This is useful for detecting
182 non-determinism in the build process.")
183 (license license:gpl3+)))
184
185 (define-public glusterfs
186 (package
187 (name "glusterfs")
188 (version "7.0")
189 (source
190 (origin
191 (method url-fetch)
192 (uri (string-append "https://download.gluster.org/pub/gluster/glusterfs/"
193 (version-major version) "/"
194 (version-major+minor version) "/"
195 "glusterfs-" version ".tar.gz"))
196 (sha256
197 (base32
198 "0yzhx710ypj0j3m5dcgmmgvkp7p0rmmp2p7ld0axrm4vpwc2b1wa"))))
199 (build-system gnu-build-system)
200 (arguments
201 `(#:configure-flags
202 (let ((out (assoc-ref %outputs "out"))
203 (p2 (assoc-ref %build-inputs "python-2")))
204 (list (string-append "PYTHON=" p2 "/bin/python")
205 (string-append "--with-initdir=" out "/etc/init.d")
206 (string-append "--with-mountutildir=" out "/sbin")
207 "--enable-cmocka" ; unit tests
208 ;; "--enable-debug" ; debug build options
209 ;; "--enable-asan" ; Address Sanitizer
210 ;; "--enable-tsan" ; ThreadSanitizer
211 ))
212 #:phases
213 (modify-phases %standard-phases
214 (add-before 'configure 'autogen
215 (lambda _ (invoke "./autogen.sh"))))))
216 (native-inputs
217 `(("pkg-config" ,pkg-config)
218 ("libtirpc", libtirpc)
219 ("rpcsvc-proto", rpcsvc-proto)
220 ("python-2" ,python-2) ; must be version 2
221 ("flex" ,flex)
222 ("bison" ,bison)
223 ("libtool" ,libtool)
224 ("autoconf" ,autoconf)
225 ("automake" ,automake)
226 ("cmocka" ,cmocka)))
227 (inputs
228 `(("acl" ,acl)
229 ("fuse", fuse)
230 ("openssl" ,openssl)
231 ("liburcu" ,liburcu)
232 ("libuuid" ,util-linux)
233 ("libxml2" ,libxml2)
234 ("readline" ,readline)
235 ("zlib" ,zlib)
236 ("libaio", libaio)
237 ("rdma-core", rdma-core)))
238 (home-page "https://www.gluster.org")
239 (synopsis "Distributed file system")
240 (description "GlusterFS is a distributed scalable network file system
241 suitable for data-intensive tasks such as cloud storage and media streaming.
242 It allows rapid provisioning of additional storage based on your storage
243 consumption needs. It incorporates automatic failover as a primary feature.
244 All of this is accomplished without a centralized metadata server.")
245 ;; The user may choose either LGPLv3+ or GPLv2 only.
246 (license (list license:lgpl3+ license:gpl2+))))
247
248 (define-public curlftpfs
249 (package
250 (name "curlftpfs")
251 (version "0.9.2")
252 (source
253 (origin
254 (method url-fetch)
255 (uri (string-append "mirror://sourceforge/curlftpfs/curlftpfs/" version
256 "/curlftpfs-" version ".tar.gz"))
257 (sha256
258 (base32
259 "0n397hmv21jsr1j7zx3m21i7ryscdhkdsyqpvvns12q7qwwlgd2f"))))
260 (build-system gnu-build-system)
261 (arguments
262 `(#:phases
263 (modify-phases %standard-phases
264 (add-after 'unpack 'fix-test
265 (lambda _
266 ;; One of the 512-Byte block counts is definitely wrong.
267 ;; See <https://sourceforge.net/p/curlftpfs/bugs/73/>.
268 (substitute* "tests/ftpfs-ls_unittest.c"
269 (("4426192") "12814800"))
270 #t)))))
271 (inputs
272 `(("curl" ,curl)
273 ("glib" ,glib)
274 ("fuse" ,fuse)))
275 (native-inputs
276 `(("pkg-config" ,pkg-config)))
277 (home-page "http://curlftpfs.sourceforge.net/")
278 (synopsis "Mount remote file systems over FTP")
279 (description
280 "This is a file system client based on the FTP File Transfer Protocol.")
281 (license license:gpl2+)))
282
283 (define-public libnfs
284 (package
285 (name "libnfs")
286 (version "3.0.0")
287 (source (origin
288 (method git-fetch)
289 (uri (git-reference
290 (url "https://github.com/sahlberg/libnfs.git")
291 (commit (string-append "libnfs-" version))))
292 (file-name (git-file-name name version))
293 (sha256
294 (base32
295 "115p55y2cbs92z5lmcnjx1v29lwinpgq4sha9v1kq1vd8674h404"))))
296 (build-system gnu-build-system)
297 (home-page "https://github.com/sahlberg/libnfs")
298 (native-inputs
299 `(("autoconf" ,autoconf)
300 ("automake" ,automake)
301 ("libtool" ,libtool)
302 ("pkg-config" ,pkg-config)))
303 (synopsis "Client library for accessing NFS shares")
304 (description "LIBNFS is a client library for accessing NFS shares over a
305 network. LIBNFS offers three different APIs, for different use :
306
307 @enumerate
308 @item RAW, a fully asynchronous low level RPC library for NFS protocols. This
309 API provides very flexible and precise control of the RPC issued.
310 @item NFS ASYNC, a fully asynchronous library for high level vfs functions
311 @item NFS SYNC, a synchronous library for high level vfs functions.
312 @end enumerate\n")
313 (license (list license:lgpl2.1+ ; library
314 license:gpl3+ ; tests
315 license:bsd-3 ; copied nsf4 files
316 ))))
317
318 (define-public apfs-fuse
319 (let ((commit "c7036a3030d128bcecefc1eabc47c039ccfdcec9")
320 (revision "0"))
321 (package
322 (name "apfs-fuse")
323 (version (git-version "0.0.0" revision commit))
324 (source (origin
325 (method git-fetch)
326 (uri (git-reference
327 (url "https://github.com/sgan81/apfs-fuse")
328 (recursive? #t) ; for lzfse
329 (commit commit)))
330 (sha256
331 (base32
332 "1akd4cx1f9cyq6sfk9ybv4chhjwjlnqi8ic4z5ajnd5x0g76nz3r"))
333 (file-name (git-file-name name version))))
334 (build-system cmake-build-system)
335 (arguments
336 `(#:tests? #f ; No test suite
337 #:phases
338 (modify-phases %standard-phases
339 ;; No 'install' target in CMakeLists.txt
340 (replace 'install
341 (lambda* (#:key outputs #:allow-other-keys)
342 (let* ((out (assoc-ref outputs "out"))
343 (bin (string-append out "/bin"))
344 (lib (string-append out "/lib"))
345 (doc (string-append out "/share/doc/"
346 (string-append ,name "-" ,version))))
347 (install-file "apfs-dump" bin)
348 (install-file "apfs-dump-quick" bin)
349 (install-file "apfs-fuse" bin)
350 (install-file "libapfs.a" lib)
351 #t))))))
352 (inputs
353 `(("bzip2" ,bzip2)
354 ("fuse" ,fuse)
355 ("zlib" ,zlib)))
356 (synopsis "Read-only FUSE driver for the APFS file system")
357 (description "APFS-FUSE is a read-only FUSE driver for the @dfn{Apple File
358 System} (APFS). It is currently in an experimental state — it may not be able
359 to read all files, and it does not support all the compression methods in
360 APFS.")
361 (home-page "https://github.com/sgan81/apfs-fuse")
362 (license license:gpl2+))))
363
364 (define-public zfs
365 (package
366 (name "zfs")
367 (version "0.8.2")
368 (outputs '("out" "module" "src"))
369 (source
370 (origin
371 (method url-fetch)
372 (uri (string-append "https://github.com/zfsonlinux/zfs/releases"
373 "/download/zfs-" version
374 "/zfs-" version ".tar.gz"))
375 (sha256
376 (base32
377 "1f7aig15q3z832pr2n48j3clafic2yk1vvqlh28vpklfghjqwq27"))))
378 (build-system linux-module-build-system)
379 (arguments
380 `(;; The ZFS kernel module should not be downloaded since the license
381 ;; terms don't allow for distributing it, only building it locally.
382 #:substitutable? #f
383 ;; Tests cannot run in an unprivileged build environment.
384 #:tests? #f
385 #:phases
386 (modify-phases %standard-phases
387 (add-after 'configure 'really-configure
388 (lambda* (#:key outputs inputs #:allow-other-keys)
389 (let ((out (assoc-ref outputs "out")))
390 (substitute* "configure"
391 (("-/bin/sh") (string-append "-" (which "sh")))
392 ((" /bin/sh") (string-append " " (which "sh"))))
393 (invoke "./configure"
394 "--with-config=all"
395 (string-append "--prefix=" out)
396 (string-append "--with-dracutdir=" out "/lib/dracut")
397 (string-append "--with-udevdir=" out "/lib/udev")
398 (string-append "--with-mounthelperdir=" out "/sbin")
399 (string-append "--with-linux="
400 (assoc-ref inputs "linux-module-builder")
401 "/lib/modules/build")))))
402 (add-after 'unpack 'patch-source
403 (lambda* (#:key inputs outputs #:allow-other-keys)
404 (let ((out (assoc-ref outputs "out"))
405 (src (assoc-ref outputs "src"))
406 (util-linux (assoc-ref inputs "util-linux"))
407 (nfs-utils (assoc-ref inputs "nfs-utils")))
408 (substitute* "module/zfs/zfs_ctldir.c"
409 (("/usr/bin/env\", \"umount")
410 (string-append util-linux "/bin/umount\", \"-n"))
411 (("/usr/bin/env\", \"mount")
412 (string-append util-linux "/bin/mount\", \"-n")))
413 (substitute* "lib/libzfs/libzfs_mount.c"
414 (("/bin/mount") (string-append util-linux "/bin/mount"))
415 (("/bin/umount") (string-append util-linux "/bin/umount")))
416 (substitute* "lib/libshare/nfs.c"
417 (("/usr/sbin/exportfs")
418 (string-append nfs-utils "/sbin/exportfs")))
419 (substitute* "config/zfs-build.m4"
420 (("\\$sysconfdir/init.d") (string-append out "/etc/init.d")))
421 (substitute* '("etc/zfs/Makefile.am"
422 "cmd/zed/Makefile.am")
423 (("\\$\\(sysconfdir)") (string-append out "/etc")))
424 (substitute* "cmd/vdev_id/vdev_id"
425 (("PATH=/bin:/sbin:/usr/bin:/usr/sbin")
426 (string-append "PATH="
427 (dirname (which "chmod")) ":"
428 (dirname (which "grep")) ":"
429 (dirname (which "sed")) ":"
430 (dirname (which "gawk")))))
431 (substitute* "contrib/pyzfs/Makefile.in"
432 ((".*install-lib.*") ""))
433 (substitute* '("Makefile.am" "Makefile.in")
434 (("\\$\\(prefix)/src") (string-append src "/src"))))
435 #t))
436 (replace 'build
437 (lambda _ (invoke "make")))
438 (replace 'install
439 (lambda* (#:key outputs inputs native-inputs #:allow-other-keys)
440 (let* ((out (assoc-ref outputs "out"))
441 (moddir (assoc-ref outputs "module"))
442 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
443 (invoke "make" "install"
444 (string-append "DEFAULT_INITCONF_DIR=" out "/etc/default")
445 (string-append "DEPMOD=" kmod "/bin/depmod")
446 (string-append "INSTALL_PATH=" out)
447 (string-append "INSTALL_MOD_PATH=" moddir)
448 "INSTALL_MOD_STRIP=1")
449 (install-file "contrib/bash_completion.d/zfs"
450 (string-append out "/share/bash-completion/completions"))
451 (symlink "../share/pkgconfig/" (string-append out "/lib/pkgconfig"))
452 #t))))))
453 (native-inputs
454 `(("attr" ,attr)
455 ("pkg-config" ,pkg-config)))
456 (inputs
457 `(("eudev" ,eudev)
458 ("libaio" ,libaio)
459 ("libtirpc" ,libtirpc)
460 ("nfs-utils" ,nfs-utils)
461 ("openssl" ,openssl)
462 ("python" ,python)
463 ("python-cffi" ,python-cffi)
464 ("util-linux" ,util-linux)
465 ("zlib" ,zlib)))
466 (home-page "https://zfsonlinux.org/")
467 (synopsis "Native ZFS on Linux")
468 (description
469 "ZFS on Linux is an advanced file system and volume manager which was
470 originally developed for Solaris and is now maintained by the OpenZFS
471 community.")
472 (license license:cddl1.0)))