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>
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 go)
35 #:use-module (guix build-system linux-module)
36 #:use-module (guix build-system python)
37 #:use-module (guix build-system trivial)
38 #:use-module (guix utils)
39 #:use-module (gnu packages)
40 #:use-module (gnu packages acl)
41 #:use-module (gnu packages attr)
42 #:use-module (gnu packages autotools)
43 #:use-module (gnu packages base)
44 #:use-module (gnu packages bison)
45 #:use-module (gnu packages check)
46 #:use-module (gnu packages compression)
47 #:use-module (gnu packages crypto)
48 #:use-module (gnu packages curl)
49 #:use-module (gnu packages cyrus-sasl)
50 #:use-module (gnu packages datastructures)
51 #:use-module (gnu packages documentation)
52 #:use-module (gnu packages docbook)
53 #:use-module (gnu packages flex)
54 #:use-module (gnu packages gawk)
55 #:use-module (gnu packages glib)
56 #:use-module (gnu packages gnupg)
57 #:use-module (gnu packages golang)
58 #:use-module (gnu packages kerberos)
59 #:use-module (gnu packages libffi)
60 #:use-module (gnu packages linux)
61 #:use-module (gnu packages nfs)
62 #:use-module (gnu packages onc-rpc)
63 #:use-module (gnu packages openldap)
64 #:use-module (gnu packages photo)
65 #:use-module (gnu packages pkg-config)
66 #:use-module (gnu packages python)
67 #:use-module (gnu packages python-crypto)
68 #:use-module (gnu packages python-web)
69 #:use-module (gnu packages python-xyz)
70 #:use-module (gnu packages readline)
71 #:use-module (gnu packages rsync)
72 #:use-module (gnu packages sssd)
73 #:use-module (gnu packages sqlite)
74 #:use-module (gnu packages tls)
75 #:use-module (gnu packages valgrind)
76 #:use-module (gnu packages version-control)
77 #:use-module (gnu packages xml))
86 (uri (string-append "mirror://kernel.org/linux/daemons/autofs/"
87 "v" (version-major version) "/"
88 "autofs-" version ".tar.xz"))
90 (base32 "1vya21mb4izj3khcr3flibv7xc15vvx2v0rjfk5yd31qnzcy7pnx"))))
91 (build-system gnu-build-system)
94 (list "--enable-ignore-busy" ; during shutdown
95 "--enable-sloppy-mount" ; support mount(8) -s
97 (string-append "--with-openldap="
98 (assoc-ref %build-inputs "openldap"))
99 (string-append "--with-sasl="
100 (assoc-ref %build-inputs "cyrus-sasl"))
101 "HAVE_SSS_AUTOFS=1" ; required to make sssldir click
102 (string-append "sssldir="
103 (assoc-ref %build-inputs "sssd")
104 "/lib/sssd/modules"))
105 #:tests? #f ; no test suite
107 (modify-phases %standard-phases
108 (add-before 'configure 'fix-hard-coded-search-path
110 (substitute* "configure"
111 (("^searchpath=\".*\"")
112 "searchpath=\"$PATH\""))
114 (add-before 'install 'omit-obsolete-lookup_nis.so-link
115 ;; Building lookup_yp.so depends on $(YPCLNT) but this doesn't,
116 ;; leading to a make error. Since it's broken, comment it out.
118 (substitute* "modules/Makefile"
119 (("ln -fs lookup_yp.so" match)
120 (string-append "# " match)))
125 ("pkg-config" ,pkg-config)
126 ("rpcsvc-proto" ,rpcsvc-proto)))
128 `(("cyrus-sasl" ,cyrus-sasl)
129 ("e2fsprogs" ,e2fsprogs) ; for e[234]fsck
130 ("libtirpc" ,libtirpc)
131 ("libxml2" ,libxml2) ; needed for LDAP, SASL
132 ("mit-krb5" ,mit-krb5) ; needed for LDAP, SASL
133 ("nfs-utils" ,nfs-utils) ; for mount.nfs
134 ("openldap" ,openldap)
135 ("openssl" ,openssl) ; needed for SASL
137 ("util-linux" ,util-linux))) ; for mount, umount
138 ;; XXX A directory index is the closest thing this has to a home page.
139 (home-page "https://www.kernel.org/pub/linux/daemons/autofs/")
140 (synopsis "Kernel-based automounter for Linux")
142 "Autofs is a kernel-based automounter for use with the Linux autofs4
143 module. It automatically mounts selected file systems when they are used and
144 unmounts them after a set period of inactivity. This provides
145 centrally-managed, consistent file names for users and applications, even in a
146 large and/or frequently changing (network) environment.")
147 ;; fedfs/ is GPL-2-only but not built.
148 (license (list license:bsd-3 ; modules/cyrus-sasl.c
149 license:gpl2+)))) ; the rest
151 (define-public bindfs
157 (uri (string-append "https://bindfs.org/downloads/bindfs-"
161 "1av8dj9i1g0105fs5r9srqqsp7yahlhwc0yl8i1szyfdls23bp84"))))
162 (build-system gnu-build-system)
164 ;; XXX: The tests have no hope of passing until there is a "nogroup"
165 ;; entry (or at least some group to which the guix builder does
166 ;; not belong) in the /etc/group file of the build environment.
167 ;; Currently we do not have such a group. Disable tests for now.
170 ;; Native inputs to run the tests
172 ;; ("valgrind" ,valgrind)
174 `(("pkg-config" ,pkg-config)))
177 (home-page "https://bindfs.org")
178 (synopsis "Bind mount a directory and alter permission bits")
180 "@command{bindfs} is a FUSE filesystem for mounting a directory to
181 another location, similar to @command{mount --bind}. It can be used for:
183 @item Making a directory read-only.
184 @item Making all executables non-executable.
185 @item Sharing a directory with a list of users (or groups).
186 @item Modifying permission bits using rules with chmod-like syntax.
187 @item Changing the permissions with which files are created.
189 (license license:gpl2+)))
191 (define-public davfs2
198 (uri (string-append "https://download.savannah.nongnu.org/releases/"
199 "davfs2/davfs2-" version ".tar.gz"))
201 (base32 "0l1vnv5lfigciwg17p10zxwhzj4qw2d9kw30prr7g4dxhmb6fsrf"))))
202 (build-system gnu-build-system)
205 (list "--sysconfdir=/etc" ; so man pages & binaries contain /etc
206 (string-append "--docdir=" (assoc-ref %outputs "out")
207 "/share/doc/" ,name "-" ,version)
208 (string-append "ssbindir=" (assoc-ref %outputs "out") "/sbin")
209 ;; The default ‘davfs2’ user and group don't exist on most systems.
213 (modify-phases %standard-phases
214 (add-after 'unpack 'omit-redundancy
215 ;; Don't install redundant copies of /etc examples into /share.
217 (substitute* "etc/Makefile.in"
218 (("(dist_pkgdata_DATA =.*) davfs2.conf secrets(.*)"
220 (string-append prefix suffix)))
222 (add-after 'unpack 'patch-file-names
224 ;; Don't auto-load the FUSE kernel module. That's up to root.
225 ;; XXX If/when we restore the previous behaviour, make sure not
226 ;; to introduce a security hole when mount.davfs is setuid.
227 (substitute* "src/kernel_interface.c"
228 (("/sbin/modprobe") "/modprobe/disabled"))
231 (lambda* (#:key make-flags outputs #:allow-other-keys)
232 (let ((out (assoc-ref outputs "out")))
233 (apply invoke "make" "install"
234 (string-append "pkgsysconfdir=" out "/etc")
239 ;; Neon requires but doesn't propagate zlib, nor would we want that.
240 ;; XZ as well, but that's already present in the build environment.
242 (home-page "https://savannah.nongnu.org/projects/davfs2")
243 (synopsis "Mount remote WebDAV resources in the local file system")
245 "The @acronym{WebDAV, Web Distributed Authoring and Versioning} extension
246 to the HTTP protocol defines a standard way to author resources on a remote Web
247 server. Davfs2 exposes such resources as a typical filesystem which can be used
248 by standard applications with no built-in support for WebDAV, such as the GNU
249 coreutils (@command{cp}, @command{mv}, etc.) or a graphical word processor.
251 Davfs2 works with most WebDAV servers with no or little configuration. It
252 supports TLS (HTTPS), HTTP proxies, HTTP basic and digest authentication, and
253 client certificates. It performs extensive caching to avoid unnecessary network
254 traffic, stay responsive even over slow or unreliable connections, and prevent
255 data loss. It aims to make use by unprivileged users as easy and secure as
258 However, davfs2 is not a full-featured WebDAV client. The file system interface
259 and the WebDAV protocol are quite different. Translating between the two is not
261 (license (list license:bsd-2 ; src/fuse_kernel.h
262 license:gpl3+)))) ; everything else
264 (define-public fsarchiver
273 (url "https://github.com/fdupoux/fsarchiver")
275 (file-name (git-file-name name version))
277 (base32 "1ry2sdkfbg4bwcldk42g1i3wa3z4pr9yh9dil6ilhwcvhqiw41zc"))))
278 (build-system gnu-build-system)
280 `(("autoconf" ,autoconf)
281 ("automake" ,automake)
282 ("pkg-config" ,pkg-config)))
285 ("e2fsprogs" ,e2fsprogs)
286 ("libgcrypt" ,libgcrypt)
289 ("util-linux" ,util-linux "lib")
292 ("zstd:lib" ,zstd "lib")))
293 (synopsis "File system back-up, deployment, and migration tool")
295 "FSArchiver saves the contents of a file system to a compressed archive
296 file, and restores it to a different file system and/or partition. This
297 partition can be of a different size than the original and FSArchiver will
298 create a new file system if none exists.
300 All standard file attributes supported by the kernel are preserved, including
301 file permissions, timestamps, symbolic and hard links, and extended attributes.
303 Each file in the archive is protected by a checksum. If part of the archive
304 is corrupted you'll lose the affected file(s) but not the whole back-up.")
305 (home-page "https://www.fsarchiver.org/")
306 (license license:gpl2)))
308 (define-public gphotofs
316 (string-append "mirror://sourceforge/gphoto/gphotofs/" version
317 "/gphotofs-0.5.tar.gz"))
320 "04slwhr6ap9xcc27wphk22ad8yn79ngyy5z10lxams3k5liahvc2"))))
321 (build-system gnu-build-system)
323 `(("pkg-config" ,pkg-config)))
327 ("libgphoto2" ,libgphoto2)))
328 (synopsis "Virtual file system for libgphoto2 using FUSE")
329 (description "GPhotoFS is a FUSE file system module to mount your camera as
330 a file system on Linux. This allow using your camera with any tool able to read
331 from a mounted file system.")
332 (home-page "http://www.gphoto.org/proj/gphotofs/")
333 (license license:gpl2+)))
335 (define-public bcachefs-tools
336 (let ((commit "612f6b9ab73c7f46e0254355b707d494a8ad9270")
339 (name "bcachefs-tools")
340 (version (git-version "0.1" revision commit))
345 (url "https://evilpiepirate.org/git/bcachefs-tools.git")
347 (file-name (git-file-name name version))
349 (base32 "1a62wkv1i6pg5k1cjw7fzn933cbz8cp8y40cdpfd8rxjx0wg2szb"))))
350 (build-system gnu-build-system)
353 (list ,(string-append "VERSION=" version) ; bogus vX.Y-nogit otherwise
354 (string-append "PREFIX=" (assoc-ref %outputs "out"))
355 "INITRAMFS_DIR=$(PREFIX)/share/initramfs-tools"
359 (modify-phases %standard-phases
360 (delete 'configure) ; no configure script
361 (add-after 'install 'promote-mount.bcachefs.sh
362 ;; XXX The (optional) mount.bcachefs helper requires rust:cargo.
363 ;; This alternative shell script does the job well enough for now.
364 (lambda* (#:key inputs outputs #:allow-other-keys)
365 (let ((out (assoc-ref outputs "out")))
366 (with-directory-excursion (string-append out "/sbin")
367 (rename-file "mount.bcachefs.sh" "mount.bcachefs")
368 ;; WRAP-SCRIPT causes bogus ‘Insufficient arguments’ errors.
369 (wrap-program "mount.bcachefs"
371 ,(cons (string-append out "/sbin")
373 (string-append (assoc-ref inputs input)
377 "util-linux"))))))))))
378 #:tests? #f)) ; XXX 6 valgrind tests fail
380 `(("pkg-config" ,pkg-config)
383 ("python-pytest" ,python-pytest)
384 ("valgrind" ,valgrind)))
387 ("keyutils" ,keyutils)
389 ("libscrypt" ,libscrypt)
390 ("libsodium" ,libsodium)
392 ("util-linux:lib" ,util-linux "lib") ; lib{blkid,uuid}
395 ("zstd:lib" ,zstd "lib")
397 ;; Only for mount.bcachefs.sh.
398 ("coreutils" ,coreutils-minimal)
400 ("util-linux" ,util-linux)))
401 (home-page "https://bcachefs.org/")
402 (synopsis "Tools to create and manage bcachefs file systems")
404 "The bcachefs-tools are command-line utilities for creating, checking,
405 and otherwise managing bcachefs file systems.
407 Bcachefs is a @acronym{CoW, copy-on-write} file system supporting native
408 encryption, compression, snapshots, and (meta)data checksums. It can use
409 multiple block devices for replication and/or performance, similar to RAID.
411 In addition, bcachefs provides all the functionality of bcache, a block-layer
412 caching system, and lets you assign different roles to each device based on its
413 performance and other characteristics.")
414 (license license:gpl2+))))
416 (define-public bcachefs-tools/static
418 (inherit bcachefs-tools)
419 (name "bcachefs-tools-static")
421 (substitute-keyword-arguments (package-arguments bcachefs-tools)
422 ((#:make-flags make-flags)
424 (list "LDFLAGS=-static")))))
426 `(("eudev:static" ,eudev "static")
427 ("libscrypt:static" ,libscrypt "static")
428 ("lz4:static" ,lz4 "static")
429 ("util-linux:static" ,util-linux "static") ; lib{blkid,uuid}
430 ("zlib" ,zlib "static")
431 ("zstd:static" ,zstd "static")
432 ,@(package-inputs bcachefs-tools)))))
434 (define-public bcachefs/static
436 (name "bcachefs-static")
437 (version (package-version bcachefs-tools))
438 (build-system trivial-build-system)
441 `(("bcachefs-tools" ,bcachefs-tools/static)))
443 `(#:modules ((guix build utils))
446 (use-modules (guix build utils)
449 (let* ((bcachefs-tools (assoc-ref %build-inputs "bcachefs-tools"))
450 (out (assoc-ref %outputs "out")))
452 (with-directory-excursion out
453 (install-file (string-append bcachefs-tools
456 (remove-store-references "sbin/bcachefs")
457 (invoke "sbin/bcachefs" "version") ; test suite
459 (home-page (package-home-page bcachefs-tools))
460 (synopsis "Statically-linked bcachefs command from bcachefs-tools")
461 (description "This package provides the statically-linked @command{bcachefs}
462 from the bcachefs-tools package. It is meant to be used in initrds.")
463 (license (package-license bcachefs-tools))))
465 (define-public exfatprogs
473 (url "https://github.com/exfatprogs/exfatprogs")
475 (file-name (git-file-name name version))
477 (base32 "1ciy28lx7c1vr1f138qi0mkz88pzlkay6nlwmp1yjzd830x48549"))))
478 (build-system gnu-build-system)
481 (list "--disable-static")))
483 `(("autoconf" ,autoconf)
484 ("automake" ,automake)
486 ("pkg-config" ,pkg-config)))
487 (home-page "https://github.com/exfatprogs/exfatprogs")
488 (synopsis "Tools to create, check, and repair exFAT file systems")
490 "These are command-line user space tools for the @acronym{exFAT,
491 Extensible File Allocation Table} file systems. Included are
492 @command{mkfs.exfat} to create (format) new exFAT file systems, and
493 @command{fsck.exfat} to check their consistency and repair them.")
494 (license license:gpl2+)))
496 (define-public httpfs2
503 (uri (string-append "mirror://sourceforge/httpfs/httpfs2/"
504 "httpfs2-" version ".tar.gz"))
507 "1h8ggvhw30n2r6w11n1s458ypggdqx6ldwd61ma4yd7binrlpjq1"))))
508 (build-system gnu-build-system)
510 `(("asciidoc" ,asciidoc)
511 ("docbook-xml" ,docbook-xml)
514 ("pkg-config" ,pkg-config)))
520 (modify-phases %standard-phases
521 (delete 'configure) ; no configure script
523 ;; There's no ‘install’ target. Install all variants manually.
524 (lambda* (#:key outputs #:allow-other-keys)
525 (let* ((out (assoc-ref outputs "out"))
526 (bin (string-append out "/bin"))
527 (man1 (string-append out "/share/man/man1")))
532 (let ((man1-page (string-append variant ".1")))
533 (install-file variant bin)
534 (install-file man1-page man1)))
540 #:make-flags (list "CC=gcc")
541 #:parallel-build? #f ; can result in missing man pages
542 #:tests? #f)) ; no tests
543 (home-page "https://sourceforge.net/projects/httpfs/")
544 (synopsis "Mount remote files over HTTP")
545 (description "httpfs2 is a @code{fuse} file system for mounting any
546 @dfn{HyperText} (HTTP or HTTPS) URL. It uses HTTP/1.1 byte ranges to request
547 arbitrary bytes from the web server, without needing to download the entire
548 file. This is particularly useful with large archives such as ZIP files and
549 ISO images when you only need to inspect their contents or extract specific
550 files. Since the HTTP protocol itself has no notion of directories, only a
551 single file can be mounted.")
552 (license license:gpl2+)))
554 (define-public jfsutils
561 (uri (string-append "http://jfs.sourceforge.net/project/pub/jfsutils-"
564 (base32 "0kbsy2sk1jv4m82rxyl25gwrlkzvl3hzdga9gshkxkhm83v1aji4"))
565 (patches (search-patches "jfsutils-add-sysmacros.patch"
566 "jfsutils-include-systypes.patch"))))
567 (build-system gnu-build-system)
569 `(("util-linux" ,util-linux "lib")))
570 (home-page "http://jfs.sourceforge.net/home.html")
571 (synopsis "Utilities for managing JFS file systems")
573 "The JFSutils are a collection of utilities for managing the @acronym{JFS,
574 Journaled File System}, a 64-bit journaling file system created by IBM and later
575 ported to the kernel Linux. The following commands are available:
577 @item @command{fsck.jfs}: check and repair a JFS file system or replay its
579 @item @command{logdump}: dump the JFS journal log.
580 @item @command{logredo}: replay the JFS journal log.
581 @item @command{mkfs.jfs}: create a new JFS file system.
582 @item @command{xchklog}: save a JFS fsck log to a file.
583 @item @command{xchkdmp}: dump the contents of such a log file.
584 @item @command{xpeek}: a JFS file system editor with a shell-like interface.
586 (license license:gpl3+))) ; no explicit version given
588 (define-public jfsutils/static
592 (name "jfsutils-static")
594 `(("util-linux:static" ,util-linux "static")
595 ,@(package-inputs jfsutils))))))
597 (define-public jfs_fsck/static
599 (name "jfs_fsck-static")
600 (version (package-version jfsutils))
602 (build-system trivial-build-system)
604 `(#:modules ((guix build utils))
607 (use-modules (guix build utils)
610 (let* ((jfsutils (assoc-ref %build-inputs "jfsutils"))
612 (out (assoc-ref %outputs "out"))
613 (sbin (string-append out "/sbin")))
615 (with-directory-excursion sbin
616 (install-file (string-append jfsutils "/sbin/" fsck)
618 (remove-store-references fsck)
622 `(("jfsutils" ,jfsutils/static)))
623 (home-page (package-home-page jfsutils))
624 (synopsis "Statically-linked jfs_fsck command from jfsutils")
625 (description "This package provides statically-linked jfs_fsck command taken
626 from the jfsutils package. It is meant to be used in initrds.")
627 (license (package-license jfsutils))))
629 (define-public disorderfs
637 (url "https://salsa.debian.org/reproducible-builds/disorderfs.git")
639 (file-name (git-file-name name version))
642 "1pnrj0h8sgqwgsc18vz3fkqsp6vhigdbi75vdj0si1r6wgslnr7z"))))
643 (build-system gnu-build-system)
645 `(("pkg-config" ,pkg-config)))
650 `(#:phases (modify-phases %standard-phases
651 (delete 'configure)) ; no configure script
652 #:make-flags (let ((out (assoc-ref %outputs "out")))
653 (list (string-append "PREFIX=" out)))
655 ;; FIXME: Tests require 'run-parts' which is not in Guix yet.
657 (home-page "https://salsa.debian.org/reproducible-builds/disorderfs")
658 (synopsis "FUSE file system that introduces non-determinism")
660 "An overlay FUSE file system that introduces non-determinism
661 into file system metadata. For example, it can randomize the order
662 in which directory entries are read. This is useful for detecting
663 non-determinism in the build process.")
664 (license license:gpl3+)))
666 (define-public glusterfs
673 (uri (string-append "https://download.gluster.org/pub/gluster/glusterfs/"
674 (version-major version) "/"
675 (version-major+minor version) "/"
676 "glusterfs-" version ".tar.gz"))
679 "0yzhx710ypj0j3m5dcgmmgvkp7p0rmmp2p7ld0axrm4vpwc2b1wa"))))
680 (build-system gnu-build-system)
683 (let ((out (assoc-ref %outputs "out"))
684 (p2 (assoc-ref %build-inputs "python-2")))
685 (list (string-append "PYTHON=" p2 "/bin/python")
686 (string-append "--with-initdir=" out "/etc/init.d")
687 (string-append "--with-mountutildir=" out "/sbin")
688 "--enable-cmocka" ; unit tests
689 ;; "--enable-debug" ; debug build options
690 ;; "--enable-asan" ; Address Sanitizer
691 ;; "--enable-tsan" ; ThreadSanitizer
694 (modify-phases %standard-phases
695 (add-before 'configure 'autogen
696 (lambda _ (invoke "./autogen.sh"))))))
698 `(("pkg-config" ,pkg-config)
699 ("libtirpc" ,libtirpc)
700 ("rpcsvc-proto" ,rpcsvc-proto)
701 ("python-2" ,python-2) ; must be version 2
705 ("autoconf" ,autoconf)
706 ("automake" ,automake)
713 ("libuuid" ,util-linux "lib")
715 ("readline" ,readline)
718 ("rdma-core" ,rdma-core)))
719 (home-page "https://www.gluster.org")
720 (synopsis "Distributed file system")
721 (description "GlusterFS is a distributed scalable network file system
722 suitable for data-intensive tasks such as cloud storage and media streaming.
723 It allows rapid provisioning of additional storage based on your storage
724 consumption needs. It incorporates automatic failover as a primary feature.
725 All of this is accomplished without a centralized metadata server.")
726 ;; The user may choose either LGPLv3+ or GPLv2 only.
727 (license (list license:lgpl3+ license:gpl2+))))
729 (define-public curlftpfs
736 (uri (string-append "mirror://sourceforge/curlftpfs/curlftpfs/" version
737 "/curlftpfs-" version ".tar.gz"))
740 "0n397hmv21jsr1j7zx3m21i7ryscdhkdsyqpvvns12q7qwwlgd2f"))))
741 (build-system gnu-build-system)
744 (modify-phases %standard-phases
745 (add-after 'unpack 'fix-test
747 ;; One of the 512-Byte block counts is definitely wrong.
748 ;; See <https://sourceforge.net/p/curlftpfs/bugs/73/>.
749 (substitute* "tests/ftpfs-ls_unittest.c"
750 (("4426192") "12814800"))
757 `(("pkg-config" ,pkg-config)))
758 (home-page "http://curlftpfs.sourceforge.net/")
759 (synopsis "Mount remote file systems over FTP")
761 "This is a file system client based on the FTP File Transfer Protocol.")
762 (license license:gpl2+)))
764 (define-public libnfs
771 (url "https://github.com/sahlberg/libnfs")
772 (commit (string-append "libnfs-" version))))
773 (file-name (git-file-name name version))
776 "115p55y2cbs92z5lmcnjx1v29lwinpgq4sha9v1kq1vd8674h404"))))
777 (build-system gnu-build-system)
778 (home-page "https://github.com/sahlberg/libnfs")
780 `(("autoconf" ,autoconf)
781 ("automake" ,automake)
783 ("pkg-config" ,pkg-config)))
784 (synopsis "Client library for accessing NFS shares")
785 (description "LIBNFS is a client library for accessing NFS shares over a
786 network. LIBNFS offers three different APIs, for different use :
789 @item RAW, a fully asynchronous low level RPC library for NFS protocols. This
790 API provides very flexible and precise control of the RPC issued.
791 @item NFS ASYNC, a fully asynchronous library for high level vfs functions
792 @item NFS SYNC, a synchronous library for high level vfs functions.
794 (license (list license:lgpl2.1+ ; library
795 license:gpl3+ ; tests
796 license:bsd-3 ; copied nsf4 files
799 (define-public apfs-fuse
800 ;; Later versions require FUSE 3.
801 (let ((commit "7b89418e8dc27103d3c4f8fa348086ffcd634c17")
805 (version (git-version "0.0.0" revision commit))
809 (url "https://github.com/sgan81/apfs-fuse")
810 (recursive? #t) ; for lzfse
814 "0x2siy3cmnm9wsdfazg3xc8r3kbg73gijmnn1vjw33pp71ckylxr"))
815 (file-name (git-file-name name version))))
816 (build-system cmake-build-system)
818 `(#:tests? #f ; No test suite
820 '("-DUSE_FUSE3=OFF") ; FUSE 3 is not packaged yet.
822 (modify-phases %standard-phases
823 ;; No 'install' target in CMakeLists.txt
825 (lambda* (#:key outputs #:allow-other-keys)
826 (let* ((out (assoc-ref outputs "out"))
827 (bin (string-append out "/bin"))
828 (lib (string-append out "/lib"))
829 (doc (string-append out "/share/doc/"
830 (string-append ,name "-" ,version))))
831 (install-file "apfs-dump" bin)
832 (install-file "apfs-dump-quick" bin)
833 (install-file "apfs-fuse" bin)
834 (install-file "libapfs.a" lib)
835 (install-file "../source/README.md" doc)
841 (synopsis "Read-only FUSE driver for the APFS file system")
842 (description "APFS-FUSE is a read-only FUSE driver for the @dfn{Apple File
843 System} (APFS). It is currently in an experimental state — it may not be able
844 to read all files, and it does not support all the compression methods in
846 (home-page "https://github.com/sgan81/apfs-fuse")
847 (license license:gpl2+))))
853 (outputs '("out" "module" "src"))
857 (uri (string-append "https://github.com/zfsonlinux/zfs/releases"
858 "/download/zfs-" version
859 "/zfs-" version ".tar.gz"))
861 (base32 "0v2zshimz5miyj8mbskb52pnzyl1s4rhpr6208zq549v8g2l84vx"))))
862 (build-system linux-module-build-system)
864 `(;; The ZFS kernel module should not be downloaded since the license
865 ;; terms don't allow for distributing it, only building it locally.
867 ;; Tests cannot run in an unprivileged build environment.
870 (modify-phases %standard-phases
871 (add-after 'configure 'really-configure
872 (lambda* (#:key outputs inputs #:allow-other-keys)
873 (let ((out (assoc-ref outputs "out")))
874 (substitute* "configure"
875 (("-/bin/sh") (string-append "-" (which "sh"))))
876 (invoke "./configure"
878 (string-append "--prefix=" out)
879 (string-append "--with-dracutdir=" out "/lib/dracut")
880 (string-append "--with-udevdir=" out "/lib/udev")
881 (string-append "--with-mounthelperdir=" out "/sbin")
882 (string-append "--with-linux="
883 (assoc-ref inputs "linux-module-builder")
884 "/lib/modules/build")))))
885 (add-after 'unpack 'patch-source
886 (lambda* (#:key inputs outputs #:allow-other-keys)
887 (let ((out (assoc-ref outputs "out"))
888 (src (assoc-ref outputs "src"))
889 (util-linux (assoc-ref inputs "util-linux"))
890 (nfs-utils (assoc-ref inputs "nfs-utils"))
891 (kmod (assoc-ref inputs "kmod-runtime")))
892 (substitute* "etc/Makefile.in"
893 ;; This just contains an example configuration file for
894 ;; configuring ZFS on traditional init systems, skip it
895 ;; since we cannot use it anyway; the install target becomes
897 (("= default ") "= "))
898 (substitute* "lib/libzfs/os/linux/libzfs_util_os.c"
899 ;; Use path to /gnu/store/*-kmod in actual path that is exec'ed.
900 (("\"/sbin/modprobe\"")
901 (string-append "\"" kmod "/bin/modprobe" "\""))
902 ;; Just use 'modprobe' in message to user, since Guix
903 ;; does not have a traditional /sbin/
904 (("'/sbin/modprobe ") "'modprobe "))
905 (substitute* "contrib/Makefile.in"
906 ;; This is not configurable nor is its hard-coded /usr prefix.
908 (substitute* "module/os/linux/zfs/zfs_ctldir.c"
909 (("/usr/bin/env\", \"umount")
910 (string-append util-linux "/bin/umount\", \"-n"))
911 (("/usr/bin/env\", \"mount")
912 (string-append util-linux "/bin/mount\", \"-n")))
913 (substitute* "lib/libzfs/os/linux/libzfs_mount_os.c"
914 (("/bin/mount") (string-append util-linux "/bin/mount"))
915 (("/bin/umount") (string-append util-linux "/bin/umount")))
916 (substitute* "lib/libshare/os/linux/nfs.c"
917 (("/usr/sbin/exportfs")
918 (string-append nfs-utils "/sbin/exportfs")))
919 (substitute* "config/zfs-build.m4"
920 (("\\$sysconfdir/init.d") (string-append out "/etc/init.d")))
921 (substitute* '("etc/zfs/Makefile.am"
922 "cmd/zed/Makefile.am")
923 (("\\$\\(sysconfdir)") (string-append out "/etc")))
924 (substitute* "cmd/vdev_id/vdev_id"
925 (("PATH=/bin:/sbin:/usr/bin:/usr/sbin")
926 (string-append "PATH="
927 (dirname (which "chmod")) ":"
928 (dirname (which "grep")) ":"
929 (dirname (which "sed")) ":"
930 (dirname (which "gawk")))))
931 (substitute* "contrib/pyzfs/Makefile.in"
932 ((".*install-lib.*") ""))
933 (substitute* '("Makefile.am" "Makefile.in")
934 (("\\$\\(prefix)/src") (string-append src "/src")))
935 (substitute* (find-files "udev/rules.d/" ".rules.in$")
936 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))))
939 (lambda _ (invoke "make")))
941 (lambda* (#:key outputs inputs native-inputs #:allow-other-keys)
942 (let* ((out (assoc-ref outputs "out"))
943 (moddir (assoc-ref outputs "module"))
944 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
945 (invoke "make" "install"
946 (string-append "DEFAULT_INITCONF_DIR=" out "/etc/default")
947 (string-append "DEPMOD=" kmod "/bin/depmod")
948 (string-append "INSTALL_PATH=" out)
949 (string-append "INSTALL_MOD_PATH=" moddir)
950 "INSTALL_MOD_STRIP=1")
951 (install-file "contrib/bash_completion.d/zfs"
952 (string-append out "/share/bash-completion/completions"))
957 ("pkg-config" ,pkg-config)))
960 ("kmod-runtime" ,kmod)
962 ("libtirpc" ,libtirpc)
963 ("nfs-utils" ,nfs-utils)
966 ("python-cffi" ,python-cffi)
967 ("util-linux" ,util-linux)
968 ("util-linux:lib" ,util-linux "lib")
970 (home-page "https://zfsonlinux.org/")
971 (synopsis "OpenZFS on Linux")
973 "OpenZFS is an advanced file system and volume manager which was
974 originally developed for Solaris and is now maintained by the OpenZFS
976 (license license:cddl1.0)))
978 (define-public mergerfs
985 (uri (string-append "https://github.com/trapexit/mergerfs/releases/download/"
986 version "/mergerfs-" version ".tar.gz"))
989 "0k4asbg5n9dhy5jpjkw6simqqnr1zira2y4i71cq05091dfwm90p"))))
990 (build-system gnu-build-system)
992 `(#:tests? #f ; No tests exist.
994 (modify-phases %standard-phases
996 (add-after 'unpack 'fix-paths
997 (lambda* (#:key inputs outputs #:allow-other-keys)
999 ;; These were copied from the package libfuse.
1000 (substitute* '("libfuse/lib/mount_util.c" "libfuse/util/mount_util.c")
1001 (("/bin/(u?)mount" _ maybe-u)
1002 (string-append (assoc-ref inputs "util-linux")
1003 "/bin/" maybe-u "mount")))
1004 (substitute* '("libfuse/util/mount.mergerfs.c")
1007 ;; The Makefile does not allow overriding PREFIX via make variables.
1008 (substitute* '("Makefile" "libfuse/Makefile")
1009 (("= /usr/local") (string-append "= " (assoc-ref outputs "out")))
1010 (("= /sbin") "= $(EXEC_PREFIX)/sbin")
1011 ;; cannot chown as build user
1012 (("chown root(:root)?") "true"))
1014 ;; mergerfs bundles a heavily modified copy of libfuse.
1015 (inputs `(("util-linux" ,util-linux)))
1016 (home-page "https://github.com/trapexit/mergerfs")
1017 (synopsis "Featureful union file system")
1018 (description "mergerfs is a union file system geared towards simplifying
1019 storage and management of files across numerous commodity storage devices. It
1020 is similar to mhddfs, unionfs, and aufs.")
1022 license:isc ; mergerfs
1023 license:gpl2 license:lgpl2.0 ; Imported libfuse code.
1026 (define-public mergerfs-tools
1027 (let ((commit "480296ed03d1c3c7909697d7ef96d35840ee26b8")
1030 (name "mergerfs-tools")
1031 ;; No released version exists.
1032 (version (git-version "0.0" revision commit))
1037 (url "https://github.com/trapexit/mergerfs-tools")
1039 (file-name (git-file-name name version))
1042 "0xr06gi4xcr832rzy0hkp5c1n231s7w5iq1nkjvx9kvm0dl7chpq"))))
1043 (build-system copy-build-system)
1045 `(("python" ,python)
1046 ("python-xattr" ,python-xattr)
1052 (modify-phases %standard-phases
1053 (add-after 'unpack 'patch-paths
1054 (lambda* (#:key inputs #:allow-other-keys)
1055 (substitute* (find-files "src" "^mergerfs\\.")
1057 (string-append "'" (assoc-ref inputs "rsync") "/bin/rsync'"))
1059 (string-append "'" (assoc-ref inputs "coreutils") "/bin/rm'")))
1060 (substitute* "src/mergerfs.mktrash"
1062 (string-append (assoc-ref inputs "python-xattr") "/bin/xattr"))
1064 (string-append (assoc-ref inputs "coreutils") "/bin/mkdir")))
1066 (synopsis "Tools to help manage data in a mergerfs pool")
1067 (description "mergerfs-tools is a suite of programs that can audit
1068 permissions and ownership of files and directories on a mergerfs volume,
1069 duplicates files and directories across branches in its pool, find and remove
1070 duplicate files, balance pool drives, consolidate files in a single mergerfs
1071 directory onto a single drive and create FreeDesktop.org Trash specification
1072 compatible directories.")
1073 (home-page "https://github.com/trapexit/mergerfs-tools")
1074 (license license:isc))))
1076 (define-public python-dropbox
1078 (name "python-dropbox")
1083 (uri (pypi-uri "dropbox" version))
1086 "0ml6z37k6nkhkiy483kvifs8im8z7vabd2g9jl6fkf1fzy3n6bym"))))
1087 (build-system python-build-system)
1088 (arguments '(#:tests? #f)) ; Tests require a network connection.
1090 `(("python-pytest" ,python-pytest)
1091 ("python-pytest-runner" ,python-pytest-runner)))
1093 `(("python-certifi" ,python-certifi)
1094 ("python-chardet" ,python-chardet)
1095 ("python-requests" ,python-requests)
1096 ("python-six" ,python-six)
1097 ("python-stone" ,python-stone)
1098 ("python-urllib3" ,python-urllib3)))
1099 (home-page "https://www.dropbox.com/developers")
1100 (synopsis "Official Dropbox API Client")
1101 (description "This package provides a Python SDK for integrating with the
1103 (license license:expat)))
1105 (define-public dbxfs
1112 (uri (pypi-uri "dbxfs" version))
1115 "1zz82d0mnql55397x4jx7z5rn857rf9zhjv895j93wpxdq10xwvk"))
1116 (patches (search-patches "dbxfs-remove-sentry-sdk.patch"))))
1117 (build-system python-build-system)
1119 '(#:tests? #f)) ; tests requires safefs
1121 `(("python-appdirs" ,python-appdirs)
1122 ("python-block-tracing" ,python-block-tracing)
1123 ("python-dropbox" ,python-dropbox)
1124 ("python-keyring" ,python-keyring)
1125 ("python-keyrings.alt" ,python-keyrings.alt)
1126 ("python-privy" ,python-privy)
1127 ("python-userspacefs" ,python-userspacefs)))
1128 (home-page "https://github.com/rianhunter/dbxfs")
1129 (synopsis "User-space file system for Dropbox")
1131 "@code{dbxfs} allows you to mount your Dropbox folder as if it were a
1132 local file system using FUSE.")
1133 (license license:gpl3+)))
1135 (define-public go-github-com-hanwen-fuse
1137 (name "go-github-com-hanwen-fuse")
1143 (url "https://github.com/hanwen/go-fuse")
1144 (commit (string-append "v" version))))
1145 (file-name (git-file-name name version))
1148 "1y44d08fxyis99s6jxdr6dbbw5kv3wb8lkhq3xmr886i4w41lz03"))))
1149 (build-system go-build-system)
1151 `(#:import-path "github.com/hanwen/go-fuse"))
1153 `(("go-golang-org-x-sys" ,go-golang-org-x-sys)))
1154 (home-page "https://github.com/hanwen/go-fuse")
1155 (synopsis "FUSE bindings for Go")
1157 "This package provides Go native bindings for the FUSE kernel module.")
1158 (license license:bsd-3)))
1168 (url "https://github.com/oniony/TMSU")
1169 (commit (string-append "v" version))))
1170 (file-name (git-file-name name version))
1173 "0834hah7p6ad81w60ifnxyh9zn09ddfgrll04kwjxwp7ypbv38wq"))))
1174 (build-system go-build-system)
1176 `(#:import-path "github.com/oniony/TMSU"
1177 #:unpack-path ".."))
1179 `(("go-github-com-mattn-go-sqlite3" ,go-github-com-mattn-go-sqlite3)
1180 ("go-github-com-hanwen-fuse" ,go-github-com-hanwen-fuse)))
1181 (home-page "https://github.com/oniony/TMSU")
1182 (synopsis "Tag files and access them through a virtual filesystem")
1184 "TMSU is a tool for tagging your files. It provides a simple
1185 command-line utility for applying tags and a virtual filesystem to give you a
1186 tag-based view of your files from any other program. TMSU does not alter your
1187 files in any way: they remain unchanged on disk, or on the network, wherever
1188 your put them. TMSU maintains its own database and you simply gain an
1189 additional view, which you can mount where you like, based upon the tags you
1191 (license license:gpl3+)))