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>
11 ;;; Copyright © 2021 Noisytoot <noisytoot@disroot.org>
13 ;;; This file is part of GNU Guix.
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28 (define-module (gnu packages file-systems)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
31 #:use-module (guix download)
32 #:use-module (guix git-download)
33 #:use-module (guix build-system cmake)
34 #:use-module (guix build-system copy)
35 #:use-module (guix build-system gnu)
36 #:use-module (guix build-system go)
37 #:use-module (guix build-system linux-module)
38 #:use-module (guix build-system python)
39 #:use-module (guix build-system trivial)
40 #:use-module (guix utils)
41 #:use-module (gnu packages)
42 #:use-module (gnu packages acl)
43 #:use-module (gnu packages admin)
44 #:use-module (gnu packages attr)
45 #:use-module (gnu packages autotools)
46 #:use-module (gnu packages base)
47 #:use-module (gnu packages bison)
48 #:use-module (gnu packages check)
49 #:use-module (gnu packages compression)
50 #:use-module (gnu packages crypto)
51 #:use-module (gnu packages curl)
52 #:use-module (gnu packages cyrus-sasl)
53 #:use-module (gnu packages datastructures)
54 #:use-module (gnu packages documentation)
55 #:use-module (gnu packages docbook)
56 #:use-module (gnu packages flex)
57 #:use-module (gnu packages gawk)
58 #:use-module (gnu packages glib)
59 #:use-module (gnu packages gnupg)
60 #:use-module (gnu packages golang)
61 #:use-module (gnu packages guile)
62 #:use-module (gnu packages kerberos)
63 #:use-module (gnu packages libffi)
64 #:use-module (gnu packages linux)
65 #:use-module (gnu packages nfs)
66 #:use-module (gnu packages onc-rpc)
67 #:use-module (gnu packages openldap)
68 #:use-module (gnu packages pcre)
69 #:use-module (gnu packages perl)
70 #:use-module (gnu packages photo)
71 #:use-module (gnu packages pkg-config)
72 #:use-module (gnu packages python)
73 #:use-module (gnu packages python-crypto)
74 #:use-module (gnu packages python-web)
75 #:use-module (gnu packages python-xyz)
76 #:use-module (gnu packages readline)
77 #:use-module (gnu packages rsync)
78 #:use-module (gnu packages sssd)
79 #:use-module (gnu packages sqlite)
80 #:use-module (gnu packages time)
81 #:use-module (gnu packages tls)
82 #:use-module (gnu packages valgrind)
83 #:use-module (gnu packages version-control)
84 #:use-module (gnu packages xml))
93 (uri (string-append "mirror://kernel.org/linux/daemons/autofs/"
94 "v" (version-major version) "/"
95 "autofs-" version ".tar.xz"))
97 (base32 "1myfz6a3wj2c4j9h5g44zj796fdi82jhp1s92w2hg6xp2632csx3"))))
98 (build-system gnu-build-system)
101 (list "--enable-ignore-busy" ; during shutdown
102 "--enable-sloppy-mount" ; support mount(8) -s
104 (string-append "--with-openldap="
105 (assoc-ref %build-inputs "openldap"))
106 (string-append "--with-sasl="
107 (assoc-ref %build-inputs "cyrus-sasl"))
108 "HAVE_SSS_AUTOFS=1" ; required to make sssldir click
109 (string-append "sssldir="
110 (assoc-ref %build-inputs "sssd")
111 "/lib/sssd/modules"))
112 #:tests? #f ; no test suite
114 (modify-phases %standard-phases
115 (add-before 'configure 'fix-hard-coded-search-path
117 (substitute* "configure"
118 (("^searchpath=\".*\"")
119 "searchpath=\"$PATH\""))
121 (add-before 'configure 'fix-rpath
122 (lambda* (#:key outputs #:allow-other-keys)
123 (let ((out (assoc-ref outputs "out")))
124 (substitute* "Makefile.rules"
125 (("^AUTOFS_LIB_LINK.*=" match)
126 (string-append match " -Wl,-rpath=" out "/lib"))))))
127 (add-before 'install 'omit-obsolete-lookup_nis.so-link
128 ;; Building lookup_yp.so depends on $(YPCLNT) but this doesn't,
129 ;; leading to a make error. Since it's broken, comment it out.
131 (substitute* "modules/Makefile"
132 (("ln -fs lookup_yp.so" match)
133 (string-append "# " match)))
138 ("pkg-config" ,pkg-config)
139 ("rpcsvc-proto" ,rpcsvc-proto)))
141 `(("cyrus-sasl" ,cyrus-sasl)
142 ("e2fsprogs" ,e2fsprogs) ; for e[234]fsck
143 ("libtirpc" ,libtirpc)
144 ("libxml2" ,libxml2) ; needed for LDAP, SASL
145 ("mit-krb5" ,mit-krb5) ; needed for LDAP, SASL
146 ("nfs-utils" ,nfs-utils) ; for mount.nfs
147 ("openldap" ,openldap)
148 ("openssl" ,openssl) ; needed for SASL
150 ("util-linux" ,util-linux))) ; for mount, umount
151 ;; XXX A directory index is the closest thing this has to a home page.
152 (home-page "https://www.kernel.org/pub/linux/daemons/autofs/")
153 (synopsis "Kernel-based automounter for Linux")
155 "Autofs is a kernel-based automounter for use with the Linux autofs4
156 module. It automatically mounts selected file systems when they are used and
157 unmounts them after a set period of inactivity. This provides
158 centrally-managed, consistent file names for users and applications, even in a
159 large and/or frequently changing (network) environment.")
160 ;; fedfs/ is GPL-2-only but not built.
161 (license (list license:bsd-3 ; modules/cyrus-sasl.c
162 license:gpl2+)))) ; the rest
164 (define-public bindfs
170 (uri (string-append "https://bindfs.org/downloads/bindfs-"
174 "1av8dj9i1g0105fs5r9srqqsp7yahlhwc0yl8i1szyfdls23bp84"))))
175 (build-system gnu-build-system)
177 ;; XXX: The tests have no hope of passing until there is a "nogroup"
178 ;; entry (or at least some group to which the guix builder does
179 ;; not belong) in the /etc/group file of the build environment.
180 ;; Currently we do not have such a group. Disable tests for now.
183 ;; Native inputs to run the tests
185 ;; ("valgrind" ,valgrind)
187 `(("pkg-config" ,pkg-config)))
190 (home-page "https://bindfs.org")
191 (synopsis "Bind mount a directory and alter permission bits")
193 "@command{bindfs} is a FUSE file system for mounting a directory to
194 another location, similar to @command{mount --bind}. It can be used for:
196 @item Making a directory read-only.
197 @item Making all executables non-executable.
198 @item Sharing a directory with a list of users (or groups).
199 @item Modifying permission bits using rules with chmod-like syntax.
200 @item Changing the permissions with which files are created.
202 (license license:gpl2+)))
204 (define-public cachefilesd-inotify
206 (name "cachefilesd-inotify")
212 (url "https://gitlab.com/tomalok/cachefilesd-inotify")
214 (file-name (git-file-name name version))
216 (base32 "0qkrpz69ql6fb3fwh0l35hhf9znnqyxhgv5fzd1gl2a2kz13rq5a"))))
217 (build-system gnu-build-system)
220 (list (string-append "CC=" ,(cc-for-target))
221 ;; The Makefile doesn't support prefix= or similar.
222 (string-append "DESTDIR=" (assoc-ref %outputs "out"))
224 #:tests? #f ; no test suite
226 (modify-phases %standard-phases
227 (delete 'configure)))) ; no configure script
228 (home-page "https://gitlab.com/tomalok/cachefilesd-inotify")
230 "CacheFiles file system cache management daemon (using @code{inotify})")
232 "This package provides the user space component of CacheFiles, a caching
233 back end that uses a directory on a locally mounted file system (such as ext4)
234 as a cache to speed up (by reducing) access to a slower file system and make it
235 appear more reliable.
237 The cached file system is often a network file system such as NFS or CIFS, but
238 can also be a local file system like ISO 9660 on a slow optical drive.
240 CacheFiles itself is part of the kernel but relies on this user space
241 @command{cachefilesd} daemon to perform maintenance tasks like culling and
242 reaping stale nodes. Only one such daemon can be running at a time, and
243 communicates with the kernel through the @file{/dev/cachefiles} character
246 This version modifies David Howells original cachefilesd---which appears
247 unmaintained---to use the @code{inotify} API instead of the deprecated
248 @code{dnotify} to monitor file changes.")
249 (license license:gpl2+)))
251 (define-public davfs2
258 (uri (string-append "https://download.savannah.nongnu.org/releases/"
259 "davfs2/davfs2-" version ".tar.gz"))
261 (base32 "0l1vnv5lfigciwg17p10zxwhzj4qw2d9kw30prr7g4dxhmb6fsrf"))))
262 (build-system gnu-build-system)
265 (list "--sysconfdir=/etc" ; so man pages & binaries contain /etc
266 (string-append "--docdir=" (assoc-ref %outputs "out")
267 "/share/doc/" ,name "-" ,version)
268 (string-append "ssbindir=" (assoc-ref %outputs "out") "/sbin")
269 ;; The default ‘davfs2’ user and group don't exist on most systems.
273 (modify-phases %standard-phases
274 (add-after 'unpack 'omit-redundancy
275 ;; Don't install redundant copies of /etc examples into /share.
277 (substitute* "etc/Makefile.in"
278 (("(dist_pkgdata_DATA =.*) davfs2.conf secrets(.*)"
280 (string-append prefix suffix)))
282 (add-after 'unpack 'patch-file-names
284 ;; Don't auto-load the FUSE kernel module. That's up to root.
285 ;; XXX If/when we restore the previous behaviour, make sure not
286 ;; to introduce a security hole when mount.davfs is setuid.
287 (substitute* "src/kernel_interface.c"
288 (("/sbin/modprobe") "/modprobe/disabled"))
291 (lambda* (#:key make-flags outputs #:allow-other-keys)
292 (let ((out (assoc-ref outputs "out")))
293 (apply invoke "make" "install"
294 (string-append "pkgsysconfdir=" out "/etc")
299 ;; Neon requires but doesn't propagate zlib, nor would we want that.
300 ;; XZ as well, but that's already present in the build environment.
302 (home-page "https://savannah.nongnu.org/projects/davfs2")
303 (synopsis "Mount remote WebDAV resources in the local file system")
305 "The @acronym{WebDAV, Web Distributed Authoring and Versioning} extension
306 to the HTTP protocol defines a standard way to author resources on a remote Web
307 server. Davfs2 exposes such resources as a typical file system which can be
308 used by standard applications with no built-in support for WebDAV, such as the
309 GNU coreutils (@command{cp}, @command{mv}, etc.) or a graphical word processor.
311 Davfs2 works with most WebDAV servers with no or little configuration. It
312 supports TLS (HTTPS), HTTP proxies, HTTP basic and digest authentication, and
313 client certificates. It performs extensive caching to avoid unnecessary network
314 traffic, stay responsive even over slow or unreliable connections, and prevent
315 data loss. It aims to make use by unprivileged users as easy and secure as
318 However, davfs2 is not a full-featured WebDAV client. The file system interface
319 and the WebDAV protocol are quite different. Translating between the two is not
321 (license (list license:bsd-2 ; src/fuse_kernel.h
322 license:gpl3+)))) ; everything else
324 (define-public exfat-utils
332 "https://github.com/relan/exfat/releases/download/v"
333 version "/exfat-utils-" version ".tar.gz"))
335 (base32 "0da8f8mm1sbwqp7prh78qk33xm0b8kk2d5is7mh2szlhgdxd1syz"))))
336 (build-system gnu-build-system)
337 (home-page "https://github.com/relan/exfat")
338 (synopsis "Utilities to manipulate exFAT file systems")
340 "This package provides an implementation of the exFAT file system,
341 including command-line tools to validate exFAT file systems and to create new
343 (license license:gpl2+)))
345 (define-public fsarchiver
354 (url "https://github.com/fdupoux/fsarchiver")
356 (file-name (git-file-name name version))
358 (base32 "1ry2sdkfbg4bwcldk42g1i3wa3z4pr9yh9dil6ilhwcvhqiw41zc"))))
359 (build-system gnu-build-system)
361 `(("autoconf" ,autoconf)
362 ("automake" ,automake)
363 ("pkg-config" ,pkg-config)))
366 ("e2fsprogs" ,e2fsprogs)
367 ("libgcrypt" ,libgcrypt)
370 ("util-linux" ,util-linux "lib")
373 ("zstd:lib" ,zstd "lib")))
374 (synopsis "File system back-up, deployment, and migration tool")
376 "FSArchiver saves the contents of a file system to a compressed archive
377 file, and restores it to a different file system and/or partition. This
378 partition can be of a different size than the original and FSArchiver will
379 create a new file system if none exists.
381 All standard file attributes supported by the kernel are preserved, including
382 file permissions, timestamps, symbolic and hard links, and extended attributes.
384 Each file in the archive is protected by a checksum. If part of the archive
385 is corrupted you'll lose the affected file(s) but not the whole back-up.")
386 (home-page "https://www.fsarchiver.org/")
387 (license license:gpl2)))
389 (define-public gphotofs
397 (string-append "mirror://sourceforge/gphoto/gphotofs/" version
398 "/gphotofs-0.5.tar.gz"))
401 "04slwhr6ap9xcc27wphk22ad8yn79ngyy5z10lxams3k5liahvc2"))))
402 (build-system gnu-build-system)
404 `(("pkg-config" ,pkg-config)))
408 ("libgphoto2" ,libgphoto2)))
409 (synopsis "Virtual file system for libgphoto2 using FUSE")
410 (description "GPhotoFS is a FUSE file system module to mount your camera as
411 a file system on Linux. This allow using your camera with any tool able to read
412 from a mounted file system.")
413 (home-page "http://www.gphoto.org/proj/gphotofs/")
414 (license license:gpl2+)))
416 (define-public bcachefs-tools
417 (let ((commit "fe1bb39aa52d9140981ba1e96f3c95ddf14006ce")
420 (name "bcachefs-tools")
421 (version (git-version "0.1" revision commit))
426 (url "https://evilpiepirate.org/git/bcachefs-tools.git")
428 (file-name (git-file-name name version))
430 (base32 "1ks6w2v76pfpp70cv1d6znxaw1g5alz1v6hf8z9gvj15r94vgpwz"))))
431 (build-system gnu-build-system)
434 (list ,(string-append "VERSION=" version) ; bogus vX.Y-nogit otherwise
435 (string-append "PREFIX=" (assoc-ref %outputs "out"))
436 "INITRAMFS_DIR=$(PREFIX)/share/initramfs-tools"
437 ,(string-append "CC=" (cc-for-target))
438 ,(string-append "PKG_CONFIG=" (pkg-config-for-target))
441 (modify-phases %standard-phases
442 (delete 'configure) ; no configure script
443 (add-after 'install 'promote-mount.bcachefs.sh
444 ;; XXX The (optional) mount.bcachefs helper requires rust:cargo.
445 ;; This alternative shell script does the job well enough for now.
446 (lambda* (#:key inputs outputs #:allow-other-keys)
447 (let ((out (assoc-ref outputs "out")))
448 (with-directory-excursion (string-append out "/sbin")
449 (rename-file "mount.bcachefs.sh" "mount.bcachefs")
450 ;; WRAP-SCRIPT causes bogus ‘Insufficient arguments’ errors.
451 (wrap-program "mount.bcachefs"
453 ,(cons (string-append out "/sbin")
455 (string-append (assoc-ref inputs input)
459 "util-linux"))))))))))
460 #:tests? #f)) ; XXX 6 valgrind tests fail
462 `(("pkg-config" ,pkg-config)
465 ("python-pytest" ,python-pytest)
466 ("valgrind" ,valgrind)))
469 ("keyutils" ,keyutils)
471 ("libscrypt" ,libscrypt)
472 ("libsodium" ,libsodium)
474 ("util-linux:lib" ,util-linux "lib") ; lib{blkid,uuid}
477 ("zstd:lib" ,zstd "lib")
479 ;; Only for mount.bcachefs.sh.
480 ("coreutils" ,coreutils-minimal)
482 ("util-linux" ,util-linux)))
483 (home-page "https://bcachefs.org/")
484 (synopsis "Tools to create and manage bcachefs file systems")
486 "The bcachefs-tools are command-line utilities for creating, checking,
487 and otherwise managing bcachefs file systems.
489 Bcachefs is a @acronym{CoW, copy-on-write} file system supporting native
490 encryption, compression, snapshots, and (meta)data checksums. It can use
491 multiple block devices for replication and/or performance, similar to RAID.
493 In addition, bcachefs provides all the functionality of bcache, a block-layer
494 caching system, and lets you assign different roles to each device based on its
495 performance and other characteristics.")
496 (license license:gpl2+))))
498 (define-public bcachefs-tools/static
500 (inherit bcachefs-tools)
501 (name "bcachefs-tools-static")
503 (substitute-keyword-arguments (package-arguments bcachefs-tools)
504 ((#:make-flags make-flags)
506 (list "LDFLAGS=-static")))))
508 `(("eudev:static" ,eudev "static")
509 ("libscrypt:static" ,libscrypt "static")
510 ("lz4:static" ,lz4 "static")
511 ("util-linux:static" ,util-linux "static") ; lib{blkid,uuid}
512 ("zlib" ,zlib "static")
513 ("zstd:static" ,zstd "static")
514 ,@(package-inputs bcachefs-tools)))))
516 (define-public bcachefs/static
518 (name "bcachefs-static")
519 (version (package-version bcachefs-tools))
520 (build-system trivial-build-system)
523 `(("bcachefs-tools" ,bcachefs-tools/static)))
525 `(#:modules ((guix build utils))
528 (use-modules (guix build utils)
531 (let* ((bcachefs-tools (assoc-ref %build-inputs "bcachefs-tools"))
532 (out (assoc-ref %outputs "out")))
534 (with-directory-excursion out
535 (install-file (string-append bcachefs-tools
538 (remove-store-references "sbin/bcachefs")
539 (invoke "sbin/bcachefs" "version") ; test suite
541 (home-page (package-home-page bcachefs-tools))
542 (synopsis "Statically-linked bcachefs command from bcachefs-tools")
543 (description "This package provides the statically-linked @command{bcachefs}
544 from the bcachefs-tools package. It is meant to be used in initrds.")
545 (license (package-license bcachefs-tools))))
547 (define-public exfatprogs
555 (url "https://github.com/exfatprogs/exfatprogs")
557 (file-name (git-file-name name version))
559 (base32 "19pbybgbfnvjb3n944ihrn1r8ch4dm8dr0d44d6w7p63dcp372xy"))))
560 (build-system gnu-build-system)
563 (list "--disable-static")))
565 `(("autoconf" ,autoconf)
566 ("automake" ,automake)
568 ("pkg-config" ,pkg-config)))
569 (home-page "https://github.com/exfatprogs/exfatprogs")
570 (synopsis "Tools to create, check, and repair exFAT file systems")
572 "These are command-line user space tools for the @acronym{exFAT,
573 Extensible File Allocation Table} file systems. Included are
574 @command{mkfs.exfat} to create (format) new exFAT file systems, and
575 @command{fsck.exfat} to check their consistency and repair them.")
576 (license license:gpl2+)))
578 (define-public httpfs2
585 (uri (string-append "mirror://sourceforge/httpfs/httpfs2/"
586 "httpfs2-" version ".tar.gz"))
589 "1h8ggvhw30n2r6w11n1s458ypggdqx6ldwd61ma4yd7binrlpjq1"))))
590 (build-system gnu-build-system)
592 `(("asciidoc" ,asciidoc)
593 ("docbook-xml" ,docbook-xml)
596 ("pkg-config" ,pkg-config)))
602 (modify-phases %standard-phases
603 (delete 'configure) ; no configure script
605 ;; There's no ‘install’ target. Install all variants manually.
606 (lambda* (#:key outputs #:allow-other-keys)
607 (let* ((out (assoc-ref outputs "out"))
608 (bin (string-append out "/bin"))
609 (man1 (string-append out "/share/man/man1")))
614 (let ((man1-page (string-append variant ".1")))
615 (install-file variant bin)
616 (install-file man1-page man1)))
622 #:make-flags (list "CC=gcc")
623 #:parallel-build? #f ; can result in missing man pages
624 #:tests? #f)) ; no tests
625 (home-page "https://sourceforge.net/projects/httpfs/")
626 (synopsis "Mount remote files over HTTP")
627 (description "httpfs2 is a @code{fuse} file system for mounting any
628 @dfn{HyperText} (HTTP or HTTPS) URL. It uses HTTP/1.1 byte ranges to request
629 arbitrary bytes from the web server, without needing to download the entire
630 file. This is particularly useful with large archives such as ZIP files and
631 ISO images when you only need to inspect their contents or extract specific
632 files. Since the HTTP protocol itself has no notion of directories, only a
633 single file can be mounted.")
634 (license license:gpl2+)))
636 (define-public jfsutils
643 (uri (string-append "http://jfs.sourceforge.net/project/pub/jfsutils-"
646 (base32 "0kbsy2sk1jv4m82rxyl25gwrlkzvl3hzdga9gshkxkhm83v1aji4"))
647 (patches (search-patches "jfsutils-add-sysmacros.patch"
648 "jfsutils-gcc-compat.patch"
649 "jfsutils-include-systypes.patch"))))
650 (build-system gnu-build-system)
652 `(("util-linux" ,util-linux "lib")))
653 (home-page "http://jfs.sourceforge.net/home.html")
654 (synopsis "Utilities for managing JFS file systems")
656 "The JFSutils are a collection of utilities for managing the @acronym{JFS,
657 Journaled File System}, a 64-bit journaling file system created by IBM and later
658 ported to the kernel Linux. The following commands are available:
660 @item @command{fsck.jfs}: check and repair a JFS file system or replay its
662 @item @command{logdump}: dump the JFS journal log.
663 @item @command{logredo}: replay the JFS journal log.
664 @item @command{mkfs.jfs}: create a new JFS file system.
665 @item @command{xchklog}: save a JFS fsck log to a file.
666 @item @command{xchkdmp}: dump the contents of such a log file.
667 @item @command{xpeek}: a JFS file system editor with a shell-like interface.
669 (license license:gpl3+))) ; no explicit version given
671 (define-public jfsutils/static
675 (name "jfsutils-static")
677 `(("util-linux:static" ,util-linux "static")
678 ,@(package-inputs jfsutils))))))
680 (define-public jfs_fsck/static
682 (name "jfs_fsck-static")
683 (version (package-version jfsutils))
685 (build-system trivial-build-system)
687 `(#:modules ((guix build utils))
690 (use-modules (guix build utils)
693 (let* ((jfsutils (assoc-ref %build-inputs "jfsutils"))
695 (out (assoc-ref %outputs "out"))
696 (sbin (string-append out "/sbin")))
698 (with-directory-excursion sbin
699 (install-file (string-append jfsutils "/sbin/" fsck)
701 (remove-store-references fsck)
705 `(("jfsutils" ,jfsutils/static)))
706 (home-page (package-home-page jfsutils))
707 (synopsis "Statically-linked jfs_fsck command from jfsutils")
708 (description "This package provides statically-linked jfs_fsck command taken
709 from the jfsutils package. It is meant to be used in initrds.")
710 (license (package-license jfsutils))))
712 (define-public disorderfs
720 (url "https://salsa.debian.org/reproducible-builds/disorderfs.git")
722 (file-name (git-file-name name version))
725 "1pnrj0h8sgqwgsc18vz3fkqsp6vhigdbi75vdj0si1r6wgslnr7z"))))
726 (build-system gnu-build-system)
728 `(("pkg-config" ,pkg-config)))
733 `(#:phases (modify-phases %standard-phases
734 (delete 'configure)) ; no configure script
735 #:make-flags (let ((out (assoc-ref %outputs "out")))
736 (list (string-append "PREFIX=" out)))
738 ;; FIXME: Tests require 'run-parts' which is not in Guix yet.
740 (home-page "https://salsa.debian.org/reproducible-builds/disorderfs")
741 (synopsis "FUSE file system that introduces non-determinism")
743 "An overlay FUSE file system that introduces non-determinism
744 into file system metadata. For example, it can randomize the order
745 in which directory entries are read. This is useful for detecting
746 non-determinism in the build process.")
747 (license license:gpl3+)))
749 (define-public glusterfs
756 (uri (string-append "https://download.gluster.org/pub/gluster/glusterfs/"
757 (version-major version) "/"
758 (version-major+minor version) "/"
759 "glusterfs-" version ".tar.gz"))
762 "0yzhx710ypj0j3m5dcgmmgvkp7p0rmmp2p7ld0axrm4vpwc2b1wa"))))
763 (build-system gnu-build-system)
766 (let ((out (assoc-ref %outputs "out"))
767 (p2 (assoc-ref %build-inputs "python-2")))
768 (list (string-append "PYTHON=" p2 "/bin/python")
769 (string-append "--with-initdir=" out "/etc/init.d")
770 (string-append "--with-mountutildir=" out "/sbin")
771 "--enable-cmocka" ; unit tests
772 ;; "--enable-debug" ; debug build options
773 ;; "--enable-asan" ; Address Sanitizer
774 ;; "--enable-tsan" ; ThreadSanitizer
777 (modify-phases %standard-phases
778 (add-before 'configure 'autogen
779 (lambda _ (invoke "./autogen.sh"))))))
781 `(("pkg-config" ,pkg-config)
782 ("libtirpc" ,libtirpc)
783 ("rpcsvc-proto" ,rpcsvc-proto)
784 ("python-2" ,python-2) ; must be version 2
788 ("autoconf" ,autoconf)
789 ("automake" ,automake)
796 ("libuuid" ,util-linux "lib")
798 ("readline" ,readline)
801 ("rdma-core" ,rdma-core)))
802 (home-page "https://www.gluster.org")
803 (synopsis "Distributed file system")
804 (description "GlusterFS is a distributed scalable network file system
805 suitable for data-intensive tasks such as cloud storage and media streaming.
806 It allows rapid provisioning of additional storage based on your storage
807 consumption needs. It incorporates automatic failover as a primary feature.
808 All of this is accomplished without a centralized metadata server.")
809 ;; The user may choose either LGPLv3+ or GPLv2 only.
810 (license (list license:lgpl3+ license:gpl2+))))
812 (define-public curlftpfs
819 (uri (string-append "mirror://sourceforge/curlftpfs/curlftpfs/" version
820 "/curlftpfs-" version ".tar.gz"))
823 "0n397hmv21jsr1j7zx3m21i7ryscdhkdsyqpvvns12q7qwwlgd2f"))))
824 (build-system gnu-build-system)
827 (modify-phases %standard-phases
828 (add-after 'unpack 'fix-test
830 ;; One of the 512-Byte block counts is definitely wrong.
831 ;; See <https://sourceforge.net/p/curlftpfs/bugs/73/>.
832 (substitute* "tests/ftpfs-ls_unittest.c"
833 (("4426192") "12814800"))
840 `(("pkg-config" ,pkg-config)))
841 (home-page "http://curlftpfs.sourceforge.net/")
842 (synopsis "Mount remote file systems over FTP")
844 "This is a file system client based on the FTP File Transfer Protocol.")
845 (license license:gpl2+)))
847 (define-public libeatmydata
849 (name "libeatmydata")
854 (uri (string-append "https://www.flamingspork.com/projects/libeatmydata/"
855 "libeatmydata-" version ".tar.gz"))
857 (base32 "1qycv1cvy6fr3v5rxilnsqxllwyfbqlcairlh31x2dnjsx28jnqf"))))
858 (build-system gnu-build-system)
860 ;; All tests pass---but only if the host kernel allows PTRACE_TRACEME.
863 (list "--disable-static")
865 (modify-phases %standard-phases
866 (add-after 'unpack 'patch-file-names
867 (lambda* (#:key inputs #:allow-other-keys)
868 (substitute* (list "eatmydata.in" "eatmydata.sh.in")
869 (("basename|readlink|uname" command)
870 (string-append (assoc-ref inputs "coreutils") "/bin/" command)))))
871 (add-before 'patch-file-names 'tighten-symlink-mode
872 ;; When the ‘eatmydata’ helper detects that it's a symlink, it will
873 ;; transparently invoke the command of the same name. However, it's
874 ;; *always* a link in Guix profiles and doesn't handle that well.
875 ;; Patch it to treat its own $name specially.
877 (substitute* "eatmydata.in"
878 (("-L \"\\$0\"" match)
879 (string-append match " ] && [ "
880 "\"x$(basename \"$0\")\" != \"x$name\"")))))
881 (add-after 'install 'install-debian-files
882 (lambda* (#:key inputs outputs #:allow-other-keys)
883 (let* ((debian (assoc-ref inputs "debian-files"))
884 (out (assoc-ref outputs "out"))
885 (share (string-append out "/share")))
886 (invoke "tar" "xvf" debian)
887 (with-directory-excursion "debian"
888 (install-file "eatmydata.1" (string-append share "/man/man1"))
889 (install-file "eatmydata.bash-completion"
890 (string-append share "/bash-completion"
891 "/completions")))))))))
893 `(("debian-files" ; for the man page
896 (uri (string-append "https://deb.debian.org/debian/pool/main/"
897 "libe/libeatmydata/libeatmydata_" version
900 (base32 "0q6kx1bf870jj52a2vm5p5xlrr89g2zs8wyhlpn80pys9p28nikx"))))
901 ;; For the test suite.
905 `(("coreutils" ,coreutils)))
906 (home-page "https://www.flamingspork.com/projects/libeatmydata/")
907 (synopsis "Transparently ignore calls to synchronize data safely to disk")
909 "Libeatmydata transparently disables most ways a program might force data
910 to be written to the file system, such as @code{fsync()} or @code{open(O_SYNC)}.
912 Such synchronisation calls provide important data integrity guarantees but are
913 expensive to perform and can significantly slow down software that (over)uses
916 This price is worth paying if you care about the files being modified---which is
917 typically the case---or when manipulating important components of your system.
918 Please, @emph{do not} use something called ``eat my data'' in such cases!
920 However, it does not make sense to accept this performance hit if the data is
921 unimportant and you can afford to lose all of it in the event of a crash, for
922 example when running a software test suite. Adding @code{}libeatmydata.so} to
923 the @env{LD_PRELOAD} environment of such tasks will override all C library data
924 synchronisation functions with custom @i{no-op} ones that do nothing and
925 immediately return success.
927 A simple @command{eatmydata} script is included that does this for you.")
928 (license license:gpl3+)))
930 (define-public libnfs
937 (url "https://github.com/sahlberg/libnfs")
938 (commit (string-append "libnfs-" version))))
939 (file-name (git-file-name name version))
942 "0i27wd4zvhjz7620q043p4d4mkx8zv2yz9adm1byin47dynahyda"))))
943 (build-system gnu-build-system)
944 (home-page "https://github.com/sahlberg/libnfs")
946 `(("autoconf" ,autoconf)
947 ("automake" ,automake)
949 ("pkg-config" ,pkg-config)))
950 (synopsis "Client library for accessing NFS shares")
951 (description "LIBNFS is a client library for accessing NFS shares over a
952 network. LIBNFS offers three different APIs, for different use :
955 @item RAW, a fully asynchronous low level RPC library for NFS protocols. This
956 API provides very flexible and precise control of the RPC issued.
957 @item NFS ASYNC, a fully asynchronous library for high level vfs functions
958 @item NFS SYNC, a synchronous library for high level vfs functions.
960 (license (list license:lgpl2.1+ ; library
961 license:gpl3+ ; tests
962 license:bsd-3 ; copied nsf4 files
965 (define-public apfs-fuse
966 ;; Later versions require FUSE 3.
967 (let ((commit "7b89418e8dc27103d3c4f8fa348086ffcd634c17")
971 (version (git-version "0.0.0" revision commit))
975 (url "https://github.com/sgan81/apfs-fuse")
976 (recursive? #t) ; for lzfse
980 "0x2siy3cmnm9wsdfazg3xc8r3kbg73gijmnn1vjw33pp71ckylxr"))
981 (file-name (git-file-name name version))))
982 (build-system cmake-build-system)
984 `(#:tests? #f ; No test suite
986 '("-DUSE_FUSE3=OFF") ; FUSE 3 is not packaged yet.
988 (modify-phases %standard-phases
989 ;; No 'install' target in CMakeLists.txt
991 (lambda* (#:key outputs #:allow-other-keys)
992 (let* ((out (assoc-ref outputs "out"))
993 (bin (string-append out "/bin"))
994 (lib (string-append out "/lib"))
995 (doc (string-append out "/share/doc/"
996 (string-append ,name "-" ,version))))
997 (install-file "apfs-dump" bin)
998 (install-file "apfs-dump-quick" bin)
999 (install-file "apfs-fuse" bin)
1000 (install-file "libapfs.a" lib)
1001 (install-file "../source/README.md" doc)
1007 (synopsis "Read-only FUSE driver for the APFS file system")
1008 (description "APFS-FUSE is a read-only FUSE driver for the @dfn{Apple File
1009 System} (APFS). It is currently in an experimental state — it may not be able
1010 to read all files, and it does not support all the compression methods in
1012 (home-page "https://github.com/sgan81/apfs-fuse")
1013 (license license:gpl2+))))
1015 (define-public xfstests
1016 ;; The last release (1.1.0) is from 2011.
1017 (let ((revision "0")
1018 (commit "1c18b9ec2fcc94bd05ecdd136aa51c97bf3fa70d"))
1021 (version (git-version "1.1.0" revision commit))
1026 (url "git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git")
1028 (file-name (git-file-name name version))
1030 (base32 "0rrv0rs9nhaza0jk5k0bj27w4lcd1s4a1ls8nr679qi02bgx630x"))))
1031 (build-system gnu-build-system)
1034 (modify-phases %standard-phases
1035 (add-after 'unpack 'patch-tool-locations
1036 (lambda* (#:key inputs #:allow-other-keys)
1037 (substitute* "common/config"
1038 ;; Make absolute file names relative.
1039 (("(MKFS_PROG=\").*(\")" _ pre post)
1040 (string-append pre "mkfs" post)))
1041 (for-each (lambda (file)
1043 (("( -s|#.|[= ])(/bin/sh|/bin/bash)" _ pre match)
1045 (assoc-ref inputs "bash")
1047 (("/bin/(rm|true)" match)
1048 (string-append (assoc-ref inputs "coreutils")
1050 (("/usr(/bin/time)" _ match)
1051 (string-append (assoc-ref inputs "time")
1053 (append (find-files "common" ".*")
1054 (find-files "tests" ".*")
1055 (find-files "tools" ".*")
1056 (find-files "src" "\\.(c|sh)$")))))
1058 (lambda* (#:key make-flags #:allow-other-keys)
1059 (substitute* "Makefile"
1060 ;; Avoid a mysterious (to me) ‘permission denied’ error.
1062 (substitute* "m4/package_utilies.m4"
1063 ;; Fix the bogus hard-coded paths for every single binary.
1064 (("(AC_PATH_PROG\\(.*, ).*(\\))" _ pre post)
1065 (string-append pre (getenv "PATH") post)))
1066 (apply invoke "make" "configure" make-flags)))
1067 (add-after 'install 'wrap-xfstests/check
1068 ;; Keep wrapping distinct from 'create-helper-script below: users
1069 ;; must be able to invoke xfstests/check directly if they prefer.
1070 (lambda* (#:key inputs outputs #:allow-other-keys)
1071 (let* ((out (assoc-ref outputs "out")))
1072 (wrap-program (string-append out "/xfstests/check")
1073 ;; Prefix the user's PATH with the minimum required tools.
1074 ;; The suite has many other optional dependencies and will
1075 ;; automatically select tests based on the original PATH.
1077 ,(map (lambda (name)
1078 (let ((input (assoc-ref inputs name)))
1079 (string-append input "/bin:"
1086 (add-after 'install 'create-helper
1087 ;; Upstream installs only a ‘check’ script that's not in $PATH and
1088 ;; would try to write to the store without explaining how to change
1089 ;; that. Install a simple helper script to make it discoverable.
1090 (lambda* (#:key inputs outputs #:allow-other-keys)
1091 (let* ((out (assoc-ref outputs "out"))
1092 (check (string-append out "/xfstests/check"))
1093 (bin (string-append out "/bin"))
1094 (helper (string-append bin "/xfstests-check")))
1096 (with-output-to-file helper
1098 (format #t "#!~a --no-auto-compile\n!#\n"
1099 (string-append (assoc-ref inputs "guile")
1103 (define (try proc dir)
1104 "Try to PROC DIR. Return DIR on success, else #f."
1105 (with-exception-handler (const #f)
1106 (lambda _ (proc dir) dir)
1110 (cdr (command-line)))
1112 (when (or (member "--help" args)
1114 (format #t "Usage: ~a [OPTION]...
1115 This Guix helper sets up a new writable RESULT_BASE if it's unset, then executes
1116 xfstest's \"~a\" command (with any OPTIONs) as documented below.\n\n"
1120 (let* ((gotenv-base (getenv "RESULT_BASE"))
1121 (base (or gotenv-base
1122 (let loop ((count 0))
1124 (format #f "xfstests.~a"
1126 (loop (+ 1 count))))))
1127 (result-base (if (string-prefix? "/" base)
1129 (string-append (getcwd) "/"
1131 (setenv "RESULT_BASE" result-base)
1132 ;; CHECK must run in its own directory or will fail.
1133 (chdir ,(dirname check))
1135 (status:exit-val (apply system* ,check args))))
1137 (try rmdir result-base))
1139 (chmod helper #o755)))))))
1141 `(("autoconf" ,autoconf)
1142 ("automake" ,automake)
1143 ("libtool" ,libtool)))
1147 ("guile" ,guile-3.0) ; for our xfstests-check helper script
1148 ("inetutils" ,inetutils) ; for ‘hostname’
1149 ("libuuid" ,util-linux "lib")
1150 ("perl" ,perl) ; to automagically patch shebangs
1152 ("xfsprogs" ,xfsprogs)))
1153 (home-page "https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git")
1154 (synopsis "File system @acronym{QA, Quality Assurance} test suite")
1156 "The @acronym{FSQA, File System Quality Assurance} regression test suite,
1157 more commonly known as xfstests, comprises over 1,500 tests that exercise
1158 (@dfn{torture}) both the user- and kernel-space parts of many different file
1161 As the package's name subtly implies, it was originally developed to test the
1162 XFS file system. Today, xfstests is the primary test suite for all major file
1163 systems supported by the kernel Linux including XFS, ext4, and Btrfs, but also
1164 virtual and network file systems such as NFS, 9P, and the overlay file system.
1166 The packaged @command{check} script is not in @env{PATH} but can be invoked
1167 with the included @command{xfstests-check} helper.")
1168 (license license:gpl2))))
1174 (outputs '("out" "module" "src"))
1178 (uri (string-append "https://github.com/zfsonlinux/zfs/releases"
1179 "/download/zfs-" version
1180 "/zfs-" version ".tar.gz"))
1182 (base32 "1jbfm18hh9x4a9s5d7si8lapmq2aniphyriif9flrgsff26lj5rs"))))
1183 (build-system linux-module-build-system)
1185 `(;; The ZFS kernel module should not be downloaded since the license
1186 ;; terms don't allow for distributing it, only building it locally.
1188 ;; Tests cannot run in an unprivileged build environment.
1191 (modify-phases %standard-phases
1192 (add-after 'configure 'really-configure
1193 (lambda* (#:key outputs inputs #:allow-other-keys)
1194 (let ((out (assoc-ref outputs "out")))
1195 (substitute* "configure"
1196 (("-/bin/sh") (string-append "-" (which "sh"))))
1197 (invoke "./configure"
1199 (string-append "--prefix=" out)
1200 (string-append "--with-dracutdir=" out "/lib/dracut")
1201 (string-append "--with-udevdir=" out "/lib/udev")
1202 (string-append "--with-mounthelperdir=" out "/sbin")
1203 (string-append "--with-linux="
1204 (assoc-ref inputs "linux-module-builder")
1205 "/lib/modules/build")))))
1206 (add-after 'unpack 'patch-source
1207 (lambda* (#:key inputs outputs #:allow-other-keys)
1208 (let ((out (assoc-ref outputs "out"))
1209 (src (assoc-ref outputs "src"))
1210 (util-linux (assoc-ref inputs "util-linux"))
1211 (nfs-utils (assoc-ref inputs "nfs-utils"))
1212 (kmod (assoc-ref inputs "kmod-runtime")))
1213 (substitute* "etc/Makefile.in"
1214 ;; This just contains an example configuration file for
1215 ;; configuring ZFS on traditional init systems, skip it
1216 ;; since we cannot use it anyway; the install target becomes
1218 (("= default ") "= "))
1219 (substitute* "lib/libzfs/os/linux/libzfs_util_os.c"
1220 ;; Use path to /gnu/store/*-kmod in actual path that is exec'ed.
1221 (("\"/sbin/modprobe\"")
1222 (string-append "\"" kmod "/bin/modprobe" "\""))
1223 ;; Just use 'modprobe' in message to user, since Guix
1224 ;; does not have a traditional /sbin/
1225 (("'/sbin/modprobe ") "'modprobe "))
1226 (substitute* "contrib/Makefile.in"
1227 ;; This is not configurable nor is its hard-coded /usr prefix.
1228 ((" initramfs") ""))
1229 (substitute* "module/os/linux/zfs/zfs_ctldir.c"
1230 (("/usr/bin/env\", \"umount")
1231 (string-append util-linux "/bin/umount\", \"-n"))
1232 (("/usr/bin/env\", \"mount")
1233 (string-append util-linux "/bin/mount\", \"-n")))
1234 (substitute* "lib/libzfs/os/linux/libzfs_mount_os.c"
1235 (("/bin/mount") (string-append util-linux "/bin/mount"))
1236 (("/bin/umount") (string-append util-linux "/bin/umount")))
1237 (substitute* "lib/libshare/os/linux/nfs.c"
1238 (("/usr/sbin/exportfs")
1239 (string-append nfs-utils "/sbin/exportfs")))
1240 (substitute* "config/zfs-build.m4"
1241 (("\\$sysconfdir/init.d") (string-append out "/etc/init.d")))
1242 (substitute* '("etc/zfs/Makefile.am"
1243 "cmd/zed/Makefile.am")
1244 (("\\$\\(sysconfdir)") (string-append out "/etc")))
1245 (substitute* "cmd/vdev_id/vdev_id"
1246 (("PATH=/bin:/sbin:/usr/bin:/usr/sbin")
1247 (string-append "PATH="
1248 (dirname (which "chmod")) ":"
1249 (dirname (which "grep")) ":"
1250 (dirname (which "sed")) ":"
1251 (dirname (which "gawk")))))
1252 (substitute* "contrib/pyzfs/Makefile.in"
1253 ((".*install-lib.*") ""))
1254 (substitute* '("Makefile.am" "Makefile.in")
1255 (("\\$\\(prefix)/src") (string-append src "/src")))
1256 (substitute* (find-files "udev/rules.d/" ".rules.in$")
1257 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))))
1260 (lambda _ (invoke "make")))
1262 (lambda* (#:key outputs inputs native-inputs #:allow-other-keys)
1263 (let* ((out (assoc-ref outputs "out"))
1264 (moddir (assoc-ref outputs "module"))
1265 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
1266 (invoke "make" "install"
1267 (string-append "DEFAULT_INITCONF_DIR=" out "/etc/default")
1268 (string-append "DEPMOD=" kmod "/bin/depmod")
1269 (string-append "INSTALL_PATH=" out)
1270 (string-append "INSTALL_MOD_PATH=" moddir)
1271 "INSTALL_MOD_STRIP=1")
1272 (install-file "contrib/bash_completion.d/zfs"
1273 (string-append out "/share/bash-completion/completions"))
1278 ("pkg-config" ,pkg-config)))
1281 ("kmod-runtime" ,kmod)
1283 ("libtirpc" ,libtirpc)
1284 ("nfs-utils" ,nfs-utils)
1285 ("openssl" ,openssl)
1287 ("python-cffi" ,python-cffi)
1288 ("util-linux" ,util-linux)
1289 ("util-linux:lib" ,util-linux "lib")
1291 (home-page "https://zfsonlinux.org/")
1292 (synopsis "OpenZFS on Linux")
1294 "OpenZFS is an advanced file system and volume manager which was
1295 originally developed for Solaris and is now maintained by the OpenZFS
1297 (license license:cddl1.0)))
1299 (define-public zfs-auto-snapshot
1301 (name "zfs-auto-snapshot")
1308 (string-append "https://github.com/zfsonlinux/" name))
1310 (string-append "upstream/" version))))
1311 (file-name (git-file-name name version))
1313 (base32 "0m4xw7h5qlbn5zdf9wb137pcr5l7hyrr7w2dgr16dfm5ay64vvfq"))))
1314 (build-system gnu-build-system)
1316 ;; Note: if you are inheriting from the above zfs package in order
1317 ;; to provide a specific stable kernel version, you should also
1318 ;; inherit this package and replace the sole input below.
1321 `(#:tests? #f ; No tests
1323 (modify-phases %standard-phases
1326 ;; Guix System may not have a traditional cron system, but
1327 ;; the cron scripts installed by this package are convenient
1328 ;; to use as targets for an mcron job specification, so make
1329 ;; sure they can be run in-store.
1330 (add-before 'install 'fix-scripts
1331 (lambda* (#:key outputs inputs #:allow-other-keys)
1332 (let* ((out (assoc-ref outputs "out"))
1333 (zfs-auto-snapshot (string-append
1335 "/sbin/zfs-auto-snapshot"))
1336 (zfs-package (assoc-ref inputs "zfs"))
1337 (zpool (string-append
1343 (substitute* '("etc/zfs-auto-snapshot.cron.daily"
1344 "etc/zfs-auto-snapshot.cron.frequent"
1345 "etc/zfs-auto-snapshot.cron.hourly"
1346 "etc/zfs-auto-snapshot.cron.monthly"
1347 "etc/zfs-auto-snapshot.cron.weekly")
1348 (("zfs-auto-snapshot")
1350 (substitute* "src/zfs-auto-snapshot.sh"
1351 (("LC_ALL=C zfs list")
1352 (string-append "LC_ALL=C " zfs " list"))
1353 (("LC_ALL=C zpool status")
1354 (string-append "LC_ALL=C " zpool " status"))
1356 (string-append zfs " snapshot"))
1358 (string-append zfs " destroy"))))))
1359 ;; Provide DESTDIR and PREFIX on make command.
1361 (lambda* (#:key outputs #:allow-other-keys)
1362 (let ((out (assoc-ref outputs "out")))
1363 (invoke "make" "install"
1365 (string-append "DESTDIR=" out)))
1367 (home-page "https://github.com/zfsonlinux/zfs-auto-snapshot")
1368 (synopsis "Automatically create, rotate and destroy ZFS snapshots")
1369 (description "An alternative implementation of the zfs-auto-snapshot
1370 service for Linux that is compatible with zfs-linux (now OpenZFS) and
1373 On Guix System, you will need to invoke the included shell scripts as
1374 @code{job} definitions in your @code{operating-system} declaration.")
1375 (license license:gpl2+)))
1377 (define-public mergerfs
1384 (uri (string-append "https://github.com/trapexit/mergerfs/"
1385 "releases/download/" version "/"
1386 "mergerfs-" version ".tar.gz"))
1388 (base32 "08gwi094ll0b7nf2i44fyjxiyvr45rp766npbdyw0yzyigas8a2f"))))
1389 (build-system gnu-build-system)
1391 `(#:tests? #f ; No tests exist.
1393 (modify-phases %standard-phases
1395 (add-after 'unpack 'fix-paths
1396 (lambda* (#:key inputs outputs #:allow-other-keys)
1398 ;; These were copied from the package libfuse.
1399 (substitute* '("libfuse/lib/mount_util.c" "libfuse/util/mount_util.c")
1400 (("/bin/(u?)mount" _ maybe-u)
1401 (string-append (assoc-ref inputs "util-linux")
1402 "/bin/" maybe-u "mount")))
1403 (substitute* '("libfuse/util/mount.mergerfs.c")
1406 ;; The Makefile does not allow overriding PREFIX via make variables.
1407 (substitute* '("Makefile" "libfuse/Makefile")
1408 (("= /usr/local") (string-append "= " (assoc-ref outputs "out")))
1409 (("= /sbin") "= $(EXEC_PREFIX)/sbin")
1410 ;; cannot chown as build user
1411 (("chown root(:root)?") "true"))
1413 ;; mergerfs bundles a heavily modified copy of libfuse.
1414 (inputs `(("util-linux" ,util-linux)))
1415 (home-page "https://github.com/trapexit/mergerfs")
1416 (synopsis "Featureful union file system")
1417 (description "mergerfs is a union file system geared towards simplifying
1418 storage and management of files across numerous commodity storage devices. It
1419 is similar to mhddfs, unionfs, and aufs.")
1421 license:isc ; mergerfs
1422 license:gpl2 license:lgpl2.0 ; Imported libfuse code.
1425 (define-public mergerfs-tools
1426 (let ((commit "480296ed03d1c3c7909697d7ef96d35840ee26b8")
1429 (name "mergerfs-tools")
1430 ;; No released version exists.
1431 (version (git-version "0.0" revision commit))
1436 (url "https://github.com/trapexit/mergerfs-tools")
1438 (file-name (git-file-name name version))
1441 "0xr06gi4xcr832rzy0hkp5c1n231s7w5iq1nkjvx9kvm0dl7chpq"))))
1442 (build-system copy-build-system)
1444 `(("python" ,python)
1445 ("python-xattr" ,python-xattr)
1451 (modify-phases %standard-phases
1452 (add-after 'unpack 'patch-paths
1453 (lambda* (#:key inputs #:allow-other-keys)
1454 (substitute* (find-files "src" "^mergerfs\\.")
1456 (string-append "'" (assoc-ref inputs "rsync") "/bin/rsync'"))
1458 (string-append "'" (assoc-ref inputs "coreutils") "/bin/rm'")))
1459 (substitute* "src/mergerfs.mktrash"
1461 (string-append (assoc-ref inputs "python-xattr") "/bin/xattr"))
1463 (string-append (assoc-ref inputs "coreutils") "/bin/mkdir")))
1465 (synopsis "Tools to help manage data in a mergerfs pool")
1466 (description "mergerfs-tools is a suite of programs that can audit
1467 permissions and ownership of files and directories on a mergerfs volume,
1468 duplicates files and directories across branches in its pool, find and remove
1469 duplicate files, balance pool drives, consolidate files in a single mergerfs
1470 directory onto a single drive and create FreeDesktop.org Trash specification
1471 compatible directories.")
1472 (home-page "https://github.com/trapexit/mergerfs-tools")
1473 (license license:isc))))
1475 (define-public python-dropbox
1477 (name "python-dropbox")
1482 (uri (pypi-uri "dropbox" version))
1485 "16bxx9xqx2s4d9khrw57a0bj4q7nc6kq355wl4pfddn9cqvh9rg2"))))
1486 (build-system python-build-system)
1487 (arguments '(#:tests? #f)) ; Tests require a network connection.
1489 `(("python-pytest" ,python-pytest)
1490 ("python-pytest-runner" ,python-pytest-runner)))
1492 `(("python-certifi" ,python-certifi)
1493 ("python-chardet" ,python-chardet)
1494 ("python-requests" ,python-requests)
1495 ("python-six" ,python-six)
1496 ("python-stone" ,python-stone)
1497 ("python-urllib3" ,python-urllib3)))
1498 (home-page "https://www.dropbox.com/developers")
1499 (synopsis "Official Dropbox API Client")
1500 (description "This package provides a Python SDK for integrating with the
1502 (license license:expat)))
1504 (define-public dbxfs
1511 (uri (pypi-uri "dbxfs" version))
1514 "1zz82d0mnql55397x4jx7z5rn857rf9zhjv895j93wpxdq10xwvk"))
1515 (patches (search-patches "dbxfs-remove-sentry-sdk.patch"))))
1516 (build-system python-build-system)
1518 '(#:tests? #f)) ; tests requires safefs
1520 `(("python-appdirs" ,python-appdirs)
1521 ("python-block-tracing" ,python-block-tracing)
1522 ("python-dropbox" ,python-dropbox)
1523 ("python-keyring" ,python-keyring)
1524 ("python-keyrings.alt" ,python-keyrings.alt)
1525 ("python-privy" ,python-privy)
1526 ("python-userspacefs" ,python-userspacefs)))
1527 (home-page "https://github.com/rianhunter/dbxfs")
1528 (synopsis "User-space file system for Dropbox")
1530 "@code{dbxfs} allows you to mount your Dropbox folder as if it were a
1531 local file system using FUSE.")
1532 (license license:gpl3+)))
1534 (define-public go-github-com-hanwen-fuse
1536 (name "go-github-com-hanwen-fuse")
1542 (url "https://github.com/hanwen/go-fuse")
1543 (commit (string-append "v" version))))
1544 (file-name (git-file-name name version))
1547 "1y44d08fxyis99s6jxdr6dbbw5kv3wb8lkhq3xmr886i4w41lz03"))))
1548 (build-system go-build-system)
1550 `(#:import-path "github.com/hanwen/go-fuse"))
1552 `(("go-golang-org-x-sys" ,go-golang-org-x-sys)))
1553 (home-page "https://github.com/hanwen/go-fuse")
1554 (synopsis "FUSE bindings for Go")
1556 "This package provides Go native bindings for the FUSE kernel module.")
1557 (license license:bsd-3)))
1559 (define-public rewritefs
1560 (let ((revision "0")
1561 ;; This is the last commit supporting our fuse@2.
1562 (commit "31e2810b596028a12e49a08664567755f4b387b2"))
1565 (version (git-version "0.0.0" revision commit))
1570 (url "https://github.com/sloonz/rewritefs")
1572 (file-name (git-file-name name version))
1574 (base32 "0k1aas2bdq2l3a6q3fvmngpakcxiws8qny2w6z7ffngyqxh33fv7"))))
1575 (build-system gnu-build-system)
1577 `(#:modules ((srfi srfi-26)
1578 ,@%gnu-build-system-modules)
1580 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
1581 #:test-target "test"
1582 #:tests? #f ; all require a kernel with FUSE loaded
1584 (modify-phases %standard-phases
1585 (delete 'configure) ; no configure script
1586 (add-after 'install 'install-examples
1587 (lambda* (#:key outputs #:allow-other-keys)
1588 (let* ((out (assoc-ref outputs "out"))
1589 (doc (string-append out "/share/doc/" ,name "-" ,version)))
1590 (for-each (cut install-file <> (string-append doc "/examples"))
1591 (find-files "." "^config\\."))))))))
1593 `(("pkg-config" ,pkg-config)))
1597 (home-page "https://github.com/sloonz/rewritefs")
1598 (synopsis "FUSE file system that changes particular file names")
1600 "RewriteFS is a @acronym{FUSE, File system in USEr space} to change the
1601 name of accessed files on the fly based on any number of regular expressions.
1602 It's like the @code{rewrite} action of many Web servers, but for your file
1603 system. For example, it can help keep your home directory tidy by transparently
1604 rewriting the location of configuration files of software that doesn't follow
1605 the XDG directory specification from @file{~/.@var{name}} to
1606 @file{~/.config/@var{name}}.")
1607 (license license:gpl2+))))
1617 (url "https://github.com/oniony/TMSU")
1618 (commit (string-append "v" version))))
1619 (file-name (git-file-name name version))
1622 "0834hah7p6ad81w60ifnxyh9zn09ddfgrll04kwjxwp7ypbv38wq"))))
1623 (build-system go-build-system)
1625 `(#:import-path "github.com/oniony/TMSU"
1627 #:install-source? #f
1629 (modify-phases %standard-phases
1630 (add-after 'install 'post-install
1631 (lambda* (#:key outputs #:allow-other-keys)
1632 (let ((out (assoc-ref outputs "out")))
1633 ;; The go build system produces /bin/TMSU -> install as /bin/tmsu
1634 (rename-file (string-append out "/bin/TMSU")
1635 (string-append out "/bin/tmsu"))))))))
1637 `(("go-github-com-mattn-go-sqlite3" ,go-github-com-mattn-go-sqlite3)
1638 ("go-github-com-hanwen-fuse" ,go-github-com-hanwen-fuse)))
1639 (home-page "https://github.com/oniony/TMSU")
1640 (synopsis "Tag files and access them through a virtual file system")
1642 "TMSU is a tool for tagging your files. It provides a simple
1643 command-line utility for applying tags and a virtual file system to give you a
1644 tag-based view of your files from any other program. TMSU does not alter your
1645 files in any way: they remain unchanged on disk, or on the network, wherever
1646 your put them. TMSU maintains its own database and you simply gain an
1647 additional view, which you can mount where you like, based upon the tags you
1649 (license license:gpl3+)))
1651 (define-public udftools
1658 (url "https://github.com/pali/udftools")
1662 "1nl2s61znyzaap23zhbdg3znj6l6akr313fchn5wwvjzj8k70is9"))
1663 (file-name (git-file-name name version))))
1664 (build-system gnu-build-system)
1667 (list (string-append "--docdir=" (assoc-ref %outputs "out")
1668 "/share/doc/" ,name "-" ,version))))
1670 `(("automake" ,automake)
1671 ("autoconf" ,autoconf)
1672 ("libtool" ,libtool)
1673 ("pkg-config" ,pkg-config)))
1674 (home-page "https://github.com/pali/udftools")
1675 (synopsis "Tools to manage UDF file systems and DVD/CD-R(W) drives")
1676 (description "@code{udftools} is a set of programs for reading
1677 and modifying @acronym{UDF, Universal Disk Format} file systems.
1678 @acronym{UDF, Universal Disk Format} is a file system mostly used for DVDs
1679 and other optical media. It supports read-only media (DVD/CD-R)
1680 and rewritable media that wears out (DVD/CD-RW).")
1681 (license license:gpl2+)))