gnu: Add amule.
[jackhill/guix/guix.git] / gnu / packages / file-systems.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
3 ;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
4 ;;; Copyright © 2017 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.2")
111 (source
112 (origin
113 (method git-fetch)
114 (uri (git-reference
115 (url "https://github.com/ReproducibleBuilds/disorderfs.git")
116 (commit "0.5.2")))
117 (file-name (git-file-name name version))
118 (sha256
119 (base32
120 "1j028dq3d4m64mn9xmfamcnnc7i2drmra4pdmxdmqdsi8p7yj4sv"))))
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.7")
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 "02sn9s3jjva2i1l47y3in326n8jgp57rbykz5s8m87y4bzpw0ym1"))
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 ,(package-version automake) "/config.sub")
174 ".")
175 #t))
176 ;; Fix flex error. This has already been fixed with upstream commit
177 ;; db3fe245a9e8812829eae7d143e49d0bfdfef9a7.
178 (add-before 'configure 'fix-lex
179 (lambda _
180 (substitute* "libglusterfs/src/Makefile.in"
181 (("libglusterfs_la_LIBADD = @LEXLIB@")
182 "libglusterfs_la_LIBADD ="))
183 #t)))))
184 (native-inputs
185 `(("cmocka" ,cmocka)
186 ("pkg-config" ,pkg-config)
187 ("python-2" ,python-2) ; must be version 2
188 ("flex" ,flex)
189 ("bison" ,bison)
190 ("automake" ,automake)))
191 (inputs
192 `(("acl" ,acl)
193 ;; GlusterFS fails to build with libressl because HMAC_CTX_new and
194 ;; HMAC_CTX_free are undefined.
195 ("openssl" ,openssl)
196 ("liburcu" ,liburcu)
197 ("libuuid" ,util-linux)
198 ("libxml2" ,libxml2)
199 ("lvm2" ,lvm2)
200 ("readline" ,readline)
201 ("sqlite" ,sqlite) ; for tiering
202 ("zlib" ,zlib)))
203 (home-page "https://www.gluster.org")
204 (synopsis "Distributed file system")
205 (description "GlusterFS is a distributed scalable network file system
206 suitable for data-intensive tasks such as cloud storage and media streaming.
207 It allows rapid provisioning of additional storage based on your storage
208 consumption needs. It incorporates automatic failover as a primary feature.
209 All of this is accomplished without a centralized metadata server.")
210 ;; The user may choose either LGPLv3+ or GPLv2 only.
211 (license (list license:lgpl3+ license:gpl2+))))
212
213 (define-public curlftpfs
214 (package
215 (name "curlftpfs")
216 (version "0.9.2")
217 (source
218 (origin
219 (method url-fetch)
220 (uri (string-append "mirror://sourceforge/curlftpfs/curlftpfs/" version
221 "/curlftpfs-" version ".tar.gz"))
222 (sha256
223 (base32
224 "0n397hmv21jsr1j7zx3m21i7ryscdhkdsyqpvvns12q7qwwlgd2f"))))
225 (build-system gnu-build-system)
226 (arguments
227 `(#:phases
228 (modify-phases %standard-phases
229 (add-after 'unpack 'fix-test
230 (lambda _
231 ;; One of the 512-Byte block counts is definitely wrong.
232 ;; See <https://sourceforge.net/p/curlftpfs/bugs/73/>.
233 (substitute* "tests/ftpfs-ls_unittest.c"
234 (("4426192") "12814800"))
235 #t)))))
236 (inputs
237 `(("curl" ,curl)
238 ("glib" ,glib)
239 ("fuse" ,fuse)))
240 (native-inputs
241 `(("pkg-config" ,pkg-config)))
242 (home-page "http://curlftpfs.sourceforge.net/")
243 (synopsis "Mount remote file systems over FTP")
244 (description
245 "This is a file system client based on the FTP File Transfer Protocol.")
246 (license license:gpl2+)))