1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015, 2018, 2021, 2021 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")
122 `((release-monitoring-url . "https://www.ncftp.com/download/")))
123 (build-system gnu-build-system)
126 (modify-phases %standard-phases
128 (lambda* (#:key outputs #:allow-other-keys)
129 ;; This is an old 'configure' script that doesn't
130 ;; understand variables passed as arguments.
131 (let ((out (assoc-ref outputs "out")))
132 (setenv "CONFIG_SHELL" (which "sh"))
133 (setenv "SHELL" (which "sh"))
134 (invoke "./configure"
135 (string-append "--prefix=" out))))))
136 #:tests? #f)) ;there are no tests
137 (inputs `(("ncurses" ,ncurses)))
138 (home-page "https://www.ncftp.com/ncftp/")
139 (synopsis "Command-line File Transfer Protocol (FTP) client")
141 "NcFTP Client (or just NcFTP) is a set of command-line programs to access
142 File Transfer Protocol (FTP) servers. This includes @code{ncftp}, an interactive
143 FTP browser, as well as non-interactive commands such as @code{ncftpput} and
145 (license clarified-artistic)))
156 (string-append "mirror://sourceforge/weex/weex/"
157 "/weex_" version ".tar.gz"))
160 "1ir761hjncr1bamaqcw9j7x57xi3s9jax3223bxwbq30a0vsw1pd"))))
161 (build-system gnu-build-system)
163 `(("automake" ,automake)
164 ("autoconf" ,autoconf)
165 ("gettext" ,gettext-minimal)))
166 (home-page "http://weex.sourceforge.net/")
167 (synopsis "Non-interactive client for FTP synchronization")
169 "Weex is a utility designed to automate the task of remotely
170 maintaining a web page or other FTP archive. It synchronizes a set of
171 local files to a remote server by performing uploads and remote deletes
175 (define-public libfilezilla
177 (name "libfilezilla")
182 (uri (string-append "https://download.filezilla-project.org/"
183 "libfilezilla/libfilezilla-" version ".tar.bz2"))
185 (base32 "1zfnqbn14dx0fl45mfaznr5n5xsxy1kx8z9f80fppbqn37pb9mgx"))))
186 (build-system gnu-build-system)
189 (list "--disable-static")))
191 `(("cppunit" ,cppunit)
192 ("gettext" ,gettext-minimal)
193 ("pkg-config" ,pkg-config)))
197 (home-page "https://lib.filezilla-project.org")
198 (synopsis "Cross-platform C++ library used by Filezilla client")
200 "This package provides some basic functionality to build high-performing,
201 platform-independent programs.
203 Some of the highlights include:
206 A type-safe, multi-threaded event system that's simple to use yet efficient.
208 Timers for periodic events.
210 A @code{datetime} class that not only tracks timestamp but also their accuracy,
211 which simplifies dealing with timestamps originating from different sources.
213 Simple process handling for spawning child processes with redirected input and
218 (define-public filezilla
225 (uri (string-append "https://download.filezilla-project.org/client/"
226 "FileZilla_" version "_src.tar.bz2"))
228 (base32 "042w2f5cf8g9cr7d3m6294ygx7jggcria9502jnql855khk8gnz0"))))
229 (build-system gnu-build-system)
231 ;; Don't let filezilla phone home to check for updates.
232 '(#:configure-flags '("--disable-autoupdatecheck")))
234 `(("cppunit" ,cppunit)
235 ("gettext" ,gettext-minimal)
236 ("pkg-config" ,pkg-config)
237 ("xdg-utils" ,xdg-utils)))
242 ("libfilezilla" ,libfilezilla)
247 ("wxwidgets" ,wxwidgets)))
248 (home-page "https://filezilla-project.org")
249 (synopsis "Full-featured graphical FTP/FTPS/SFTP client")
251 "Filezilla client supports FTP, FTP over SSL/TLS (FTPS),
252 SSH File Transfer Protocol (SFTP), HTTP/1.1, SOCKS5, FTP-Proxy, IPv6
253 and others features such as bookmarks, drag and drop, filename filters,
254 directory comparison and more.")
256 (properties '((upstream-name . "FileZilla")))))
258 (define-public vsftpd
259 ;; Use a significantly patched CentOS variant with TLSv1.2 support and
260 ;; further bug and security fixes.
261 (let ((upstream-version "3.0.3")
262 (centos-version "8.3.2011")
266 (version (string-append upstream-version "-" revision))
271 "https://vault.centos.org/centos/" centos-version
272 "/AppStream/Source/SPackages/vsftpd-" upstream-version "-"
273 revision ".src.rpm"))
275 (base32 "1xl0kqcismf82hl99klqbvvpylpyk1yr1qjy5hd8f80cj4lyl0f4"))))
276 (build-system gnu-build-system)
278 `(#:make-flags '("LDFLAGS=-lcrypt -lssl -pie")
279 #:tests? #f ; no tests exist
281 (modify-phases %standard-phases
283 (lambda* (#:key source #:allow-other-keys)
284 (invoke "7z" "e" source "-ocpio")
285 (invoke "cpio" "-idmv"
286 (string-append "--file=cpio/vsftpd-"
287 ,upstream-version "-" ,revision
290 (string-append "vsftpd-" ,upstream-version ".tar.gz"))
291 (chdir (string-append "vsftpd-" ,upstream-version))))
292 (add-after 'unpack 'apply-CentOS-patches
293 ;; Apply all patches as enumerated in vsftpd.spec, in order:
294 ;; simply using FIND-FILES would silently corrupt the result.
296 (call-with-input-file "../vsftpd.spec"
298 (use-modules (ice-9 rdelim))
300 (let ((line (read-line port)))
301 (unless (eof-object? line)
302 (when (string-prefix? "Patch" line)
303 (let* ((space (string-rindex line #\space))
304 (patch (string-drop line (+ 1 space))))
305 (format #t "Applying '~a'.\n" patch)
306 (invoke "patch" "-Np1"
307 "-i" (string-append "../" patch))))
309 (add-after 'unpack 'patch-installation-directory
310 (lambda* (#:key outputs #:allow-other-keys)
311 (substitute* "Makefile"
312 (("/usr") (assoc-ref outputs "out")))
314 (add-before 'install 'mkdir
315 (lambda* (#:key outputs #:allow-other-keys)
316 (let ((out (assoc-ref outputs "out")))
318 (mkdir (string-append out "/sbin"))
319 (mkdir (string-append out "/man"))
320 (mkdir (string-append out "/man/man5"))
321 (mkdir (string-append out "/man/man8"))
323 (delete 'configure))))
325 ;; Used to unpack the source RPM.
330 ("linux-pam" ,linux-pam)
331 ("openssl" ,openssl)))
332 (home-page "https://security.appspot.com/vsftpd.html")
333 (synopsis "Share files securely over FTP or FTPS")
334 (description "@command{vsftpd} is a daemon that listens on a TCP socket
335 for clients and gives them access to local files via File Transfer