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, 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 raid5atemyhoemwork <raid5atemyhomework@protonmail.com>
11 ;;; This file is part of GNU Guix.
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26 (define-module (gnu packages file-systems)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix git-download)
31 #:use-module (guix build-system cmake)
32 #:use-module (guix build-system copy)
33 #:use-module (guix build-system gnu)
34 #:use-module (guix build-system linux-module)
35 #:use-module (guix build-system python)
36 #:use-module (guix build-system trivial)
37 #:use-module (guix utils)
38 #:use-module (gnu packages)
39 #:use-module (gnu packages acl)
40 #:use-module (gnu packages attr)
41 #:use-module (gnu packages autotools)
42 #:use-module (gnu packages base)
43 #:use-module (gnu packages bison)
44 #:use-module (gnu packages check)
45 #:use-module (gnu packages compression)
46 #:use-module (gnu packages crypto)
47 #:use-module (gnu packages curl)
48 #:use-module (gnu packages cyrus-sasl)
49 #:use-module (gnu packages datastructures)
50 #:use-module (gnu packages documentation)
51 #:use-module (gnu packages docbook)
52 #:use-module (gnu packages flex)
53 #:use-module (gnu packages gawk)
54 #:use-module (gnu packages glib)
55 #:use-module (gnu packages gnupg)
56 #:use-module (gnu packages kerberos)
57 #:use-module (gnu packages libffi)
58 #:use-module (gnu packages linux)
59 #:use-module (gnu packages nfs)
60 #:use-module (gnu packages onc-rpc)
61 #:use-module (gnu packages openldap)
62 #:use-module (gnu packages photo)
63 #:use-module (gnu packages pkg-config)
64 #:use-module (gnu packages python)
65 #:use-module (gnu packages python-crypto)
66 #:use-module (gnu packages python-web)
67 #:use-module (gnu packages python-xyz)
68 #:use-module (gnu packages readline)
69 #:use-module (gnu packages rsync)
70 #:use-module (gnu packages sssd)
71 #:use-module (gnu packages sqlite)
72 #:use-module (gnu packages tls)
73 #:use-module (gnu packages valgrind)
74 #:use-module (gnu packages version-control)
75 #:use-module (gnu packages xml))
84 (uri (string-append "mirror://kernel.org/linux/daemons/autofs/"
85 "v" (version-major version) "/"
86 "autofs-" version ".tar.xz"))
88 (base32 "1vya21mb4izj3khcr3flibv7xc15vvx2v0rjfk5yd31qnzcy7pnx"))))
89 (build-system gnu-build-system)
92 (list "--enable-ignore-busy" ; during shutdown
93 "--enable-sloppy-mount" ; support mount(8) -s
95 (string-append "--with-openldap="
96 (assoc-ref %build-inputs "openldap"))
97 (string-append "--with-sasl="
98 (assoc-ref %build-inputs "cyrus-sasl"))
99 "HAVE_SSS_AUTOFS=1" ; required to make sssldir click
100 (string-append "sssldir="
101 (assoc-ref %build-inputs "sssd")
102 "/lib/sssd/modules"))
103 #:tests? #f ; no test suite
105 (modify-phases %standard-phases
106 (add-before 'configure 'fix-hard-coded-search-path
108 (substitute* "configure"
109 (("^searchpath=\".*\"")
110 "searchpath=\"$PATH\""))
112 (add-before 'install 'omit-obsolete-lookup_nis.so-link
113 ;; Building lookup_yp.so depends on $(YPCLNT) but this doesn't,
114 ;; leading to a make error. Since it's broken, comment it out.
116 (substitute* "modules/Makefile"
117 (("ln -fs lookup_yp.so" match)
118 (string-append "# " match)))
123 ("pkg-config" ,pkg-config)
124 ("rpcsvc-proto" ,rpcsvc-proto)))
126 `(("cyrus-sasl" ,cyrus-sasl)
127 ("e2fsprogs" ,e2fsprogs) ; for e[234]fsck
128 ("libtirpc" ,libtirpc)
129 ("libxml2" ,libxml2) ; needed for LDAP, SASL
130 ("mit-krb5" ,mit-krb5) ; needed for LDAP, SASL
131 ("nfs-utils" ,nfs-utils) ; for mount.nfs
132 ("openldap" ,openldap)
133 ("openssl" ,openssl) ; needed for SASL
135 ("util-linux" ,util-linux))) ; for mount, umount
136 ;; XXX A directory index is the closest thing this has to a home page.
137 (home-page "https://www.kernel.org/pub/linux/daemons/autofs/")
138 (synopsis "Kernel-based automounter for Linux")
140 "Autofs is a kernel-based automounter for use with the Linux autofs4
141 module. It automatically mounts selected file systems when they are used and
142 unmounts them after a set period of inactivity. This provides
143 centrally-managed, consistent file names for users and applications, even in a
144 large and/or frequently changing (network) environment.")
145 ;; fedfs/ is GPL-2-only but not built.
146 (license (list license:bsd-3 ; modules/cyrus-sasl.c
147 license:gpl2+)))) ; the rest
149 (define-public bindfs
155 (uri (string-append "https://bindfs.org/downloads/bindfs-"
159 "15y4brlcrqhxl6z73785m0dr1vp2q3wc6xss08x9jjr0apzmmjp5"))))
160 (build-system gnu-build-system)
162 ;; XXX: The tests have no hope of passing until there is a "nogroup"
163 ;; entry (or at least some group to which the guix builder does
164 ;; not belong) in the /etc/group file of the build environment.
165 ;; Currently we do not have such a group. Disable tests for now.
168 ;; Native inputs to run the tests
170 ;; ("valgrind" ,valgrind)
172 `(("pkg-config" ,pkg-config)))
175 (home-page "https://bindfs.org")
176 (synopsis "Bind mount a directory and alter permission bits")
178 "@command{bindfs} is a FUSE filesystem for mounting a directory to
179 another location, similar to @command{mount --bind}. It can be used for:
181 @item Making a directory read-only.
182 @item Making all executables non-executable.
183 @item Sharing a directory with a list of users (or groups).
184 @item Modifying permission bits using rules with chmod-like syntax.
185 @item Changing the permissions with which files are created.
187 (license license:gpl2+)))
189 (define-public davfs2
196 (uri (string-append "https://download.savannah.nongnu.org/releases/"
197 "davfs2/davfs2-" version ".tar.gz"))
199 (base32 "0l1vnv5lfigciwg17p10zxwhzj4qw2d9kw30prr7g4dxhmb6fsrf"))))
200 (build-system gnu-build-system)
203 (list "--sysconfdir=/etc" ; so man pages & binaries contain /etc
204 (string-append "--docdir=" (assoc-ref %outputs "out")
205 "/share/doc/" ,name "-" ,version)
206 (string-append "ssbindir=" (assoc-ref %outputs "out") "/sbin")
207 ;; The default ‘davfs2’ user and group don't exist on most systems.
211 (modify-phases %standard-phases
212 (add-after 'unpack 'omit-redundancy
213 ;; Don't install redundant copies of /etc examples into /share.
215 (substitute* "etc/Makefile.in"
216 (("(dist_pkgdata_DATA =.*) davfs2.conf secrets(.*)"
218 (string-append prefix suffix)))
220 (add-after 'unpack 'patch-file-names
222 ;; Don't auto-load the FUSE kernel module. That's up to root.
223 ;; XXX If/when we restore the previous behaviour, make sure not
224 ;; to introduce a security hole when mount.davfs is setuid.
225 (substitute* "src/kernel_interface.c"
226 (("/sbin/modprobe") "/modprobe/disabled"))
229 (lambda* (#:key make-flags outputs #:allow-other-keys)
230 (let ((out (assoc-ref outputs "out")))
231 (apply invoke "make" "install"
232 (string-append "pkgsysconfdir=" out "/etc")
237 ;; Neon requires but doesn't propagate zlib, nor would we want that.
238 ;; XZ as well, but that's already present in the build environment.
240 (home-page "https://savannah.nongnu.org/projects/davfs2")
241 (synopsis "Mount remote WebDAV resources in the local file system")
243 "The @acronym{WebDAV, Web Distributed Authoring and Versioning} extension
244 to the HTTP protocol defines a standard way to author resources on a remote Web
245 server. Davfs2 exposes such resources as a typical filesystem which can be used
246 by standard applications with no built-in support for WebDAV, such as the GNU
247 coreutils (@command{cp}, @command{mv}, etc.) or a graphical word processor.
249 Davfs2 works with most WebDAV servers with no or little configuration. It
250 supports TLS (HTTPS), HTTP proxies, HTTP basic and digest authentication, and
251 client certificates. It performs extensive caching to avoid unnecessary network
252 traffic, stay responsive even over slow or unreliable connections, and prevent
253 data loss. It aims to make use by unprivileged users as easy and secure as
256 However, davfs2 is not a full-featured WebDAV client. The file system interface
257 and the WebDAV protocol are quite different. Translating between the two is not
259 (license (list license:bsd-2 ; src/fuse_kernel.h
260 license:gpl3+)))) ; everything else
262 (define-public fsarchiver
271 (url "https://github.com/fdupoux/fsarchiver")
273 (file-name (git-file-name name version))
275 (base32 "1rvwq5v3rl14bqxjm1ibfapyicf0sa44nw7451v10kx39lp56ylp"))))
276 (build-system gnu-build-system)
278 `(("autoconf" ,autoconf)
279 ("automake" ,automake)
280 ("pkg-config" ,pkg-config)))
283 ("e2fsprogs" ,e2fsprogs)
284 ("libgcrypt" ,libgcrypt)
287 ("util-linux" ,util-linux "lib")
290 ("zstd:lib" ,zstd "lib")))
291 (synopsis "File system back-up, deployment, and migration tool")
293 "FSArchiver saves the contents of a file system to a compressed archive
294 file, and restores it to a different file system and/or partition. This
295 partition can be of a different size than the original and FSArchiver will
296 create a new file system if none exists.
298 All standard file attributes supported by the kernel are preserved, including
299 file permissions, timestamps, symbolic and hard links, and extended attributes.
301 Each file in the archive is protected by a checksum. If part of the archive
302 is corrupted you'll lose the affected file(s) but not the whole back-up.")
303 (home-page "https://www.fsarchiver.org/")
304 (license license:gpl2)))
306 (define-public gphotofs
314 (string-append "mirror://sourceforge/gphoto/gphotofs/" version
315 "/gphotofs-0.5.tar.gz"))
318 "04slwhr6ap9xcc27wphk22ad8yn79ngyy5z10lxams3k5liahvc2"))))
319 (build-system gnu-build-system)
321 `(("pkg-config" ,pkg-config)))
325 ("libgphoto2" ,libgphoto2)))
326 (synopsis "Virtual file system for libgphoto2 using FUSE")
327 (description "GPhotoFS is a FUSE file system module to mount your camera as
328 a file system on Linux. This allow using your camera with any tool able to read
329 from a mounted file system.")
330 (home-page "http://www.gphoto.org/proj/gphotofs/")
331 (license license:gpl2+)))
333 (define-public bcachefs-tools
334 (let ((commit "db931a4571817d7d61be6bce306f1d42f7cd3398")
337 (name "bcachefs-tools")
338 (version (git-version "0.1" revision commit))
343 (url "https://evilpiepirate.org/git/bcachefs-tools.git")
345 (file-name (git-file-name name version))
347 (base32 "1zl8lda6ni6rhsmsng6smrcjihy2irjf03h1m7nvkqmkhq44j80s"))))
348 (build-system gnu-build-system)
351 (list ,(string-append "VERSION=" version) ; bogus vX.Y-nogit otherwise
352 (string-append "PREFIX=" (assoc-ref %outputs "out"))
353 "INITRAMFS_DIR=$(PREFIX)/share/initramfs-tools"
357 (modify-phases %standard-phases
358 (delete 'configure) ; no configure script
359 (add-after 'install 'promote-mount.bcachefs.sh
360 ;; XXX The (optional) mount.bcachefs helper requires rust:cargo.
361 ;; This alternative shell script does the job well enough for now.
362 (lambda* (#:key inputs outputs #:allow-other-keys)
363 (let ((out (assoc-ref outputs "out")))
364 (with-directory-excursion (string-append out "/sbin")
365 (rename-file "mount.bcachefs.sh" "mount.bcachefs")
366 ;; WRAP-SCRIPT causes bogus ‘Insufficient arguments’ errors.
367 (wrap-program "mount.bcachefs"
369 ,(cons (string-append out "/sbin")
371 (string-append (assoc-ref inputs input)
375 "util-linux"))))))))))
376 #:tests? #f)) ; XXX 6 valgrind tests fail
378 `(("pkg-config" ,pkg-config)
381 ("python-pytest" ,python-pytest)
382 ("valgrind" ,valgrind)))
385 ("keyutils" ,keyutils)
387 ("libscrypt" ,libscrypt)
388 ("libsodium" ,libsodium)
390 ("util-linux:lib" ,util-linux "lib") ; lib{blkid,uuid}
393 ("zstd:lib" ,zstd "lib")
395 ;; Only for mount.bcachefs.sh.
396 ("coreutils" ,coreutils-minimal)
398 ("util-linux" ,util-linux)))
399 (home-page "https://bcachefs.org/")
400 (synopsis "Tools to create and manage bcachefs file systems")
402 "The bcachefs-tools are command-line utilities for creating, checking,
403 and otherwise managing bcachefs file systems.
405 Bcachefs is a @acronym{CoW, copy-on-write} file system supporting native
406 encryption, compression, snapshots, and (meta)data checksums. It can use
407 multiple block devices for replication and/or performance, similar to RAID.
409 In addition, bcachefs provides all the functionality of bcache, a block-layer
410 caching system, and lets you assign different roles to each device based on its
411 performance and other characteristics.")
412 (license license:gpl2+))))
414 (define-public bcachefs-tools/static
416 (inherit bcachefs-tools)
417 (name "bcachefs-tools-static")
419 (substitute-keyword-arguments (package-arguments bcachefs-tools)
420 ((#:make-flags make-flags)
422 (list "LDFLAGS=-static")))))
424 `(("eudev:static" ,eudev "static")
425 ("libscrypt:static" ,libscrypt "static")
426 ("lz4:static" ,lz4 "static")
427 ("util-linux:static" ,util-linux "static") ; lib{blkid,uuid}
428 ("zlib" ,zlib "static")
429 ("zstd:static" ,zstd "static")
430 ,@(package-inputs bcachefs-tools)))))
432 (define-public bcachefs/static
434 (name "bcachefs-static")
435 (version (package-version bcachefs-tools))
436 (build-system trivial-build-system)
439 `(("bcachefs-tools" ,bcachefs-tools/static)))
441 `(#:modules ((guix build utils))
444 (use-modules (guix build utils)
447 (let* ((bcachefs-tools (assoc-ref %build-inputs "bcachefs-tools"))
448 (out (assoc-ref %outputs "out")))
450 (with-directory-excursion out
451 (install-file (string-append bcachefs-tools
454 (remove-store-references "sbin/bcachefs")
455 (invoke "sbin/bcachefs" "version") ; test suite
457 (home-page (package-home-page bcachefs-tools))
458 (synopsis "Statically-linked bcachefs command from bcachefs-tools")
459 (description "This package provides the statically-linked @command{bcachefs}
460 from the bcachefs-tools package. It is meant to be used in initrds.")
461 (license (package-license bcachefs-tools))))
463 (define-public exfatprogs
471 (url "https://github.com/exfatprogs/exfatprogs")
473 (file-name (git-file-name name version))
475 (base32 "1braffz1wc4ki3nb42q85l5zg2dl2hwjr64rk27nc85wcsrbavnl"))))
476 (build-system gnu-build-system)
479 (list "--disable-static")))
481 `(("autoconf" ,autoconf)
482 ("automake" ,automake)
484 ("pkg-config" ,pkg-config)))
485 (home-page "https://github.com/exfatprogs/exfatprogs")
486 (synopsis "Tools to create, check, and repair exFAT file systems")
488 "These are command-line user space tools for the @acronym{exFAT,
489 Extensible File Allocation Table} file systems. Included are
490 @command{mkfs.exfat} to create (format) new exFAT file systems, and
491 @command{fsck.exfat} to check their consistency and repair them.")
492 (license license:gpl2+)))
494 (define-public httpfs2
501 (uri (string-append "mirror://sourceforge/httpfs/httpfs2/"
502 "httpfs2-" version ".tar.gz"))
505 "1h8ggvhw30n2r6w11n1s458ypggdqx6ldwd61ma4yd7binrlpjq1"))))
506 (build-system gnu-build-system)
508 `(("asciidoc" ,asciidoc)
509 ("docbook-xml" ,docbook-xml)
512 ("pkg-config" ,pkg-config)))
518 (modify-phases %standard-phases
519 (delete 'configure) ; no configure script
521 ;; There's no ‘install’ target. Install all variants manually.
522 (lambda* (#:key outputs #:allow-other-keys)
523 (let* ((out (assoc-ref outputs "out"))
524 (bin (string-append out "/bin"))
525 (man1 (string-append out "/share/man/man1")))
530 (let ((man1-page (string-append variant ".1")))
531 (install-file variant bin)
532 (install-file man1-page man1)))
538 #:make-flags (list "CC=gcc")
539 #:parallel-build? #f ; can result in missing man pages
540 #:tests? #f)) ; no tests
541 (home-page "https://sourceforge.net/projects/httpfs/")
542 (synopsis "Mount remote files over HTTP")
543 (description "httpfs2 is a @code{fuse} file system for mounting any
544 @dfn{HyperText} (HTTP or HTTPS) URL. It uses HTTP/1.1 byte ranges to request
545 arbitrary bytes from the web server, without needing to download the entire
546 file. This is particularly useful with large archives such as ZIP files and
547 ISO images when you only need to inspect their contents or extract specific
548 files. Since the HTTP protocol itself has no notion of directories, only a
549 single file can be mounted.")
550 (license license:gpl2+)))
552 (define-public jfsutils
559 (uri (string-append "http://jfs.sourceforge.net/project/pub/jfsutils-"
562 (base32 "0kbsy2sk1jv4m82rxyl25gwrlkzvl3hzdga9gshkxkhm83v1aji4"))
563 (patches (search-patches "jfsutils-add-sysmacros.patch"
564 "jfsutils-include-systypes.patch"))))
565 (build-system gnu-build-system)
567 `(("util-linux" ,util-linux "lib")))
568 (home-page "http://jfs.sourceforge.net/home.html")
569 (synopsis "Utilities for managing JFS file systems")
571 "The JFSutils are a collection of utilities for managing the @acronym{JFS,
572 Journaled File System}, a 64-bit journaling file system created by IBM and later
573 ported to the kernel Linux. The following commands are available:
575 @item @command{fsck.jfs}: check and repair a JFS file system or replay its
577 @item @command{logdump}: dump the JFS journal log.
578 @item @command{logredo}: replay the JFS journal log.
579 @item @command{mkfs.jfs}: create a new JFS file system.
580 @item @command{xchklog}: save a JFS fsck log to a file.
581 @item @command{xchkdmp}: dump the contents of such a log file.
582 @item @command{xpeek}: a JFS file system editor with a shell-like interface.
584 (license license:gpl3+))) ; no explicit version given
586 (define-public jfsutils/static
590 (name "jfsutils-static")
592 `(("util-linux:static" ,util-linux "static")
593 ,@(package-inputs jfsutils))))))
595 (define-public jfs_fsck/static
597 (name "jfs_fsck-static")
598 (version (package-version jfsutils))
600 (build-system trivial-build-system)
602 `(#:modules ((guix build utils))
605 (use-modules (guix build utils)
608 (let* ((jfsutils (assoc-ref %build-inputs "jfsutils"))
610 (out (assoc-ref %outputs "out"))
611 (sbin (string-append out "/sbin")))
613 (with-directory-excursion sbin
614 (install-file (string-append jfsutils "/sbin/" fsck)
616 (remove-store-references fsck)
620 `(("jfsutils" ,jfsutils/static)))
621 (home-page (package-home-page jfsutils))
622 (synopsis "Statically-linked jfs_fsck command from jfsutils")
623 (description "This package provides statically-linked jfs_fsck command taken
624 from the jfsutils package. It is meant to be used in initrds.")
625 (license (package-license jfsutils))))
627 (define-public disorderfs
635 (url "https://salsa.debian.org/reproducible-builds/disorderfs.git")
637 (file-name (git-file-name name version))
640 "0lsisx5118k0qk0b5klbxl03rvhycnznyfx05yxmjawh85bfhmlh"))))
641 (build-system gnu-build-system)
643 `(("pkg-config" ,pkg-config)))
648 `(#:phases (modify-phases %standard-phases
649 (delete 'configure)) ; no configure script
650 #:make-flags (let ((out (assoc-ref %outputs "out")))
651 (list (string-append "PREFIX=" out)))
653 ;; FIXME: Tests require 'run-parts' which is not in Guix yet.
655 (home-page "https://salsa.debian.org/reproducible-builds/disorderfs")
656 (synopsis "FUSE file system that introduces non-determinism")
658 "An overlay FUSE file system that introduces non-determinism
659 into file system metadata. For example, it can randomize the order
660 in which directory entries are read. This is useful for detecting
661 non-determinism in the build process.")
662 (license license:gpl3+)))
664 (define-public glusterfs
671 (uri (string-append "https://download.gluster.org/pub/gluster/glusterfs/"
672 (version-major version) "/"
673 (version-major+minor version) "/"
674 "glusterfs-" version ".tar.gz"))
677 "0yzhx710ypj0j3m5dcgmmgvkp7p0rmmp2p7ld0axrm4vpwc2b1wa"))))
678 (build-system gnu-build-system)
681 (let ((out (assoc-ref %outputs "out"))
682 (p2 (assoc-ref %build-inputs "python-2")))
683 (list (string-append "PYTHON=" p2 "/bin/python")
684 (string-append "--with-initdir=" out "/etc/init.d")
685 (string-append "--with-mountutildir=" out "/sbin")
686 "--enable-cmocka" ; unit tests
687 ;; "--enable-debug" ; debug build options
688 ;; "--enable-asan" ; Address Sanitizer
689 ;; "--enable-tsan" ; ThreadSanitizer
692 (modify-phases %standard-phases
693 (add-before 'configure 'autogen
694 (lambda _ (invoke "./autogen.sh"))))))
696 `(("pkg-config" ,pkg-config)
697 ("libtirpc" ,libtirpc)
698 ("rpcsvc-proto" ,rpcsvc-proto)
699 ("python-2" ,python-2) ; must be version 2
703 ("autoconf" ,autoconf)
704 ("automake" ,automake)
711 ("libuuid" ,util-linux "lib")
713 ("readline" ,readline)
716 ("rdma-core" ,rdma-core)))
717 (home-page "https://www.gluster.org")
718 (synopsis "Distributed file system")
719 (description "GlusterFS is a distributed scalable network file system
720 suitable for data-intensive tasks such as cloud storage and media streaming.
721 It allows rapid provisioning of additional storage based on your storage
722 consumption needs. It incorporates automatic failover as a primary feature.
723 All of this is accomplished without a centralized metadata server.")
724 ;; The user may choose either LGPLv3+ or GPLv2 only.
725 (license (list license:lgpl3+ license:gpl2+))))
727 (define-public curlftpfs
734 (uri (string-append "mirror://sourceforge/curlftpfs/curlftpfs/" version
735 "/curlftpfs-" version ".tar.gz"))
738 "0n397hmv21jsr1j7zx3m21i7ryscdhkdsyqpvvns12q7qwwlgd2f"))))
739 (build-system gnu-build-system)
742 (modify-phases %standard-phases
743 (add-after 'unpack 'fix-test
745 ;; One of the 512-Byte block counts is definitely wrong.
746 ;; See <https://sourceforge.net/p/curlftpfs/bugs/73/>.
747 (substitute* "tests/ftpfs-ls_unittest.c"
748 (("4426192") "12814800"))
755 `(("pkg-config" ,pkg-config)))
756 (home-page "http://curlftpfs.sourceforge.net/")
757 (synopsis "Mount remote file systems over FTP")
759 "This is a file system client based on the FTP File Transfer Protocol.")
760 (license license:gpl2+)))
762 (define-public libnfs
769 (url "https://github.com/sahlberg/libnfs")
770 (commit (string-append "libnfs-" version))))
771 (file-name (git-file-name name version))
774 "115p55y2cbs92z5lmcnjx1v29lwinpgq4sha9v1kq1vd8674h404"))))
775 (build-system gnu-build-system)
776 (home-page "https://github.com/sahlberg/libnfs")
778 `(("autoconf" ,autoconf)
779 ("automake" ,automake)
781 ("pkg-config" ,pkg-config)))
782 (synopsis "Client library for accessing NFS shares")
783 (description "LIBNFS is a client library for accessing NFS shares over a
784 network. LIBNFS offers three different APIs, for different use :
787 @item RAW, a fully asynchronous low level RPC library for NFS protocols. This
788 API provides very flexible and precise control of the RPC issued.
789 @item NFS ASYNC, a fully asynchronous library for high level vfs functions
790 @item NFS SYNC, a synchronous library for high level vfs functions.
792 (license (list license:lgpl2.1+ ; library
793 license:gpl3+ ; tests
794 license:bsd-3 ; copied nsf4 files
797 (define-public apfs-fuse
798 ;; Later versions require FUSE 3.
799 (let ((commit "7b89418e8dc27103d3c4f8fa348086ffcd634c17")
803 (version (git-version "0.0.0" revision commit))
807 (url "https://github.com/sgan81/apfs-fuse")
808 (recursive? #t) ; for lzfse
812 "0x2siy3cmnm9wsdfazg3xc8r3kbg73gijmnn1vjw33pp71ckylxr"))
813 (file-name (git-file-name name version))))
814 (build-system cmake-build-system)
816 `(#:tests? #f ; No test suite
818 '("-DUSE_FUSE3=OFF") ; FUSE 3 is not packaged yet.
820 (modify-phases %standard-phases
821 ;; No 'install' target in CMakeLists.txt
823 (lambda* (#:key outputs #:allow-other-keys)
824 (let* ((out (assoc-ref outputs "out"))
825 (bin (string-append out "/bin"))
826 (lib (string-append out "/lib"))
827 (doc (string-append out "/share/doc/"
828 (string-append ,name "-" ,version))))
829 (install-file "apfs-dump" bin)
830 (install-file "apfs-dump-quick" bin)
831 (install-file "apfs-fuse" bin)
832 (install-file "libapfs.a" lib)
833 (install-file "../source/README.md" doc)
839 (synopsis "Read-only FUSE driver for the APFS file system")
840 (description "APFS-FUSE is a read-only FUSE driver for the @dfn{Apple File
841 System} (APFS). It is currently in an experimental state — it may not be able
842 to read all files, and it does not support all the compression methods in
844 (home-page "https://github.com/sgan81/apfs-fuse")
845 (license license:gpl2+))))
851 (outputs '("out" "module" "src"))
855 (uri (string-append "https://github.com/zfsonlinux/zfs/releases"
856 "/download/zfs-" version
857 "/zfs-" version ".tar.gz"))
859 (base32 "0gfdnynmsxbhi97q73smrgmcw1k8zmlr1hgljfn38sk0kimivd6v"))))
860 (build-system linux-module-build-system)
862 `(;; The ZFS kernel module should not be downloaded since the license
863 ;; terms don't allow for distributing it, only building it locally.
865 ;; Tests cannot run in an unprivileged build environment.
868 (modify-phases %standard-phases
869 (add-after 'configure 'really-configure
870 (lambda* (#:key outputs inputs #:allow-other-keys)
871 (let ((out (assoc-ref outputs "out")))
872 (substitute* "configure"
873 (("-/bin/sh") (string-append "-" (which "sh"))))
874 (invoke "./configure"
876 (string-append "--prefix=" out)
877 (string-append "--with-dracutdir=" out "/lib/dracut")
878 (string-append "--with-udevdir=" out "/lib/udev")
879 (string-append "--with-mounthelperdir=" out "/sbin")
880 (string-append "--with-linux="
881 (assoc-ref inputs "linux-module-builder")
882 "/lib/modules/build")))))
883 (add-after 'unpack 'patch-source
884 (lambda* (#:key inputs outputs #:allow-other-keys)
885 (let ((out (assoc-ref outputs "out"))
886 (src (assoc-ref outputs "src"))
887 (util-linux (assoc-ref inputs "util-linux"))
888 (nfs-utils (assoc-ref inputs "nfs-utils"))
889 (kmod (assoc-ref inputs "kmod-runtime")))
890 (substitute* "contrib/Makefile.in"
891 ;; This is not configurable nor is its hard-coded /usr prefix.
893 (substitute* "module/zfs/zfs_ctldir.c"
894 (("/usr/bin/env\", \"umount")
895 (string-append util-linux "/bin/umount\", \"-n"))
896 (("/usr/bin/env\", \"mount")
897 (string-append util-linux "/bin/mount\", \"-n")))
898 (substitute* "lib/libzfs/libzfs_mount.c"
899 (("/bin/mount") (string-append util-linux "/bin/mount"))
900 (("/bin/umount") (string-append util-linux "/bin/umount")))
901 (substitute* "lib/libshare/nfs.c"
902 (("/usr/sbin/exportfs")
903 (string-append nfs-utils "/sbin/exportfs")))
904 (substitute* "config/zfs-build.m4"
905 (("\\$sysconfdir/init.d") (string-append out "/etc/init.d")))
906 (substitute* '("etc/zfs/Makefile.am"
907 "cmd/zed/Makefile.am")
908 (("\\$\\(sysconfdir)") (string-append out "/etc")))
909 (substitute* "cmd/vdev_id/vdev_id"
910 (("PATH=/bin:/sbin:/usr/bin:/usr/sbin")
911 (string-append "PATH="
912 (dirname (which "chmod")) ":"
913 (dirname (which "grep")) ":"
914 (dirname (which "sed")) ":"
915 (dirname (which "gawk")))))
916 (substitute* "contrib/pyzfs/Makefile.in"
917 ((".*install-lib.*") ""))
918 (substitute* '("Makefile.am" "Makefile.in")
919 (("\\$\\(prefix)/src") (string-append src "/src")))
920 (substitute* (find-files "udev/rules.d/" ".rules.in$")
921 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))))
924 (lambda _ (invoke "make")))
926 (lambda* (#:key outputs inputs native-inputs #:allow-other-keys)
927 (let* ((out (assoc-ref outputs "out"))
928 (moddir (assoc-ref outputs "module"))
929 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
930 (invoke "make" "install"
931 (string-append "DEFAULT_INITCONF_DIR=" out "/etc/default")
932 (string-append "DEPMOD=" kmod "/bin/depmod")
933 (string-append "INSTALL_PATH=" out)
934 (string-append "INSTALL_MOD_PATH=" moddir)
935 "INSTALL_MOD_STRIP=1")
936 (install-file "contrib/bash_completion.d/zfs"
937 (string-append out "/share/bash-completion/completions"))
942 ("pkg-config" ,pkg-config)))
945 ("kmod-runtime" ,kmod)
947 ("libtirpc" ,libtirpc)
948 ("nfs-utils" ,nfs-utils)
951 ("python-cffi" ,python-cffi)
952 ("util-linux" ,util-linux)
953 ("util-linux:lib" ,util-linux "lib")
955 (home-page "https://zfsonlinux.org/")
956 (synopsis "Native ZFS on Linux")
958 "ZFS on Linux is an advanced file system and volume manager which was
959 originally developed for Solaris and is now maintained by the OpenZFS
961 (license license:cddl1.0)))
963 (define-public mergerfs
970 (uri (string-append "https://github.com/trapexit/mergerfs/releases/download/"
971 version "/mergerfs-" version ".tar.gz"))
974 "0k4asbg5n9dhy5jpjkw6simqqnr1zira2y4i71cq05091dfwm90p"))))
975 (build-system gnu-build-system)
977 `(#:tests? #f ; No tests exist.
979 (modify-phases %standard-phases
981 (add-after 'unpack 'fix-paths
982 (lambda* (#:key inputs outputs #:allow-other-keys)
984 ;; These were copied from the package libfuse.
985 (substitute* '("libfuse/lib/mount_util.c" "libfuse/util/mount_util.c")
986 (("/bin/(u?)mount" _ maybe-u)
987 (string-append (assoc-ref inputs "util-linux")
988 "/bin/" maybe-u "mount")))
989 (substitute* '("libfuse/util/mount.mergerfs.c")
992 ;; The Makefile does not allow overriding PREFIX via make variables.
993 (substitute* '("Makefile" "libfuse/Makefile")
994 (("= /usr/local") (string-append "= " (assoc-ref outputs "out")))
995 (("= /sbin") "= $(EXEC_PREFIX)/sbin")
996 ;; cannot chown as build user
997 (("chown root(:root)?") "true"))
999 ;; mergerfs bundles a heavily modified copy of libfuse.
1000 (inputs `(("util-linux" ,util-linux)))
1001 (home-page "https://github.com/trapexit/mergerfs")
1002 (synopsis "Featureful union file system")
1003 (description "mergerfs is a union file system geared towards simplifying
1004 storage and management of files across numerous commodity storage devices. It
1005 is similar to mhddfs, unionfs, and aufs.")
1007 license:isc ; mergerfs
1008 license:gpl2 license:lgpl2.0 ; Imported libfuse code.
1011 (define-public mergerfs-tools
1012 (let ((commit "480296ed03d1c3c7909697d7ef96d35840ee26b8")
1015 (name "mergerfs-tools")
1016 ;; No released version exists.
1017 (version (git-version "0.0" revision commit))
1022 (url "https://github.com/trapexit/mergerfs-tools")
1024 (file-name (git-file-name name version))
1027 "0xr06gi4xcr832rzy0hkp5c1n231s7w5iq1nkjvx9kvm0dl7chpq"))))
1028 (build-system copy-build-system)
1030 `(("python" ,python)
1031 ("python-xattr" ,python-xattr)
1037 (modify-phases %standard-phases
1038 (add-after 'unpack 'patch-paths
1039 (lambda* (#:key inputs #:allow-other-keys)
1040 (substitute* (find-files "src" "^mergerfs\\.")
1042 (string-append "'" (assoc-ref inputs "rsync") "/bin/rsync'"))
1044 (string-append "'" (assoc-ref inputs "coreutils") "/bin/rm'")))
1045 (substitute* "src/mergerfs.mktrash"
1047 (string-append (assoc-ref inputs "python-xattr") "/bin/xattr"))
1049 (string-append (assoc-ref inputs "coreutils") "/bin/mkdir")))
1051 (synopsis "Tools to help manage data in a mergerfs pool")
1052 (description "mergerfs-tools is a suite of programs that can audit
1053 permissions and ownership of files and directories on a mergerfs volume,
1054 duplicates files and directories across branches in its pool, find and remove
1055 duplicate files, balance pool drives, consolidate files in a single mergerfs
1056 directory onto a single drive and create FreeDesktop.org Trash specification
1057 compatible directories.")
1058 (home-page "https://github.com/trapexit/mergerfs-tools")
1059 (license license:isc))))
1061 (define-public python-dropbox
1063 (name "python-dropbox")
1068 (uri (pypi-uri "dropbox" version))
1071 "0r64jxm5m4a1sln2la3av0103filb0plqja1nnyibqvk9qrqs5jf"))))
1072 (build-system python-build-system)
1073 (arguments '(#:tests? #f)) ; Tests require a network connection.
1075 `(("python-pytest" ,python-pytest)
1076 ("python-pytest-runner" ,python-pytest-runner)))
1078 `(("python-certifi" ,python-certifi)
1079 ("python-chardet" ,python-chardet)
1080 ("python-requests" ,python-requests)
1081 ("python-six" ,python-six)
1082 ("python-stone" ,python-stone)
1083 ("python-urllib3" ,python-urllib3)))
1084 (home-page "https://www.dropbox.com/developers")
1085 (synopsis "Official Dropbox API Client")
1086 (description "This package provides a Python SDK for integrating with the
1088 (license license:expat)))
1090 (define-public dbxfs
1097 (uri (pypi-uri "dbxfs" version))
1100 "01zvk862ybz12270q0r2l1i7kdj30ib2gxrlxmwvi19b2fkf39na"))
1101 (patches (search-patches "dbxfs-remove-sentry-sdk.patch"))))
1102 (build-system python-build-system)
1104 '(#:tests? #f)) ; tests requires safefs
1106 `(("python-appdirs" ,python-appdirs)
1107 ("python-block-tracing" ,python-block-tracing)
1108 ("python-dropbox" ,python-dropbox)
1109 ("python-keyring" ,python-keyring)
1110 ("python-keyrings.alt" ,python-keyrings.alt)
1111 ("python-privy" ,python-privy)
1112 ("python-userspacefs" ,python-userspacefs)))
1113 (home-page "https://github.com/rianhunter/dbxfs")
1114 (synopsis "User-space file system for Dropbox")
1116 "@code{dbxfs} allows you to mount your Dropbox folder as if it were a
1117 local file system using FUSE.")
1118 (license license:gpl3+)))