1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2017, 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
3 ;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
4 ;;; Copyright © 2017, 2018, 2021 Ricardo Wurmus <rekado@elephly.net>
5 ;;; Copyright © 2018 Leo Famulari <leo@famulari.name>
6 ;;; Copyright © 2019, 2020, 2021 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 ;;; Copyright © 2021 raid5atemyhomework <raid5atemyhomework@protonmail.com>
10 ;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
12 ;;; This file is part of GNU Guix.
14 ;;; GNU Guix is free software; you can redistribute it and/or modify it
15 ;;; under the terms of the GNU General Public License as published by
16 ;;; the Free Software Foundation; either version 3 of the License, or (at
17 ;;; your option) any later version.
19 ;;; GNU Guix is distributed in the hope that it will be useful, but
20 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;;; GNU General Public License for more details.
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27 (define-module (gnu packages file-systems)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix packages)
30 #:use-module (guix download)
31 #:use-module (guix git-download)
32 #:use-module (guix build-system cmake)
33 #:use-module (guix build-system copy)
34 #:use-module (guix build-system gnu)
35 #:use-module (guix build-system go)
36 #:use-module (guix build-system linux-module)
37 #:use-module (guix build-system python)
38 #:use-module (guix build-system trivial)
39 #:use-module (guix utils)
40 #:use-module (gnu packages)
41 #:use-module (gnu packages acl)
42 #:use-module (gnu packages attr)
43 #:use-module (gnu packages autotools)
44 #:use-module (gnu packages base)
45 #:use-module (gnu packages bison)
46 #:use-module (gnu packages check)
47 #:use-module (gnu packages compression)
48 #:use-module (gnu packages crypto)
49 #:use-module (gnu packages curl)
50 #:use-module (gnu packages cyrus-sasl)
51 #:use-module (gnu packages datastructures)
52 #:use-module (gnu packages documentation)
53 #:use-module (gnu packages docbook)
54 #:use-module (gnu packages flex)
55 #:use-module (gnu packages gawk)
56 #:use-module (gnu packages glib)
57 #:use-module (gnu packages gnupg)
58 #:use-module (gnu packages golang)
59 #:use-module (gnu packages kerberos)
60 #:use-module (gnu packages libffi)
61 #:use-module (gnu packages linux)
62 #:use-module (gnu packages nfs)
63 #:use-module (gnu packages onc-rpc)
64 #:use-module (gnu packages openldap)
65 #:use-module (gnu packages photo)
66 #:use-module (gnu packages pkg-config)
67 #:use-module (gnu packages python)
68 #:use-module (gnu packages python-crypto)
69 #:use-module (gnu packages python-web)
70 #:use-module (gnu packages python-xyz)
71 #:use-module (gnu packages readline)
72 #:use-module (gnu packages rsync)
73 #:use-module (gnu packages sssd)
74 #:use-module (gnu packages sqlite)
75 #:use-module (gnu packages tls)
76 #:use-module (gnu packages valgrind)
77 #:use-module (gnu packages version-control)
78 #:use-module (gnu packages xml))
87 (uri (string-append "mirror://kernel.org/linux/daemons/autofs/"
88 "v" (version-major version) "/"
89 "autofs-" version ".tar.xz"))
91 (base32 "1myfz6a3wj2c4j9h5g44zj796fdi82jhp1s92w2hg6xp2632csx3"))))
92 (build-system gnu-build-system)
95 (list "--enable-ignore-busy" ; during shutdown
96 "--enable-sloppy-mount" ; support mount(8) -s
98 (string-append "--with-openldap="
99 (assoc-ref %build-inputs "openldap"))
100 (string-append "--with-sasl="
101 (assoc-ref %build-inputs "cyrus-sasl"))
102 "HAVE_SSS_AUTOFS=1" ; required to make sssldir click
103 (string-append "sssldir="
104 (assoc-ref %build-inputs "sssd")
105 "/lib/sssd/modules"))
106 #:tests? #f ; no test suite
108 (modify-phases %standard-phases
109 (add-before 'configure 'fix-hard-coded-search-path
111 (substitute* "configure"
112 (("^searchpath=\".*\"")
113 "searchpath=\"$PATH\""))
115 (add-before 'configure 'fix-rpath
116 (lambda* (#:key outputs #:allow-other-keys)
117 (let ((out (assoc-ref outputs "out")))
118 (substitute* "Makefile.rules"
119 (("^AUTOFS_LIB_LINK.*=" match)
120 (string-append match " -Wl,-rpath=" out "/lib"))))))
121 (add-before 'install 'omit-obsolete-lookup_nis.so-link
122 ;; Building lookup_yp.so depends on $(YPCLNT) but this doesn't,
123 ;; leading to a make error. Since it's broken, comment it out.
125 (substitute* "modules/Makefile"
126 (("ln -fs lookup_yp.so" match)
127 (string-append "# " match)))
132 ("pkg-config" ,pkg-config)
133 ("rpcsvc-proto" ,rpcsvc-proto)))
135 `(("cyrus-sasl" ,cyrus-sasl)
136 ("e2fsprogs" ,e2fsprogs) ; for e[234]fsck
137 ("libtirpc" ,libtirpc)
138 ("libxml2" ,libxml2) ; needed for LDAP, SASL
139 ("mit-krb5" ,mit-krb5) ; needed for LDAP, SASL
140 ("nfs-utils" ,nfs-utils) ; for mount.nfs
141 ("openldap" ,openldap)
142 ("openssl" ,openssl) ; needed for SASL
144 ("util-linux" ,util-linux))) ; for mount, umount
145 ;; XXX A directory index is the closest thing this has to a home page.
146 (home-page "https://www.kernel.org/pub/linux/daemons/autofs/")
147 (synopsis "Kernel-based automounter for Linux")
149 "Autofs is a kernel-based automounter for use with the Linux autofs4
150 module. It automatically mounts selected file systems when they are used and
151 unmounts them after a set period of inactivity. This provides
152 centrally-managed, consistent file names for users and applications, even in a
153 large and/or frequently changing (network) environment.")
154 ;; fedfs/ is GPL-2-only but not built.
155 (license (list license:bsd-3 ; modules/cyrus-sasl.c
156 license:gpl2+)))) ; the rest
158 (define-public bindfs
164 (uri (string-append "https://bindfs.org/downloads/bindfs-"
168 "1av8dj9i1g0105fs5r9srqqsp7yahlhwc0yl8i1szyfdls23bp84"))))
169 (build-system gnu-build-system)
171 ;; XXX: The tests have no hope of passing until there is a "nogroup"
172 ;; entry (or at least some group to which the guix builder does
173 ;; not belong) in the /etc/group file of the build environment.
174 ;; Currently we do not have such a group. Disable tests for now.
177 ;; Native inputs to run the tests
179 ;; ("valgrind" ,valgrind)
181 `(("pkg-config" ,pkg-config)))
184 (home-page "https://bindfs.org")
185 (synopsis "Bind mount a directory and alter permission bits")
187 "@command{bindfs} is a FUSE filesystem for mounting a directory to
188 another location, similar to @command{mount --bind}. It can be used for:
190 @item Making a directory read-only.
191 @item Making all executables non-executable.
192 @item Sharing a directory with a list of users (or groups).
193 @item Modifying permission bits using rules with chmod-like syntax.
194 @item Changing the permissions with which files are created.
196 (license license:gpl2+)))
198 (define-public davfs2
205 (uri (string-append "https://download.savannah.nongnu.org/releases/"
206 "davfs2/davfs2-" version ".tar.gz"))
208 (base32 "0l1vnv5lfigciwg17p10zxwhzj4qw2d9kw30prr7g4dxhmb6fsrf"))))
209 (build-system gnu-build-system)
212 (list "--sysconfdir=/etc" ; so man pages & binaries contain /etc
213 (string-append "--docdir=" (assoc-ref %outputs "out")
214 "/share/doc/" ,name "-" ,version)
215 (string-append "ssbindir=" (assoc-ref %outputs "out") "/sbin")
216 ;; The default ‘davfs2’ user and group don't exist on most systems.
220 (modify-phases %standard-phases
221 (add-after 'unpack 'omit-redundancy
222 ;; Don't install redundant copies of /etc examples into /share.
224 (substitute* "etc/Makefile.in"
225 (("(dist_pkgdata_DATA =.*) davfs2.conf secrets(.*)"
227 (string-append prefix suffix)))
229 (add-after 'unpack 'patch-file-names
231 ;; Don't auto-load the FUSE kernel module. That's up to root.
232 ;; XXX If/when we restore the previous behaviour, make sure not
233 ;; to introduce a security hole when mount.davfs is setuid.
234 (substitute* "src/kernel_interface.c"
235 (("/sbin/modprobe") "/modprobe/disabled"))
238 (lambda* (#:key make-flags outputs #:allow-other-keys)
239 (let ((out (assoc-ref outputs "out")))
240 (apply invoke "make" "install"
241 (string-append "pkgsysconfdir=" out "/etc")
246 ;; Neon requires but doesn't propagate zlib, nor would we want that.
247 ;; XZ as well, but that's already present in the build environment.
249 (home-page "https://savannah.nongnu.org/projects/davfs2")
250 (synopsis "Mount remote WebDAV resources in the local file system")
252 "The @acronym{WebDAV, Web Distributed Authoring and Versioning} extension
253 to the HTTP protocol defines a standard way to author resources on a remote Web
254 server. Davfs2 exposes such resources as a typical file system which can be
255 used by standard applications with no built-in support for WebDAV, such as the
256 GNU coreutils (@command{cp}, @command{mv}, etc.) or a graphical word processor.
258 Davfs2 works with most WebDAV servers with no or little configuration. It
259 supports TLS (HTTPS), HTTP proxies, HTTP basic and digest authentication, and
260 client certificates. It performs extensive caching to avoid unnecessary network
261 traffic, stay responsive even over slow or unreliable connections, and prevent
262 data loss. It aims to make use by unprivileged users as easy and secure as
265 However, davfs2 is not a full-featured WebDAV client. The file system interface
266 and the WebDAV protocol are quite different. Translating between the two is not
268 (license (list license:bsd-2 ; src/fuse_kernel.h
269 license:gpl3+)))) ; everything else
271 (define-public fsarchiver
280 (url "https://github.com/fdupoux/fsarchiver")
282 (file-name (git-file-name name version))
284 (base32 "1ry2sdkfbg4bwcldk42g1i3wa3z4pr9yh9dil6ilhwcvhqiw41zc"))))
285 (build-system gnu-build-system)
287 `(("autoconf" ,autoconf)
288 ("automake" ,automake)
289 ("pkg-config" ,pkg-config)))
292 ("e2fsprogs" ,e2fsprogs)
293 ("libgcrypt" ,libgcrypt)
296 ("util-linux" ,util-linux "lib")
299 ("zstd:lib" ,zstd "lib")))
300 (synopsis "File system back-up, deployment, and migration tool")
302 "FSArchiver saves the contents of a file system to a compressed archive
303 file, and restores it to a different file system and/or partition. This
304 partition can be of a different size than the original and FSArchiver will
305 create a new file system if none exists.
307 All standard file attributes supported by the kernel are preserved, including
308 file permissions, timestamps, symbolic and hard links, and extended attributes.
310 Each file in the archive is protected by a checksum. If part of the archive
311 is corrupted you'll lose the affected file(s) but not the whole back-up.")
312 (home-page "https://www.fsarchiver.org/")
313 (license license:gpl2)))
315 (define-public gphotofs
323 (string-append "mirror://sourceforge/gphoto/gphotofs/" version
324 "/gphotofs-0.5.tar.gz"))
327 "04slwhr6ap9xcc27wphk22ad8yn79ngyy5z10lxams3k5liahvc2"))))
328 (build-system gnu-build-system)
330 `(("pkg-config" ,pkg-config)))
334 ("libgphoto2" ,libgphoto2)))
335 (synopsis "Virtual file system for libgphoto2 using FUSE")
336 (description "GPhotoFS is a FUSE file system module to mount your camera as
337 a file system on Linux. This allow using your camera with any tool able to read
338 from a mounted file system.")
339 (home-page "http://www.gphoto.org/proj/gphotofs/")
340 (license license:gpl2+)))
342 (define-public bcachefs-tools
343 (let ((commit "bb6eccc2ecd4728871bfc70462d3a4a20daa9d68")
346 (name "bcachefs-tools")
347 (version (git-version "0.1" revision commit))
352 (url "https://evilpiepirate.org/git/bcachefs-tools.git")
354 (file-name (git-file-name name version))
356 (base32 "0ziqmcxbrak6bjck6s46hqrqx44zc97yaj0kbk3amsxf18rsfs0n"))))
357 (build-system gnu-build-system)
360 (list ,(string-append "VERSION=" version) ; bogus vX.Y-nogit otherwise
361 (string-append "PREFIX=" (assoc-ref %outputs "out"))
362 "INITRAMFS_DIR=$(PREFIX)/share/initramfs-tools"
366 (modify-phases %standard-phases
367 (delete 'configure) ; no configure script
368 (add-after 'install 'promote-mount.bcachefs.sh
369 ;; XXX The (optional) mount.bcachefs helper requires rust:cargo.
370 ;; This alternative shell script does the job well enough for now.
371 (lambda* (#:key inputs outputs #:allow-other-keys)
372 (let ((out (assoc-ref outputs "out")))
373 (with-directory-excursion (string-append out "/sbin")
374 (rename-file "mount.bcachefs.sh" "mount.bcachefs")
375 ;; WRAP-SCRIPT causes bogus ‘Insufficient arguments’ errors.
376 (wrap-program "mount.bcachefs"
378 ,(cons (string-append out "/sbin")
380 (string-append (assoc-ref inputs input)
384 "util-linux"))))))))))
385 #:tests? #f)) ; XXX 6 valgrind tests fail
387 `(("pkg-config" ,pkg-config)
390 ("python-pytest" ,python-pytest)
391 ("valgrind" ,valgrind)))
394 ("keyutils" ,keyutils)
396 ("libscrypt" ,libscrypt)
397 ("libsodium" ,libsodium)
399 ("util-linux:lib" ,util-linux "lib") ; lib{blkid,uuid}
402 ("zstd:lib" ,zstd "lib")
404 ;; Only for mount.bcachefs.sh.
405 ("coreutils" ,coreutils-minimal)
407 ("util-linux" ,util-linux)))
408 (home-page "https://bcachefs.org/")
409 (synopsis "Tools to create and manage bcachefs file systems")
411 "The bcachefs-tools are command-line utilities for creating, checking,
412 and otherwise managing bcachefs file systems.
414 Bcachefs is a @acronym{CoW, copy-on-write} file system supporting native
415 encryption, compression, snapshots, and (meta)data checksums. It can use
416 multiple block devices for replication and/or performance, similar to RAID.
418 In addition, bcachefs provides all the functionality of bcache, a block-layer
419 caching system, and lets you assign different roles to each device based on its
420 performance and other characteristics.")
421 (license license:gpl2+))))
423 (define-public bcachefs-tools/static
425 (inherit bcachefs-tools)
426 (name "bcachefs-tools-static")
428 (substitute-keyword-arguments (package-arguments bcachefs-tools)
429 ((#:make-flags make-flags)
431 (list "LDFLAGS=-static")))))
433 `(("eudev:static" ,eudev "static")
434 ("libscrypt:static" ,libscrypt "static")
435 ("lz4:static" ,lz4 "static")
436 ("util-linux:static" ,util-linux "static") ; lib{blkid,uuid}
437 ("zlib" ,zlib "static")
438 ("zstd:static" ,zstd "static")
439 ,@(package-inputs bcachefs-tools)))))
441 (define-public bcachefs/static
443 (name "bcachefs-static")
444 (version (package-version bcachefs-tools))
445 (build-system trivial-build-system)
448 `(("bcachefs-tools" ,bcachefs-tools/static)))
450 `(#:modules ((guix build utils))
453 (use-modules (guix build utils)
456 (let* ((bcachefs-tools (assoc-ref %build-inputs "bcachefs-tools"))
457 (out (assoc-ref %outputs "out")))
459 (with-directory-excursion out
460 (install-file (string-append bcachefs-tools
463 (remove-store-references "sbin/bcachefs")
464 (invoke "sbin/bcachefs" "version") ; test suite
466 (home-page (package-home-page bcachefs-tools))
467 (synopsis "Statically-linked bcachefs command from bcachefs-tools")
468 (description "This package provides the statically-linked @command{bcachefs}
469 from the bcachefs-tools package. It is meant to be used in initrds.")
470 (license (package-license bcachefs-tools))))
472 (define-public exfatprogs
480 (url "https://github.com/exfatprogs/exfatprogs")
482 (file-name (git-file-name name version))
484 (base32 "1ciy28lx7c1vr1f138qi0mkz88pzlkay6nlwmp1yjzd830x48549"))))
485 (build-system gnu-build-system)
488 (list "--disable-static")))
490 `(("autoconf" ,autoconf)
491 ("automake" ,automake)
493 ("pkg-config" ,pkg-config)))
494 (home-page "https://github.com/exfatprogs/exfatprogs")
495 (synopsis "Tools to create, check, and repair exFAT file systems")
497 "These are command-line user space tools for the @acronym{exFAT,
498 Extensible File Allocation Table} file systems. Included are
499 @command{mkfs.exfat} to create (format) new exFAT file systems, and
500 @command{fsck.exfat} to check their consistency and repair them.")
501 (license license:gpl2+)))
503 (define-public httpfs2
510 (uri (string-append "mirror://sourceforge/httpfs/httpfs2/"
511 "httpfs2-" version ".tar.gz"))
514 "1h8ggvhw30n2r6w11n1s458ypggdqx6ldwd61ma4yd7binrlpjq1"))))
515 (build-system gnu-build-system)
517 `(("asciidoc" ,asciidoc)
518 ("docbook-xml" ,docbook-xml)
521 ("pkg-config" ,pkg-config)))
527 (modify-phases %standard-phases
528 (delete 'configure) ; no configure script
530 ;; There's no ‘install’ target. Install all variants manually.
531 (lambda* (#:key outputs #:allow-other-keys)
532 (let* ((out (assoc-ref outputs "out"))
533 (bin (string-append out "/bin"))
534 (man1 (string-append out "/share/man/man1")))
539 (let ((man1-page (string-append variant ".1")))
540 (install-file variant bin)
541 (install-file man1-page man1)))
547 #:make-flags (list "CC=gcc")
548 #:parallel-build? #f ; can result in missing man pages
549 #:tests? #f)) ; no tests
550 (home-page "https://sourceforge.net/projects/httpfs/")
551 (synopsis "Mount remote files over HTTP")
552 (description "httpfs2 is a @code{fuse} file system for mounting any
553 @dfn{HyperText} (HTTP or HTTPS) URL. It uses HTTP/1.1 byte ranges to request
554 arbitrary bytes from the web server, without needing to download the entire
555 file. This is particularly useful with large archives such as ZIP files and
556 ISO images when you only need to inspect their contents or extract specific
557 files. Since the HTTP protocol itself has no notion of directories, only a
558 single file can be mounted.")
559 (license license:gpl2+)))
561 (define-public jfsutils
568 (uri (string-append "http://jfs.sourceforge.net/project/pub/jfsutils-"
571 (base32 "0kbsy2sk1jv4m82rxyl25gwrlkzvl3hzdga9gshkxkhm83v1aji4"))
572 (patches (search-patches "jfsutils-add-sysmacros.patch"
573 "jfsutils-include-systypes.patch"))))
574 (build-system gnu-build-system)
576 `(("util-linux" ,util-linux "lib")))
577 (home-page "http://jfs.sourceforge.net/home.html")
578 (synopsis "Utilities for managing JFS file systems")
580 "The JFSutils are a collection of utilities for managing the @acronym{JFS,
581 Journaled File System}, a 64-bit journaling file system created by IBM and later
582 ported to the kernel Linux. The following commands are available:
584 @item @command{fsck.jfs}: check and repair a JFS file system or replay its
586 @item @command{logdump}: dump the JFS journal log.
587 @item @command{logredo}: replay the JFS journal log.
588 @item @command{mkfs.jfs}: create a new JFS file system.
589 @item @command{xchklog}: save a JFS fsck log to a file.
590 @item @command{xchkdmp}: dump the contents of such a log file.
591 @item @command{xpeek}: a JFS file system editor with a shell-like interface.
593 (license license:gpl3+))) ; no explicit version given
595 (define-public jfsutils/static
599 (name "jfsutils-static")
601 `(("util-linux:static" ,util-linux "static")
602 ,@(package-inputs jfsutils))))))
604 (define-public jfs_fsck/static
606 (name "jfs_fsck-static")
607 (version (package-version jfsutils))
609 (build-system trivial-build-system)
611 `(#:modules ((guix build utils))
614 (use-modules (guix build utils)
617 (let* ((jfsutils (assoc-ref %build-inputs "jfsutils"))
619 (out (assoc-ref %outputs "out"))
620 (sbin (string-append out "/sbin")))
622 (with-directory-excursion sbin
623 (install-file (string-append jfsutils "/sbin/" fsck)
625 (remove-store-references fsck)
629 `(("jfsutils" ,jfsutils/static)))
630 (home-page (package-home-page jfsutils))
631 (synopsis "Statically-linked jfs_fsck command from jfsutils")
632 (description "This package provides statically-linked jfs_fsck command taken
633 from the jfsutils package. It is meant to be used in initrds.")
634 (license (package-license jfsutils))))
636 (define-public disorderfs
644 (url "https://salsa.debian.org/reproducible-builds/disorderfs.git")
646 (file-name (git-file-name name version))
649 "1pnrj0h8sgqwgsc18vz3fkqsp6vhigdbi75vdj0si1r6wgslnr7z"))))
650 (build-system gnu-build-system)
652 `(("pkg-config" ,pkg-config)))
657 `(#:phases (modify-phases %standard-phases
658 (delete 'configure)) ; no configure script
659 #:make-flags (let ((out (assoc-ref %outputs "out")))
660 (list (string-append "PREFIX=" out)))
662 ;; FIXME: Tests require 'run-parts' which is not in Guix yet.
664 (home-page "https://salsa.debian.org/reproducible-builds/disorderfs")
665 (synopsis "FUSE file system that introduces non-determinism")
667 "An overlay FUSE file system that introduces non-determinism
668 into file system metadata. For example, it can randomize the order
669 in which directory entries are read. This is useful for detecting
670 non-determinism in the build process.")
671 (license license:gpl3+)))
673 (define-public glusterfs
680 (uri (string-append "https://download.gluster.org/pub/gluster/glusterfs/"
681 (version-major version) "/"
682 (version-major+minor version) "/"
683 "glusterfs-" version ".tar.gz"))
686 "0yzhx710ypj0j3m5dcgmmgvkp7p0rmmp2p7ld0axrm4vpwc2b1wa"))))
687 (build-system gnu-build-system)
690 (let ((out (assoc-ref %outputs "out"))
691 (p2 (assoc-ref %build-inputs "python-2")))
692 (list (string-append "PYTHON=" p2 "/bin/python")
693 (string-append "--with-initdir=" out "/etc/init.d")
694 (string-append "--with-mountutildir=" out "/sbin")
695 "--enable-cmocka" ; unit tests
696 ;; "--enable-debug" ; debug build options
697 ;; "--enable-asan" ; Address Sanitizer
698 ;; "--enable-tsan" ; ThreadSanitizer
701 (modify-phases %standard-phases
702 (add-before 'configure 'autogen
703 (lambda _ (invoke "./autogen.sh"))))))
705 `(("pkg-config" ,pkg-config)
706 ("libtirpc" ,libtirpc)
707 ("rpcsvc-proto" ,rpcsvc-proto)
708 ("python-2" ,python-2) ; must be version 2
712 ("autoconf" ,autoconf)
713 ("automake" ,automake)
720 ("libuuid" ,util-linux "lib")
722 ("readline" ,readline)
725 ("rdma-core" ,rdma-core)))
726 (home-page "https://www.gluster.org")
727 (synopsis "Distributed file system")
728 (description "GlusterFS is a distributed scalable network file system
729 suitable for data-intensive tasks such as cloud storage and media streaming.
730 It allows rapid provisioning of additional storage based on your storage
731 consumption needs. It incorporates automatic failover as a primary feature.
732 All of this is accomplished without a centralized metadata server.")
733 ;; The user may choose either LGPLv3+ or GPLv2 only.
734 (license (list license:lgpl3+ license:gpl2+))))
736 (define-public curlftpfs
743 (uri (string-append "mirror://sourceforge/curlftpfs/curlftpfs/" version
744 "/curlftpfs-" version ".tar.gz"))
747 "0n397hmv21jsr1j7zx3m21i7ryscdhkdsyqpvvns12q7qwwlgd2f"))))
748 (build-system gnu-build-system)
751 (modify-phases %standard-phases
752 (add-after 'unpack 'fix-test
754 ;; One of the 512-Byte block counts is definitely wrong.
755 ;; See <https://sourceforge.net/p/curlftpfs/bugs/73/>.
756 (substitute* "tests/ftpfs-ls_unittest.c"
757 (("4426192") "12814800"))
764 `(("pkg-config" ,pkg-config)))
765 (home-page "http://curlftpfs.sourceforge.net/")
766 (synopsis "Mount remote file systems over FTP")
768 "This is a file system client based on the FTP File Transfer Protocol.")
769 (license license:gpl2+)))
771 (define-public libnfs
778 (url "https://github.com/sahlberg/libnfs")
779 (commit (string-append "libnfs-" version))))
780 (file-name (git-file-name name version))
783 "115p55y2cbs92z5lmcnjx1v29lwinpgq4sha9v1kq1vd8674h404"))))
784 (build-system gnu-build-system)
785 (home-page "https://github.com/sahlberg/libnfs")
787 `(("autoconf" ,autoconf)
788 ("automake" ,automake)
790 ("pkg-config" ,pkg-config)))
791 (synopsis "Client library for accessing NFS shares")
792 (description "LIBNFS is a client library for accessing NFS shares over a
793 network. LIBNFS offers three different APIs, for different use :
796 @item RAW, a fully asynchronous low level RPC library for NFS protocols. This
797 API provides very flexible and precise control of the RPC issued.
798 @item NFS ASYNC, a fully asynchronous library for high level vfs functions
799 @item NFS SYNC, a synchronous library for high level vfs functions.
801 (license (list license:lgpl2.1+ ; library
802 license:gpl3+ ; tests
803 license:bsd-3 ; copied nsf4 files
806 (define-public apfs-fuse
807 ;; Later versions require FUSE 3.
808 (let ((commit "7b89418e8dc27103d3c4f8fa348086ffcd634c17")
812 (version (git-version "0.0.0" revision commit))
816 (url "https://github.com/sgan81/apfs-fuse")
817 (recursive? #t) ; for lzfse
821 "0x2siy3cmnm9wsdfazg3xc8r3kbg73gijmnn1vjw33pp71ckylxr"))
822 (file-name (git-file-name name version))))
823 (build-system cmake-build-system)
825 `(#:tests? #f ; No test suite
827 '("-DUSE_FUSE3=OFF") ; FUSE 3 is not packaged yet.
829 (modify-phases %standard-phases
830 ;; No 'install' target in CMakeLists.txt
832 (lambda* (#:key outputs #:allow-other-keys)
833 (let* ((out (assoc-ref outputs "out"))
834 (bin (string-append out "/bin"))
835 (lib (string-append out "/lib"))
836 (doc (string-append out "/share/doc/"
837 (string-append ,name "-" ,version))))
838 (install-file "apfs-dump" bin)
839 (install-file "apfs-dump-quick" bin)
840 (install-file "apfs-fuse" bin)
841 (install-file "libapfs.a" lib)
842 (install-file "../source/README.md" doc)
848 (synopsis "Read-only FUSE driver for the APFS file system")
849 (description "APFS-FUSE is a read-only FUSE driver for the @dfn{Apple File
850 System} (APFS). It is currently in an experimental state — it may not be able
851 to read all files, and it does not support all the compression methods in
853 (home-page "https://github.com/sgan81/apfs-fuse")
854 (license license:gpl2+))))
860 (outputs '("out" "module" "src"))
864 (uri (string-append "https://github.com/zfsonlinux/zfs/releases"
865 "/download/zfs-" version
866 "/zfs-" version ".tar.gz"))
868 (base32 "0v2zshimz5miyj8mbskb52pnzyl1s4rhpr6208zq549v8g2l84vx"))))
869 (build-system linux-module-build-system)
871 `(;; The ZFS kernel module should not be downloaded since the license
872 ;; terms don't allow for distributing it, only building it locally.
874 ;; Tests cannot run in an unprivileged build environment.
877 (modify-phases %standard-phases
878 (add-after 'configure 'really-configure
879 (lambda* (#:key outputs inputs #:allow-other-keys)
880 (let ((out (assoc-ref outputs "out")))
881 (substitute* "configure"
882 (("-/bin/sh") (string-append "-" (which "sh"))))
883 (invoke "./configure"
885 (string-append "--prefix=" out)
886 (string-append "--with-dracutdir=" out "/lib/dracut")
887 (string-append "--with-udevdir=" out "/lib/udev")
888 (string-append "--with-mounthelperdir=" out "/sbin")
889 (string-append "--with-linux="
890 (assoc-ref inputs "linux-module-builder")
891 "/lib/modules/build")))))
892 (add-after 'unpack 'patch-source
893 (lambda* (#:key inputs outputs #:allow-other-keys)
894 (let ((out (assoc-ref outputs "out"))
895 (src (assoc-ref outputs "src"))
896 (util-linux (assoc-ref inputs "util-linux"))
897 (nfs-utils (assoc-ref inputs "nfs-utils"))
898 (kmod (assoc-ref inputs "kmod-runtime")))
899 (substitute* "etc/Makefile.in"
900 ;; This just contains an example configuration file for
901 ;; configuring ZFS on traditional init systems, skip it
902 ;; since we cannot use it anyway; the install target becomes
904 (("= default ") "= "))
905 (substitute* "lib/libzfs/os/linux/libzfs_util_os.c"
906 ;; Use path to /gnu/store/*-kmod in actual path that is exec'ed.
907 (("\"/sbin/modprobe\"")
908 (string-append "\"" kmod "/bin/modprobe" "\""))
909 ;; Just use 'modprobe' in message to user, since Guix
910 ;; does not have a traditional /sbin/
911 (("'/sbin/modprobe ") "'modprobe "))
912 (substitute* "contrib/Makefile.in"
913 ;; This is not configurable nor is its hard-coded /usr prefix.
915 (substitute* "module/os/linux/zfs/zfs_ctldir.c"
916 (("/usr/bin/env\", \"umount")
917 (string-append util-linux "/bin/umount\", \"-n"))
918 (("/usr/bin/env\", \"mount")
919 (string-append util-linux "/bin/mount\", \"-n")))
920 (substitute* "lib/libzfs/os/linux/libzfs_mount_os.c"
921 (("/bin/mount") (string-append util-linux "/bin/mount"))
922 (("/bin/umount") (string-append util-linux "/bin/umount")))
923 (substitute* "lib/libshare/os/linux/nfs.c"
924 (("/usr/sbin/exportfs")
925 (string-append nfs-utils "/sbin/exportfs")))
926 (substitute* "config/zfs-build.m4"
927 (("\\$sysconfdir/init.d") (string-append out "/etc/init.d")))
928 (substitute* '("etc/zfs/Makefile.am"
929 "cmd/zed/Makefile.am")
930 (("\\$\\(sysconfdir)") (string-append out "/etc")))
931 (substitute* "cmd/vdev_id/vdev_id"
932 (("PATH=/bin:/sbin:/usr/bin:/usr/sbin")
933 (string-append "PATH="
934 (dirname (which "chmod")) ":"
935 (dirname (which "grep")) ":"
936 (dirname (which "sed")) ":"
937 (dirname (which "gawk")))))
938 (substitute* "contrib/pyzfs/Makefile.in"
939 ((".*install-lib.*") ""))
940 (substitute* '("Makefile.am" "Makefile.in")
941 (("\\$\\(prefix)/src") (string-append src "/src")))
942 (substitute* (find-files "udev/rules.d/" ".rules.in$")
943 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))))
946 (lambda _ (invoke "make")))
948 (lambda* (#:key outputs inputs native-inputs #:allow-other-keys)
949 (let* ((out (assoc-ref outputs "out"))
950 (moddir (assoc-ref outputs "module"))
951 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
952 (invoke "make" "install"
953 (string-append "DEFAULT_INITCONF_DIR=" out "/etc/default")
954 (string-append "DEPMOD=" kmod "/bin/depmod")
955 (string-append "INSTALL_PATH=" out)
956 (string-append "INSTALL_MOD_PATH=" moddir)
957 "INSTALL_MOD_STRIP=1")
958 (install-file "contrib/bash_completion.d/zfs"
959 (string-append out "/share/bash-completion/completions"))
964 ("pkg-config" ,pkg-config)))
967 ("kmod-runtime" ,kmod)
969 ("libtirpc" ,libtirpc)
970 ("nfs-utils" ,nfs-utils)
973 ("python-cffi" ,python-cffi)
974 ("util-linux" ,util-linux)
975 ("util-linux:lib" ,util-linux "lib")
977 (home-page "https://zfsonlinux.org/")
978 (synopsis "OpenZFS on Linux")
980 "OpenZFS is an advanced file system and volume manager which was
981 originally developed for Solaris and is now maintained by the OpenZFS
983 (license license:cddl1.0)))
985 (define-public mergerfs
992 (uri (string-append "https://github.com/trapexit/mergerfs/releases/download/"
993 version "/mergerfs-" version ".tar.gz"))
996 "0yz7nljx6axcj6hb09sgc0waspgfhp535228rjqvqgyd8y74jc3s"))))
997 (build-system gnu-build-system)
999 `(#:tests? #f ; No tests exist.
1001 (modify-phases %standard-phases
1003 (add-after 'unpack 'fix-paths
1004 (lambda* (#:key inputs outputs #:allow-other-keys)
1006 ;; These were copied from the package libfuse.
1007 (substitute* '("libfuse/lib/mount_util.c" "libfuse/util/mount_util.c")
1008 (("/bin/(u?)mount" _ maybe-u)
1009 (string-append (assoc-ref inputs "util-linux")
1010 "/bin/" maybe-u "mount")))
1011 (substitute* '("libfuse/util/mount.mergerfs.c")
1014 ;; The Makefile does not allow overriding PREFIX via make variables.
1015 (substitute* '("Makefile" "libfuse/Makefile")
1016 (("= /usr/local") (string-append "= " (assoc-ref outputs "out")))
1017 (("= /sbin") "= $(EXEC_PREFIX)/sbin")
1018 ;; cannot chown as build user
1019 (("chown root(:root)?") "true"))
1021 ;; mergerfs bundles a heavily modified copy of libfuse.
1022 (inputs `(("util-linux" ,util-linux)))
1023 (home-page "https://github.com/trapexit/mergerfs")
1024 (synopsis "Featureful union file system")
1025 (description "mergerfs is a union file system geared towards simplifying
1026 storage and management of files across numerous commodity storage devices. It
1027 is similar to mhddfs, unionfs, and aufs.")
1029 license:isc ; mergerfs
1030 license:gpl2 license:lgpl2.0 ; Imported libfuse code.
1033 (define-public mergerfs-tools
1034 (let ((commit "480296ed03d1c3c7909697d7ef96d35840ee26b8")
1037 (name "mergerfs-tools")
1038 ;; No released version exists.
1039 (version (git-version "0.0" revision commit))
1044 (url "https://github.com/trapexit/mergerfs-tools")
1046 (file-name (git-file-name name version))
1049 "0xr06gi4xcr832rzy0hkp5c1n231s7w5iq1nkjvx9kvm0dl7chpq"))))
1050 (build-system copy-build-system)
1052 `(("python" ,python)
1053 ("python-xattr" ,python-xattr)
1059 (modify-phases %standard-phases
1060 (add-after 'unpack 'patch-paths
1061 (lambda* (#:key inputs #:allow-other-keys)
1062 (substitute* (find-files "src" "^mergerfs\\.")
1064 (string-append "'" (assoc-ref inputs "rsync") "/bin/rsync'"))
1066 (string-append "'" (assoc-ref inputs "coreutils") "/bin/rm'")))
1067 (substitute* "src/mergerfs.mktrash"
1069 (string-append (assoc-ref inputs "python-xattr") "/bin/xattr"))
1071 (string-append (assoc-ref inputs "coreutils") "/bin/mkdir")))
1073 (synopsis "Tools to help manage data in a mergerfs pool")
1074 (description "mergerfs-tools is a suite of programs that can audit
1075 permissions and ownership of files and directories on a mergerfs volume,
1076 duplicates files and directories across branches in its pool, find and remove
1077 duplicate files, balance pool drives, consolidate files in a single mergerfs
1078 directory onto a single drive and create FreeDesktop.org Trash specification
1079 compatible directories.")
1080 (home-page "https://github.com/trapexit/mergerfs-tools")
1081 (license license:isc))))
1083 (define-public python-dropbox
1085 (name "python-dropbox")
1090 (uri (pypi-uri "dropbox" version))
1093 "16bxx9xqx2s4d9khrw57a0bj4q7nc6kq355wl4pfddn9cqvh9rg2"))))
1094 (build-system python-build-system)
1095 (arguments '(#:tests? #f)) ; Tests require a network connection.
1097 `(("python-pytest" ,python-pytest)
1098 ("python-pytest-runner" ,python-pytest-runner)))
1100 `(("python-certifi" ,python-certifi)
1101 ("python-chardet" ,python-chardet)
1102 ("python-requests" ,python-requests)
1103 ("python-six" ,python-six)
1104 ("python-stone" ,python-stone)
1105 ("python-urllib3" ,python-urllib3)))
1106 (home-page "https://www.dropbox.com/developers")
1107 (synopsis "Official Dropbox API Client")
1108 (description "This package provides a Python SDK for integrating with the
1110 (license license:expat)))
1112 (define-public dbxfs
1119 (uri (pypi-uri "dbxfs" version))
1122 "1zz82d0mnql55397x4jx7z5rn857rf9zhjv895j93wpxdq10xwvk"))
1123 (patches (search-patches "dbxfs-remove-sentry-sdk.patch"))))
1124 (build-system python-build-system)
1126 '(#:tests? #f)) ; tests requires safefs
1128 `(("python-appdirs" ,python-appdirs)
1129 ("python-block-tracing" ,python-block-tracing)
1130 ("python-dropbox" ,python-dropbox)
1131 ("python-keyring" ,python-keyring)
1132 ("python-keyrings.alt" ,python-keyrings.alt)
1133 ("python-privy" ,python-privy)
1134 ("python-userspacefs" ,python-userspacefs)))
1135 (home-page "https://github.com/rianhunter/dbxfs")
1136 (synopsis "User-space file system for Dropbox")
1138 "@code{dbxfs} allows you to mount your Dropbox folder as if it were a
1139 local file system using FUSE.")
1140 (license license:gpl3+)))
1142 (define-public go-github-com-hanwen-fuse
1144 (name "go-github-com-hanwen-fuse")
1150 (url "https://github.com/hanwen/go-fuse")
1151 (commit (string-append "v" version))))
1152 (file-name (git-file-name name version))
1155 "1y44d08fxyis99s6jxdr6dbbw5kv3wb8lkhq3xmr886i4w41lz03"))))
1156 (build-system go-build-system)
1158 `(#:import-path "github.com/hanwen/go-fuse"))
1160 `(("go-golang-org-x-sys" ,go-golang-org-x-sys)))
1161 (home-page "https://github.com/hanwen/go-fuse")
1162 (synopsis "FUSE bindings for Go")
1164 "This package provides Go native bindings for the FUSE kernel module.")
1165 (license license:bsd-3)))
1175 (url "https://github.com/oniony/TMSU")
1176 (commit (string-append "v" version))))
1177 (file-name (git-file-name name version))
1180 "0834hah7p6ad81w60ifnxyh9zn09ddfgrll04kwjxwp7ypbv38wq"))))
1181 (build-system go-build-system)
1183 `(#:import-path "github.com/oniony/TMSU"
1185 #:install-source? #f
1187 (modify-phases %standard-phases
1188 (add-after 'install 'post-install
1189 (lambda* (#:key outputs #:allow-other-keys)
1190 (let ((out (assoc-ref outputs "out")))
1191 ;; The go build system produces /bin/TMSU -> install as /bin/tmsu
1192 (rename-file (string-append out "/bin/TMSU")
1193 (string-append out "/bin/tmsu"))))))))
1195 `(("go-github-com-mattn-go-sqlite3" ,go-github-com-mattn-go-sqlite3)
1196 ("go-github-com-hanwen-fuse" ,go-github-com-hanwen-fuse)))
1197 (home-page "https://github.com/oniony/TMSU")
1198 (synopsis "Tag files and access them through a virtual filesystem")
1200 "TMSU is a tool for tagging your files. It provides a simple
1201 command-line utility for applying tags and a virtual filesystem to give you a
1202 tag-based view of your files from any other program. TMSU does not alter your
1203 files in any way: they remain unchanged on disk, or on the network, wherever
1204 your put them. TMSU maintains its own database and you simply gain an
1205 additional view, which you can mount where you like, based upon the tags you
1207 (license license:gpl3+)))