gnu: Add python-user-agents.
[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 ;;;
6 ;;; This file is part of GNU Guix.
7 ;;;
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
12 ;;;
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
17 ;;;
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21 (define-module (gnu packages file-systems)
22 #:use-module ((guix licenses) #:prefix license:)
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix git-download)
26 #:use-module (guix build-system gnu)
27 #:use-module (guix utils)
28 #:use-module (gnu packages)
29 #:use-module (gnu packages acl)
30 #:use-module (gnu packages attr)
31 #:use-module (gnu packages autotools)
32 #:use-module (gnu packages bison)
33 #:use-module (gnu packages check)
34 #:use-module (gnu packages compression)
35 #:use-module (gnu packages curl)
36 #:use-module (gnu packages databases)
37 #:use-module (gnu packages datastructures)
38 #:use-module (gnu packages documentation)
39 #:use-module (gnu packages docbook)
40 #:use-module (gnu packages flex)
41 #:use-module (gnu packages glib)
42 #:use-module (gnu packages linux)
43 #:use-module (gnu packages pkg-config)
44 #:use-module (gnu packages python)
45 #:use-module (gnu packages readline)
46 #:use-module (gnu packages tls)
47 #:use-module (gnu packages xml))
48
49 (define-public httpfs2
50 (package
51 (name "httpfs2")
52 (version "0.1.5")
53 (source
54 (origin
55 (method url-fetch)
56 (uri (string-append "mirror://sourceforge/httpfs/" name "/"
57 name "-" version ".tar.gz"))
58 (sha256
59 (base32
60 "1h8ggvhw30n2r6w11n1s458ypggdqx6ldwd61ma4yd7binrlpjq1"))))
61 (build-system gnu-build-system)
62 (native-inputs
63 `(("asciidoc" ,asciidoc)
64 ("docbook-xml" ,docbook-xml)
65 ("libxml2" ,libxml2)
66 ("libxslt" ,libxslt)
67 ("pkg-config" ,pkg-config)))
68 (inputs
69 `(("fuse" ,fuse)
70 ("gnutls" ,gnutls)))
71 (arguments
72 `(#:phases
73 (modify-phases %standard-phases
74 (delete 'configure) ; no configure script
75 (replace 'install
76 ;; There's no ‘install’ target. Install all variants manually.
77 (lambda* (#:key outputs #:allow-other-keys)
78 (let* ((out (assoc-ref outputs "out"))
79 (bin (string-append out "/bin"))
80 (man1 (string-append out "/share/man/man1")))
81 (mkdir-p bin)
82 (mkdir-p man1)
83 (for-each
84 (lambda (variant)
85 (let ((man1-page (string-append variant ".1")))
86 (install-file variant bin)
87 (install-file man1-page man1)))
88 (list "httpfs2"
89 "httpfs2-mt"
90 "httpfs2-ssl"
91 "httpfs2-ssl-mt")))
92 #t)))
93 #:make-flags (list "CC=gcc")
94 #:parallel-build? #f ; can result in missing man pages
95 #:tests? #f)) ; no tests
96 (home-page "https://sourceforge.net/projects/httpfs/")
97 (synopsis "Mount remote files over HTTP")
98 (description "httpfs2 is a @code{fuse} file system for mounting any
99 @dfn{HyperText} (HTTP or HTTPS) URL. It uses HTTP/1.1 byte ranges to request
100 arbitrary bytes from the web server, without needing to download the entire
101 file. This is particularly useful with large archives such as ZIP files and
102 ISO images when you only need to inspect their contents or extract specific
103 files. Since the HTTP protocol itself has no notion of directories, only a
104 single file can be mounted.")
105 (license license:gpl2+)))
106
107 (define-public disorderfs
108 (package
109 (name "disorderfs")
110 (version "0.5.3")
111 (source
112 (origin
113 (method git-fetch)
114 (uri (git-reference
115 (url "https://salsa.debian.org/reproducible-builds/disorderfs.git")
116 (commit version)))
117 (file-name (git-file-name name version))
118 (sha256
119 (base32
120 "1nmhfvxpvz3xsfxl9wqnh6r2l5m7hjq6n0vpblsl5xdcvwaqcf50"))))
121 (build-system gnu-build-system)
122 (native-inputs
123 `(("pkg-config" ,pkg-config)))
124 (inputs
125 `(("fuse" ,fuse)
126 ("attr" ,attr)))
127 (arguments
128 `(#:phases (modify-phases %standard-phases
129 (delete 'configure))
130 #:make-flags (let ((out (assoc-ref %outputs "out")))
131 (list (string-append "PREFIX=" out)))
132 #:test-target "test"
133 ;; FIXME: Tests require 'run-parts' which is not in Guix yet.
134 #:tests? #f))
135 (home-page "https://github.com/ReproducibleBuilds/disorderfs")
136 (synopsis "FUSE file system that introduces non-determinism")
137 (description
138 "An overlay FUSE file system that introduces non-determinism
139 into file system metadata. For example, it can randomize the order
140 in which directory entries are read. This is useful for detecting
141 non-determinism in the build process.")
142 (license license:gpl3+)))
143
144 (define-public glusterfs
145 (package
146 (name "glusterfs")
147 (version "3.10.12")
148 (source
149 (origin
150 (method url-fetch)
151 (uri (string-append "https://download.gluster.org/pub/gluster/glusterfs/"
152 (version-major+minor version) "/" version
153 "/glusterfs-" version ".tar.gz"))
154 (sha256
155 (base32
156 "01ysvamvfv2l5pswa1rygpg8w0954h2wkh1ba97h3nx03m5n0prg"))
157 (patches
158 (search-patches "glusterfs-use-PATH-instead-of-hardcodes.patch"))))
159 (build-system gnu-build-system)
160 (arguments
161 `(#:configure-flags
162 (let ((out (assoc-ref %outputs "out")))
163 (list (string-append "--with-initdir=" out "/etc/init.d")
164 (string-append "--with-mountutildir=" out "/sbin")))
165 #:phases
166 (modify-phases %standard-phases
167 (add-before 'configure 'replace-config.sub
168 (lambda* (#:key inputs #:allow-other-keys)
169 ;; The distributed config.sub is intentionally left empty and
170 ;; must be replaced.
171 (install-file (string-append (assoc-ref inputs "automake")
172 "/share/automake-"
173 ,(version-major+minor (package-version automake)) "/config.sub")
174 ".")
175 #t))
176 ;; Fix flex error. This has already been fixed with upstream commit
177 ;; db3fe245a9e8812829eae7d143e49d0bfdfef9a7, but is not available in
178 ;; current releases.
179 (add-before 'configure 'fix-lex
180 (lambda _
181 (substitute* "libglusterfs/src/Makefile.in"
182 (("libglusterfs_la_LIBADD = @LEXLIB@")
183 "libglusterfs_la_LIBADD ="))
184 #t)))))
185 (native-inputs
186 `(("cmocka" ,cmocka)
187 ("pkg-config" ,pkg-config)
188 ("python-2" ,python-2) ; must be version 2
189 ("flex" ,flex)
190 ("bison" ,bison)
191 ("automake" ,automake)))
192 (inputs
193 `(("acl" ,acl)
194 ;; GlusterFS fails to build with libressl because HMAC_CTX_new and
195 ;; HMAC_CTX_free are undefined.
196 ("openssl" ,openssl)
197 ("liburcu" ,liburcu)
198 ("libuuid" ,util-linux)
199 ("libxml2" ,libxml2)
200 ("lvm2" ,lvm2)
201 ("readline" ,readline)
202 ("sqlite" ,sqlite) ; for tiering
203 ("zlib" ,zlib)))
204 (home-page "https://www.gluster.org")
205 (synopsis "Distributed file system")
206 (description "GlusterFS is a distributed scalable network file system
207 suitable for data-intensive tasks such as cloud storage and media streaming.
208 It allows rapid provisioning of additional storage based on your storage
209 consumption needs. It incorporates automatic failover as a primary feature.
210 All of this is accomplished without a centralized metadata server.")
211 ;; The user may choose either LGPLv3+ or GPLv2 only.
212 (license (list license:lgpl3+ license:gpl2+))))
213
214 (define-public curlftpfs
215 (package
216 (name "curlftpfs")
217 (version "0.9.2")
218 (source
219 (origin
220 (method url-fetch)
221 (uri (string-append "mirror://sourceforge/curlftpfs/curlftpfs/" version
222 "/curlftpfs-" version ".tar.gz"))
223 (sha256
224 (base32
225 "0n397hmv21jsr1j7zx3m21i7ryscdhkdsyqpvvns12q7qwwlgd2f"))))
226 (build-system gnu-build-system)
227 (arguments
228 `(#:phases
229 (modify-phases %standard-phases
230 (add-after 'unpack 'fix-test
231 (lambda _
232 ;; One of the 512-Byte block counts is definitely wrong.
233 ;; See <https://sourceforge.net/p/curlftpfs/bugs/73/>.
234 (substitute* "tests/ftpfs-ls_unittest.c"
235 (("4426192") "12814800"))
236 #t)))))
237 (inputs
238 `(("curl" ,curl)
239 ("glib" ,glib)
240 ("fuse" ,fuse)))
241 (native-inputs
242 `(("pkg-config" ,pkg-config)))
243 (home-page "http://curlftpfs.sourceforge.net/")
244 (synopsis "Mount remote file systems over FTP")
245 (description
246 "This is a file system client based on the FTP File Transfer Protocol.")
247 (license license:gpl2+)))