gnu: facter: Update to 4.0.33.
[jackhill/guix/guix.git] / gnu / packages / file-systems.scm
CommitLineData
8d5fe1f1 1;;; GNU Guix --- Functional package management for GNU
cd328a73 2;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
7c5cc400 3;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
b7238c3d 4;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
083ce0ad 5;;; Copyright © 2018 Leo Famulari <leo@famulari.name>
ed7f4d33 6;;; Copyright © 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
c341b2ad 7;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
8d5fe1f1
TGR
8;;;
9;;; This file is part of GNU Guix.
10;;;
11;;; GNU Guix is free software; you can redistribute it and/or modify it
12;;; under the terms of the GNU General Public License as published by
13;;; the Free Software Foundation; either version 3 of the License, or (at
14;;; your option) any later version.
15;;;
16;;; GNU Guix is distributed in the hope that it will be useful, but
17;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;;; GNU General Public License for more details.
20;;;
21;;; You should have received a copy of the GNU General Public License
22;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24(define-module (gnu packages file-systems)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix packages)
27 #:use-module (guix download)
7c5cc400 28 #:use-module (guix git-download)
083ce0ad 29 #:use-module (guix build-system cmake)
4960a955 30 #:use-module (guix build-system copy)
8d5fe1f1 31 #:use-module (guix build-system gnu)
fe338d7f 32 #:use-module (guix build-system linux-module)
37899445 33 #:use-module (guix build-system trivial)
12a24ee8 34 #:use-module (guix utils)
8d5fe1f1 35 #:use-module (gnu packages)
12a24ee8 36 #:use-module (gnu packages acl)
7c5cc400 37 #:use-module (gnu packages attr)
12a24ee8
RW
38 #:use-module (gnu packages autotools)
39 #:use-module (gnu packages bison)
40 #:use-module (gnu packages check)
41 #:use-module (gnu packages compression)
cd328a73 42 #:use-module (gnu packages crypto)
3b1ada0d 43 #:use-module (gnu packages curl)
5c10200b 44 #:use-module (gnu packages cyrus-sasl)
12a24ee8 45 #:use-module (gnu packages datastructures)
8d5fe1f1
TGR
46 #:use-module (gnu packages documentation)
47 #:use-module (gnu packages docbook)
12a24ee8 48 #:use-module (gnu packages flex)
3b1ada0d 49 #:use-module (gnu packages glib)
c341b2ad 50 #:use-module (gnu packages gnupg)
5c10200b 51 #:use-module (gnu packages kerberos)
fe338d7f 52 #:use-module (gnu packages libffi)
8d5fe1f1 53 #:use-module (gnu packages linux)
fe338d7f 54 #:use-module (gnu packages nfs)
327bfe8d 55 #:use-module (gnu packages onc-rpc)
5c10200b 56 #:use-module (gnu packages openldap)
4c88ae7b 57 #:use-module (gnu packages photo)
8d5fe1f1 58 #:use-module (gnu packages pkg-config)
12a24ee8 59 #:use-module (gnu packages python)
4960a955 60 #:use-module (gnu packages python-xyz)
12a24ee8 61 #:use-module (gnu packages readline)
4960a955 62 #:use-module (gnu packages rsync)
5c10200b 63 #:use-module (gnu packages sssd)
cd0322a3 64 #:use-module (gnu packages sqlite)
8d5fe1f1 65 #:use-module (gnu packages tls)
cd328a73 66 #:use-module (gnu packages valgrind)
8d5fe1f1
TGR
67 #:use-module (gnu packages xml))
68
5c10200b
TGR
69(define-public autofs
70 (package
71 (name "autofs")
72 (version "5.1.6")
73 (source
74 (origin
75 (method url-fetch)
76 (uri (string-append "mirror://kernel.org/linux/daemons/autofs/"
77 "v" (version-major version) "/"
78 "autofs-" version ".tar.xz"))
79 (sha256
80 (base32 "1vya21mb4izj3khcr3flibv7xc15vvx2v0rjfk5yd31qnzcy7pnx"))))
81 (build-system gnu-build-system)
82 (arguments
83 `(#:configure-flags
84 (list "--enable-ignore-busy" ; during shutdown
85 "--enable-sloppy-mount" ; support mount(8) -s
86 "--with-libtirpc"
87 (string-append "--with-openldap="
88 (assoc-ref %build-inputs "openldap"))
89 (string-append "--with-sasl="
90 (assoc-ref %build-inputs "cyrus-sasl"))
91 "HAVE_SSS_AUTOFS=1" ; required to make sssldir click
92 (string-append "sssldir="
93 (assoc-ref %build-inputs "sssd")
94 "/lib/sssd/modules"))
95 #:tests? #f ; no test suite
96 #:phases
97 (modify-phases %standard-phases
98 (add-before 'configure 'fix-hard-coded-search-path
99 (lambda _
100 (substitute* "configure"
101 (("^searchpath=\".*\"")
102 "searchpath=\"$PATH\""))
103 #t))
104 (add-before 'install 'omit-obsolete-lookup_nis.so-link
105 ;; Building lookup_yp.so depends on $(YPCLNT) but this doesn't,
106 ;; leading to a make error. Since it's broken, comment it out.
107 (lambda _
108 (substitute* "modules/Makefile"
109 (("ln -fs lookup_yp.so" match)
110 (string-append "# " match)))
111 #t)))))
112 (native-inputs
113 `(("bison" ,bison)
114 ("flex" ,flex)
115 ("pkg-config" ,pkg-config)
116 ("rpcsvc-proto" ,rpcsvc-proto)))
117 (inputs
118 `(("cyrus-sasl" ,cyrus-sasl)
119 ("e2fsprogs" ,e2fsprogs) ; for e[234]fsck
120 ("libtirpc" ,libtirpc)
121 ("libxml2" ,libxml2) ; needed for LDAP, SASL
122 ("mit-krb5" ,mit-krb5) ; needed for LDAP, SASL
123 ("nfs-utils" ,nfs-utils) ; for mount.nfs
124 ("openldap" ,openldap)
125 ("openssl" ,openssl) ; needed for SASL
126 ("sssd" ,sssd)
127 ("util-linux" ,util-linux))) ; for mount, umount
128 ;; XXX A directory index is the closest thing this has to a home page.
129 (home-page "https://www.kernel.org/pub/linux/daemons/autofs/")
130 (synopsis "Kernel-based automounter for Linux")
131 (description
132 "Autofs is a kernel-based automounter for use with the Linux autofs4
133module. It automatically mounts selected file systems when they are used and
134unmounts them after a set period of inactivity. This provides
135centrally-managed, consistent file names for users and applications, even in a
136large and/or frequently changing (network) environment.")
137 ;; fedfs/ is GPL-2-only but not built.
138 (license (list license:bsd-3 ; modules/cyrus-sasl.c
139 license:gpl2+)))) ; the rest
140
c341b2ad
TGR
141(define-public fsarchiver
142 (package
143 (name "fsarchiver")
144 (version "0.8.5")
145 (source
146 (origin
147 (method git-fetch)
148 (uri
149 (git-reference
b0e7b699 150 (url "https://github.com/fdupoux/fsarchiver")
c341b2ad
TGR
151 (commit version)))
152 (file-name (git-file-name name version))
153 (sha256
154 (base32 "1rvwq5v3rl14bqxjm1ibfapyicf0sa44nw7451v10kx39lp56ylp"))))
155 (build-system gnu-build-system)
156 (native-inputs
157 `(("autoconf" ,autoconf)
158 ("automake" ,automake)
159 ("pkg-config" ,pkg-config)))
160 (inputs
161 `(("bzip2" ,bzip2)
162 ("e2fsprogs" ,e2fsprogs)
163 ("libgcrypt" ,libgcrypt)
164 ("lz4" ,lz4)
165 ("lzo" ,lzo)
166 ("util-linux" ,util-linux "lib")
167 ("xz" ,xz)
168 ("zlib" ,zlib)
169 ("zstd:lib" ,zstd "lib")))
0f30fe7e
TGR
170 (synopsis "File system back-up, deployment, and migration tool")
171 (description
172 "FSArchiver saves the contents of a file system to a compressed archive
173file, and restores it to a different file system and/or partition. This
174partition can be of a different size than the original and FSArchiver will
175create a new file system if none exists.
176
177All standard file attributes supported by the kernel are preserved, including
178file permissions, timestamps, symbolic and hard links, and extended attributes.
179
180Each file in the archive is protected by a checksum. If part of the archive
181is corrupted you'll lose the affected file(s) but not the whole back-up.")
bf8e1005 182 (home-page "https://www.fsarchiver.org/")
c341b2ad
TGR
183 (license license:gpl2)))
184
4c88ae7b
RG
185(define-public gphotofs
186 (package
187 (name "gphotofs")
188 (version "0.5.0")
189 (source
190 (origin
191 (method url-fetch)
192 (uri
193 (string-append "mirror://sourceforge/gphoto/gphotofs/" version
194 "/gphotofs-0.5.tar.gz"))
195 (sha256
196 (base32
197 "04slwhr6ap9xcc27wphk22ad8yn79ngyy5z10lxams3k5liahvc2"))))
198 (build-system gnu-build-system)
199 (native-inputs
200 `(("pkg-config" ,pkg-config)))
201 (inputs
202 `(("fuse" ,fuse)
203 ("glib" ,glib)
204 ("libgphoto2" ,libgphoto2)))
026959f0
TGR
205 (synopsis "Virtual file system for libgphoto2 using FUSE")
206 (description "GPhotoFS is a FUSE file system module to mount your camera as
207a file system on Linux. This allow using your camera with any tool able to read
208from a mounted file system.")
4c88ae7b
RG
209 (home-page "http://www.gphoto.org/proj/gphotofs/")
210 (license license:gpl2+)))
211
cd328a73
TGR
212(define-public bcachefs-tools
213 (let ((commit "ab2f1ec24f5307b0cf1e3c4ad19bf350d9f54d9f")
214 (revision "0"))
215 (package
216 (name "bcachefs-tools")
217 (version (git-version "0.1" revision commit))
218 (source
219 (origin
220 (method git-fetch)
221 (uri (git-reference
222 (url "https://evilpiepirate.org/git/bcachefs-tools.git")
223 (commit commit)))
224 (file-name (git-file-name name version))
225 (sha256
226 (base32 "10pafvaxg1lvwnqjv3a4rsi96bghbpcsgh3vhqilndi334k3b0hd"))))
227 (build-system gnu-build-system)
228 (arguments
229 `(#:make-flags
8dca40a3
TGR
230 (list ,(string-append "VERSION=" version) ; bogus vX.Y-nogit otherwise
231 (string-append "PREFIX=" (assoc-ref %outputs "out"))
cd328a73
TGR
232 "INITRAMFS_DIR=$(PREFIX)/share/initramfs-tools"
233 "CC=gcc"
234 "PYTEST=pytest")
235 #:phases
236 (modify-phases %standard-phases
237 (delete 'configure)) ; no configure script
238 #:tests? #f)) ; XXX 6 valgrind tests fail
239 (native-inputs
240 `(("pkg-config" ,pkg-config)
241
242 ;; For tests.
243 ("python-pytest" ,python-pytest)
244 ("valgrind" ,valgrind)))
245 (inputs
246 `(("keyutils" ,keyutils)
247 ("libaio" ,libaio)
248 ("libscrypt" ,libscrypt)
249 ("libsodium" ,libsodium)
250 ("liburcu" ,liburcu)
52665d2b 251 ("util-linux" ,util-linux "lib") ; lib{blkid,uuid}
cd328a73
TGR
252 ("lz4" ,lz4)
253 ("zlib" ,zlib)
254 ("zstd:lib" ,zstd "lib")))
255 (home-page "https://bcachefs.org/")
256 (synopsis "Tools to create and manage bcachefs file systems")
257 (description
8ccc77a4 258 "The bcachefs-tools are command-line utilities for creating, checking,
cd328a73
TGR
259and otherwise managing bcachefs file systems.
260
261Bcachefs is a @acronym{CoW, copy-on-write} file system supporting native
262encryption, compression, snapshots, and (meta)data checksums. It can use
263multiple block devices for replication and/or performance, similar to RAID.
264
265In addition, bcachefs provides all the functionality of bcache, a block-layer
266caching system, and lets you assign different roles to each device based on its
267performance and other characteristics.")
268 (license license:gpl2+))))
269
d7aef3ab
TGR
270(define-public exfatprogs
271 (package
272 (name "exfatprogs")
273 (version "1.0.3")
274 (source
275 (origin
276 (method git-fetch)
277 (uri (git-reference
278 (url "https://github.com/exfatprogs/exfatprogs")
279 (commit version)))
280 (file-name (git-file-name name version))
281 (sha256
282 (base32
283 "1s47qvhr702z5c19wfqz8cwl9ammmincs7a8vjc6p974wnnjg77y"))))
284 (build-system gnu-build-system)
285 (arguments
286 `(#:configure-flags
287 (list "--disable-static")))
288 (native-inputs
289 `(("autoconf" ,autoconf)
290 ("automake" ,automake)
291 ("libtool" ,libtool)
292 ("pkg-config" ,pkg-config)))
293 (home-page "https://github.com/exfatprogs/exfatprogs")
294 (synopsis "Tools to create, check, and repair exFAT file systems")
295 (description
296 "These are command-line user space tools for the @acronym{exFAT,
297Extensible File Allocation Table} file systems. Included are
298@command{mkfs.exfat} to create (format) new exFAT file systems, and
299@command{fsck.exfat} to check their consistency and repair them.")
300 (license license:gpl2+)))
301
8d5fe1f1
TGR
302(define-public httpfs2
303 (package
304 (name "httpfs2")
305 (version "0.1.5")
306 (source
307 (origin
308 (method url-fetch)
c5edec09
TGR
309 (uri (string-append "mirror://sourceforge/httpfs/httpfs2/"
310 "httpfs2-" version ".tar.gz"))
8d5fe1f1
TGR
311 (sha256
312 (base32
313 "1h8ggvhw30n2r6w11n1s458ypggdqx6ldwd61ma4yd7binrlpjq1"))))
314 (build-system gnu-build-system)
315 (native-inputs
316 `(("asciidoc" ,asciidoc)
317 ("docbook-xml" ,docbook-xml)
318 ("libxml2" ,libxml2)
319 ("libxslt" ,libxslt)
320 ("pkg-config" ,pkg-config)))
321 (inputs
322 `(("fuse" ,fuse)
323 ("gnutls" ,gnutls)))
324 (arguments
325 `(#:phases
326 (modify-phases %standard-phases
327 (delete 'configure) ; no configure script
328 (replace 'install
329 ;; There's no ‘install’ target. Install all variants manually.
330 (lambda* (#:key outputs #:allow-other-keys)
331 (let* ((out (assoc-ref outputs "out"))
332 (bin (string-append out "/bin"))
333 (man1 (string-append out "/share/man/man1")))
334 (mkdir-p bin)
335 (mkdir-p man1)
336 (for-each
337 (lambda (variant)
338 (let ((man1-page (string-append variant ".1")))
339 (install-file variant bin)
340 (install-file man1-page man1)))
341 (list "httpfs2"
342 "httpfs2-mt"
343 "httpfs2-ssl"
344 "httpfs2-ssl-mt")))
345 #t)))
346 #:make-flags (list "CC=gcc")
347 #:parallel-build? #f ; can result in missing man pages
348 #:tests? #f)) ; no tests
349 (home-page "https://sourceforge.net/projects/httpfs/")
350 (synopsis "Mount remote files over HTTP")
351 (description "httpfs2 is a @code{fuse} file system for mounting any
352@dfn{HyperText} (HTTP or HTTPS) URL. It uses HTTP/1.1 byte ranges to request
353arbitrary bytes from the web server, without needing to download the entire
354file. This is particularly useful with large archives such as ZIP files and
355ISO images when you only need to inspect their contents or extract specific
356files. Since the HTTP protocol itself has no notion of directories, only a
357single file can be mounted.")
358 (license license:gpl2+)))
7c5cc400 359
e9e75da6
TGR
360(define-public jfsutils
361 (package
362 (name "jfsutils")
363 (version "1.1.15")
364 (source
365 (origin
366 (method url-fetch)
367 (uri (string-append "http://jfs.sourceforge.net/project/pub/jfsutils-"
368 version ".tar.gz"))
369 (sha256
370 (base32 "0kbsy2sk1jv4m82rxyl25gwrlkzvl3hzdga9gshkxkhm83v1aji4"))
371 (patches (search-patches "jfsutils-add-sysmacros.patch"
372 "jfsutils-include-systypes.patch"))))
373 (build-system gnu-build-system)
374 (inputs
bb93042c 375 `(("util-linux" ,util-linux "lib")))
e9e75da6
TGR
376 (home-page "http://jfs.sourceforge.net/home.html")
377 (synopsis "Utilities for managing JFS file systems")
378 (description
379 "The JFSutils are a collection of utilities for managing the @acronym{JFS,
380Journaled File System}, a 64-bit journaling file system created by IBM and later
381ported to the kernel Linux. The following commands are available:
382@enumerate
383@item @command{fsck.jfs}: check and repair a JFS file system or replay its
384transaction log.
385@item @command{logdump}: dump the JFS journal log.
386@item @command{logredo}: replay the JFS journal log.
387@item @command{mkfs.jfs}: create a new JFS file system.
388@item @command{xchklog}: save a JFS fsck log to a file.
389@item @command{xchkdmp}: dump the contents of such a log file.
390@item @command{xpeek}: a JFS file system editor with a shell-like interface.
391@end enumerate\n")
392 (license license:gpl3+))) ; no explicit version given
393
56dad973
TGR
394(define-public jfsutils/static
395 (static-package
396 (package
397 (inherit jfsutils)
398 (name "jfsutils-static")
399 (inputs
400 `(("util-linux:static" ,util-linux "static")
401 ,@(package-inputs jfsutils))))))
402
37899445
TGR
403(define-public jfs_fsck/static
404 (package
405 (name "jfs_fsck-static")
406 (version (package-version jfsutils))
407 (source #f)
408 (build-system trivial-build-system)
409 (arguments
410 `(#:modules ((guix build utils))
411 #:builder
412 (begin
413 (use-modules (guix build utils)
414 (ice-9 ftw)
415 (srfi srfi-26))
416 (let* ((jfsutils (assoc-ref %build-inputs "jfsutils"))
417 (fsck "jfs_fsck")
418 (out (assoc-ref %outputs "out"))
419 (sbin (string-append out "/sbin")))
420 (mkdir-p sbin)
421 (with-directory-excursion sbin
422 (install-file (string-append jfsutils "/sbin/" fsck)
423 ".")
424 (remove-store-references fsck)
425 (chmod fsck #o555))
426 #t))))
427 (inputs
428 `(("jfsutils" ,jfsutils/static)))
429 (home-page (package-home-page jfsutils))
430 (synopsis "Statically-linked jfs_fsck command from jfsutils")
431 (description "This package provides statically-linked jfs_fsck command taken
432from the jfsutils package. It is meant to be used in initrds.")
433 (license (package-license jfsutils))))
434
7c5cc400
GB
435(define-public disorderfs
436 (package
437 (name "disorderfs")
2f04adf5 438 (version "0.5.10")
7c5cc400
GB
439 (source
440 (origin
441 (method git-fetch)
442 (uri (git-reference
3b68a9b6
TGR
443 (url "https://salsa.debian.org/reproducible-builds/disorderfs.git")
444 (commit version)))
a1dc853e 445 (file-name (git-file-name name version))
7c5cc400
GB
446 (sha256
447 (base32
2f04adf5 448 "0lsisx5118k0qk0b5klbxl03rvhycnznyfx05yxmjawh85bfhmlh"))))
7c5cc400
GB
449 (build-system gnu-build-system)
450 (native-inputs
451 `(("pkg-config" ,pkg-config)))
452 (inputs
453 `(("fuse" ,fuse)
454 ("attr" ,attr)))
455 (arguments
456 `(#:phases (modify-phases %standard-phases
becee702 457 (delete 'configure)) ; no configure script
7c5cc400
GB
458 #:make-flags (let ((out (assoc-ref %outputs "out")))
459 (list (string-append "PREFIX=" out)))
460 #:test-target "test"
461 ;; FIXME: Tests require 'run-parts' which is not in Guix yet.
462 #:tests? #f))
9b478eb7 463 (home-page "https://salsa.debian.org/reproducible-builds/disorderfs")
162a1374 464 (synopsis "FUSE file system that introduces non-determinism")
7c5cc400 465 (description
162a1374
TGR
466 "An overlay FUSE file system that introduces non-determinism
467into file system metadata. For example, it can randomize the order
7c5cc400
GB
468in which directory entries are read. This is useful for detecting
469non-determinism in the build process.")
470 (license license:gpl3+)))
471
12a24ee8
RW
472(define-public glusterfs
473 (package
474 (name "glusterfs")
327bfe8d 475 (version "7.0")
12a24ee8
RW
476 (source
477 (origin
478 (method url-fetch)
479 (uri (string-append "https://download.gluster.org/pub/gluster/glusterfs/"
327bfe8d
AM
480 (version-major version) "/"
481 (version-major+minor version) "/"
482 "glusterfs-" version ".tar.gz"))
12a24ee8
RW
483 (sha256
484 (base32
327bfe8d 485 "0yzhx710ypj0j3m5dcgmmgvkp7p0rmmp2p7ld0axrm4vpwc2b1wa"))))
12a24ee8
RW
486 (build-system gnu-build-system)
487 (arguments
488 `(#:configure-flags
327bfe8d
AM
489 (let ((out (assoc-ref %outputs "out"))
490 (p2 (assoc-ref %build-inputs "python-2")))
491 (list (string-append "PYTHON=" p2 "/bin/python")
492 (string-append "--with-initdir=" out "/etc/init.d")
493 (string-append "--with-mountutildir=" out "/sbin")
494 "--enable-cmocka" ; unit tests
495 ;; "--enable-debug" ; debug build options
496 ;; "--enable-asan" ; Address Sanitizer
497 ;; "--enable-tsan" ; ThreadSanitizer
498 ))
12a24ee8
RW
499 #:phases
500 (modify-phases %standard-phases
327bfe8d
AM
501 (add-before 'configure 'autogen
502 (lambda _ (invoke "./autogen.sh"))))))
12a24ee8 503 (native-inputs
327bfe8d
AM
504 `(("pkg-config" ,pkg-config)
505 ("libtirpc", libtirpc)
506 ("rpcsvc-proto", rpcsvc-proto)
12a24ee8
RW
507 ("python-2" ,python-2) ; must be version 2
508 ("flex" ,flex)
509 ("bison" ,bison)
327bfe8d
AM
510 ("libtool" ,libtool)
511 ("autoconf" ,autoconf)
512 ("automake" ,automake)
513 ("cmocka" ,cmocka)))
12a24ee8
RW
514 (inputs
515 `(("acl" ,acl)
327bfe8d 516 ("fuse", fuse)
12a24ee8
RW
517 ("openssl" ,openssl)
518 ("liburcu" ,liburcu)
bb93042c 519 ("libuuid" ,util-linux "lib")
12a24ee8 520 ("libxml2" ,libxml2)
12a24ee8 521 ("readline" ,readline)
327bfe8d
AM
522 ("zlib" ,zlib)
523 ("libaio", libaio)
524 ("rdma-core", rdma-core)))
12a24ee8
RW
525 (home-page "https://www.gluster.org")
526 (synopsis "Distributed file system")
162a1374 527 (description "GlusterFS is a distributed scalable network file system
12a24ee8
RW
528suitable for data-intensive tasks such as cloud storage and media streaming.
529It allows rapid provisioning of additional storage based on your storage
530consumption needs. It incorporates automatic failover as a primary feature.
531All of this is accomplished without a centralized metadata server.")
532 ;; The user may choose either LGPLv3+ or GPLv2 only.
533 (license (list license:lgpl3+ license:gpl2+))))
3b1ada0d
DM
534
535(define-public curlftpfs
536 (package
537 (name "curlftpfs")
538 (version "0.9.2")
539 (source
540 (origin
541 (method url-fetch)
542 (uri (string-append "mirror://sourceforge/curlftpfs/curlftpfs/" version
543 "/curlftpfs-" version ".tar.gz"))
544 (sha256
545 (base32
546 "0n397hmv21jsr1j7zx3m21i7ryscdhkdsyqpvvns12q7qwwlgd2f"))))
547 (build-system gnu-build-system)
548 (arguments
549 `(#:phases
550 (modify-phases %standard-phases
551 (add-after 'unpack 'fix-test
552 (lambda _
553 ;; One of the 512-Byte block counts is definitely wrong.
554 ;; See <https://sourceforge.net/p/curlftpfs/bugs/73/>.
555 (substitute* "tests/ftpfs-ls_unittest.c"
556 (("4426192") "12814800"))
557 #t)))))
558 (inputs
559 `(("curl" ,curl)
560 ("glib" ,glib)
c695fb76 561 ("fuse" ,fuse)))
3b1ada0d
DM
562 (native-inputs
563 `(("pkg-config" ,pkg-config)))
564 (home-page "http://curlftpfs.sourceforge.net/")
565 (synopsis "Mount remote file systems over FTP")
566 (description
567 "This is a file system client based on the FTP File Transfer Protocol.")
568 (license license:gpl2+)))
083ce0ad 569
3b39ae9f
RW
570(define-public libnfs
571 (package
572 (name "libnfs")
573 (version "3.0.0")
574 (source (origin
575 (method git-fetch)
576 (uri (git-reference
b0e7b699 577 (url "https://github.com/sahlberg/libnfs")
3b39ae9f
RW
578 (commit (string-append "libnfs-" version))))
579 (file-name (git-file-name name version))
580 (sha256
581 (base32
582 "115p55y2cbs92z5lmcnjx1v29lwinpgq4sha9v1kq1vd8674h404"))))
583 (build-system gnu-build-system)
584 (home-page "https://github.com/sahlberg/libnfs")
585 (native-inputs
586 `(("autoconf" ,autoconf)
587 ("automake" ,automake)
588 ("libtool" ,libtool)
589 ("pkg-config" ,pkg-config)))
590 (synopsis "Client library for accessing NFS shares")
591 (description "LIBNFS is a client library for accessing NFS shares over a
592network. LIBNFS offers three different APIs, for different use :
593
594@enumerate
595@item RAW, a fully asynchronous low level RPC library for NFS protocols. This
596 API provides very flexible and precise control of the RPC issued.
597@item NFS ASYNC, a fully asynchronous library for high level vfs functions
598@item NFS SYNC, a synchronous library for high level vfs functions.
599@end enumerate\n")
600 (license (list license:lgpl2.1+ ; library
601 license:gpl3+ ; tests
602 license:bsd-3 ; copied nsf4 files
603 ))))
604
083ce0ad 605(define-public apfs-fuse
023eea68
LF
606 ;; Later versions require FUSE 3.
607 (let ((commit "7b89418e8dc27103d3c4f8fa348086ffcd634c17")
608 (revision "1"))
083ce0ad
LF
609 (package
610 (name "apfs-fuse")
611 (version (git-version "0.0.0" revision commit))
612 (source (origin
613 (method git-fetch)
614 (uri (git-reference
615 (url "https://github.com/sgan81/apfs-fuse")
616 (recursive? #t) ; for lzfse
617 (commit commit)))
618 (sha256
619 (base32
023eea68 620 "0x2siy3cmnm9wsdfazg3xc8r3kbg73gijmnn1vjw33pp71ckylxr"))
083ce0ad
LF
621 (file-name (git-file-name name version))))
622 (build-system cmake-build-system)
623 (arguments
624 `(#:tests? #f ; No test suite
023eea68
LF
625 #:configure-flags
626 '("-DUSE_FUSE3=OFF") ; FUSE 3 is not packaged yet.
083ce0ad
LF
627 #:phases
628 (modify-phases %standard-phases
629 ;; No 'install' target in CMakeLists.txt
630 (replace 'install
631 (lambda* (#:key outputs #:allow-other-keys)
632 (let* ((out (assoc-ref outputs "out"))
633 (bin (string-append out "/bin"))
634 (lib (string-append out "/lib"))
635 (doc (string-append out "/share/doc/"
636 (string-append ,name "-" ,version))))
637 (install-file "apfs-dump" bin)
638 (install-file "apfs-dump-quick" bin)
639 (install-file "apfs-fuse" bin)
640 (install-file "libapfs.a" lib)
023eea68 641 (install-file "../source/README.md" doc)
083ce0ad
LF
642 #t))))))
643 (inputs
644 `(("bzip2" ,bzip2)
645 ("fuse" ,fuse)
646 ("zlib" ,zlib)))
c1469ab6 647 (synopsis "Read-only FUSE driver for the APFS file system")
083ce0ad
LF
648 (description "APFS-FUSE is a read-only FUSE driver for the @dfn{Apple File
649System} (APFS). It is currently in an experimental state — it may not be able
650to read all files, and it does not support all the compression methods in
651APFS.")
652 (home-page "https://github.com/sgan81/apfs-fuse")
653 (license license:gpl2+))))
fe338d7f
EF
654
655(define-public zfs
656 (package
657 (name "zfs")
658 (version "0.8.2")
659 (outputs '("out" "module" "src"))
660 (source
661 (origin
662 (method url-fetch)
663 (uri (string-append "https://github.com/zfsonlinux/zfs/releases"
664 "/download/zfs-" version
665 "/zfs-" version ".tar.gz"))
666 (sha256
667 (base32
668 "1f7aig15q3z832pr2n48j3clafic2yk1vvqlh28vpklfghjqwq27"))))
669 (build-system linux-module-build-system)
670 (arguments
671 `(;; The ZFS kernel module should not be downloaded since the license
672 ;; terms don't allow for distributing it, only building it locally.
673 #:substitutable? #f
674 ;; Tests cannot run in an unprivileged build environment.
675 #:tests? #f
676 #:phases
677 (modify-phases %standard-phases
678 (add-after 'configure 'really-configure
679 (lambda* (#:key outputs inputs #:allow-other-keys)
680 (let ((out (assoc-ref outputs "out")))
681 (substitute* "configure"
682 (("-/bin/sh") (string-append "-" (which "sh")))
683 ((" /bin/sh") (string-append " " (which "sh"))))
684 (invoke "./configure"
685 "--with-config=all"
686 (string-append "--prefix=" out)
687 (string-append "--with-dracutdir=" out "/lib/dracut")
688 (string-append "--with-udevdir=" out "/lib/udev")
689 (string-append "--with-mounthelperdir=" out "/sbin")
690 (string-append "--with-linux="
691 (assoc-ref inputs "linux-module-builder")
692 "/lib/modules/build")))))
693 (add-after 'unpack 'patch-source
694 (lambda* (#:key inputs outputs #:allow-other-keys)
695 (let ((out (assoc-ref outputs "out"))
696 (src (assoc-ref outputs "src"))
697 (util-linux (assoc-ref inputs "util-linux"))
698 (nfs-utils (assoc-ref inputs "nfs-utils")))
699 (substitute* "module/zfs/zfs_ctldir.c"
700 (("/usr/bin/env\", \"umount")
701 (string-append util-linux "/bin/umount\", \"-n"))
702 (("/usr/bin/env\", \"mount")
703 (string-append util-linux "/bin/mount\", \"-n")))
704 (substitute* "lib/libzfs/libzfs_mount.c"
705 (("/bin/mount") (string-append util-linux "/bin/mount"))
706 (("/bin/umount") (string-append util-linux "/bin/umount")))
707 (substitute* "lib/libshare/nfs.c"
708 (("/usr/sbin/exportfs")
709 (string-append nfs-utils "/sbin/exportfs")))
710 (substitute* "config/zfs-build.m4"
711 (("\\$sysconfdir/init.d") (string-append out "/etc/init.d")))
712 (substitute* '("etc/zfs/Makefile.am"
713 "cmd/zed/Makefile.am")
714 (("\\$\\(sysconfdir)") (string-append out "/etc")))
715 (substitute* "cmd/vdev_id/vdev_id"
716 (("PATH=/bin:/sbin:/usr/bin:/usr/sbin")
717 (string-append "PATH="
718 (dirname (which "chmod")) ":"
719 (dirname (which "grep")) ":"
720 (dirname (which "sed")) ":"
721 (dirname (which "gawk")))))
722 (substitute* "contrib/pyzfs/Makefile.in"
723 ((".*install-lib.*") ""))
724 (substitute* '("Makefile.am" "Makefile.in")
725 (("\\$\\(prefix)/src") (string-append src "/src"))))
726 #t))
727 (replace 'build
728 (lambda _ (invoke "make")))
729 (replace 'install
730 (lambda* (#:key outputs inputs native-inputs #:allow-other-keys)
731 (let* ((out (assoc-ref outputs "out"))
732 (moddir (assoc-ref outputs "module"))
733 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
734 (invoke "make" "install"
735 (string-append "DEFAULT_INITCONF_DIR=" out "/etc/default")
736 (string-append "DEPMOD=" kmod "/bin/depmod")
737 (string-append "INSTALL_PATH=" out)
738 (string-append "INSTALL_MOD_PATH=" moddir)
739 "INSTALL_MOD_STRIP=1")
740 (install-file "contrib/bash_completion.d/zfs"
741 (string-append out "/share/bash-completion/completions"))
742 (symlink "../share/pkgconfig/" (string-append out "/lib/pkgconfig"))
743 #t))))))
744 (native-inputs
745 `(("attr" ,attr)
ed7f4d33 746 ("kmod" ,kmod)
fe338d7f
EF
747 ("pkg-config" ,pkg-config)))
748 (inputs
749 `(("eudev" ,eudev)
750 ("libaio" ,libaio)
751 ("libtirpc" ,libtirpc)
752 ("nfs-utils" ,nfs-utils)
753 ("openssl" ,openssl)
754 ("python" ,python)
755 ("python-cffi" ,python-cffi)
bb93042c 756 ("util-linux" ,util-linux "lib")
fe338d7f
EF
757 ("zlib" ,zlib)))
758 (home-page "https://zfsonlinux.org/")
759 (synopsis "Native ZFS on Linux")
760 (description
761 "ZFS on Linux is an advanced file system and volume manager which was
762originally developed for Solaris and is now maintained by the OpenZFS
763community.")
764 (license license:cddl1.0)))
639bcf20
LDB
765
766(define-public mergerfs
767 (package
768 (name "mergerfs")
769 (version "2.29.0")
770 (source
771 (origin
772 (method url-fetch)
773 (uri (string-append "https://github.com/trapexit/mergerfs/releases/download/"
774 version "/mergerfs-" version ".tar.gz"))
775 (sha256
776 (base32
777 "17gizw4vgbqqjd2ykkfpp276942jb5qclp0lkiwkmq1yjgyjqfmk"))))
778 (build-system gnu-build-system)
779 (arguments
780 `(#:tests? #f ; No tests exist.
781 #:phases
782 (modify-phases %standard-phases
783 (delete 'configure)
784 (add-after 'unpack 'fix-paths
785 (lambda* (#:key inputs outputs #:allow-other-keys)
786 (setenv "CC" "gcc")
787 ;; These were copied from the package libfuse.
788 (substitute* '("libfuse/lib/mount_util.c" "libfuse/util/mount_util.c")
789 (("/bin/(u?)mount" _ maybe-u)
790 (string-append (assoc-ref inputs "util-linux")
791 "/bin/" maybe-u "mount")))
792 (substitute* '("libfuse/util/mount.mergerfs.c")
793 (("/bin/sh")
794 (which "sh")))
795 ;; The Makefile does not allow overriding PREFIX via make variables.
796 (substitute* '("Makefile" "libfuse/Makefile")
797 (("= /usr/local") (string-append "= " (assoc-ref outputs "out")))
798 ;; cannot chown as build user
799 (("chown root:root") "true"))
800 #t)))))
801 ;; mergerfs bundles a heavily modified copy of libfuse.
802 (inputs `(("util-linux" ,util-linux)))
803 (home-page "https://github.com/trapexit/mergerfs")
052117f8
TGR
804 (synopsis "Featureful union file system")
805 (description "mergerfs is a union file system geared towards simplifying
639bcf20
LDB
806storage and management of files across numerous commodity storage devices. It
807is similar to mhddfs, unionfs, and aufs.")
808 (license (list
809 license:isc ; mergerfs
810 license:gpl2 license:lgpl2.0 ; Imported libfuse code.
811 ))))
4960a955
LDB
812
813(define-public mergerfs-tools
814 (let ((commit "c926779d87458d103f3b674603bf97801ae2486d")
815 (revision "1"))
816 (package
817 (name "mergerfs-tools")
818 ;; No released version exists.
819 (version (git-version "0.0" revision commit))
820 (source
821 (origin
822 (method git-fetch)
823 (uri (git-reference
b0e7b699 824 (url "https://github.com/trapexit/mergerfs-tools")
4960a955
LDB
825 (commit commit)))
826 (file-name (git-file-name name version))
827 (sha256
828 (base32
829 "04hhwcib0xv4cf1mkj8zrp2aqpxkncml9iqg4m1mz6a5zhzsk0vm"))))
830 (build-system copy-build-system)
831 (inputs
832 `(("python" ,python)
833 ("python-xattr" ,python-xattr)
834 ("rsync" ,rsync)))
835 (arguments
836 '(#:install-plan
837 '(("src/" "bin/"))
838 #:phases
839 (modify-phases %standard-phases
840 (add-after 'unpack 'patch-paths
841 (lambda* (#:key inputs #:allow-other-keys)
842 (substitute* (find-files "src" "^mergerfs\\.")
843 (("'rsync'")
844 (string-append "'" (assoc-ref inputs "rsync") "/bin/rsync'"))
845 (("'rm'")
846 (string-append "'" (assoc-ref inputs "coreutils") "/bin/rm'")))
847 (substitute* "src/mergerfs.mktrash"
848 (("xattr")
849 (string-append (assoc-ref inputs "python-xattr") "/bin/xattr"))
850 (("mkdir")
851 (string-append (assoc-ref inputs "coreutils") "/bin/mkdir")))
852 #t)))))
853 (synopsis "Tools to help manage data in a mergerfs pool")
854 (description "mergerfs-tools is a suite of programs that can audit
855permissions and ownership of files and directories on a mergerfs volume,
856duplicates files and directories across branches in its pool, find and remove
857duplicate files, balance pool drives, consolidate files in a single mergerfs
858directory onto a single drive and create FreeDesktop.org Trash specification
859compatible directories.")
860 (home-page "https://github.com/trapexit/mergerfs-tools")
861 (license license:isc))))