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>
9 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
55 ;; See https://lftp.tech/get.html for mirrors.
56 (uri (list (string-append "https://lftp.tech/ftp/lftp-"
58 (string-append "https://lftp.tech/ftp/old/lftp-"
60 (string-append "ftp://ftp.st.ryukoku.ac.jp/pub/network/"
61 "ftp/lftp/lftp-" version ".tar.xz")))
64 "03b7y0h3mf4jfq5y8zw6hv9v44z3n6i8hc1iswax96y3z7sc85y5"))))
65 (build-system gnu-build-system)
67 `(("pkg-config" ,pkg-config)))
70 ("readline" ,readline)
74 (modify-phases %standard-phases
75 ;; Disable tests that require network access, which is most of them.
76 (add-before 'check 'disable-impure-tests
78 (substitute* "tests/Makefile"
79 (("(ftp-cls-l|ftp-list|http-get)\\$\\(EXEEXT\\)") "")
80 (("lftp-https-get ") ""))
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")
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.")
101 (uri (string-append "ftp://ftp.ncftp.com/ncftp/ncftp-"
102 version "-src.tar.xz"))
105 "1389657cwgw5a3kljnqmhvfh4vr2gcr71dwz1mlhf22xq23hc82z"))
106 (modules '((guix build utils)))
109 ;; Use the right 'rm' and 'ls'.
110 (substitute* (cons "configure"
112 "^(Makefile\\.in|.*\\.sh)$"))
113 (("/bin/(rm|ls)" _ command)
116 ;; This is free software, avoid any confusion.
117 (substitute* (find-files "." "\\.c$")
118 (("a freeware program")
121 (build-system gnu-build-system)
124 (modify-phases %standard-phases
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")
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
143 (license clarified-artistic)))
154 (string-append "mirror://sourceforge/weex/weex/"
155 "/weex_" version ".tar.gz"))
158 "1ir761hjncr1bamaqcw9j7x57xi3s9jax3223bxwbq30a0vsw1pd"))))
159 (build-system gnu-build-system)
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")
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
173 (define-public libfilezilla
175 (name "libfilezilla")
180 (uri (string-append "https://download.filezilla-project.org/"
181 "libfilezilla/libfilezilla-" version ".tar.bz2"))
183 (base32 "1zfnqbn14dx0fl45mfaznr5n5xsxy1kx8z9f80fppbqn37pb9mgx"))))
184 (build-system gnu-build-system)
187 (list "--disable-static")))
189 `(("cppunit" ,cppunit)
190 ("gettext" ,gettext-minimal)
191 ("pkg-config" ,pkg-config)))
195 (home-page "https://lib.filezilla-project.org")
196 (synopsis "Cross-platform C++ library used by Filezilla client")
198 "This package provides some basic functionality to build high-performing,
199 platform-independent programs.
201 Some of the highlights include:
204 A type-safe, multi-threaded event system that's simple to use yet efficient.
206 Timers for periodic events.
208 A @code{datetime} class that not only tracks timestamp but also their accuracy,
209 which simplifies dealing with timestamps originating from different sources.
211 Simple process handling for spawning child processes with redirected input and
216 (define-public filezilla
223 (uri (string-append "https://download.filezilla-project.org/client/"
224 "FileZilla_" version "_src.tar.bz2"))
226 (base32 "042w2f5cf8g9cr7d3m6294ygx7jggcria9502jnql855khk8gnz0"))))
227 (build-system gnu-build-system)
229 ;; Don't let filezilla phone home to check for updates.
230 '(#:configure-flags '("--disable-autoupdatecheck")))
232 `(("cppunit" ,cppunit)
233 ("gettext" ,gettext-minimal)
234 ("pkg-config" ,pkg-config)
235 ("xdg-utils" ,xdg-utils)))
240 ("libfilezilla" ,libfilezilla)
245 ("wxwidgets" ,wxwidgets)))
246 (home-page "https://filezilla-project.org")
247 (synopsis "Full-featured graphical FTP/FTPS/SFTP client")
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.")
254 (properties '((upstream-name . "FileZilla")))))
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")
264 (version (string-append upstream-version "-" revision))
269 "https://vault.centos.org/centos/" centos-version
270 "/AppStream/Source/SPackages/vsftpd-" upstream-version "-"
271 revision ".src.rpm"))
273 (base32 "1xl0kqcismf82hl99klqbvvpylpyk1yr1qjy5hd8f80cj4lyl0f4"))))
274 (build-system gnu-build-system)
276 `(#:make-flags '("LDFLAGS=-lcrypt -lssl -pie")
277 #:tests? #f ; no tests exist
279 (modify-phases %standard-phases
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
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.
294 (call-with-input-file "../vsftpd.spec"
296 (use-modules (ice-9 rdelim))
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))))
307 (add-after 'unpack 'patch-installation-directory
308 (lambda* (#:key outputs #:allow-other-keys)
309 (substitute* "Makefile"
310 (("/usr") (assoc-ref outputs "out")))
312 (add-before 'install 'mkdir
313 (lambda* (#:key outputs #:allow-other-keys)
314 (let ((out (assoc-ref outputs "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"))
321 (delete 'configure))))
323 ;; Used to unpack the source RPM.
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