Merge branch 'master' into ungrafting
[jackhill/guix/guix.git] / gnu / packages / file-systems.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
3 ;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
4 ;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
5 ;;; Copyright © 2018 Leo Famulari <leo@famulari.name>
6 ;;; Copyright © 2019, 2020 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 ;;;
10 ;;; This file is part of GNU Guix.
11 ;;;
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
16 ;;;
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
21 ;;;
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
25 (define-module (gnu packages file-systems)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix packages)
28 #:use-module (guix download)
29 #:use-module (guix git-download)
30 #:use-module (guix build-system cmake)
31 #:use-module (guix build-system copy)
32 #:use-module (guix build-system gnu)
33 #:use-module (guix build-system linux-module)
34 #:use-module (guix build-system python)
35 #:use-module (guix build-system trivial)
36 #:use-module (guix utils)
37 #:use-module (gnu packages)
38 #:use-module (gnu packages acl)
39 #:use-module (gnu packages attr)
40 #:use-module (gnu packages autotools)
41 #:use-module (gnu packages base)
42 #:use-module (gnu packages bison)
43 #:use-module (gnu packages check)
44 #:use-module (gnu packages compression)
45 #:use-module (gnu packages crypto)
46 #:use-module (gnu packages curl)
47 #:use-module (gnu packages cyrus-sasl)
48 #:use-module (gnu packages datastructures)
49 #:use-module (gnu packages documentation)
50 #:use-module (gnu packages docbook)
51 #:use-module (gnu packages flex)
52 #:use-module (gnu packages gawk)
53 #:use-module (gnu packages glib)
54 #:use-module (gnu packages gnupg)
55 #:use-module (gnu packages kerberos)
56 #:use-module (gnu packages libffi)
57 #:use-module (gnu packages linux)
58 #:use-module (gnu packages nfs)
59 #:use-module (gnu packages onc-rpc)
60 #:use-module (gnu packages openldap)
61 #:use-module (gnu packages photo)
62 #:use-module (gnu packages pkg-config)
63 #:use-module (gnu packages python)
64 #:use-module (gnu packages python-crypto)
65 #:use-module (gnu packages python-web)
66 #:use-module (gnu packages python-xyz)
67 #:use-module (gnu packages readline)
68 #:use-module (gnu packages rsync)
69 #:use-module (gnu packages sssd)
70 #:use-module (gnu packages sqlite)
71 #:use-module (gnu packages tls)
72 #:use-module (gnu packages valgrind)
73 #:use-module (gnu packages version-control)
74 #:use-module (gnu packages xml))
75
76 (define-public autofs
77 (package
78 (name "autofs")
79 (version "5.1.6")
80 (source
81 (origin
82 (method url-fetch)
83 (uri (string-append "mirror://kernel.org/linux/daemons/autofs/"
84 "v" (version-major version) "/"
85 "autofs-" version ".tar.xz"))
86 (sha256
87 (base32 "1vya21mb4izj3khcr3flibv7xc15vvx2v0rjfk5yd31qnzcy7pnx"))))
88 (build-system gnu-build-system)
89 (arguments
90 `(#:configure-flags
91 (list "--enable-ignore-busy" ; during shutdown
92 "--enable-sloppy-mount" ; support mount(8) -s
93 "--with-libtirpc"
94 (string-append "--with-openldap="
95 (assoc-ref %build-inputs "openldap"))
96 (string-append "--with-sasl="
97 (assoc-ref %build-inputs "cyrus-sasl"))
98 "HAVE_SSS_AUTOFS=1" ; required to make sssldir click
99 (string-append "sssldir="
100 (assoc-ref %build-inputs "sssd")
101 "/lib/sssd/modules"))
102 #:tests? #f ; no test suite
103 #:phases
104 (modify-phases %standard-phases
105 (add-before 'configure 'fix-hard-coded-search-path
106 (lambda _
107 (substitute* "configure"
108 (("^searchpath=\".*\"")
109 "searchpath=\"$PATH\""))
110 #t))
111 (add-before 'install 'omit-obsolete-lookup_nis.so-link
112 ;; Building lookup_yp.so depends on $(YPCLNT) but this doesn't,
113 ;; leading to a make error. Since it's broken, comment it out.
114 (lambda _
115 (substitute* "modules/Makefile"
116 (("ln -fs lookup_yp.so" match)
117 (string-append "# " match)))
118 #t)))))
119 (native-inputs
120 `(("bison" ,bison)
121 ("flex" ,flex)
122 ("pkg-config" ,pkg-config)
123 ("rpcsvc-proto" ,rpcsvc-proto)))
124 (inputs
125 `(("cyrus-sasl" ,cyrus-sasl)
126 ("e2fsprogs" ,e2fsprogs) ; for e[234]fsck
127 ("libtirpc" ,libtirpc)
128 ("libxml2" ,libxml2) ; needed for LDAP, SASL
129 ("mit-krb5" ,mit-krb5) ; needed for LDAP, SASL
130 ("nfs-utils" ,nfs-utils) ; for mount.nfs
131 ("openldap" ,openldap)
132 ("openssl" ,openssl) ; needed for SASL
133 ("sssd" ,sssd)
134 ("util-linux" ,util-linux))) ; for mount, umount
135 ;; XXX A directory index is the closest thing this has to a home page.
136 (home-page "https://www.kernel.org/pub/linux/daemons/autofs/")
137 (synopsis "Kernel-based automounter for Linux")
138 (description
139 "Autofs is a kernel-based automounter for use with the Linux autofs4
140 module. It automatically mounts selected file systems when they are used and
141 unmounts them after a set period of inactivity. This provides
142 centrally-managed, consistent file names for users and applications, even in a
143 large and/or frequently changing (network) environment.")
144 ;; fedfs/ is GPL-2-only but not built.
145 (license (list license:bsd-3 ; modules/cyrus-sasl.c
146 license:gpl2+)))) ; the rest
147
148 (define-public bindfs
149 (package
150 (name "bindfs")
151 (version "1.14.8")
152 (source (origin
153 (method url-fetch)
154 (uri (string-append "https://bindfs.org/downloads/bindfs-"
155 version ".tar.gz"))
156 (sha256
157 (base32
158 "15y4brlcrqhxl6z73785m0dr1vp2q3wc6xss08x9jjr0apzmmjp5"))))
159 (build-system gnu-build-system)
160 (arguments
161 ;; XXX: The tests have no hope of passing until there is a "nogroup"
162 ;; entry (or at least some group to which the guix builder does
163 ;; not belong) in the /etc/group file of the build environment.
164 ;; Currently we do not have such a group. Disable tests for now.
165 '(#:tests? #f))
166 (native-inputs
167 ;; Native inputs to run the tests
168 ;; ("ruby" ,ruby)
169 ;; ("valgrind" ,valgrind)
170 ;; ("which" ,which)
171 `(("pkg-config" ,pkg-config)))
172 (inputs
173 `(("fuse" ,fuse)))
174 (home-page "https://bindfs.org")
175 (synopsis "Bind mount a directory and alter permission bits")
176 (description
177 "@command{bindfs} is a FUSE filesystem for mounting a directory to
178 another location, similar to @command{mount --bind}. It can be used for:
179 @itemize
180 @item Making a directory read-only.
181 @item Making all executables non-executable.
182 @item Sharing a directory with a list of users (or groups).
183 @item Modifying permission bits using rules with chmod-like syntax.
184 @item Changing the permissions with which files are created.
185 @end itemize ")
186 (license license:gpl2+)))
187
188 (define-public davfs2
189 (package
190 (name "davfs2")
191 (version "1.6.0")
192 (source
193 (origin
194 (method url-fetch)
195 (uri (string-append "https://download.savannah.nongnu.org/releases/"
196 "davfs2/davfs2-" version ".tar.gz"))
197 (sha256
198 (base32 "0l1vnv5lfigciwg17p10zxwhzj4qw2d9kw30prr7g4dxhmb6fsrf"))))
199 (build-system gnu-build-system)
200 (arguments
201 `(#:configure-flags
202 (list "--sysconfdir=/etc" ; so man pages & binaries contain /etc
203 (string-append "--docdir=" (assoc-ref %outputs "out")
204 "/share/doc/" ,name "-" ,version)
205 (string-append "ssbindir=" (assoc-ref %outputs "out") "/sbin")
206 ;; The default ‘davfs2’ user and group don't exist on most systems.
207 "dav_user=nobody"
208 "dav_group=nogroup")
209 #:phases
210 (modify-phases %standard-phases
211 (add-after 'unpack 'omit-redundancy
212 ;; Don't install redundant copies of /etc examples into /share.
213 (lambda _
214 (substitute* "etc/Makefile.in"
215 (("(dist_pkgdata_DATA =.*) davfs2.conf secrets(.*)"
216 _ prefix suffix)
217 (string-append prefix suffix)))
218 #t))
219 (add-after 'unpack 'patch-file-names
220 (lambda _
221 ;; Don't auto-load the FUSE kernel module. That's up to root.
222 ;; XXX If/when we restore the previous behaviour, make sure not
223 ;; to introduce a security hole when mount.davfs is setuid.
224 (substitute* "src/kernel_interface.c"
225 (("/sbin/modprobe") "/modprobe/disabled"))
226 #t))
227 (replace 'install
228 (lambda* (#:key make-flags outputs #:allow-other-keys)
229 (let ((out (assoc-ref outputs "out")))
230 (apply invoke "make" "install"
231 (string-append "pkgsysconfdir=" out "/etc")
232 make-flags)))))))
233 (inputs
234 `(("neon" ,neon)
235
236 ;; Neon requires but doesn't propagate zlib, nor would we want that.
237 ;; XZ as well, but that's already present in the build environment.
238 ("zlib" ,zlib)))
239 (home-page "https://savannah.nongnu.org/projects/davfs2")
240 (synopsis "Mount remote WebDAV resources in the local file system")
241 (description
242 "The @acronym{WebDAV, Web Distributed Authoring and Versioning} extension
243 to the HTTP protocol defines a standard way to author resources on a remote Web
244 server. Davfs2 exposes such resources as a typical filesystem which can be used
245 by standard applications with no built-in support for WebDAV, such as the GNU
246 coreutils (@command{cp}, @command{mv}, etc.) or a graphical word processor.
247
248 Davfs2 works with most WebDAV servers with no or little configuration. It
249 supports TLS (HTTPS), HTTP proxies, HTTP basic and digest authentication, and
250 client certificates. It performs extensive caching to avoid unnecessary network
251 traffic, stay responsive even over slow or unreliable connections, and prevent
252 data loss. It aims to make use by unprivileged users as easy and secure as
253 possible.
254
255 However, davfs2 is not a full-featured WebDAV client. The file system interface
256 and the WebDAV protocol are quite different. Translating between the two is not
257 always possible.")
258 (license (list license:bsd-2 ; src/fuse_kernel.h
259 license:gpl3+)))) ; everything else
260
261 (define-public fsarchiver
262 (package
263 (name "fsarchiver")
264 (version "0.8.5")
265 (source
266 (origin
267 (method git-fetch)
268 (uri
269 (git-reference
270 (url "https://github.com/fdupoux/fsarchiver")
271 (commit version)))
272 (file-name (git-file-name name version))
273 (sha256
274 (base32 "1rvwq5v3rl14bqxjm1ibfapyicf0sa44nw7451v10kx39lp56ylp"))))
275 (build-system gnu-build-system)
276 (native-inputs
277 `(("autoconf" ,autoconf)
278 ("automake" ,automake)
279 ("pkg-config" ,pkg-config)))
280 (inputs
281 `(("bzip2" ,bzip2)
282 ("e2fsprogs" ,e2fsprogs)
283 ("libgcrypt" ,libgcrypt)
284 ("lz4" ,lz4)
285 ("lzo" ,lzo)
286 ("util-linux" ,util-linux "lib")
287 ("xz" ,xz)
288 ("zlib" ,zlib)
289 ("zstd:lib" ,zstd "lib")))
290 (synopsis "File system back-up, deployment, and migration tool")
291 (description
292 "FSArchiver saves the contents of a file system to a compressed archive
293 file, and restores it to a different file system and/or partition. This
294 partition can be of a different size than the original and FSArchiver will
295 create a new file system if none exists.
296
297 All standard file attributes supported by the kernel are preserved, including
298 file permissions, timestamps, symbolic and hard links, and extended attributes.
299
300 Each file in the archive is protected by a checksum. If part of the archive
301 is corrupted you'll lose the affected file(s) but not the whole back-up.")
302 (home-page "https://www.fsarchiver.org/")
303 (license license:gpl2)))
304
305 (define-public gphotofs
306 (package
307 (name "gphotofs")
308 (version "0.5.0")
309 (source
310 (origin
311 (method url-fetch)
312 (uri
313 (string-append "mirror://sourceforge/gphoto/gphotofs/" version
314 "/gphotofs-0.5.tar.gz"))
315 (sha256
316 (base32
317 "04slwhr6ap9xcc27wphk22ad8yn79ngyy5z10lxams3k5liahvc2"))))
318 (build-system gnu-build-system)
319 (native-inputs
320 `(("pkg-config" ,pkg-config)))
321 (inputs
322 `(("fuse" ,fuse)
323 ("glib" ,glib)
324 ("libgphoto2" ,libgphoto2)))
325 (synopsis "Virtual file system for libgphoto2 using FUSE")
326 (description "GPhotoFS is a FUSE file system module to mount your camera as
327 a file system on Linux. This allow using your camera with any tool able to read
328 from a mounted file system.")
329 (home-page "http://www.gphoto.org/proj/gphotofs/")
330 (license license:gpl2+)))
331
332 (define-public bcachefs-tools
333 (let ((commit "db931a4571817d7d61be6bce306f1d42f7cd3398")
334 (revision "2"))
335 (package
336 (name "bcachefs-tools")
337 (version (git-version "0.1" revision commit))
338 (source
339 (origin
340 (method git-fetch)
341 (uri (git-reference
342 (url "https://evilpiepirate.org/git/bcachefs-tools.git")
343 (commit commit)))
344 (file-name (git-file-name name version))
345 (sha256
346 (base32 "1zl8lda6ni6rhsmsng6smrcjihy2irjf03h1m7nvkqmkhq44j80s"))))
347 (build-system gnu-build-system)
348 (arguments
349 `(#:make-flags
350 (list ,(string-append "VERSION=" version) ; bogus vX.Y-nogit otherwise
351 (string-append "PREFIX=" (assoc-ref %outputs "out"))
352 "INITRAMFS_DIR=$(PREFIX)/share/initramfs-tools"
353 "CC=gcc"
354 "PYTEST=pytest")
355 #:phases
356 (modify-phases %standard-phases
357 (delete 'configure) ; no configure script
358 (add-after 'install 'promote-mount.bcachefs.sh
359 ;; XXX The (optional) mount.bcachefs helper requires rust:cargo.
360 ;; This alternative shell script does the job well enough for now.
361 (lambda* (#:key inputs outputs #:allow-other-keys)
362 (let ((out (assoc-ref outputs "out")))
363 (with-directory-excursion (string-append out "/sbin")
364 (rename-file "mount.bcachefs.sh" "mount.bcachefs")
365 ;; WRAP-SCRIPT causes bogus ‘Insufficient arguments’ errors.
366 (wrap-program "mount.bcachefs"
367 `("PATH" ":" prefix
368 ,(cons (string-append out "/sbin")
369 (map (lambda (input)
370 (string-append (assoc-ref inputs input)
371 "/bin"))
372 (list "coreutils"
373 "gawk"
374 "util-linux"))))))))))
375 #:tests? #f)) ; XXX 6 valgrind tests fail
376 (native-inputs
377 `(("pkg-config" ,pkg-config)
378
379 ;; For tests.
380 ("python-pytest" ,python-pytest)
381 ("valgrind" ,valgrind)))
382 (inputs
383 `(("eudev" ,eudev)
384 ("keyutils" ,keyutils)
385 ("libaio" ,libaio)
386 ("libscrypt" ,libscrypt)
387 ("libsodium" ,libsodium)
388 ("liburcu" ,liburcu)
389 ("util-linux:lib" ,util-linux "lib") ; lib{blkid,uuid}
390 ("lz4" ,lz4)
391 ("zlib" ,zlib)
392 ("zstd:lib" ,zstd "lib")
393
394 ;; Only for mount.bcachefs.sh.
395 ("coreutils" ,coreutils-minimal)
396 ("gawk" ,gawk)
397 ("util-linux" ,util-linux)))
398 (home-page "https://bcachefs.org/")
399 (synopsis "Tools to create and manage bcachefs file systems")
400 (description
401 "The bcachefs-tools are command-line utilities for creating, checking,
402 and otherwise managing bcachefs file systems.
403
404 Bcachefs is a @acronym{CoW, copy-on-write} file system supporting native
405 encryption, compression, snapshots, and (meta)data checksums. It can use
406 multiple block devices for replication and/or performance, similar to RAID.
407
408 In addition, bcachefs provides all the functionality of bcache, a block-layer
409 caching system, and lets you assign different roles to each device based on its
410 performance and other characteristics.")
411 (license license:gpl2+))))
412
413 (define-public bcachefs-tools/static
414 (package
415 (inherit bcachefs-tools)
416 (name "bcachefs-tools-static")
417 (arguments
418 (substitute-keyword-arguments (package-arguments bcachefs-tools)
419 ((#:make-flags make-flags)
420 `(append ,make-flags
421 (list "LDFLAGS=-static")))))
422 (inputs
423 `(("eudev:static" ,eudev "static")
424 ("libscrypt:static" ,libscrypt "static")
425 ("lz4:static" ,lz4 "static")
426 ("util-linux:static" ,util-linux "static") ; lib{blkid,uuid}
427 ("zlib" ,zlib "static")
428 ("zstd:static" ,zstd "static")
429 ,@(package-inputs bcachefs-tools)))))
430
431 (define-public bcachefs/static
432 (package
433 (name "bcachefs-static")
434 (version (package-version bcachefs-tools))
435 (build-system trivial-build-system)
436 (source #f)
437 (inputs
438 `(("bcachefs-tools" ,bcachefs-tools/static)))
439 (arguments
440 `(#:modules ((guix build utils))
441 #:builder
442 (begin
443 (use-modules (guix build utils)
444 (ice-9 ftw)
445 (srfi srfi-26))
446 (let* ((bcachefs-tools (assoc-ref %build-inputs "bcachefs-tools"))
447 (out (assoc-ref %outputs "out")))
448 (mkdir-p out)
449 (with-directory-excursion out
450 (install-file (string-append bcachefs-tools
451 "/sbin/bcachefs")
452 "sbin")
453 (remove-store-references "sbin/bcachefs")
454 (invoke "sbin/bcachefs" "version") ; test suite
455 #t)))))
456 (home-page (package-home-page bcachefs-tools))
457 (synopsis "Statically-linked bcachefs command from bcachefs-tools")
458 (description "This package provides the statically-linked @command{bcachefs}
459 from the bcachefs-tools package. It is meant to be used in initrds.")
460 (license (package-license bcachefs-tools))))
461
462 (define-public exfatprogs
463 (package
464 (name "exfatprogs")
465 (version "1.0.4")
466 (source
467 (origin
468 (method git-fetch)
469 (uri (git-reference
470 (url "https://github.com/exfatprogs/exfatprogs")
471 (commit version)))
472 (file-name (git-file-name name version))
473 (sha256
474 (base32 "1braffz1wc4ki3nb42q85l5zg2dl2hwjr64rk27nc85wcsrbavnl"))))
475 (build-system gnu-build-system)
476 (arguments
477 `(#:configure-flags
478 (list "--disable-static")))
479 (native-inputs
480 `(("autoconf" ,autoconf)
481 ("automake" ,automake)
482 ("libtool" ,libtool)
483 ("pkg-config" ,pkg-config)))
484 (home-page "https://github.com/exfatprogs/exfatprogs")
485 (synopsis "Tools to create, check, and repair exFAT file systems")
486 (description
487 "These are command-line user space tools for the @acronym{exFAT,
488 Extensible File Allocation Table} file systems. Included are
489 @command{mkfs.exfat} to create (format) new exFAT file systems, and
490 @command{fsck.exfat} to check their consistency and repair them.")
491 (license license:gpl2+)))
492
493 (define-public httpfs2
494 (package
495 (name "httpfs2")
496 (version "0.1.5")
497 (source
498 (origin
499 (method url-fetch)
500 (uri (string-append "mirror://sourceforge/httpfs/httpfs2/"
501 "httpfs2-" version ".tar.gz"))
502 (sha256
503 (base32
504 "1h8ggvhw30n2r6w11n1s458ypggdqx6ldwd61ma4yd7binrlpjq1"))))
505 (build-system gnu-build-system)
506 (native-inputs
507 `(("asciidoc" ,asciidoc)
508 ("docbook-xml" ,docbook-xml)
509 ("libxml2" ,libxml2)
510 ("libxslt" ,libxslt)
511 ("pkg-config" ,pkg-config)))
512 (inputs
513 `(("fuse" ,fuse)
514 ("gnutls" ,gnutls)))
515 (arguments
516 `(#:phases
517 (modify-phases %standard-phases
518 (delete 'configure) ; no configure script
519 (replace 'install
520 ;; There's no ‘install’ target. Install all variants manually.
521 (lambda* (#:key outputs #:allow-other-keys)
522 (let* ((out (assoc-ref outputs "out"))
523 (bin (string-append out "/bin"))
524 (man1 (string-append out "/share/man/man1")))
525 (mkdir-p bin)
526 (mkdir-p man1)
527 (for-each
528 (lambda (variant)
529 (let ((man1-page (string-append variant ".1")))
530 (install-file variant bin)
531 (install-file man1-page man1)))
532 (list "httpfs2"
533 "httpfs2-mt"
534 "httpfs2-ssl"
535 "httpfs2-ssl-mt")))
536 #t)))
537 #:make-flags (list "CC=gcc")
538 #:parallel-build? #f ; can result in missing man pages
539 #:tests? #f)) ; no tests
540 (home-page "https://sourceforge.net/projects/httpfs/")
541 (synopsis "Mount remote files over HTTP")
542 (description "httpfs2 is a @code{fuse} file system for mounting any
543 @dfn{HyperText} (HTTP or HTTPS) URL. It uses HTTP/1.1 byte ranges to request
544 arbitrary bytes from the web server, without needing to download the entire
545 file. This is particularly useful with large archives such as ZIP files and
546 ISO images when you only need to inspect their contents or extract specific
547 files. Since the HTTP protocol itself has no notion of directories, only a
548 single file can be mounted.")
549 (license license:gpl2+)))
550
551 (define-public jfsutils
552 (package
553 (name "jfsutils")
554 (version "1.1.15")
555 (source
556 (origin
557 (method url-fetch)
558 (uri (string-append "http://jfs.sourceforge.net/project/pub/jfsutils-"
559 version ".tar.gz"))
560 (sha256
561 (base32 "0kbsy2sk1jv4m82rxyl25gwrlkzvl3hzdga9gshkxkhm83v1aji4"))
562 (patches (search-patches "jfsutils-add-sysmacros.patch"
563 "jfsutils-include-systypes.patch"))))
564 (build-system gnu-build-system)
565 (inputs
566 `(("util-linux" ,util-linux "lib")))
567 (home-page "http://jfs.sourceforge.net/home.html")
568 (synopsis "Utilities for managing JFS file systems")
569 (description
570 "The JFSutils are a collection of utilities for managing the @acronym{JFS,
571 Journaled File System}, a 64-bit journaling file system created by IBM and later
572 ported to the kernel Linux. The following commands are available:
573 @enumerate
574 @item @command{fsck.jfs}: check and repair a JFS file system or replay its
575 transaction log.
576 @item @command{logdump}: dump the JFS journal log.
577 @item @command{logredo}: replay the JFS journal log.
578 @item @command{mkfs.jfs}: create a new JFS file system.
579 @item @command{xchklog}: save a JFS fsck log to a file.
580 @item @command{xchkdmp}: dump the contents of such a log file.
581 @item @command{xpeek}: a JFS file system editor with a shell-like interface.
582 @end enumerate\n")
583 (license license:gpl3+))) ; no explicit version given
584
585 (define-public jfsutils/static
586 (static-package
587 (package
588 (inherit jfsutils)
589 (name "jfsutils-static")
590 (inputs
591 `(("util-linux:static" ,util-linux "static")
592 ,@(package-inputs jfsutils))))))
593
594 (define-public jfs_fsck/static
595 (package
596 (name "jfs_fsck-static")
597 (version (package-version jfsutils))
598 (source #f)
599 (build-system trivial-build-system)
600 (arguments
601 `(#:modules ((guix build utils))
602 #:builder
603 (begin
604 (use-modules (guix build utils)
605 (ice-9 ftw)
606 (srfi srfi-26))
607 (let* ((jfsutils (assoc-ref %build-inputs "jfsutils"))
608 (fsck "jfs_fsck")
609 (out (assoc-ref %outputs "out"))
610 (sbin (string-append out "/sbin")))
611 (mkdir-p sbin)
612 (with-directory-excursion sbin
613 (install-file (string-append jfsutils "/sbin/" fsck)
614 ".")
615 (remove-store-references fsck)
616 (chmod fsck #o555))
617 #t))))
618 (inputs
619 `(("jfsutils" ,jfsutils/static)))
620 (home-page (package-home-page jfsutils))
621 (synopsis "Statically-linked jfs_fsck command from jfsutils")
622 (description "This package provides statically-linked jfs_fsck command taken
623 from the jfsutils package. It is meant to be used in initrds.")
624 (license (package-license jfsutils))))
625
626 (define-public disorderfs
627 (package
628 (name "disorderfs")
629 (version "0.5.10")
630 (source
631 (origin
632 (method git-fetch)
633 (uri (git-reference
634 (url "https://salsa.debian.org/reproducible-builds/disorderfs.git")
635 (commit version)))
636 (file-name (git-file-name name version))
637 (sha256
638 (base32
639 "0lsisx5118k0qk0b5klbxl03rvhycnznyfx05yxmjawh85bfhmlh"))))
640 (build-system gnu-build-system)
641 (native-inputs
642 `(("pkg-config" ,pkg-config)))
643 (inputs
644 `(("fuse" ,fuse)
645 ("attr" ,attr)))
646 (arguments
647 `(#:phases (modify-phases %standard-phases
648 (delete 'configure)) ; no configure script
649 #:make-flags (let ((out (assoc-ref %outputs "out")))
650 (list (string-append "PREFIX=" out)))
651 #:test-target "test"
652 ;; FIXME: Tests require 'run-parts' which is not in Guix yet.
653 #:tests? #f))
654 (home-page "https://salsa.debian.org/reproducible-builds/disorderfs")
655 (synopsis "FUSE file system that introduces non-determinism")
656 (description
657 "An overlay FUSE file system that introduces non-determinism
658 into file system metadata. For example, it can randomize the order
659 in which directory entries are read. This is useful for detecting
660 non-determinism in the build process.")
661 (license license:gpl3+)))
662
663 (define-public glusterfs
664 (package
665 (name "glusterfs")
666 (version "7.0")
667 (source
668 (origin
669 (method url-fetch)
670 (uri (string-append "https://download.gluster.org/pub/gluster/glusterfs/"
671 (version-major version) "/"
672 (version-major+minor version) "/"
673 "glusterfs-" version ".tar.gz"))
674 (sha256
675 (base32
676 "0yzhx710ypj0j3m5dcgmmgvkp7p0rmmp2p7ld0axrm4vpwc2b1wa"))))
677 (build-system gnu-build-system)
678 (arguments
679 `(#:configure-flags
680 (let ((out (assoc-ref %outputs "out"))
681 (p2 (assoc-ref %build-inputs "python-2")))
682 (list (string-append "PYTHON=" p2 "/bin/python")
683 (string-append "--with-initdir=" out "/etc/init.d")
684 (string-append "--with-mountutildir=" out "/sbin")
685 "--enable-cmocka" ; unit tests
686 ;; "--enable-debug" ; debug build options
687 ;; "--enable-asan" ; Address Sanitizer
688 ;; "--enable-tsan" ; ThreadSanitizer
689 ))
690 #:phases
691 (modify-phases %standard-phases
692 (add-before 'configure 'autogen
693 (lambda _ (invoke "./autogen.sh"))))))
694 (native-inputs
695 `(("pkg-config" ,pkg-config)
696 ("libtirpc" ,libtirpc)
697 ("rpcsvc-proto" ,rpcsvc-proto)
698 ("python-2" ,python-2) ; must be version 2
699 ("flex" ,flex)
700 ("bison" ,bison)
701 ("libtool" ,libtool)
702 ("autoconf" ,autoconf)
703 ("automake" ,automake)
704 ("cmocka" ,cmocka)))
705 (inputs
706 `(("acl" ,acl)
707 ("fuse" ,fuse)
708 ("openssl" ,openssl)
709 ("liburcu" ,liburcu)
710 ("libuuid" ,util-linux "lib")
711 ("libxml2" ,libxml2)
712 ("readline" ,readline)
713 ("zlib" ,zlib)
714 ("libaio" ,libaio)
715 ("rdma-core" ,rdma-core)))
716 (home-page "https://www.gluster.org")
717 (synopsis "Distributed file system")
718 (description "GlusterFS is a distributed scalable network file system
719 suitable for data-intensive tasks such as cloud storage and media streaming.
720 It allows rapid provisioning of additional storage based on your storage
721 consumption needs. It incorporates automatic failover as a primary feature.
722 All of this is accomplished without a centralized metadata server.")
723 ;; The user may choose either LGPLv3+ or GPLv2 only.
724 (license (list license:lgpl3+ license:gpl2+))))
725
726 (define-public curlftpfs
727 (package
728 (name "curlftpfs")
729 (version "0.9.2")
730 (source
731 (origin
732 (method url-fetch)
733 (uri (string-append "mirror://sourceforge/curlftpfs/curlftpfs/" version
734 "/curlftpfs-" version ".tar.gz"))
735 (sha256
736 (base32
737 "0n397hmv21jsr1j7zx3m21i7ryscdhkdsyqpvvns12q7qwwlgd2f"))))
738 (build-system gnu-build-system)
739 (arguments
740 `(#:phases
741 (modify-phases %standard-phases
742 (add-after 'unpack 'fix-test
743 (lambda _
744 ;; One of the 512-Byte block counts is definitely wrong.
745 ;; See <https://sourceforge.net/p/curlftpfs/bugs/73/>.
746 (substitute* "tests/ftpfs-ls_unittest.c"
747 (("4426192") "12814800"))
748 #t)))))
749 (inputs
750 `(("curl" ,curl)
751 ("glib" ,glib)
752 ("fuse" ,fuse)))
753 (native-inputs
754 `(("pkg-config" ,pkg-config)))
755 (home-page "http://curlftpfs.sourceforge.net/")
756 (synopsis "Mount remote file systems over FTP")
757 (description
758 "This is a file system client based on the FTP File Transfer Protocol.")
759 (license license:gpl2+)))
760
761 (define-public libnfs
762 (package
763 (name "libnfs")
764 (version "3.0.0")
765 (source (origin
766 (method git-fetch)
767 (uri (git-reference
768 (url "https://github.com/sahlberg/libnfs")
769 (commit (string-append "libnfs-" version))))
770 (file-name (git-file-name name version))
771 (sha256
772 (base32
773 "115p55y2cbs92z5lmcnjx1v29lwinpgq4sha9v1kq1vd8674h404"))))
774 (build-system gnu-build-system)
775 (home-page "https://github.com/sahlberg/libnfs")
776 (native-inputs
777 `(("autoconf" ,autoconf)
778 ("automake" ,automake)
779 ("libtool" ,libtool)
780 ("pkg-config" ,pkg-config)))
781 (synopsis "Client library for accessing NFS shares")
782 (description "LIBNFS is a client library for accessing NFS shares over a
783 network. LIBNFS offers three different APIs, for different use :
784
785 @enumerate
786 @item RAW, a fully asynchronous low level RPC library for NFS protocols. This
787 API provides very flexible and precise control of the RPC issued.
788 @item NFS ASYNC, a fully asynchronous library for high level vfs functions
789 @item NFS SYNC, a synchronous library for high level vfs functions.
790 @end enumerate\n")
791 (license (list license:lgpl2.1+ ; library
792 license:gpl3+ ; tests
793 license:bsd-3 ; copied nsf4 files
794 ))))
795
796 (define-public apfs-fuse
797 ;; Later versions require FUSE 3.
798 (let ((commit "7b89418e8dc27103d3c4f8fa348086ffcd634c17")
799 (revision "1"))
800 (package
801 (name "apfs-fuse")
802 (version (git-version "0.0.0" revision commit))
803 (source (origin
804 (method git-fetch)
805 (uri (git-reference
806 (url "https://github.com/sgan81/apfs-fuse")
807 (recursive? #t) ; for lzfse
808 (commit commit)))
809 (sha256
810 (base32
811 "0x2siy3cmnm9wsdfazg3xc8r3kbg73gijmnn1vjw33pp71ckylxr"))
812 (file-name (git-file-name name version))))
813 (build-system cmake-build-system)
814 (arguments
815 `(#:tests? #f ; No test suite
816 #:configure-flags
817 '("-DUSE_FUSE3=OFF") ; FUSE 3 is not packaged yet.
818 #:phases
819 (modify-phases %standard-phases
820 ;; No 'install' target in CMakeLists.txt
821 (replace 'install
822 (lambda* (#:key outputs #:allow-other-keys)
823 (let* ((out (assoc-ref outputs "out"))
824 (bin (string-append out "/bin"))
825 (lib (string-append out "/lib"))
826 (doc (string-append out "/share/doc/"
827 (string-append ,name "-" ,version))))
828 (install-file "apfs-dump" bin)
829 (install-file "apfs-dump-quick" bin)
830 (install-file "apfs-fuse" bin)
831 (install-file "libapfs.a" lib)
832 (install-file "../source/README.md" doc)
833 #t))))))
834 (inputs
835 `(("bzip2" ,bzip2)
836 ("fuse" ,fuse)
837 ("zlib" ,zlib)))
838 (synopsis "Read-only FUSE driver for the APFS file system")
839 (description "APFS-FUSE is a read-only FUSE driver for the @dfn{Apple File
840 System} (APFS). It is currently in an experimental state — it may not be able
841 to read all files, and it does not support all the compression methods in
842 APFS.")
843 (home-page "https://github.com/sgan81/apfs-fuse")
844 (license license:gpl2+))))
845
846 (define-public zfs
847 (package
848 (name "zfs")
849 (version "0.8.5")
850 (outputs '("out" "module" "src"))
851 (source
852 (origin
853 (method url-fetch)
854 (uri (string-append "https://github.com/zfsonlinux/zfs/releases"
855 "/download/zfs-" version
856 "/zfs-" version ".tar.gz"))
857 (sha256
858 (base32 "0gfdnynmsxbhi97q73smrgmcw1k8zmlr1hgljfn38sk0kimivd6v"))))
859 (build-system linux-module-build-system)
860 (arguments
861 `(;; The ZFS kernel module should not be downloaded since the license
862 ;; terms don't allow for distributing it, only building it locally.
863 #:substitutable? #f
864 ;; Tests cannot run in an unprivileged build environment.
865 #:tests? #f
866 #:phases
867 (modify-phases %standard-phases
868 (add-after 'configure 'really-configure
869 (lambda* (#:key outputs inputs #:allow-other-keys)
870 (let ((out (assoc-ref outputs "out")))
871 (substitute* "configure"
872 (("-/bin/sh") (string-append "-" (which "sh"))))
873 (invoke "./configure"
874 "--with-config=all"
875 (string-append "--prefix=" out)
876 (string-append "--with-dracutdir=" out "/lib/dracut")
877 (string-append "--with-udevdir=" out "/lib/udev")
878 (string-append "--with-mounthelperdir=" out "/sbin")
879 (string-append "--with-linux="
880 (assoc-ref inputs "linux-module-builder")
881 "/lib/modules/build")))))
882 (add-after 'unpack 'patch-source
883 (lambda* (#:key inputs outputs #:allow-other-keys)
884 (let ((out (assoc-ref outputs "out"))
885 (src (assoc-ref outputs "src"))
886 (util-linux (assoc-ref inputs "util-linux"))
887 (nfs-utils (assoc-ref inputs "nfs-utils")))
888 (substitute* "contrib/Makefile.in"
889 ;; This is not configurable nor is its hard-coded /usr prefix.
890 ((" initramfs") ""))
891 (substitute* "module/zfs/zfs_ctldir.c"
892 (("/usr/bin/env\", \"umount")
893 (string-append util-linux "/bin/umount\", \"-n"))
894 (("/usr/bin/env\", \"mount")
895 (string-append util-linux "/bin/mount\", \"-n")))
896 (substitute* "lib/libzfs/libzfs_mount.c"
897 (("/bin/mount") (string-append util-linux "/bin/mount"))
898 (("/bin/umount") (string-append util-linux "/bin/umount")))
899 (substitute* "lib/libshare/nfs.c"
900 (("/usr/sbin/exportfs")
901 (string-append nfs-utils "/sbin/exportfs")))
902 (substitute* "config/zfs-build.m4"
903 (("\\$sysconfdir/init.d") (string-append out "/etc/init.d")))
904 (substitute* '("etc/zfs/Makefile.am"
905 "cmd/zed/Makefile.am")
906 (("\\$\\(sysconfdir)") (string-append out "/etc")))
907 (substitute* "cmd/vdev_id/vdev_id"
908 (("PATH=/bin:/sbin:/usr/bin:/usr/sbin")
909 (string-append "PATH="
910 (dirname (which "chmod")) ":"
911 (dirname (which "grep")) ":"
912 (dirname (which "sed")) ":"
913 (dirname (which "gawk")))))
914 (substitute* "contrib/pyzfs/Makefile.in"
915 ((".*install-lib.*") ""))
916 (substitute* '("Makefile.am" "Makefile.in")
917 (("\\$\\(prefix)/src") (string-append src "/src"))))
918 #t))
919 (replace 'build
920 (lambda _ (invoke "make")))
921 (replace 'install
922 (lambda* (#:key outputs inputs native-inputs #:allow-other-keys)
923 (let* ((out (assoc-ref outputs "out"))
924 (moddir (assoc-ref outputs "module"))
925 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
926 (invoke "make" "install"
927 (string-append "DEFAULT_INITCONF_DIR=" out "/etc/default")
928 (string-append "DEPMOD=" kmod "/bin/depmod")
929 (string-append "INSTALL_PATH=" out)
930 (string-append "INSTALL_MOD_PATH=" moddir)
931 "INSTALL_MOD_STRIP=1")
932 (install-file "contrib/bash_completion.d/zfs"
933 (string-append out "/share/bash-completion/completions"))
934 #t))))))
935 (native-inputs
936 `(("attr" ,attr)
937 ("kmod" ,kmod)
938 ("pkg-config" ,pkg-config)))
939 (inputs
940 `(("eudev" ,eudev)
941 ("libaio" ,libaio)
942 ("libtirpc" ,libtirpc)
943 ("nfs-utils" ,nfs-utils)
944 ("openssl" ,openssl)
945 ("python" ,python)
946 ("python-cffi" ,python-cffi)
947 ("util-linux" ,util-linux "lib")
948 ("zlib" ,zlib)))
949 (home-page "https://zfsonlinux.org/")
950 (synopsis "Native ZFS on Linux")
951 (description
952 "ZFS on Linux is an advanced file system and volume manager which was
953 originally developed for Solaris and is now maintained by the OpenZFS
954 community.")
955 (license license:cddl1.0)))
956
957 (define-public mergerfs
958 (package
959 (name "mergerfs")
960 (version "2.31.0")
961 (source
962 (origin
963 (method url-fetch)
964 (uri (string-append "https://github.com/trapexit/mergerfs/releases/download/"
965 version "/mergerfs-" version ".tar.gz"))
966 (sha256
967 (base32
968 "0k4asbg5n9dhy5jpjkw6simqqnr1zira2y4i71cq05091dfwm90p"))))
969 (build-system gnu-build-system)
970 (arguments
971 `(#:tests? #f ; No tests exist.
972 #:phases
973 (modify-phases %standard-phases
974 (delete 'configure)
975 (add-after 'unpack 'fix-paths
976 (lambda* (#:key inputs outputs #:allow-other-keys)
977 (setenv "CC" "gcc")
978 ;; These were copied from the package libfuse.
979 (substitute* '("libfuse/lib/mount_util.c" "libfuse/util/mount_util.c")
980 (("/bin/(u?)mount" _ maybe-u)
981 (string-append (assoc-ref inputs "util-linux")
982 "/bin/" maybe-u "mount")))
983 (substitute* '("libfuse/util/mount.mergerfs.c")
984 (("/bin/sh")
985 (which "sh")))
986 ;; The Makefile does not allow overriding PREFIX via make variables.
987 (substitute* '("Makefile" "libfuse/Makefile")
988 (("= /usr/local") (string-append "= " (assoc-ref outputs "out")))
989 (("= /sbin") "= $(EXEC_PREFIX)/sbin")
990 ;; cannot chown as build user
991 (("chown root(:root)?") "true"))
992 #t)))))
993 ;; mergerfs bundles a heavily modified copy of libfuse.
994 (inputs `(("util-linux" ,util-linux)))
995 (home-page "https://github.com/trapexit/mergerfs")
996 (synopsis "Featureful union file system")
997 (description "mergerfs is a union file system geared towards simplifying
998 storage and management of files across numerous commodity storage devices. It
999 is similar to mhddfs, unionfs, and aufs.")
1000 (license (list
1001 license:isc ; mergerfs
1002 license:gpl2 license:lgpl2.0 ; Imported libfuse code.
1003 ))))
1004
1005 (define-public mergerfs-tools
1006 (let ((commit "480296ed03d1c3c7909697d7ef96d35840ee26b8")
1007 (revision "2"))
1008 (package
1009 (name "mergerfs-tools")
1010 ;; No released version exists.
1011 (version (git-version "0.0" revision commit))
1012 (source
1013 (origin
1014 (method git-fetch)
1015 (uri (git-reference
1016 (url "https://github.com/trapexit/mergerfs-tools")
1017 (commit commit)))
1018 (file-name (git-file-name name version))
1019 (sha256
1020 (base32
1021 "0xr06gi4xcr832rzy0hkp5c1n231s7w5iq1nkjvx9kvm0dl7chpq"))))
1022 (build-system copy-build-system)
1023 (inputs
1024 `(("python" ,python)
1025 ("python-xattr" ,python-xattr)
1026 ("rsync" ,rsync)))
1027 (arguments
1028 '(#:install-plan
1029 '(("src/" "bin/"))
1030 #:phases
1031 (modify-phases %standard-phases
1032 (add-after 'unpack 'patch-paths
1033 (lambda* (#:key inputs #:allow-other-keys)
1034 (substitute* (find-files "src" "^mergerfs\\.")
1035 (("'rsync'")
1036 (string-append "'" (assoc-ref inputs "rsync") "/bin/rsync'"))
1037 (("'rm'")
1038 (string-append "'" (assoc-ref inputs "coreutils") "/bin/rm'")))
1039 (substitute* "src/mergerfs.mktrash"
1040 (("xattr")
1041 (string-append (assoc-ref inputs "python-xattr") "/bin/xattr"))
1042 (("mkdir")
1043 (string-append (assoc-ref inputs "coreutils") "/bin/mkdir")))
1044 #t)))))
1045 (synopsis "Tools to help manage data in a mergerfs pool")
1046 (description "mergerfs-tools is a suite of programs that can audit
1047 permissions and ownership of files and directories on a mergerfs volume,
1048 duplicates files and directories across branches in its pool, find and remove
1049 duplicate files, balance pool drives, consolidate files in a single mergerfs
1050 directory onto a single drive and create FreeDesktop.org Trash specification
1051 compatible directories.")
1052 (home-page "https://github.com/trapexit/mergerfs-tools")
1053 (license license:isc))))
1054
1055 (define-public python-dropbox
1056 (package
1057 (name "python-dropbox")
1058 (version "11.0.0")
1059 (source
1060 (origin
1061 (method url-fetch)
1062 (uri (pypi-uri "dropbox" version))
1063 (sha256
1064 (base32
1065 "0r64jxm5m4a1sln2la3av0103filb0plqja1nnyibqvk9qrqs5jf"))))
1066 (build-system python-build-system)
1067 (arguments '(#:tests? #f)) ; Tests require a network connection.
1068 (native-inputs
1069 `(("python-pytest" ,python-pytest)
1070 ("python-pytest-runner" ,python-pytest-runner)))
1071 (propagated-inputs
1072 `(("python-certifi" ,python-certifi)
1073 ("python-chardet" ,python-chardet)
1074 ("python-requests" ,python-requests)
1075 ("python-six" ,python-six)
1076 ("python-stone" ,python-stone)
1077 ("python-urllib3" ,python-urllib3)))
1078 (home-page "https://www.dropbox.com/developers")
1079 (synopsis "Official Dropbox API Client")
1080 (description "This package provides a Python SDK for integrating with the
1081 Dropbox API v2.")
1082 (license license:expat)))
1083
1084 (define-public dbxfs
1085 (package
1086 (name "dbxfs")
1087 (version "1.0.48")
1088 (source
1089 (origin
1090 (method url-fetch)
1091 (uri (pypi-uri "dbxfs" version))
1092 (sha256
1093 (base32
1094 "07q7dgqaqqyapjl9r4lqydflrgx4dh84c1qsb0jvfmqj3i8887ak"))
1095 (patches (search-patches "dbxfs-remove-sentry-sdk.patch"))))
1096 (build-system python-build-system)
1097 (arguments
1098 '(#:tests? #f)) ; tests requires safefs
1099 (propagated-inputs
1100 `(("python-appdirs" ,python-appdirs)
1101 ("python-block-tracing" ,python-block-tracing)
1102 ("python-dropbox" ,python-dropbox)
1103 ("python-keyring" ,python-keyring)
1104 ("python-keyrings.alt" ,python-keyrings.alt)
1105 ("python-privy" ,python-privy)
1106 ("python-userspacefs" ,python-userspacefs)))
1107 (home-page "https://github.com/rianhunter/dbxfs")
1108 (synopsis "User-space file system for Dropbox")
1109 (description
1110 "@code{dbxfs} allows you to mount your Dropbox folder as if it were a
1111 local file system using FUSE.")
1112 (license license:gpl3+)))