gnu: libringclient: Disable the libwrap feature.
[jackhill/guix/guix.git] / gnu / packages / ftp.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015, 2018 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <me@tobias.gr>
6 ;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
7 ;;; Copyright © 2021 David Larsson <david.larsson@selfhosted.xyz>
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 ftp)
25 #:use-module ((guix licenses) #:select (gpl2 gpl2+ gpl3+ clarified-artistic))
26 #:use-module (guix build-system gnu)
27 #:use-module (guix download)
28 #:use-module (guix packages)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages autotools)
31 #:use-module (gnu packages check)
32 #:use-module (gnu packages cpio)
33 #:use-module (gnu packages compression)
34 #:use-module (gnu packages freedesktop)
35 #:use-module (gnu packages gettext)
36 #:use-module (gnu packages glib)
37 #:use-module (gnu packages gtk)
38 #:use-module (gnu packages libidn)
39 #:use-module (gnu packages linux)
40 #:use-module (gnu packages ncurses)
41 #:use-module (gnu packages nettle)
42 #:use-module (gnu packages pkg-config)
43 #:use-module (gnu packages readline)
44 #:use-module (gnu packages sqlite)
45 #:use-module (gnu packages tls)
46 #:use-module (gnu packages wxwidgets)
47 #:use-module (gnu packages xml))
48
49 (define-public lftp
50 (package
51 (name "lftp")
52 (version "4.9.2")
53 (source (origin
54 (method url-fetch)
55 ;; See https://lftp.tech/get.html for mirrors.
56 (uri (list (string-append "https://lftp.tech/ftp/lftp-"
57 version ".tar.xz")
58 (string-append "https://lftp.tech/ftp/old/lftp-"
59 version ".tar.xz")
60 (string-append "ftp://ftp.st.ryukoku.ac.jp/pub/network/"
61 "ftp/lftp/lftp-" version ".tar.xz")))
62 (sha256
63 (base32
64 "03b7y0h3mf4jfq5y8zw6hv9v44z3n6i8hc1iswax96y3z7sc85y5"))))
65 (build-system gnu-build-system)
66 (native-inputs
67 `(("pkg-config" ,pkg-config)))
68 (inputs
69 `(("zlib" ,zlib)
70 ("readline" ,readline)
71 ("gnutls" ,gnutls)))
72 (arguments
73 `(#:phases
74 (modify-phases %standard-phases
75 ;; Disable tests that require network access, which is most of them.
76 (add-before 'check 'disable-impure-tests
77 (lambda _
78 (substitute* "tests/Makefile"
79 (("(ftp-cls-l|ftp-list|http-get)\\$\\(EXEEXT\\)") "")
80 (("lftp-https-get ") ""))
81 #t)))
82 #:configure-flags
83 (list (string-append "--with-readline="
84 (assoc-ref %build-inputs "readline")))))
85 (home-page "https://lftp.tech/")
86 (synopsis "Command-line file transfer program")
87 (description
88 "LFTP is a sophisticated FTP/HTTP client, and a file transfer program
89 supporting a number of network protocols. Like Bash, it has job control and
90 uses the Readline library for input. It has bookmarks, a built-in mirror
91 command, and can transfer several files in parallel. It was designed with
92 reliability in mind.")
93 (license gpl3+)))
94
95 (define-public ncftp
96 (package
97 (name "ncftp")
98 (version "3.2.6")
99 (source (origin
100 (method url-fetch)
101 (uri (string-append "ftp://ftp.ncftp.com/ncftp/ncftp-"
102 version "-src.tar.xz"))
103 (sha256
104 (base32
105 "1389657cwgw5a3kljnqmhvfh4vr2gcr71dwz1mlhf22xq23hc82z"))
106 (modules '((guix build utils)))
107 (snippet
108 '(begin
109 ;; Use the right 'rm' and 'ls'.
110 (substitute* (cons "configure"
111 (find-files "."
112 "^(Makefile\\.in|.*\\.sh)$"))
113 (("/bin/(rm|ls)" _ command)
114 command))
115
116 ;; This is free software, avoid any confusion.
117 (substitute* (find-files "." "\\.c$")
118 (("a freeware program")
119 "free software"))
120 #t))))
121 (build-system gnu-build-system)
122 (arguments
123 '(#:phases
124 (modify-phases %standard-phases
125 (replace 'configure
126 (lambda* (#:key outputs #:allow-other-keys)
127 ;; This is an old 'configure' script that doesn't
128 ;; understand variables passed as arguments.
129 (let ((out (assoc-ref outputs "out")))
130 (setenv "CONFIG_SHELL" (which "sh"))
131 (setenv "SHELL" (which "sh"))
132 (invoke "./configure"
133 (string-append "--prefix=" out))))))
134 #:tests? #f)) ;there are no tests
135 (inputs `(("ncurses" ,ncurses)))
136 (home-page "https://www.ncftp.com/ncftp/")
137 (synopsis "Command-line File Transfer Protocol (FTP) client")
138 (description
139 "NcFTP Client (or just NcFTP) is a set of command-line programs to access
140 File Transfer Protocol (FTP) servers. This includes @code{ncftp}, an interactive
141 FTP browser, as well as non-interactive commands such as @code{ncftpput} and
142 @code{ncftpget}.")
143 (license clarified-artistic)))
144
145
146 (define-public weex
147 (package
148 (name "weex")
149 (version "2.8.2")
150 (source
151 (origin
152 (method url-fetch)
153 (uri
154 (string-append "mirror://sourceforge/weex/weex/"
155 "/weex_" version ".tar.gz"))
156 (sha256
157 (base32
158 "1ir761hjncr1bamaqcw9j7x57xi3s9jax3223bxwbq30a0vsw1pd"))))
159 (build-system gnu-build-system)
160 (native-inputs
161 `(("automake" ,automake)
162 ("autoconf" ,autoconf)
163 ("gettext" ,gettext-minimal)))
164 (home-page "http://weex.sourceforge.net/")
165 (synopsis "Non-interactive client for FTP synchronization")
166 (description
167 "Weex is a utility designed to automate the task of remotely
168 maintaining a web page or other FTP archive. It synchronizes a set of
169 local files to a remote server by performing uploads and remote deletes
170 as required.")
171 (license gpl2+)))
172
173 (define-public libfilezilla
174 (package
175 (name "libfilezilla")
176 (version "0.24.1")
177 (source
178 (origin
179 (method url-fetch)
180 (uri (string-append "https://download.filezilla-project.org/"
181 "libfilezilla/libfilezilla-" version ".tar.bz2"))
182 (sha256
183 (base32 "1zfnqbn14dx0fl45mfaznr5n5xsxy1kx8z9f80fppbqn37pb9mgx"))))
184 (build-system gnu-build-system)
185 (arguments
186 `(#:configure-flags
187 (list "--disable-static")))
188 (native-inputs
189 `(("cppunit" ,cppunit)
190 ("gettext" ,gettext-minimal)
191 ("pkg-config" ,pkg-config)))
192 (inputs
193 `(("gnutls" ,gnutls)
194 ("nettle" ,nettle)))
195 (home-page "https://lib.filezilla-project.org")
196 (synopsis "Cross-platform C++ library used by Filezilla client")
197 (description
198 "This package provides some basic functionality to build high-performing,
199 platform-independent programs.
200
201 Some of the highlights include:
202 @itemize
203 @item
204 A type-safe, multi-threaded event system that's simple to use yet efficient.
205 @item
206 Timers for periodic events.
207 @item
208 A @code{datetime} class that not only tracks timestamp but also their accuracy,
209 which simplifies dealing with timestamps originating from different sources.
210 @item
211 Simple process handling for spawning child processes with redirected input and
212 output.
213 @end itemize\n")
214 (license gpl2+)))
215
216 (define-public filezilla
217 (package
218 (name "filezilla")
219 (version "3.50.0")
220 (source
221 (origin
222 (method url-fetch)
223 (uri (string-append "https://download.filezilla-project.org/client/"
224 "FileZilla_" version "_src.tar.bz2"))
225 (sha256
226 (base32 "042w2f5cf8g9cr7d3m6294ygx7jggcria9502jnql855khk8gnz0"))))
227 (build-system gnu-build-system)
228 (arguments
229 ;; Don't let filezilla phone home to check for updates.
230 '(#:configure-flags '("--disable-autoupdatecheck")))
231 (native-inputs
232 `(("cppunit" ,cppunit)
233 ("gettext" ,gettext-minimal)
234 ("pkg-config" ,pkg-config)
235 ("xdg-utils" ,xdg-utils)))
236 (inputs
237 `(("dbus" ,dbus)
238 ("gnutls" ,gnutls)
239 ("gtk+" ,gtk+)
240 ("libfilezilla" ,libfilezilla)
241 ("libidn" ,libidn)
242 ("nettle" ,nettle)
243 ("pugixml" ,pugixml)
244 ("sqlite" ,sqlite)
245 ("wxwidgets" ,wxwidgets)))
246 (home-page "https://filezilla-project.org")
247 (synopsis "Full-featured graphical FTP/FTPS/SFTP client")
248 (description
249 "Filezilla client supports FTP, FTP over SSL/TLS (FTPS),
250 SSH File Transfer Protocol (SFTP), HTTP/1.1, SOCKS5, FTP-Proxy, IPv6
251 and others features such as bookmarks, drag and drop, filename filters,
252 directory comparison and more.")
253 (license gpl2+)
254 (properties '((upstream-name . "FileZilla")))))
255
256 (define-public vsftpd
257 ;; Use a significantly patched CentOS variant with TLSv1.2 support and
258 ;; further bug and security fixes.
259 (let ((upstream-version "3.0.3")
260 (centos-version "8.3.2011")
261 (revision "32.el8"))
262 (package
263 (name "vsftpd")
264 (version (string-append upstream-version "-" revision))
265 (source
266 (origin
267 (method url-fetch)
268 (uri (string-append
269 "https://vault.centos.org/centos/" centos-version
270 "/AppStream/Source/SPackages/vsftpd-" upstream-version "-"
271 revision ".src.rpm"))
272 (sha256
273 (base32 "1xl0kqcismf82hl99klqbvvpylpyk1yr1qjy5hd8f80cj4lyl0f4"))))
274 (build-system gnu-build-system)
275 (arguments
276 `(#:make-flags '("LDFLAGS=-lcrypt -lssl -pie")
277 #:tests? #f ; no tests exist
278 #:phases
279 (modify-phases %standard-phases
280 (replace 'unpack
281 (lambda* (#:key source #:allow-other-keys)
282 (invoke "7z" "e" source "-ocpio")
283 (invoke "cpio" "-idmv"
284 (string-append "--file=cpio/vsftpd-"
285 ,upstream-version "-" ,revision
286 ".src.cpio"))
287 (invoke "tar" "xvf"
288 (string-append "vsftpd-" ,upstream-version ".tar.gz"))
289 (chdir (string-append "vsftpd-" ,upstream-version))))
290 (add-after 'unpack 'apply-CentOS-patches
291 ;; Apply all patches as enumerated in vsftpd.spec, in order:
292 ;; simply using FIND-FILES would silently corrupt the result.
293 (lambda _
294 (call-with-input-file "../vsftpd.spec"
295 (lambda (port)
296 (use-modules (ice-9 rdelim))
297 (let loop ()
298 (let ((line (read-line port)))
299 (unless (eof-object? line)
300 (when (string-prefix? "Patch" line)
301 (let* ((space (string-rindex line #\space))
302 (patch (string-drop line (+ 1 space))))
303 (format #t "Applying '~a'.\n" patch)
304 (invoke "patch" "-Np1"
305 "-i" (string-append "../" patch))))
306 (loop))))))))
307 (add-after 'unpack 'patch-installation-directory
308 (lambda* (#:key outputs #:allow-other-keys)
309 (substitute* "Makefile"
310 (("/usr") (assoc-ref outputs "out")))
311 #t))
312 (add-before 'install 'mkdir
313 (lambda* (#:key outputs #:allow-other-keys)
314 (let ((out (assoc-ref outputs "out")))
315 (mkdir-p out)
316 (mkdir (string-append out "/sbin"))
317 (mkdir (string-append out "/man"))
318 (mkdir (string-append out "/man/man5"))
319 (mkdir (string-append out "/man/man8"))
320 #t)))
321 (delete 'configure))))
322 (native-inputs
323 ;; Used to unpack the source RPM.
324 `(("p7zip" ,p7zip)
325 ("cpio" ,cpio)))
326 (inputs
327 `(("libcap" ,libcap)
328 ("linux-pam" ,linux-pam)
329 ("openssl" ,openssl)))
330 (home-page "https://security.appspot.com/vsftpd.html")
331 (synopsis "Share files securely over FTP or FTPS")
332 (description "@command{vsftpd} is a daemon that listens on a TCP socket
333 for clients and gives them access to local files via File Transfer
334 Protocol.")
335 (license gpl2))))