gnu: Fix copyright notice.
[jackhill/guix/guix.git] / gnu / packages / file-systems.scm
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 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 ;;;
11 ;;; This file is part of GNU Guix.
12 ;;;
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.
17 ;;;
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.
22 ;;;
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/>.
25
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))
76
77 (define-public autofs
78 (package
79 (name "autofs")
80 (version "5.1.6")
81 (source
82 (origin
83 (method url-fetch)
84 (uri (string-append "mirror://kernel.org/linux/daemons/autofs/"
85 "v" (version-major version) "/"
86 "autofs-" version ".tar.xz"))
87 (sha256
88 (base32 "1vya21mb4izj3khcr3flibv7xc15vvx2v0rjfk5yd31qnzcy7pnx"))))
89 (build-system gnu-build-system)
90 (arguments
91 `(#:configure-flags
92 (list "--enable-ignore-busy" ; during shutdown
93 "--enable-sloppy-mount" ; support mount(8) -s
94 "--with-libtirpc"
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
104 #:phases
105 (modify-phases %standard-phases
106 (add-before 'configure 'fix-hard-coded-search-path
107 (lambda _
108 (substitute* "configure"
109 (("^searchpath=\".*\"")
110 "searchpath=\"$PATH\""))
111 #t))
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.
115 (lambda _
116 (substitute* "modules/Makefile"
117 (("ln -fs lookup_yp.so" match)
118 (string-append "# " match)))
119 #t)))))
120 (native-inputs
121 `(("bison" ,bison)
122 ("flex" ,flex)
123 ("pkg-config" ,pkg-config)
124 ("rpcsvc-proto" ,rpcsvc-proto)))
125 (inputs
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
134 ("sssd" ,sssd)
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")
139 (description
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
148
149 (define-public bindfs
150 (package
151 (name "bindfs")
152 (version "1.14.8")
153 (source (origin
154 (method url-fetch)
155 (uri (string-append "https://bindfs.org/downloads/bindfs-"
156 version ".tar.gz"))
157 (sha256
158 (base32
159 "15y4brlcrqhxl6z73785m0dr1vp2q3wc6xss08x9jjr0apzmmjp5"))))
160 (build-system gnu-build-system)
161 (arguments
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.
166 '(#:tests? #f))
167 (native-inputs
168 ;; Native inputs to run the tests
169 ;; ("ruby" ,ruby)
170 ;; ("valgrind" ,valgrind)
171 ;; ("which" ,which)
172 `(("pkg-config" ,pkg-config)))
173 (inputs
174 `(("fuse" ,fuse)))
175 (home-page "https://bindfs.org")
176 (synopsis "Bind mount a directory and alter permission bits")
177 (description
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:
180 @itemize
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.
186 @end itemize ")
187 (license license:gpl2+)))
188
189 (define-public davfs2
190 (package
191 (name "davfs2")
192 (version "1.6.0")
193 (source
194 (origin
195 (method url-fetch)
196 (uri (string-append "https://download.savannah.nongnu.org/releases/"
197 "davfs2/davfs2-" version ".tar.gz"))
198 (sha256
199 (base32 "0l1vnv5lfigciwg17p10zxwhzj4qw2d9kw30prr7g4dxhmb6fsrf"))))
200 (build-system gnu-build-system)
201 (arguments
202 `(#:configure-flags
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.
208 "dav_user=nobody"
209 "dav_group=nogroup")
210 #:phases
211 (modify-phases %standard-phases
212 (add-after 'unpack 'omit-redundancy
213 ;; Don't install redundant copies of /etc examples into /share.
214 (lambda _
215 (substitute* "etc/Makefile.in"
216 (("(dist_pkgdata_DATA =.*) davfs2.conf secrets(.*)"
217 _ prefix suffix)
218 (string-append prefix suffix)))
219 #t))
220 (add-after 'unpack 'patch-file-names
221 (lambda _
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"))
227 #t))
228 (replace 'install
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")
233 make-flags)))))))
234 (inputs
235 `(("neon" ,neon)
236
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.
239 ("zlib" ,zlib)))
240 (home-page "https://savannah.nongnu.org/projects/davfs2")
241 (synopsis "Mount remote WebDAV resources in the local file system")
242 (description
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.
248
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
254 possible.
255
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
258 always possible.")
259 (license (list license:bsd-2 ; src/fuse_kernel.h
260 license:gpl3+)))) ; everything else
261
262 (define-public fsarchiver
263 (package
264 (name "fsarchiver")
265 (version "0.8.5")
266 (source
267 (origin
268 (method git-fetch)
269 (uri
270 (git-reference
271 (url "https://github.com/fdupoux/fsarchiver")
272 (commit version)))
273 (file-name (git-file-name name version))
274 (sha256
275 (base32 "1rvwq5v3rl14bqxjm1ibfapyicf0sa44nw7451v10kx39lp56ylp"))))
276 (build-system gnu-build-system)
277 (native-inputs
278 `(("autoconf" ,autoconf)
279 ("automake" ,automake)
280 ("pkg-config" ,pkg-config)))
281 (inputs
282 `(("bzip2" ,bzip2)
283 ("e2fsprogs" ,e2fsprogs)
284 ("libgcrypt" ,libgcrypt)
285 ("lz4" ,lz4)
286 ("lzo" ,lzo)
287 ("util-linux" ,util-linux "lib")
288 ("xz" ,xz)
289 ("zlib" ,zlib)
290 ("zstd:lib" ,zstd "lib")))
291 (synopsis "File system back-up, deployment, and migration tool")
292 (description
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.
297
298 All standard file attributes supported by the kernel are preserved, including
299 file permissions, timestamps, symbolic and hard links, and extended attributes.
300
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)))
305
306 (define-public gphotofs
307 (package
308 (name "gphotofs")
309 (version "0.5.0")
310 (source
311 (origin
312 (method url-fetch)
313 (uri
314 (string-append "mirror://sourceforge/gphoto/gphotofs/" version
315 "/gphotofs-0.5.tar.gz"))
316 (sha256
317 (base32
318 "04slwhr6ap9xcc27wphk22ad8yn79ngyy5z10lxams3k5liahvc2"))))
319 (build-system gnu-build-system)
320 (native-inputs
321 `(("pkg-config" ,pkg-config)))
322 (inputs
323 `(("fuse" ,fuse)
324 ("glib" ,glib)
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+)))
332
333 (define-public bcachefs-tools
334 (let ((commit "612f6b9ab73c7f46e0254355b707d494a8ad9270")
335 (revision "3"))
336 (package
337 (name "bcachefs-tools")
338 (version (git-version "0.1" revision commit))
339 (source
340 (origin
341 (method git-fetch)
342 (uri (git-reference
343 (url "https://evilpiepirate.org/git/bcachefs-tools.git")
344 (commit commit)))
345 (file-name (git-file-name name version))
346 (sha256
347 (base32 "1a62wkv1i6pg5k1cjw7fzn933cbz8cp8y40cdpfd8rxjx0wg2szb"))))
348 (build-system gnu-build-system)
349 (arguments
350 `(#:make-flags
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"
354 "CC=gcc"
355 "PYTEST=pytest")
356 #:phases
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"
368 `("PATH" ":" prefix
369 ,(cons (string-append out "/sbin")
370 (map (lambda (input)
371 (string-append (assoc-ref inputs input)
372 "/bin"))
373 (list "coreutils"
374 "gawk"
375 "util-linux"))))))))))
376 #:tests? #f)) ; XXX 6 valgrind tests fail
377 (native-inputs
378 `(("pkg-config" ,pkg-config)
379
380 ;; For tests.
381 ("python-pytest" ,python-pytest)
382 ("valgrind" ,valgrind)))
383 (inputs
384 `(("eudev" ,eudev)
385 ("keyutils" ,keyutils)
386 ("libaio" ,libaio)
387 ("libscrypt" ,libscrypt)
388 ("libsodium" ,libsodium)
389 ("liburcu" ,liburcu)
390 ("util-linux:lib" ,util-linux "lib") ; lib{blkid,uuid}
391 ("lz4" ,lz4)
392 ("zlib" ,zlib)
393 ("zstd:lib" ,zstd "lib")
394
395 ;; Only for mount.bcachefs.sh.
396 ("coreutils" ,coreutils-minimal)
397 ("gawk" ,gawk)
398 ("util-linux" ,util-linux)))
399 (home-page "https://bcachefs.org/")
400 (synopsis "Tools to create and manage bcachefs file systems")
401 (description
402 "The bcachefs-tools are command-line utilities for creating, checking,
403 and otherwise managing bcachefs file systems.
404
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.
408
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+))))
413
414 (define-public bcachefs-tools/static
415 (package
416 (inherit bcachefs-tools)
417 (name "bcachefs-tools-static")
418 (arguments
419 (substitute-keyword-arguments (package-arguments bcachefs-tools)
420 ((#:make-flags make-flags)
421 `(append ,make-flags
422 (list "LDFLAGS=-static")))))
423 (inputs
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)))))
431
432 (define-public bcachefs/static
433 (package
434 (name "bcachefs-static")
435 (version (package-version bcachefs-tools))
436 (build-system trivial-build-system)
437 (source #f)
438 (inputs
439 `(("bcachefs-tools" ,bcachefs-tools/static)))
440 (arguments
441 `(#:modules ((guix build utils))
442 #:builder
443 (begin
444 (use-modules (guix build utils)
445 (ice-9 ftw)
446 (srfi srfi-26))
447 (let* ((bcachefs-tools (assoc-ref %build-inputs "bcachefs-tools"))
448 (out (assoc-ref %outputs "out")))
449 (mkdir-p out)
450 (with-directory-excursion out
451 (install-file (string-append bcachefs-tools
452 "/sbin/bcachefs")
453 "sbin")
454 (remove-store-references "sbin/bcachefs")
455 (invoke "sbin/bcachefs" "version") ; test suite
456 #t)))))
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))))
462
463 (define-public exfatprogs
464 (package
465 (name "exfatprogs")
466 (version "1.0.4")
467 (source
468 (origin
469 (method git-fetch)
470 (uri (git-reference
471 (url "https://github.com/exfatprogs/exfatprogs")
472 (commit version)))
473 (file-name (git-file-name name version))
474 (sha256
475 (base32 "1braffz1wc4ki3nb42q85l5zg2dl2hwjr64rk27nc85wcsrbavnl"))))
476 (build-system gnu-build-system)
477 (arguments
478 `(#:configure-flags
479 (list "--disable-static")))
480 (native-inputs
481 `(("autoconf" ,autoconf)
482 ("automake" ,automake)
483 ("libtool" ,libtool)
484 ("pkg-config" ,pkg-config)))
485 (home-page "https://github.com/exfatprogs/exfatprogs")
486 (synopsis "Tools to create, check, and repair exFAT file systems")
487 (description
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+)))
493
494 (define-public httpfs2
495 (package
496 (name "httpfs2")
497 (version "0.1.5")
498 (source
499 (origin
500 (method url-fetch)
501 (uri (string-append "mirror://sourceforge/httpfs/httpfs2/"
502 "httpfs2-" version ".tar.gz"))
503 (sha256
504 (base32
505 "1h8ggvhw30n2r6w11n1s458ypggdqx6ldwd61ma4yd7binrlpjq1"))))
506 (build-system gnu-build-system)
507 (native-inputs
508 `(("asciidoc" ,asciidoc)
509 ("docbook-xml" ,docbook-xml)
510 ("libxml2" ,libxml2)
511 ("libxslt" ,libxslt)
512 ("pkg-config" ,pkg-config)))
513 (inputs
514 `(("fuse" ,fuse)
515 ("gnutls" ,gnutls)))
516 (arguments
517 `(#:phases
518 (modify-phases %standard-phases
519 (delete 'configure) ; no configure script
520 (replace 'install
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")))
526 (mkdir-p bin)
527 (mkdir-p man1)
528 (for-each
529 (lambda (variant)
530 (let ((man1-page (string-append variant ".1")))
531 (install-file variant bin)
532 (install-file man1-page man1)))
533 (list "httpfs2"
534 "httpfs2-mt"
535 "httpfs2-ssl"
536 "httpfs2-ssl-mt")))
537 #t)))
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+)))
551
552 (define-public jfsutils
553 (package
554 (name "jfsutils")
555 (version "1.1.15")
556 (source
557 (origin
558 (method url-fetch)
559 (uri (string-append "http://jfs.sourceforge.net/project/pub/jfsutils-"
560 version ".tar.gz"))
561 (sha256
562 (base32 "0kbsy2sk1jv4m82rxyl25gwrlkzvl3hzdga9gshkxkhm83v1aji4"))
563 (patches (search-patches "jfsutils-add-sysmacros.patch"
564 "jfsutils-include-systypes.patch"))))
565 (build-system gnu-build-system)
566 (inputs
567 `(("util-linux" ,util-linux "lib")))
568 (home-page "http://jfs.sourceforge.net/home.html")
569 (synopsis "Utilities for managing JFS file systems")
570 (description
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:
574 @enumerate
575 @item @command{fsck.jfs}: check and repair a JFS file system or replay its
576 transaction log.
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.
583 @end enumerate\n")
584 (license license:gpl3+))) ; no explicit version given
585
586 (define-public jfsutils/static
587 (static-package
588 (package
589 (inherit jfsutils)
590 (name "jfsutils-static")
591 (inputs
592 `(("util-linux:static" ,util-linux "static")
593 ,@(package-inputs jfsutils))))))
594
595 (define-public jfs_fsck/static
596 (package
597 (name "jfs_fsck-static")
598 (version (package-version jfsutils))
599 (source #f)
600 (build-system trivial-build-system)
601 (arguments
602 `(#:modules ((guix build utils))
603 #:builder
604 (begin
605 (use-modules (guix build utils)
606 (ice-9 ftw)
607 (srfi srfi-26))
608 (let* ((jfsutils (assoc-ref %build-inputs "jfsutils"))
609 (fsck "jfs_fsck")
610 (out (assoc-ref %outputs "out"))
611 (sbin (string-append out "/sbin")))
612 (mkdir-p sbin)
613 (with-directory-excursion sbin
614 (install-file (string-append jfsutils "/sbin/" fsck)
615 ".")
616 (remove-store-references fsck)
617 (chmod fsck #o555))
618 #t))))
619 (inputs
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))))
626
627 (define-public disorderfs
628 (package
629 (name "disorderfs")
630 (version "0.5.11")
631 (source
632 (origin
633 (method git-fetch)
634 (uri (git-reference
635 (url "https://salsa.debian.org/reproducible-builds/disorderfs.git")
636 (commit version)))
637 (file-name (git-file-name name version))
638 (sha256
639 (base32
640 "1pnrj0h8sgqwgsc18vz3fkqsp6vhigdbi75vdj0si1r6wgslnr7z"))))
641 (build-system gnu-build-system)
642 (native-inputs
643 `(("pkg-config" ,pkg-config)))
644 (inputs
645 `(("fuse" ,fuse)
646 ("attr" ,attr)))
647 (arguments
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)))
652 #:test-target "test"
653 ;; FIXME: Tests require 'run-parts' which is not in Guix yet.
654 #:tests? #f))
655 (home-page "https://salsa.debian.org/reproducible-builds/disorderfs")
656 (synopsis "FUSE file system that introduces non-determinism")
657 (description
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+)))
663
664 (define-public glusterfs
665 (package
666 (name "glusterfs")
667 (version "7.0")
668 (source
669 (origin
670 (method url-fetch)
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"))
675 (sha256
676 (base32
677 "0yzhx710ypj0j3m5dcgmmgvkp7p0rmmp2p7ld0axrm4vpwc2b1wa"))))
678 (build-system gnu-build-system)
679 (arguments
680 `(#:configure-flags
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
690 ))
691 #:phases
692 (modify-phases %standard-phases
693 (add-before 'configure 'autogen
694 (lambda _ (invoke "./autogen.sh"))))))
695 (native-inputs
696 `(("pkg-config" ,pkg-config)
697 ("libtirpc" ,libtirpc)
698 ("rpcsvc-proto" ,rpcsvc-proto)
699 ("python-2" ,python-2) ; must be version 2
700 ("flex" ,flex)
701 ("bison" ,bison)
702 ("libtool" ,libtool)
703 ("autoconf" ,autoconf)
704 ("automake" ,automake)
705 ("cmocka" ,cmocka)))
706 (inputs
707 `(("acl" ,acl)
708 ("fuse" ,fuse)
709 ("openssl" ,openssl)
710 ("liburcu" ,liburcu)
711 ("libuuid" ,util-linux "lib")
712 ("libxml2" ,libxml2)
713 ("readline" ,readline)
714 ("zlib" ,zlib)
715 ("libaio" ,libaio)
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+))))
726
727 (define-public curlftpfs
728 (package
729 (name "curlftpfs")
730 (version "0.9.2")
731 (source
732 (origin
733 (method url-fetch)
734 (uri (string-append "mirror://sourceforge/curlftpfs/curlftpfs/" version
735 "/curlftpfs-" version ".tar.gz"))
736 (sha256
737 (base32
738 "0n397hmv21jsr1j7zx3m21i7ryscdhkdsyqpvvns12q7qwwlgd2f"))))
739 (build-system gnu-build-system)
740 (arguments
741 `(#:phases
742 (modify-phases %standard-phases
743 (add-after 'unpack 'fix-test
744 (lambda _
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"))
749 #t)))))
750 (inputs
751 `(("curl" ,curl)
752 ("glib" ,glib)
753 ("fuse" ,fuse)))
754 (native-inputs
755 `(("pkg-config" ,pkg-config)))
756 (home-page "http://curlftpfs.sourceforge.net/")
757 (synopsis "Mount remote file systems over FTP")
758 (description
759 "This is a file system client based on the FTP File Transfer Protocol.")
760 (license license:gpl2+)))
761
762 (define-public libnfs
763 (package
764 (name "libnfs")
765 (version "3.0.0")
766 (source (origin
767 (method git-fetch)
768 (uri (git-reference
769 (url "https://github.com/sahlberg/libnfs")
770 (commit (string-append "libnfs-" version))))
771 (file-name (git-file-name name version))
772 (sha256
773 (base32
774 "115p55y2cbs92z5lmcnjx1v29lwinpgq4sha9v1kq1vd8674h404"))))
775 (build-system gnu-build-system)
776 (home-page "https://github.com/sahlberg/libnfs")
777 (native-inputs
778 `(("autoconf" ,autoconf)
779 ("automake" ,automake)
780 ("libtool" ,libtool)
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 :
785
786 @enumerate
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.
791 @end enumerate\n")
792 (license (list license:lgpl2.1+ ; library
793 license:gpl3+ ; tests
794 license:bsd-3 ; copied nsf4 files
795 ))))
796
797 (define-public apfs-fuse
798 ;; Later versions require FUSE 3.
799 (let ((commit "7b89418e8dc27103d3c4f8fa348086ffcd634c17")
800 (revision "1"))
801 (package
802 (name "apfs-fuse")
803 (version (git-version "0.0.0" revision commit))
804 (source (origin
805 (method git-fetch)
806 (uri (git-reference
807 (url "https://github.com/sgan81/apfs-fuse")
808 (recursive? #t) ; for lzfse
809 (commit commit)))
810 (sha256
811 (base32
812 "0x2siy3cmnm9wsdfazg3xc8r3kbg73gijmnn1vjw33pp71ckylxr"))
813 (file-name (git-file-name name version))))
814 (build-system cmake-build-system)
815 (arguments
816 `(#:tests? #f ; No test suite
817 #:configure-flags
818 '("-DUSE_FUSE3=OFF") ; FUSE 3 is not packaged yet.
819 #:phases
820 (modify-phases %standard-phases
821 ;; No 'install' target in CMakeLists.txt
822 (replace 'install
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)
834 #t))))))
835 (inputs
836 `(("bzip2" ,bzip2)
837 ("fuse" ,fuse)
838 ("zlib" ,zlib)))
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
843 APFS.")
844 (home-page "https://github.com/sgan81/apfs-fuse")
845 (license license:gpl2+))))
846
847 (define-public zfs
848 (package
849 (name "zfs")
850 (version "2.0.3")
851 (outputs '("out" "module" "src"))
852 (source
853 (origin
854 (method url-fetch)
855 (uri (string-append "https://github.com/zfsonlinux/zfs/releases"
856 "/download/zfs-" version
857 "/zfs-" version ".tar.gz"))
858 (sha256
859 (base32 "0fg5hz1yy2z5ah0hzjv3xy5vcg1c214rps90dr80lfkalx5gd506"))))
860 (build-system linux-module-build-system)
861 (arguments
862 `(;; The ZFS kernel module should not be downloaded since the license
863 ;; terms don't allow for distributing it, only building it locally.
864 #:substitutable? #f
865 ;; Tests cannot run in an unprivileged build environment.
866 #:tests? #f
867 #:phases
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"
875 "--with-config=all"
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* "etc/Makefile.in"
891 ;; This just contains an example configuration file for
892 ;; configuring ZFS on traditional init systems, skip it
893 ;; since we cannot use it anyway; the install target becomes
894 ;; misdirected.
895 (("= default ") "= "))
896 (substitute* "lib/libzfs/os/linux/libzfs_util_os.c"
897 ;; Use path to /gnu/store/*-kmod in actual path that is exec'ed.
898 (("\"/sbin/modprobe\"")
899 (string-append "\"" kmod "/bin/modprobe" "\""))
900 ;; Just use 'modprobe' in message to user, since Guix
901 ;; does not have a traditional /sbin/
902 (("'/sbin/modprobe ") "'modprobe "))
903 (substitute* "contrib/Makefile.in"
904 ;; This is not configurable nor is its hard-coded /usr prefix.
905 ((" initramfs") ""))
906 (substitute* "module/os/linux/zfs/zfs_ctldir.c"
907 (("/usr/bin/env\", \"umount")
908 (string-append util-linux "/bin/umount\", \"-n"))
909 (("/usr/bin/env\", \"mount")
910 (string-append util-linux "/bin/mount\", \"-n")))
911 (substitute* "lib/libzfs/os/linux/libzfs_mount_os.c"
912 (("/bin/mount") (string-append util-linux "/bin/mount"))
913 (("/bin/umount") (string-append util-linux "/bin/umount")))
914 (substitute* "lib/libshare/os/linux/nfs.c"
915 (("/usr/sbin/exportfs")
916 (string-append nfs-utils "/sbin/exportfs")))
917 (substitute* "config/zfs-build.m4"
918 (("\\$sysconfdir/init.d") (string-append out "/etc/init.d")))
919 (substitute* '("etc/zfs/Makefile.am"
920 "cmd/zed/Makefile.am")
921 (("\\$\\(sysconfdir)") (string-append out "/etc")))
922 (substitute* "cmd/vdev_id/vdev_id"
923 (("PATH=/bin:/sbin:/usr/bin:/usr/sbin")
924 (string-append "PATH="
925 (dirname (which "chmod")) ":"
926 (dirname (which "grep")) ":"
927 (dirname (which "sed")) ":"
928 (dirname (which "gawk")))))
929 (substitute* "contrib/pyzfs/Makefile.in"
930 ((".*install-lib.*") ""))
931 (substitute* '("Makefile.am" "Makefile.in")
932 (("\\$\\(prefix)/src") (string-append src "/src")))
933 (substitute* (find-files "udev/rules.d/" ".rules.in$")
934 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))))
935 #t))
936 (replace 'build
937 (lambda _ (invoke "make")))
938 (replace 'install
939 (lambda* (#:key outputs inputs native-inputs #:allow-other-keys)
940 (let* ((out (assoc-ref outputs "out"))
941 (moddir (assoc-ref outputs "module"))
942 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
943 (invoke "make" "install"
944 (string-append "DEFAULT_INITCONF_DIR=" out "/etc/default")
945 (string-append "DEPMOD=" kmod "/bin/depmod")
946 (string-append "INSTALL_PATH=" out)
947 (string-append "INSTALL_MOD_PATH=" moddir)
948 "INSTALL_MOD_STRIP=1")
949 (install-file "contrib/bash_completion.d/zfs"
950 (string-append out "/share/bash-completion/completions"))
951 #t))))))
952 (native-inputs
953 `(("attr" ,attr)
954 ("kmod" ,kmod)
955 ("pkg-config" ,pkg-config)))
956 (inputs
957 `(("eudev" ,eudev)
958 ("kmod-runtime" ,kmod)
959 ("libaio" ,libaio)
960 ("libtirpc" ,libtirpc)
961 ("nfs-utils" ,nfs-utils)
962 ("openssl" ,openssl)
963 ("python" ,python)
964 ("python-cffi" ,python-cffi)
965 ("util-linux" ,util-linux)
966 ("util-linux:lib" ,util-linux "lib")
967 ("zlib" ,zlib)))
968 (home-page "https://zfsonlinux.org/")
969 (synopsis "Native ZFS on Linux")
970 (description
971 "ZFS on Linux is an advanced file system and volume manager which was
972 originally developed for Solaris and is now maintained by the OpenZFS
973 community.")
974 (license license:cddl1.0)))
975
976 (define-public mergerfs
977 (package
978 (name "mergerfs")
979 (version "2.31.0")
980 (source
981 (origin
982 (method url-fetch)
983 (uri (string-append "https://github.com/trapexit/mergerfs/releases/download/"
984 version "/mergerfs-" version ".tar.gz"))
985 (sha256
986 (base32
987 "0k4asbg5n9dhy5jpjkw6simqqnr1zira2y4i71cq05091dfwm90p"))))
988 (build-system gnu-build-system)
989 (arguments
990 `(#:tests? #f ; No tests exist.
991 #:phases
992 (modify-phases %standard-phases
993 (delete 'configure)
994 (add-after 'unpack 'fix-paths
995 (lambda* (#:key inputs outputs #:allow-other-keys)
996 (setenv "CC" "gcc")
997 ;; These were copied from the package libfuse.
998 (substitute* '("libfuse/lib/mount_util.c" "libfuse/util/mount_util.c")
999 (("/bin/(u?)mount" _ maybe-u)
1000 (string-append (assoc-ref inputs "util-linux")
1001 "/bin/" maybe-u "mount")))
1002 (substitute* '("libfuse/util/mount.mergerfs.c")
1003 (("/bin/sh")
1004 (which "sh")))
1005 ;; The Makefile does not allow overriding PREFIX via make variables.
1006 (substitute* '("Makefile" "libfuse/Makefile")
1007 (("= /usr/local") (string-append "= " (assoc-ref outputs "out")))
1008 (("= /sbin") "= $(EXEC_PREFIX)/sbin")
1009 ;; cannot chown as build user
1010 (("chown root(:root)?") "true"))
1011 #t)))))
1012 ;; mergerfs bundles a heavily modified copy of libfuse.
1013 (inputs `(("util-linux" ,util-linux)))
1014 (home-page "https://github.com/trapexit/mergerfs")
1015 (synopsis "Featureful union file system")
1016 (description "mergerfs is a union file system geared towards simplifying
1017 storage and management of files across numerous commodity storage devices. It
1018 is similar to mhddfs, unionfs, and aufs.")
1019 (license (list
1020 license:isc ; mergerfs
1021 license:gpl2 license:lgpl2.0 ; Imported libfuse code.
1022 ))))
1023
1024 (define-public mergerfs-tools
1025 (let ((commit "480296ed03d1c3c7909697d7ef96d35840ee26b8")
1026 (revision "2"))
1027 (package
1028 (name "mergerfs-tools")
1029 ;; No released version exists.
1030 (version (git-version "0.0" revision commit))
1031 (source
1032 (origin
1033 (method git-fetch)
1034 (uri (git-reference
1035 (url "https://github.com/trapexit/mergerfs-tools")
1036 (commit commit)))
1037 (file-name (git-file-name name version))
1038 (sha256
1039 (base32
1040 "0xr06gi4xcr832rzy0hkp5c1n231s7w5iq1nkjvx9kvm0dl7chpq"))))
1041 (build-system copy-build-system)
1042 (inputs
1043 `(("python" ,python)
1044 ("python-xattr" ,python-xattr)
1045 ("rsync" ,rsync)))
1046 (arguments
1047 '(#:install-plan
1048 '(("src/" "bin/"))
1049 #:phases
1050 (modify-phases %standard-phases
1051 (add-after 'unpack 'patch-paths
1052 (lambda* (#:key inputs #:allow-other-keys)
1053 (substitute* (find-files "src" "^mergerfs\\.")
1054 (("'rsync'")
1055 (string-append "'" (assoc-ref inputs "rsync") "/bin/rsync'"))
1056 (("'rm'")
1057 (string-append "'" (assoc-ref inputs "coreutils") "/bin/rm'")))
1058 (substitute* "src/mergerfs.mktrash"
1059 (("xattr")
1060 (string-append (assoc-ref inputs "python-xattr") "/bin/xattr"))
1061 (("mkdir")
1062 (string-append (assoc-ref inputs "coreutils") "/bin/mkdir")))
1063 #t)))))
1064 (synopsis "Tools to help manage data in a mergerfs pool")
1065 (description "mergerfs-tools is a suite of programs that can audit
1066 permissions and ownership of files and directories on a mergerfs volume,
1067 duplicates files and directories across branches in its pool, find and remove
1068 duplicate files, balance pool drives, consolidate files in a single mergerfs
1069 directory onto a single drive and create FreeDesktop.org Trash specification
1070 compatible directories.")
1071 (home-page "https://github.com/trapexit/mergerfs-tools")
1072 (license license:isc))))
1073
1074 (define-public python-dropbox
1075 (package
1076 (name "python-dropbox")
1077 (version "11.2.0")
1078 (source
1079 (origin
1080 (method url-fetch)
1081 (uri (pypi-uri "dropbox" version))
1082 (sha256
1083 (base32
1084 "0ml6z37k6nkhkiy483kvifs8im8z7vabd2g9jl6fkf1fzy3n6bym"))))
1085 (build-system python-build-system)
1086 (arguments '(#:tests? #f)) ; Tests require a network connection.
1087 (native-inputs
1088 `(("python-pytest" ,python-pytest)
1089 ("python-pytest-runner" ,python-pytest-runner)))
1090 (propagated-inputs
1091 `(("python-certifi" ,python-certifi)
1092 ("python-chardet" ,python-chardet)
1093 ("python-requests" ,python-requests)
1094 ("python-six" ,python-six)
1095 ("python-stone" ,python-stone)
1096 ("python-urllib3" ,python-urllib3)))
1097 (home-page "https://www.dropbox.com/developers")
1098 (synopsis "Official Dropbox API Client")
1099 (description "This package provides a Python SDK for integrating with the
1100 Dropbox API v2.")
1101 (license license:expat)))
1102
1103 (define-public dbxfs
1104 (package
1105 (name "dbxfs")
1106 (version "1.0.51")
1107 (source
1108 (origin
1109 (method url-fetch)
1110 (uri (pypi-uri "dbxfs" version))
1111 (sha256
1112 (base32
1113 "1zz82d0mnql55397x4jx7z5rn857rf9zhjv895j93wpxdq10xwvk"))
1114 (patches (search-patches "dbxfs-remove-sentry-sdk.patch"))))
1115 (build-system python-build-system)
1116 (arguments
1117 '(#:tests? #f)) ; tests requires safefs
1118 (propagated-inputs
1119 `(("python-appdirs" ,python-appdirs)
1120 ("python-block-tracing" ,python-block-tracing)
1121 ("python-dropbox" ,python-dropbox)
1122 ("python-keyring" ,python-keyring)
1123 ("python-keyrings.alt" ,python-keyrings.alt)
1124 ("python-privy" ,python-privy)
1125 ("python-userspacefs" ,python-userspacefs)))
1126 (home-page "https://github.com/rianhunter/dbxfs")
1127 (synopsis "User-space file system for Dropbox")
1128 (description
1129 "@code{dbxfs} allows you to mount your Dropbox folder as if it were a
1130 local file system using FUSE.")
1131 (license license:gpl3+)))