gnu: Move sqlite to separate module.
[jackhill/guix/guix.git] / gnu / packages / file-systems.scm
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>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
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.
13 ;;;
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.
18 ;;;
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/>.
21
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))
50
51 (define-public httpfs2
52 (package
53 (name "httpfs2")
54 (version "0.1.5")
55 (source
56 (origin
57 (method url-fetch)
58 (uri (string-append "mirror://sourceforge/httpfs/" name "/"
59 name "-" version ".tar.gz"))
60 (sha256
61 (base32
62 "1h8ggvhw30n2r6w11n1s458ypggdqx6ldwd61ma4yd7binrlpjq1"))))
63 (build-system gnu-build-system)
64 (native-inputs
65 `(("asciidoc" ,asciidoc)
66 ("docbook-xml" ,docbook-xml)
67 ("libxml2" ,libxml2)
68 ("libxslt" ,libxslt)
69 ("pkg-config" ,pkg-config)))
70 (inputs
71 `(("fuse" ,fuse)
72 ("gnutls" ,gnutls)))
73 (arguments
74 `(#:phases
75 (modify-phases %standard-phases
76 (delete 'configure) ; no configure script
77 (replace 'install
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")))
83 (mkdir-p bin)
84 (mkdir-p man1)
85 (for-each
86 (lambda (variant)
87 (let ((man1-page (string-append variant ".1")))
88 (install-file variant bin)
89 (install-file man1-page man1)))
90 (list "httpfs2"
91 "httpfs2-mt"
92 "httpfs2-ssl"
93 "httpfs2-ssl-mt")))
94 #t)))
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+)))
108
109 (define-public disorderfs
110 (package
111 (name "disorderfs")
112 (version "0.5.5")
113 (source
114 (origin
115 (method git-fetch)
116 (uri (git-reference
117 (url "https://salsa.debian.org/reproducible-builds/disorderfs.git")
118 (commit version)))
119 (file-name (git-file-name name version))
120 (sha256
121 (base32
122 "18c32qcdzbxrzg7srnqnw1ls9yqqxyk9b996yxr6w2znw6x6n8v4"))))
123 (build-system gnu-build-system)
124 (native-inputs
125 `(("pkg-config" ,pkg-config)))
126 (inputs
127 `(("fuse" ,fuse)
128 ("attr" ,attr)))
129 (arguments
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)))
134 #:test-target "test"
135 ;; FIXME: Tests require 'run-parts' which is not in Guix yet.
136 #:tests? #f))
137 (home-page "https://github.com/ReproducibleBuilds/disorderfs")
138 (synopsis "FUSE file system that introduces non-determinism")
139 (description
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+)))
145
146 (define-public glusterfs
147 (package
148 (name "glusterfs")
149 (version "3.10.12")
150 (source
151 (origin
152 (method url-fetch)
153 (uri (string-append "https://download.gluster.org/pub/gluster/glusterfs/"
154 (version-major+minor version) "/" version
155 "/glusterfs-" version ".tar.gz"))
156 (sha256
157 (base32
158 "01ysvamvfv2l5pswa1rygpg8w0954h2wkh1ba97h3nx03m5n0prg"))
159 (patches
160 (search-patches "glusterfs-use-PATH-instead-of-hardcodes.patch"))))
161 (build-system gnu-build-system)
162 (arguments
163 `(#:configure-flags
164 (let ((out (assoc-ref %outputs "out")))
165 (list (string-append "--with-initdir=" out "/etc/init.d")
166 (string-append "--with-mountutildir=" out "/sbin")))
167 #:phases
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
172 ;; must be replaced.
173 (install-file (string-append (assoc-ref inputs "automake")
174 "/share/automake-"
175 ,(version-major+minor (package-version automake)) "/config.sub")
176 ".")
177 #t))
178 ;; Fix flex error. This has already been fixed with upstream commit
179 ;; db3fe245a9e8812829eae7d143e49d0bfdfef9a7, but is not available in
180 ;; current releases.
181 (add-before 'configure 'fix-lex
182 (lambda _
183 (substitute* "libglusterfs/src/Makefile.in"
184 (("libglusterfs_la_LIBADD = @LEXLIB@")
185 "libglusterfs_la_LIBADD ="))
186 #t)))))
187 (native-inputs
188 `(("cmocka" ,cmocka)
189 ("pkg-config" ,pkg-config)
190 ("python-2" ,python-2) ; must be version 2
191 ("flex" ,flex)
192 ("bison" ,bison)
193 ("automake" ,automake)))
194 (inputs
195 `(("acl" ,acl)
196 ;; GlusterFS fails to build with libressl because HMAC_CTX_new and
197 ;; HMAC_CTX_free are undefined.
198 ("openssl" ,openssl)
199 ("liburcu" ,liburcu)
200 ("libuuid" ,util-linux)
201 ("libxml2" ,libxml2)
202 ("lvm2" ,lvm2)
203 ("readline" ,readline)
204 ("sqlite" ,sqlite) ; for tiering
205 ("zlib" ,zlib)))
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+))))
215
216 (define-public curlftpfs
217 (package
218 (name "curlftpfs")
219 (version "0.9.2")
220 (source
221 (origin
222 (method url-fetch)
223 (uri (string-append "mirror://sourceforge/curlftpfs/curlftpfs/" version
224 "/curlftpfs-" version ".tar.gz"))
225 (sha256
226 (base32
227 "0n397hmv21jsr1j7zx3m21i7ryscdhkdsyqpvvns12q7qwwlgd2f"))))
228 (build-system gnu-build-system)
229 (arguments
230 `(#:phases
231 (modify-phases %standard-phases
232 (add-after 'unpack 'fix-test
233 (lambda _
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"))
238 #t)))))
239 (inputs
240 `(("curl" ,curl)
241 ("glib" ,glib)
242 ("fuse" ,fuse)))
243 (native-inputs
244 `(("pkg-config" ,pkg-config)))
245 (home-page "http://curlftpfs.sourceforge.net/")
246 (synopsis "Mount remote file systems over FTP")
247 (description
248 "This is a file system client based on the FTP File Transfer Protocol.")
249 (license license:gpl2+)))
250
251 (define-public apfs-fuse
252 (let ((commit "c7036a3030d128bcecefc1eabc47c039ccfdcec9")
253 (revision "0"))
254 (package
255 (name "apfs-fuse")
256 (version (git-version "0.0.0" revision commit))
257 (source (origin
258 (method git-fetch)
259 (uri (git-reference
260 (url "https://github.com/sgan81/apfs-fuse")
261 (recursive? #t) ; for lzfse
262 (commit commit)))
263 (sha256
264 (base32
265 "1akd4cx1f9cyq6sfk9ybv4chhjwjlnqi8ic4z5ajnd5x0g76nz3r"))
266 (file-name (git-file-name name version))))
267 (build-system cmake-build-system)
268 (arguments
269 `(#:tests? #f ; No test suite
270 #:phases
271 (modify-phases %standard-phases
272 ;; No 'install' target in CMakeLists.txt
273 (replace 'install
274 (lambda* (#:key outputs #:allow-other-keys)
275 (let* ((out (assoc-ref outputs "out"))
276 (bin (string-append out "/bin"))
277 (lib (string-append out "/lib"))
278 (doc (string-append out "/share/doc/"
279 (string-append ,name "-" ,version))))
280 (install-file "apfs-dump" bin)
281 (install-file "apfs-dump-quick" bin)
282 (install-file "apfs-fuse" bin)
283 (install-file "libapfs.a" lib)
284 (install-file "../source/LICENSE" doc)
285 #t))))))
286 (inputs
287 `(("bzip2" ,bzip2)
288 ("fuse" ,fuse)
289 ("zlib" ,zlib)))
290 (synopsis "Read-only FUSE driver for the APFS filesystem")
291 (description "APFS-FUSE is a read-only FUSE driver for the @dfn{Apple File
292 System} (APFS). It is currently in an experimental state — it may not be able
293 to read all files, and it does not support all the compression methods in
294 APFS.")
295 (home-page "https://github.com/sgan81/apfs-fuse")
296 (license license:gpl2+))))