1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2017, 2018 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>
7 ;;; This file is part of GNU Guix.
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22 (define-module (gnu packages file-systems)
23 #:use-module ((guix licenses) #:prefix license:)
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix git-download)
27 #:use-module (guix build-system cmake)
28 #:use-module (guix build-system gnu)
29 #:use-module (guix utils)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages acl)
32 #:use-module (gnu packages attr)
33 #:use-module (gnu packages autotools)
34 #:use-module (gnu packages bison)
35 #:use-module (gnu packages check)
36 #:use-module (gnu packages compression)
37 #:use-module (gnu packages curl)
38 #:use-module (gnu packages datastructures)
39 #:use-module (gnu packages documentation)
40 #:use-module (gnu packages docbook)
41 #:use-module (gnu packages flex)
42 #:use-module (gnu packages glib)
43 #:use-module (gnu packages linux)
44 #:use-module (gnu packages pkg-config)
45 #:use-module (gnu packages python)
46 #:use-module (gnu packages readline)
47 #:use-module (gnu packages sqlite)
48 #:use-module (gnu packages tls)
49 #:use-module (gnu packages xml))
51 (define-public httpfs2
58 (uri (string-append "mirror://sourceforge/httpfs/" name "/"
59 name "-" version ".tar.gz"))
62 "1h8ggvhw30n2r6w11n1s458ypggdqx6ldwd61ma4yd7binrlpjq1"))))
63 (build-system gnu-build-system)
65 `(("asciidoc" ,asciidoc)
66 ("docbook-xml" ,docbook-xml)
69 ("pkg-config" ,pkg-config)))
75 (modify-phases %standard-phases
76 (delete 'configure) ; no configure script
78 ;; There's no ‘install’ target. Install all variants manually.
79 (lambda* (#:key outputs #:allow-other-keys)
80 (let* ((out (assoc-ref outputs "out"))
81 (bin (string-append out "/bin"))
82 (man1 (string-append out "/share/man/man1")))
87 (let ((man1-page (string-append variant ".1")))
88 (install-file variant bin)
89 (install-file man1-page man1)))
95 #:make-flags (list "CC=gcc")
96 #:parallel-build? #f ; can result in missing man pages
97 #:tests? #f)) ; no tests
98 (home-page "https://sourceforge.net/projects/httpfs/")
99 (synopsis "Mount remote files over HTTP")
100 (description "httpfs2 is a @code{fuse} file system for mounting any
101 @dfn{HyperText} (HTTP or HTTPS) URL. It uses HTTP/1.1 byte ranges to request
102 arbitrary bytes from the web server, without needing to download the entire
103 file. This is particularly useful with large archives such as ZIP files and
104 ISO images when you only need to inspect their contents or extract specific
105 files. Since the HTTP protocol itself has no notion of directories, only a
106 single file can be mounted.")
107 (license license:gpl2+)))
109 (define-public disorderfs
117 (url "https://salsa.debian.org/reproducible-builds/disorderfs.git")
119 (file-name (git-file-name name version))
122 "1zn2ydap8k9fwjl3ivgrg6l32s5p4ik6ca6j1idp7c77znlv6cpp"))))
123 (build-system gnu-build-system)
125 `(("pkg-config" ,pkg-config)))
130 `(#:phases (modify-phases %standard-phases
131 (delete 'configure)) ; no configure script
132 #:make-flags (let ((out (assoc-ref %outputs "out")))
133 (list (string-append "PREFIX=" out)))
135 ;; FIXME: Tests require 'run-parts' which is not in Guix yet.
137 (home-page "https://github.com/ReproducibleBuilds/disorderfs")
138 (synopsis "FUSE file system that introduces non-determinism")
140 "An overlay FUSE file system that introduces non-determinism
141 into file system metadata. For example, it can randomize the order
142 in which directory entries are read. This is useful for detecting
143 non-determinism in the build process.")
144 (license license:gpl3+)))
146 (define-public glusterfs
153 (uri (string-append "https://download.gluster.org/pub/gluster/glusterfs/"
154 (version-major+minor version) "/" version
155 "/glusterfs-" version ".tar.gz"))
158 "01ysvamvfv2l5pswa1rygpg8w0954h2wkh1ba97h3nx03m5n0prg"))
160 (search-patches "glusterfs-use-PATH-instead-of-hardcodes.patch"))))
161 (build-system gnu-build-system)
164 (let ((out (assoc-ref %outputs "out")))
165 (list (string-append "--with-initdir=" out "/etc/init.d")
166 (string-append "--with-mountutildir=" out "/sbin")))
168 (modify-phases %standard-phases
169 (add-before 'configure 'replace-config.sub
170 (lambda* (#:key inputs #:allow-other-keys)
171 ;; The distributed config.sub is intentionally left empty and
173 (install-file (string-append (assoc-ref inputs "automake")
175 ,(version-major+minor (package-version automake)) "/config.sub")
178 ;; Fix flex error. This has already been fixed with upstream commit
179 ;; db3fe245a9e8812829eae7d143e49d0bfdfef9a7, but is not available in
181 (add-before 'configure 'fix-lex
183 (substitute* "libglusterfs/src/Makefile.in"
184 (("libglusterfs_la_LIBADD = @LEXLIB@")
185 "libglusterfs_la_LIBADD ="))
189 ("pkg-config" ,pkg-config)
190 ("python-2" ,python-2) ; must be version 2
193 ("automake" ,automake)))
196 ;; GlusterFS fails to build with libressl because HMAC_CTX_new and
197 ;; HMAC_CTX_free are undefined.
200 ("libuuid" ,util-linux)
203 ("readline" ,readline)
204 ("sqlite" ,sqlite) ; for tiering
206 (home-page "https://www.gluster.org")
207 (synopsis "Distributed file system")
208 (description "GlusterFS is a distributed scalable network file system
209 suitable for data-intensive tasks such as cloud storage and media streaming.
210 It allows rapid provisioning of additional storage based on your storage
211 consumption needs. It incorporates automatic failover as a primary feature.
212 All of this is accomplished without a centralized metadata server.")
213 ;; The user may choose either LGPLv3+ or GPLv2 only.
214 (license (list license:lgpl3+ license:gpl2+))))
216 (define-public curlftpfs
223 (uri (string-append "mirror://sourceforge/curlftpfs/curlftpfs/" version
224 "/curlftpfs-" version ".tar.gz"))
227 "0n397hmv21jsr1j7zx3m21i7ryscdhkdsyqpvvns12q7qwwlgd2f"))))
228 (build-system gnu-build-system)
231 (modify-phases %standard-phases
232 (add-after 'unpack 'fix-test
234 ;; One of the 512-Byte block counts is definitely wrong.
235 ;; See <https://sourceforge.net/p/curlftpfs/bugs/73/>.
236 (substitute* "tests/ftpfs-ls_unittest.c"
237 (("4426192") "12814800"))
244 `(("pkg-config" ,pkg-config)))
245 (home-page "http://curlftpfs.sourceforge.net/")
246 (synopsis "Mount remote file systems over FTP")
248 "This is a file system client based on the FTP File Transfer Protocol.")
249 (license license:gpl2+)))
251 (define-public libnfs
258 (url "https://github.com/sahlberg/libnfs.git")
259 (commit (string-append "libnfs-" version))))
260 (file-name (git-file-name name version))
263 "115p55y2cbs92z5lmcnjx1v29lwinpgq4sha9v1kq1vd8674h404"))))
264 (build-system gnu-build-system)
265 (home-page "https://github.com/sahlberg/libnfs")
267 `(("autoconf" ,autoconf)
268 ("automake" ,automake)
270 ("pkg-config" ,pkg-config)))
271 (synopsis "Client library for accessing NFS shares")
272 (description "LIBNFS is a client library for accessing NFS shares over a
273 network. LIBNFS offers three different APIs, for different use :
276 @item RAW, a fully asynchronous low level RPC library for NFS protocols. This
277 API provides very flexible and precise control of the RPC issued.
278 @item NFS ASYNC, a fully asynchronous library for high level vfs functions
279 @item NFS SYNC, a synchronous library for high level vfs functions.
281 (license (list license:lgpl2.1+ ; library
282 license:gpl3+ ; tests
283 license:bsd-3 ; copied nsf4 files
286 (define-public apfs-fuse
287 (let ((commit "c7036a3030d128bcecefc1eabc47c039ccfdcec9")
291 (version (git-version "0.0.0" revision commit))
295 (url "https://github.com/sgan81/apfs-fuse")
296 (recursive? #t) ; for lzfse
300 "1akd4cx1f9cyq6sfk9ybv4chhjwjlnqi8ic4z5ajnd5x0g76nz3r"))
301 (file-name (git-file-name name version))))
302 (build-system cmake-build-system)
304 `(#:tests? #f ; No test suite
306 (modify-phases %standard-phases
307 ;; No 'install' target in CMakeLists.txt
309 (lambda* (#:key outputs #:allow-other-keys)
310 (let* ((out (assoc-ref outputs "out"))
311 (bin (string-append out "/bin"))
312 (lib (string-append out "/lib"))
313 (doc (string-append out "/share/doc/"
314 (string-append ,name "-" ,version))))
315 (install-file "apfs-dump" bin)
316 (install-file "apfs-dump-quick" bin)
317 (install-file "apfs-fuse" bin)
318 (install-file "libapfs.a" lib)
319 (install-file "../source/LICENSE" doc)
325 (synopsis "Read-only FUSE driver for the APFS file system")
326 (description "APFS-FUSE is a read-only FUSE driver for the @dfn{Apple File
327 System} (APFS). It is currently in an experimental state — it may not be able
328 to read all files, and it does not support all the compression methods in
330 (home-page "https://github.com/sgan81/apfs-fuse")
331 (license license:gpl2+))))