gnu: Add davfs2.
[jackhill/guix/guix.git] / gnu / packages / file-systems.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2017, 2018, 2020 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, 2020 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
8 ;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
9 ;;;
10 ;;; This file is part of GNU Guix.
11 ;;;
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
16 ;;;
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
21 ;;;
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
25 (define-module (gnu packages file-systems)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix packages)
28 #:use-module (guix download)
29 #:use-module (guix git-download)
30 #:use-module (guix build-system cmake)
31 #:use-module (guix build-system copy)
32 #:use-module (guix build-system gnu)
33 #:use-module (guix build-system linux-module)
34 #:use-module (guix build-system python)
35 #:use-module (guix build-system trivial)
36 #:use-module (guix utils)
37 #:use-module (gnu packages)
38 #:use-module (gnu packages acl)
39 #:use-module (gnu packages attr)
40 #:use-module (gnu packages autotools)
41 #:use-module (gnu packages bison)
42 #:use-module (gnu packages check)
43 #:use-module (gnu packages compression)
44 #:use-module (gnu packages crypto)
45 #:use-module (gnu packages curl)
46 #:use-module (gnu packages cyrus-sasl)
47 #:use-module (gnu packages datastructures)
48 #:use-module (gnu packages documentation)
49 #:use-module (gnu packages docbook)
50 #:use-module (gnu packages flex)
51 #:use-module (gnu packages glib)
52 #:use-module (gnu packages gnupg)
53 #:use-module (gnu packages kerberos)
54 #:use-module (gnu packages libffi)
55 #:use-module (gnu packages linux)
56 #:use-module (gnu packages nfs)
57 #:use-module (gnu packages onc-rpc)
58 #:use-module (gnu packages openldap)
59 #:use-module (gnu packages photo)
60 #:use-module (gnu packages pkg-config)
61 #:use-module (gnu packages python)
62 #:use-module (gnu packages python-crypto)
63 #:use-module (gnu packages python-web)
64 #:use-module (gnu packages python-xyz)
65 #:use-module (gnu packages readline)
66 #:use-module (gnu packages rsync)
67 #:use-module (gnu packages sssd)
68 #:use-module (gnu packages sqlite)
69 #:use-module (gnu packages tls)
70 #:use-module (gnu packages valgrind)
71 #:use-module (gnu packages version-control)
72 #:use-module (gnu packages xml))
73
74 (define-public autofs
75 (package
76 (name "autofs")
77 (version "5.1.6")
78 (source
79 (origin
80 (method url-fetch)
81 (uri (string-append "mirror://kernel.org/linux/daemons/autofs/"
82 "v" (version-major version) "/"
83 "autofs-" version ".tar.xz"))
84 (sha256
85 (base32 "1vya21mb4izj3khcr3flibv7xc15vvx2v0rjfk5yd31qnzcy7pnx"))))
86 (build-system gnu-build-system)
87 (arguments
88 `(#:configure-flags
89 (list "--enable-ignore-busy" ; during shutdown
90 "--enable-sloppy-mount" ; support mount(8) -s
91 "--with-libtirpc"
92 (string-append "--with-openldap="
93 (assoc-ref %build-inputs "openldap"))
94 (string-append "--with-sasl="
95 (assoc-ref %build-inputs "cyrus-sasl"))
96 "HAVE_SSS_AUTOFS=1" ; required to make sssldir click
97 (string-append "sssldir="
98 (assoc-ref %build-inputs "sssd")
99 "/lib/sssd/modules"))
100 #:tests? #f ; no test suite
101 #:phases
102 (modify-phases %standard-phases
103 (add-before 'configure 'fix-hard-coded-search-path
104 (lambda _
105 (substitute* "configure"
106 (("^searchpath=\".*\"")
107 "searchpath=\"$PATH\""))
108 #t))
109 (add-before 'install 'omit-obsolete-lookup_nis.so-link
110 ;; Building lookup_yp.so depends on $(YPCLNT) but this doesn't,
111 ;; leading to a make error. Since it's broken, comment it out.
112 (lambda _
113 (substitute* "modules/Makefile"
114 (("ln -fs lookup_yp.so" match)
115 (string-append "# " match)))
116 #t)))))
117 (native-inputs
118 `(("bison" ,bison)
119 ("flex" ,flex)
120 ("pkg-config" ,pkg-config)
121 ("rpcsvc-proto" ,rpcsvc-proto)))
122 (inputs
123 `(("cyrus-sasl" ,cyrus-sasl)
124 ("e2fsprogs" ,e2fsprogs) ; for e[234]fsck
125 ("libtirpc" ,libtirpc)
126 ("libxml2" ,libxml2) ; needed for LDAP, SASL
127 ("mit-krb5" ,mit-krb5) ; needed for LDAP, SASL
128 ("nfs-utils" ,nfs-utils) ; for mount.nfs
129 ("openldap" ,openldap)
130 ("openssl" ,openssl) ; needed for SASL
131 ("sssd" ,sssd)
132 ("util-linux" ,util-linux))) ; for mount, umount
133 ;; XXX A directory index is the closest thing this has to a home page.
134 (home-page "https://www.kernel.org/pub/linux/daemons/autofs/")
135 (synopsis "Kernel-based automounter for Linux")
136 (description
137 "Autofs is a kernel-based automounter for use with the Linux autofs4
138 module. It automatically mounts selected file systems when they are used and
139 unmounts them after a set period of inactivity. This provides
140 centrally-managed, consistent file names for users and applications, even in a
141 large and/or frequently changing (network) environment.")
142 ;; fedfs/ is GPL-2-only but not built.
143 (license (list license:bsd-3 ; modules/cyrus-sasl.c
144 license:gpl2+)))) ; the rest
145
146 (define-public bindfs
147 (package
148 (name "bindfs")
149 (version "1.14.8")
150 (source (origin
151 (method url-fetch)
152 (uri (string-append "https://bindfs.org/downloads/bindfs-"
153 version ".tar.gz"))
154 (sha256
155 (base32
156 "15y4brlcrqhxl6z73785m0dr1vp2q3wc6xss08x9jjr0apzmmjp5"))))
157 (build-system gnu-build-system)
158 (arguments
159 ;; XXX: The tests have no hope of passing until there is a "nogroup"
160 ;; entry (or at least some group to which the guix builder does
161 ;; not belong) in the /etc/group file of the build environment.
162 ;; Currently we do not have such a group. Disable tests for now.
163 '(#:tests? #f))
164 (native-inputs
165 ;; Native inputs to run the tests
166 ;; ("ruby" ,ruby)
167 ;; ("valgrind" ,valgrind)
168 ;; ("which" ,which)
169 `(("pkg-config" ,pkg-config)))
170 (inputs
171 `(("fuse" ,fuse)))
172 (home-page "https://bindfs.org")
173 (synopsis "Bind mount a directory and alter permission bits")
174 (description
175 "@command{bindfs} is a FUSE filesystem for mounting a directory to
176 another location, similar to @command{mount --bind}. It can be used for:
177 @itemize
178 @item Making a directory read-only.
179 @item Making all executables non-executable.
180 @item Sharing a directory with a list of users (or groups).
181 @item Modifying permission bits using rules with chmod-like syntax.
182 @item Changing the permissions with which files are created.
183 @end itemize ")
184 (license license:gpl2+)))
185
186 (define-public davfs2
187 (package
188 (name "davfs2")
189 (version "1.6.0")
190 (source
191 (origin
192 (method url-fetch)
193 (uri (string-append "https://download.savannah.nongnu.org/releases/"
194 "davfs2/davfs2-" version ".tar.gz"))
195 (sha256
196 (base32 "0l1vnv5lfigciwg17p10zxwhzj4qw2d9kw30prr7g4dxhmb6fsrf"))))
197 (build-system gnu-build-system)
198 (arguments
199 `(#:configure-flags
200 (list "--sysconfdir=/etc" ; so man pages & binaries contain /etc
201 (string-append "--docdir=" (assoc-ref %outputs "out")
202 "/share/doc/" ,name "-" ,version)
203 (string-append "ssbindir=" (assoc-ref %outputs "out") "/sbin")
204 ;; The default ‘davfs2’ user and group don't exist on most systems.
205 "dav_user=nobody"
206 "dav_group=nogroup")
207 #:phases
208 (modify-phases %standard-phases
209 (add-after 'unpack 'omit-redundancy
210 ;; Don't install redundant copies of /etc examples into /share.
211 (lambda _
212 (substitute* "etc/Makefile.in"
213 (("(dist_pkgdata_DATA =.*) davfs2.conf secrets(.*)"
214 _ prefix suffix)
215 (string-append prefix suffix)))
216 #t))
217 (add-after 'unpack 'patch-file-names
218 (lambda _
219 ;; Don't auto-load the FUSE kernel module. That's up to root.
220 ;; XXX If/when we restore the previous behaviour, make sure not
221 ;; to introduce a security hole when mount.davfs is setuid.
222 (substitute* "src/kernel_interface.c"
223 (("/sbin/modprobe") "/modprobe/disabled"))
224 #t))
225 (replace 'install
226 (lambda* (#:key make-flags outputs #:allow-other-keys)
227 (let ((out (assoc-ref outputs "out")))
228 (apply invoke "make" "install"
229 (string-append "pkgsysconfdir=" out "/etc")
230 make-flags)))))))
231 (inputs
232 `(("neon" ,neon)
233
234 ;; Neon requires but doesn't propagate zlib, nor would we want that.
235 ;; XZ as well, but that's already present in the build environment.
236 ("zlib" ,zlib)))
237 (home-page "https://savannah.nongnu.org/projects/davfs2")
238 (synopsis "Mount remote WebDAV resources in the local file system")
239 (description
240 "The @acronym{WebDAV, Web Distributed Authoring and Versioning} extension
241 to the HTTP protocol defines a standard way to author resources on a remote Web
242 server. Davfs2 exposes such resources as a typical filesystem which can be used
243 by standard applications with no built-in support for WebDAV, such as the GNU
244 coreutils (@command{cp}, @command{mv}, etc.) or a graphical word processor.
245
246 Davfs2 works with most WebDAV servers with no or little configuration. It
247 supports TLS (HTTPS), HTTP proxies, HTTP basic and digest authentication, and
248 client certificates. It performs extensive caching to avoid unnecessary network
249 traffic, stay responsive even over slow or unreliable connections, and prevent
250 data loss. It aims to make use by unprivileged users as easy and secure as
251 possible.
252
253 However, davfs2 is not a full-featured WebDAV client. The file system interface
254 and the WebDAV protocol are quite different. Translating between the two is not
255 always possible.")
256 (license (list license:bsd-2 ; src/fuse_kernel.h
257 license:gpl3+)))) ; everything else
258
259 (define-public fsarchiver
260 (package
261 (name "fsarchiver")
262 (version "0.8.5")
263 (source
264 (origin
265 (method git-fetch)
266 (uri
267 (git-reference
268 (url "https://github.com/fdupoux/fsarchiver")
269 (commit version)))
270 (file-name (git-file-name name version))
271 (sha256
272 (base32 "1rvwq5v3rl14bqxjm1ibfapyicf0sa44nw7451v10kx39lp56ylp"))))
273 (build-system gnu-build-system)
274 (native-inputs
275 `(("autoconf" ,autoconf)
276 ("automake" ,automake)
277 ("pkg-config" ,pkg-config)))
278 (inputs
279 `(("bzip2" ,bzip2)
280 ("e2fsprogs" ,e2fsprogs)
281 ("libgcrypt" ,libgcrypt)
282 ("lz4" ,lz4)
283 ("lzo" ,lzo)
284 ("util-linux" ,util-linux "lib")
285 ("xz" ,xz)
286 ("zlib" ,zlib)
287 ("zstd:lib" ,zstd "lib")))
288 (synopsis "File system back-up, deployment, and migration tool")
289 (description
290 "FSArchiver saves the contents of a file system to a compressed archive
291 file, and restores it to a different file system and/or partition. This
292 partition can be of a different size than the original and FSArchiver will
293 create a new file system if none exists.
294
295 All standard file attributes supported by the kernel are preserved, including
296 file permissions, timestamps, symbolic and hard links, and extended attributes.
297
298 Each file in the archive is protected by a checksum. If part of the archive
299 is corrupted you'll lose the affected file(s) but not the whole back-up.")
300 (home-page "https://www.fsarchiver.org/")
301 (license license:gpl2)))
302
303 (define-public gphotofs
304 (package
305 (name "gphotofs")
306 (version "0.5.0")
307 (source
308 (origin
309 (method url-fetch)
310 (uri
311 (string-append "mirror://sourceforge/gphoto/gphotofs/" version
312 "/gphotofs-0.5.tar.gz"))
313 (sha256
314 (base32
315 "04slwhr6ap9xcc27wphk22ad8yn79ngyy5z10lxams3k5liahvc2"))))
316 (build-system gnu-build-system)
317 (native-inputs
318 `(("pkg-config" ,pkg-config)))
319 (inputs
320 `(("fuse" ,fuse)
321 ("glib" ,glib)
322 ("libgphoto2" ,libgphoto2)))
323 (synopsis "Virtual file system for libgphoto2 using FUSE")
324 (description "GPhotoFS is a FUSE file system module to mount your camera as
325 a file system on Linux. This allow using your camera with any tool able to read
326 from a mounted file system.")
327 (home-page "http://www.gphoto.org/proj/gphotofs/")
328 (license license:gpl2+)))
329
330 (define-public bcachefs-tools
331 (let ((commit "742dbbdbb90efb786f05a8576917fcd0e9cbd57e")
332 (revision "1"))
333 (package
334 (name "bcachefs-tools")
335 (version (git-version "0.1" revision commit))
336 (source
337 (origin
338 (method git-fetch)
339 (uri (git-reference
340 (url "https://evilpiepirate.org/git/bcachefs-tools.git")
341 (commit commit)))
342 (file-name (git-file-name name version))
343 (sha256
344 (base32 "0kn8y3kqylz6scv47mzfmwrlh21kbb14z5vs65vks8w50i26sxnc"))))
345 (build-system gnu-build-system)
346 (arguments
347 `(#:make-flags
348 (list ,(string-append "VERSION=" version) ; bogus vX.Y-nogit otherwise
349 (string-append "PREFIX=" (assoc-ref %outputs "out"))
350 "INITRAMFS_DIR=$(PREFIX)/share/initramfs-tools"
351 "CC=gcc"
352 "PYTEST=pytest")
353 #:phases
354 (modify-phases %standard-phases
355 (delete 'configure)) ; no configure script
356 #:tests? #f)) ; XXX 6 valgrind tests fail
357 (native-inputs
358 `(("pkg-config" ,pkg-config)
359
360 ;; For tests.
361 ("python-pytest" ,python-pytest)
362 ("valgrind" ,valgrind)))
363 (inputs
364 `(("eudev" ,eudev)
365 ("keyutils" ,keyutils)
366 ("libaio" ,libaio)
367 ("libscrypt" ,libscrypt)
368 ("libsodium" ,libsodium)
369 ("liburcu" ,liburcu)
370 ("util-linux" ,util-linux "lib") ; lib{blkid,uuid}
371 ("lz4" ,lz4)
372 ("zlib" ,zlib)
373 ("zstd:lib" ,zstd "lib")))
374 (home-page "https://bcachefs.org/")
375 (synopsis "Tools to create and manage bcachefs file systems")
376 (description
377 "The bcachefs-tools are command-line utilities for creating, checking,
378 and otherwise managing bcachefs file systems.
379
380 Bcachefs is a @acronym{CoW, copy-on-write} file system supporting native
381 encryption, compression, snapshots, and (meta)data checksums. It can use
382 multiple block devices for replication and/or performance, similar to RAID.
383
384 In addition, bcachefs provides all the functionality of bcache, a block-layer
385 caching system, and lets you assign different roles to each device based on its
386 performance and other characteristics.")
387 (license license:gpl2+))))
388
389 (define-public exfatprogs
390 (package
391 (name "exfatprogs")
392 (version "1.0.4")
393 (source
394 (origin
395 (method git-fetch)
396 (uri (git-reference
397 (url "https://github.com/exfatprogs/exfatprogs")
398 (commit version)))
399 (file-name (git-file-name name version))
400 (sha256
401 (base32 "1braffz1wc4ki3nb42q85l5zg2dl2hwjr64rk27nc85wcsrbavnl"))))
402 (build-system gnu-build-system)
403 (arguments
404 `(#:configure-flags
405 (list "--disable-static")))
406 (native-inputs
407 `(("autoconf" ,autoconf)
408 ("automake" ,automake)
409 ("libtool" ,libtool)
410 ("pkg-config" ,pkg-config)))
411 (home-page "https://github.com/exfatprogs/exfatprogs")
412 (synopsis "Tools to create, check, and repair exFAT file systems")
413 (description
414 "These are command-line user space tools for the @acronym{exFAT,
415 Extensible File Allocation Table} file systems. Included are
416 @command{mkfs.exfat} to create (format) new exFAT file systems, and
417 @command{fsck.exfat} to check their consistency and repair them.")
418 (license license:gpl2+)))
419
420 (define-public httpfs2
421 (package
422 (name "httpfs2")
423 (version "0.1.5")
424 (source
425 (origin
426 (method url-fetch)
427 (uri (string-append "mirror://sourceforge/httpfs/httpfs2/"
428 "httpfs2-" version ".tar.gz"))
429 (sha256
430 (base32
431 "1h8ggvhw30n2r6w11n1s458ypggdqx6ldwd61ma4yd7binrlpjq1"))))
432 (build-system gnu-build-system)
433 (native-inputs
434 `(("asciidoc" ,asciidoc)
435 ("docbook-xml" ,docbook-xml)
436 ("libxml2" ,libxml2)
437 ("libxslt" ,libxslt)
438 ("pkg-config" ,pkg-config)))
439 (inputs
440 `(("fuse" ,fuse)
441 ("gnutls" ,gnutls)))
442 (arguments
443 `(#:phases
444 (modify-phases %standard-phases
445 (delete 'configure) ; no configure script
446 (replace 'install
447 ;; There's no ‘install’ target. Install all variants manually.
448 (lambda* (#:key outputs #:allow-other-keys)
449 (let* ((out (assoc-ref outputs "out"))
450 (bin (string-append out "/bin"))
451 (man1 (string-append out "/share/man/man1")))
452 (mkdir-p bin)
453 (mkdir-p man1)
454 (for-each
455 (lambda (variant)
456 (let ((man1-page (string-append variant ".1")))
457 (install-file variant bin)
458 (install-file man1-page man1)))
459 (list "httpfs2"
460 "httpfs2-mt"
461 "httpfs2-ssl"
462 "httpfs2-ssl-mt")))
463 #t)))
464 #:make-flags (list "CC=gcc")
465 #:parallel-build? #f ; can result in missing man pages
466 #:tests? #f)) ; no tests
467 (home-page "https://sourceforge.net/projects/httpfs/")
468 (synopsis "Mount remote files over HTTP")
469 (description "httpfs2 is a @code{fuse} file system for mounting any
470 @dfn{HyperText} (HTTP or HTTPS) URL. It uses HTTP/1.1 byte ranges to request
471 arbitrary bytes from the web server, without needing to download the entire
472 file. This is particularly useful with large archives such as ZIP files and
473 ISO images when you only need to inspect their contents or extract specific
474 files. Since the HTTP protocol itself has no notion of directories, only a
475 single file can be mounted.")
476 (license license:gpl2+)))
477
478 (define-public jfsutils
479 (package
480 (name "jfsutils")
481 (version "1.1.15")
482 (source
483 (origin
484 (method url-fetch)
485 (uri (string-append "http://jfs.sourceforge.net/project/pub/jfsutils-"
486 version ".tar.gz"))
487 (sha256
488 (base32 "0kbsy2sk1jv4m82rxyl25gwrlkzvl3hzdga9gshkxkhm83v1aji4"))
489 (patches (search-patches "jfsutils-add-sysmacros.patch"
490 "jfsutils-include-systypes.patch"))))
491 (build-system gnu-build-system)
492 (inputs
493 `(("util-linux" ,util-linux "lib")))
494 (home-page "http://jfs.sourceforge.net/home.html")
495 (synopsis "Utilities for managing JFS file systems")
496 (description
497 "The JFSutils are a collection of utilities for managing the @acronym{JFS,
498 Journaled File System}, a 64-bit journaling file system created by IBM and later
499 ported to the kernel Linux. The following commands are available:
500 @enumerate
501 @item @command{fsck.jfs}: check and repair a JFS file system or replay its
502 transaction log.
503 @item @command{logdump}: dump the JFS journal log.
504 @item @command{logredo}: replay the JFS journal log.
505 @item @command{mkfs.jfs}: create a new JFS file system.
506 @item @command{xchklog}: save a JFS fsck log to a file.
507 @item @command{xchkdmp}: dump the contents of such a log file.
508 @item @command{xpeek}: a JFS file system editor with a shell-like interface.
509 @end enumerate\n")
510 (license license:gpl3+))) ; no explicit version given
511
512 (define-public jfsutils/static
513 (static-package
514 (package
515 (inherit jfsutils)
516 (name "jfsutils-static")
517 (inputs
518 `(("util-linux:static" ,util-linux "static")
519 ,@(package-inputs jfsutils))))))
520
521 (define-public jfs_fsck/static
522 (package
523 (name "jfs_fsck-static")
524 (version (package-version jfsutils))
525 (source #f)
526 (build-system trivial-build-system)
527 (arguments
528 `(#:modules ((guix build utils))
529 #:builder
530 (begin
531 (use-modules (guix build utils)
532 (ice-9 ftw)
533 (srfi srfi-26))
534 (let* ((jfsutils (assoc-ref %build-inputs "jfsutils"))
535 (fsck "jfs_fsck")
536 (out (assoc-ref %outputs "out"))
537 (sbin (string-append out "/sbin")))
538 (mkdir-p sbin)
539 (with-directory-excursion sbin
540 (install-file (string-append jfsutils "/sbin/" fsck)
541 ".")
542 (remove-store-references fsck)
543 (chmod fsck #o555))
544 #t))))
545 (inputs
546 `(("jfsutils" ,jfsutils/static)))
547 (home-page (package-home-page jfsutils))
548 (synopsis "Statically-linked jfs_fsck command from jfsutils")
549 (description "This package provides statically-linked jfs_fsck command taken
550 from the jfsutils package. It is meant to be used in initrds.")
551 (license (package-license jfsutils))))
552
553 (define-public disorderfs
554 (package
555 (name "disorderfs")
556 (version "0.5.10")
557 (source
558 (origin
559 (method git-fetch)
560 (uri (git-reference
561 (url "https://salsa.debian.org/reproducible-builds/disorderfs.git")
562 (commit version)))
563 (file-name (git-file-name name version))
564 (sha256
565 (base32
566 "0lsisx5118k0qk0b5klbxl03rvhycnznyfx05yxmjawh85bfhmlh"))))
567 (build-system gnu-build-system)
568 (native-inputs
569 `(("pkg-config" ,pkg-config)))
570 (inputs
571 `(("fuse" ,fuse)
572 ("attr" ,attr)))
573 (arguments
574 `(#:phases (modify-phases %standard-phases
575 (delete 'configure)) ; no configure script
576 #:make-flags (let ((out (assoc-ref %outputs "out")))
577 (list (string-append "PREFIX=" out)))
578 #:test-target "test"
579 ;; FIXME: Tests require 'run-parts' which is not in Guix yet.
580 #:tests? #f))
581 (home-page "https://salsa.debian.org/reproducible-builds/disorderfs")
582 (synopsis "FUSE file system that introduces non-determinism")
583 (description
584 "An overlay FUSE file system that introduces non-determinism
585 into file system metadata. For example, it can randomize the order
586 in which directory entries are read. This is useful for detecting
587 non-determinism in the build process.")
588 (license license:gpl3+)))
589
590 (define-public glusterfs
591 (package
592 (name "glusterfs")
593 (version "7.0")
594 (source
595 (origin
596 (method url-fetch)
597 (uri (string-append "https://download.gluster.org/pub/gluster/glusterfs/"
598 (version-major version) "/"
599 (version-major+minor version) "/"
600 "glusterfs-" version ".tar.gz"))
601 (sha256
602 (base32
603 "0yzhx710ypj0j3m5dcgmmgvkp7p0rmmp2p7ld0axrm4vpwc2b1wa"))))
604 (build-system gnu-build-system)
605 (arguments
606 `(#:configure-flags
607 (let ((out (assoc-ref %outputs "out"))
608 (p2 (assoc-ref %build-inputs "python-2")))
609 (list (string-append "PYTHON=" p2 "/bin/python")
610 (string-append "--with-initdir=" out "/etc/init.d")
611 (string-append "--with-mountutildir=" out "/sbin")
612 "--enable-cmocka" ; unit tests
613 ;; "--enable-debug" ; debug build options
614 ;; "--enable-asan" ; Address Sanitizer
615 ;; "--enable-tsan" ; ThreadSanitizer
616 ))
617 #:phases
618 (modify-phases %standard-phases
619 (add-before 'configure 'autogen
620 (lambda _ (invoke "./autogen.sh"))))))
621 (native-inputs
622 `(("pkg-config" ,pkg-config)
623 ("libtirpc" ,libtirpc)
624 ("rpcsvc-proto" ,rpcsvc-proto)
625 ("python-2" ,python-2) ; must be version 2
626 ("flex" ,flex)
627 ("bison" ,bison)
628 ("libtool" ,libtool)
629 ("autoconf" ,autoconf)
630 ("automake" ,automake)
631 ("cmocka" ,cmocka)))
632 (inputs
633 `(("acl" ,acl)
634 ("fuse" ,fuse)
635 ("openssl" ,openssl)
636 ("liburcu" ,liburcu)
637 ("libuuid" ,util-linux "lib")
638 ("libxml2" ,libxml2)
639 ("readline" ,readline)
640 ("zlib" ,zlib)
641 ("libaio" ,libaio)
642 ("rdma-core" ,rdma-core)))
643 (home-page "https://www.gluster.org")
644 (synopsis "Distributed file system")
645 (description "GlusterFS is a distributed scalable network file system
646 suitable for data-intensive tasks such as cloud storage and media streaming.
647 It allows rapid provisioning of additional storage based on your storage
648 consumption needs. It incorporates automatic failover as a primary feature.
649 All of this is accomplished without a centralized metadata server.")
650 ;; The user may choose either LGPLv3+ or GPLv2 only.
651 (license (list license:lgpl3+ license:gpl2+))))
652
653 (define-public curlftpfs
654 (package
655 (name "curlftpfs")
656 (version "0.9.2")
657 (source
658 (origin
659 (method url-fetch)
660 (uri (string-append "mirror://sourceforge/curlftpfs/curlftpfs/" version
661 "/curlftpfs-" version ".tar.gz"))
662 (sha256
663 (base32
664 "0n397hmv21jsr1j7zx3m21i7ryscdhkdsyqpvvns12q7qwwlgd2f"))))
665 (build-system gnu-build-system)
666 (arguments
667 `(#:phases
668 (modify-phases %standard-phases
669 (add-after 'unpack 'fix-test
670 (lambda _
671 ;; One of the 512-Byte block counts is definitely wrong.
672 ;; See <https://sourceforge.net/p/curlftpfs/bugs/73/>.
673 (substitute* "tests/ftpfs-ls_unittest.c"
674 (("4426192") "12814800"))
675 #t)))))
676 (inputs
677 `(("curl" ,curl)
678 ("glib" ,glib)
679 ("fuse" ,fuse)))
680 (native-inputs
681 `(("pkg-config" ,pkg-config)))
682 (home-page "http://curlftpfs.sourceforge.net/")
683 (synopsis "Mount remote file systems over FTP")
684 (description
685 "This is a file system client based on the FTP File Transfer Protocol.")
686 (license license:gpl2+)))
687
688 (define-public libnfs
689 (package
690 (name "libnfs")
691 (version "3.0.0")
692 (source (origin
693 (method git-fetch)
694 (uri (git-reference
695 (url "https://github.com/sahlberg/libnfs")
696 (commit (string-append "libnfs-" version))))
697 (file-name (git-file-name name version))
698 (sha256
699 (base32
700 "115p55y2cbs92z5lmcnjx1v29lwinpgq4sha9v1kq1vd8674h404"))))
701 (build-system gnu-build-system)
702 (home-page "https://github.com/sahlberg/libnfs")
703 (native-inputs
704 `(("autoconf" ,autoconf)
705 ("automake" ,automake)
706 ("libtool" ,libtool)
707 ("pkg-config" ,pkg-config)))
708 (synopsis "Client library for accessing NFS shares")
709 (description "LIBNFS is a client library for accessing NFS shares over a
710 network. LIBNFS offers three different APIs, for different use :
711
712 @enumerate
713 @item RAW, a fully asynchronous low level RPC library for NFS protocols. This
714 API provides very flexible and precise control of the RPC issued.
715 @item NFS ASYNC, a fully asynchronous library for high level vfs functions
716 @item NFS SYNC, a synchronous library for high level vfs functions.
717 @end enumerate\n")
718 (license (list license:lgpl2.1+ ; library
719 license:gpl3+ ; tests
720 license:bsd-3 ; copied nsf4 files
721 ))))
722
723 (define-public apfs-fuse
724 ;; Later versions require FUSE 3.
725 (let ((commit "7b89418e8dc27103d3c4f8fa348086ffcd634c17")
726 (revision "1"))
727 (package
728 (name "apfs-fuse")
729 (version (git-version "0.0.0" revision commit))
730 (source (origin
731 (method git-fetch)
732 (uri (git-reference
733 (url "https://github.com/sgan81/apfs-fuse")
734 (recursive? #t) ; for lzfse
735 (commit commit)))
736 (sha256
737 (base32
738 "0x2siy3cmnm9wsdfazg3xc8r3kbg73gijmnn1vjw33pp71ckylxr"))
739 (file-name (git-file-name name version))))
740 (build-system cmake-build-system)
741 (arguments
742 `(#:tests? #f ; No test suite
743 #:configure-flags
744 '("-DUSE_FUSE3=OFF") ; FUSE 3 is not packaged yet.
745 #:phases
746 (modify-phases %standard-phases
747 ;; No 'install' target in CMakeLists.txt
748 (replace 'install
749 (lambda* (#:key outputs #:allow-other-keys)
750 (let* ((out (assoc-ref outputs "out"))
751 (bin (string-append out "/bin"))
752 (lib (string-append out "/lib"))
753 (doc (string-append out "/share/doc/"
754 (string-append ,name "-" ,version))))
755 (install-file "apfs-dump" bin)
756 (install-file "apfs-dump-quick" bin)
757 (install-file "apfs-fuse" bin)
758 (install-file "libapfs.a" lib)
759 (install-file "../source/README.md" doc)
760 #t))))))
761 (inputs
762 `(("bzip2" ,bzip2)
763 ("fuse" ,fuse)
764 ("zlib" ,zlib)))
765 (synopsis "Read-only FUSE driver for the APFS file system")
766 (description "APFS-FUSE is a read-only FUSE driver for the @dfn{Apple File
767 System} (APFS). It is currently in an experimental state — it may not be able
768 to read all files, and it does not support all the compression methods in
769 APFS.")
770 (home-page "https://github.com/sgan81/apfs-fuse")
771 (license license:gpl2+))))
772
773 (define-public zfs
774 (package
775 (name "zfs")
776 (version "0.8.5")
777 (outputs '("out" "module" "src"))
778 (source
779 (origin
780 (method url-fetch)
781 (uri (string-append "https://github.com/zfsonlinux/zfs/releases"
782 "/download/zfs-" version
783 "/zfs-" version ".tar.gz"))
784 (sha256
785 (base32 "0gfdnynmsxbhi97q73smrgmcw1k8zmlr1hgljfn38sk0kimivd6v"))))
786 (build-system linux-module-build-system)
787 (arguments
788 `(;; The ZFS kernel module should not be downloaded since the license
789 ;; terms don't allow for distributing it, only building it locally.
790 #:substitutable? #f
791 ;; Tests cannot run in an unprivileged build environment.
792 #:tests? #f
793 #:phases
794 (modify-phases %standard-phases
795 (add-after 'configure 'really-configure
796 (lambda* (#:key outputs inputs #:allow-other-keys)
797 (let ((out (assoc-ref outputs "out")))
798 (substitute* "configure"
799 (("-/bin/sh") (string-append "-" (which "sh"))))
800 (invoke "./configure"
801 "--with-config=all"
802 (string-append "--prefix=" out)
803 (string-append "--with-dracutdir=" out "/lib/dracut")
804 (string-append "--with-udevdir=" out "/lib/udev")
805 (string-append "--with-mounthelperdir=" out "/sbin")
806 (string-append "--with-linux="
807 (assoc-ref inputs "linux-module-builder")
808 "/lib/modules/build")))))
809 (add-after 'unpack 'patch-source
810 (lambda* (#:key inputs outputs #:allow-other-keys)
811 (let ((out (assoc-ref outputs "out"))
812 (src (assoc-ref outputs "src"))
813 (util-linux (assoc-ref inputs "util-linux"))
814 (nfs-utils (assoc-ref inputs "nfs-utils")))
815 (substitute* "contrib/Makefile.in"
816 ;; This is not configurable nor is its hard-coded /usr prefix.
817 ((" initramfs") ""))
818 (substitute* "module/zfs/zfs_ctldir.c"
819 (("/usr/bin/env\", \"umount")
820 (string-append util-linux "/bin/umount\", \"-n"))
821 (("/usr/bin/env\", \"mount")
822 (string-append util-linux "/bin/mount\", \"-n")))
823 (substitute* "lib/libzfs/libzfs_mount.c"
824 (("/bin/mount") (string-append util-linux "/bin/mount"))
825 (("/bin/umount") (string-append util-linux "/bin/umount")))
826 (substitute* "lib/libshare/nfs.c"
827 (("/usr/sbin/exportfs")
828 (string-append nfs-utils "/sbin/exportfs")))
829 (substitute* "config/zfs-build.m4"
830 (("\\$sysconfdir/init.d") (string-append out "/etc/init.d")))
831 (substitute* '("etc/zfs/Makefile.am"
832 "cmd/zed/Makefile.am")
833 (("\\$\\(sysconfdir)") (string-append out "/etc")))
834 (substitute* "cmd/vdev_id/vdev_id"
835 (("PATH=/bin:/sbin:/usr/bin:/usr/sbin")
836 (string-append "PATH="
837 (dirname (which "chmod")) ":"
838 (dirname (which "grep")) ":"
839 (dirname (which "sed")) ":"
840 (dirname (which "gawk")))))
841 (substitute* "contrib/pyzfs/Makefile.in"
842 ((".*install-lib.*") ""))
843 (substitute* '("Makefile.am" "Makefile.in")
844 (("\\$\\(prefix)/src") (string-append src "/src"))))
845 #t))
846 (replace 'build
847 (lambda _ (invoke "make")))
848 (replace 'install
849 (lambda* (#:key outputs inputs native-inputs #:allow-other-keys)
850 (let* ((out (assoc-ref outputs "out"))
851 (moddir (assoc-ref outputs "module"))
852 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
853 (invoke "make" "install"
854 (string-append "DEFAULT_INITCONF_DIR=" out "/etc/default")
855 (string-append "DEPMOD=" kmod "/bin/depmod")
856 (string-append "INSTALL_PATH=" out)
857 (string-append "INSTALL_MOD_PATH=" moddir)
858 "INSTALL_MOD_STRIP=1")
859 (install-file "contrib/bash_completion.d/zfs"
860 (string-append out "/share/bash-completion/completions"))
861 #t))))))
862 (native-inputs
863 `(("attr" ,attr)
864 ("kmod" ,kmod)
865 ("pkg-config" ,pkg-config)))
866 (inputs
867 `(("eudev" ,eudev)
868 ("libaio" ,libaio)
869 ("libtirpc" ,libtirpc)
870 ("nfs-utils" ,nfs-utils)
871 ("openssl" ,openssl)
872 ("python" ,python)
873 ("python-cffi" ,python-cffi)
874 ("util-linux" ,util-linux "lib")
875 ("zlib" ,zlib)))
876 (home-page "https://zfsonlinux.org/")
877 (synopsis "Native ZFS on Linux")
878 (description
879 "ZFS on Linux is an advanced file system and volume manager which was
880 originally developed for Solaris and is now maintained by the OpenZFS
881 community.")
882 (license license:cddl1.0)))
883
884 (define-public mergerfs
885 (package
886 (name "mergerfs")
887 (version "2.31.0")
888 (source
889 (origin
890 (method url-fetch)
891 (uri (string-append "https://github.com/trapexit/mergerfs/releases/download/"
892 version "/mergerfs-" version ".tar.gz"))
893 (sha256
894 (base32
895 "0k4asbg5n9dhy5jpjkw6simqqnr1zira2y4i71cq05091dfwm90p"))))
896 (build-system gnu-build-system)
897 (arguments
898 `(#:tests? #f ; No tests exist.
899 #:phases
900 (modify-phases %standard-phases
901 (delete 'configure)
902 (add-after 'unpack 'fix-paths
903 (lambda* (#:key inputs outputs #:allow-other-keys)
904 (setenv "CC" "gcc")
905 ;; These were copied from the package libfuse.
906 (substitute* '("libfuse/lib/mount_util.c" "libfuse/util/mount_util.c")
907 (("/bin/(u?)mount" _ maybe-u)
908 (string-append (assoc-ref inputs "util-linux")
909 "/bin/" maybe-u "mount")))
910 (substitute* '("libfuse/util/mount.mergerfs.c")
911 (("/bin/sh")
912 (which "sh")))
913 ;; The Makefile does not allow overriding PREFIX via make variables.
914 (substitute* '("Makefile" "libfuse/Makefile")
915 (("= /usr/local") (string-append "= " (assoc-ref outputs "out")))
916 (("= /sbin") "= $(EXEC_PREFIX)/sbin")
917 ;; cannot chown as build user
918 (("chown root(:root)?") "true"))
919 #t)))))
920 ;; mergerfs bundles a heavily modified copy of libfuse.
921 (inputs `(("util-linux" ,util-linux)))
922 (home-page "https://github.com/trapexit/mergerfs")
923 (synopsis "Featureful union file system")
924 (description "mergerfs is a union file system geared towards simplifying
925 storage and management of files across numerous commodity storage devices. It
926 is similar to mhddfs, unionfs, and aufs.")
927 (license (list
928 license:isc ; mergerfs
929 license:gpl2 license:lgpl2.0 ; Imported libfuse code.
930 ))))
931
932 (define-public mergerfs-tools
933 (let ((commit "480296ed03d1c3c7909697d7ef96d35840ee26b8")
934 (revision "2"))
935 (package
936 (name "mergerfs-tools")
937 ;; No released version exists.
938 (version (git-version "0.0" revision commit))
939 (source
940 (origin
941 (method git-fetch)
942 (uri (git-reference
943 (url "https://github.com/trapexit/mergerfs-tools")
944 (commit commit)))
945 (file-name (git-file-name name version))
946 (sha256
947 (base32
948 "0xr06gi4xcr832rzy0hkp5c1n231s7w5iq1nkjvx9kvm0dl7chpq"))))
949 (build-system copy-build-system)
950 (inputs
951 `(("python" ,python)
952 ("python-xattr" ,python-xattr)
953 ("rsync" ,rsync)))
954 (arguments
955 '(#:install-plan
956 '(("src/" "bin/"))
957 #:phases
958 (modify-phases %standard-phases
959 (add-after 'unpack 'patch-paths
960 (lambda* (#:key inputs #:allow-other-keys)
961 (substitute* (find-files "src" "^mergerfs\\.")
962 (("'rsync'")
963 (string-append "'" (assoc-ref inputs "rsync") "/bin/rsync'"))
964 (("'rm'")
965 (string-append "'" (assoc-ref inputs "coreutils") "/bin/rm'")))
966 (substitute* "src/mergerfs.mktrash"
967 (("xattr")
968 (string-append (assoc-ref inputs "python-xattr") "/bin/xattr"))
969 (("mkdir")
970 (string-append (assoc-ref inputs "coreutils") "/bin/mkdir")))
971 #t)))))
972 (synopsis "Tools to help manage data in a mergerfs pool")
973 (description "mergerfs-tools is a suite of programs that can audit
974 permissions and ownership of files and directories on a mergerfs volume,
975 duplicates files and directories across branches in its pool, find and remove
976 duplicate files, balance pool drives, consolidate files in a single mergerfs
977 directory onto a single drive and create FreeDesktop.org Trash specification
978 compatible directories.")
979 (home-page "https://github.com/trapexit/mergerfs-tools")
980 (license license:isc))))
981
982 (define-public python-dropbox
983 (package
984 (name "python-dropbox")
985 (version "10.3.1")
986 (source
987 (origin
988 (method url-fetch)
989 (uri (pypi-uri "dropbox" version))
990 (sha256
991 (base32
992 "137rn9fs1bg1p1khd5lcccfxh8jsx27dh2ix5wwd8cmddbrzdrbd"))))
993 (build-system python-build-system)
994 (arguments '(#:tests? #f)) ; Tests require a network connection.
995 (native-inputs
996 `(("python-pytest" ,python-pytest)
997 ("python-pytest-runner" ,python-pytest-runner)))
998 (propagated-inputs
999 `(("python-certifi" ,python-certifi)
1000 ("python-chardet" ,python-chardet)
1001 ("python-requests" ,python-requests)
1002 ("python-six" ,python-six)
1003 ("python-urllib3" ,python-urllib3)))
1004 (home-page "https://www.dropbox.com/developers")
1005 (synopsis "Official Dropbox API Client")
1006 (description "This package provides a Python SDK for integrating with the
1007 Dropbox API v2.")
1008 (license license:expat)))
1009
1010 (define-public dbxfs
1011 (package
1012 (name "dbxfs")
1013 (version "1.0.43")
1014 (source
1015 (origin
1016 (method url-fetch)
1017 (uri (pypi-uri "dbxfs" version))
1018 (sha256
1019 (base32
1020 "1f9sy2ax215dxiwszrrcadffjdsmrlxm4kwrbiap9dhxvzm226ks"))
1021 (patches (search-patches "dbxfs-remove-sentry-sdk.patch"))))
1022 (build-system python-build-system)
1023 (arguments
1024 '(#:tests? #f)) ; tests requires safefs
1025 (propagated-inputs
1026 `(("python-appdirs" ,python-appdirs)
1027 ("python-block-tracing" ,python-block-tracing)
1028 ("python-dropbox" ,python-dropbox)
1029 ("python-keyring" ,python-keyring)
1030 ("python-keyrings.alt" ,python-keyrings.alt)
1031 ("python-privy" ,python-privy)
1032 ("python-userspacefs" ,python-userspacefs)))
1033 (home-page "https://github.com/rianhunter/dbxfs")
1034 (synopsis "User-space file system for Dropbox")
1035 (description
1036 "@code{dbxfs} allows you to mount your Dropbox folder as if it were a
1037 local file system using FUSE.")
1038 (license license:gpl3+)))