ftp.scm 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  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>
  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. (define-module (gnu packages ftp)
  24. #:use-module ((guix licenses) #:select (gpl2 gpl2+ gpl3+ clarified-artistic))
  25. #:use-module (guix build-system gnu)
  26. #:use-module (guix download)
  27. #:use-module (guix packages)
  28. #:use-module (guix utils)
  29. #:use-module (gnu packages)
  30. #:use-module (gnu packages autotools)
  31. #:use-module (gnu packages check)
  32. #:use-module (gnu packages compression)
  33. #:use-module (gnu packages freedesktop)
  34. #:use-module (gnu packages gcc)
  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. (define-public lftp
  49. (package
  50. (name "lftp")
  51. (version "4.9.2")
  52. (source (origin
  53. (method url-fetch)
  54. ;; See https://lftp.tech/get.html for mirrors.
  55. (uri (list (string-append "https://lftp.tech/ftp/lftp-"
  56. version ".tar.xz")
  57. (string-append "https://lftp.tech/ftp/old/lftp-"
  58. version ".tar.xz")
  59. (string-append "ftp://ftp.st.ryukoku.ac.jp/pub/network/"
  60. "ftp/lftp/lftp-" version ".tar.xz")))
  61. (sha256
  62. (base32
  63. "03b7y0h3mf4jfq5y8zw6hv9v44z3n6i8hc1iswax96y3z7sc85y5"))))
  64. (build-system gnu-build-system)
  65. (native-inputs
  66. `(("pkg-config" ,pkg-config)))
  67. (inputs
  68. `(("zlib" ,zlib)
  69. ("readline" ,readline)
  70. ("gnutls" ,gnutls)))
  71. (arguments
  72. `(#:phases
  73. (modify-phases %standard-phases
  74. ;; Disable tests that require network access, which is most of them.
  75. (add-before 'check 'disable-impure-tests
  76. (lambda _
  77. (substitute* "tests/Makefile"
  78. (("(ftp-cls-l|ftp-list|http-get)\\$\\(EXEEXT\\)") "")
  79. (("lftp-https-get ") ""))
  80. #t)))
  81. #:configure-flags
  82. (list (string-append "--with-readline="
  83. (assoc-ref %build-inputs "readline")))))
  84. (home-page "https://lftp.tech/")
  85. (synopsis "Command-line file transfer program")
  86. (description
  87. "LFTP is a sophisticated FTP/HTTP client, and a file transfer program
  88. supporting a number of network protocols. Like Bash, it has job control and
  89. uses the Readline library for input. It has bookmarks, a built-in mirror
  90. command, and can transfer several files in parallel. It was designed with
  91. reliability in mind.")
  92. (license gpl3+)))
  93. (define-public ncftp
  94. (package
  95. (name "ncftp")
  96. (version "3.2.6")
  97. (source (origin
  98. (method url-fetch)
  99. (uri (string-append "ftp://ftp.ncftp.com/ncftp/ncftp-"
  100. version "-src.tar.xz"))
  101. (sha256
  102. (base32
  103. "1389657cwgw5a3kljnqmhvfh4vr2gcr71dwz1mlhf22xq23hc82z"))
  104. (modules '((guix build utils)))
  105. (snippet
  106. '(begin
  107. ;; Use the right 'rm' and 'ls'.
  108. (substitute* (cons "configure"
  109. (find-files "."
  110. "^(Makefile\\.in|.*\\.sh)$"))
  111. (("/bin/(rm|ls)" _ command)
  112. command))
  113. ;; This is free software, avoid any confusion.
  114. (substitute* (find-files "." "\\.c$")
  115. (("a freeware program")
  116. "free software"))
  117. #t))))
  118. (properties
  119. `((release-monitoring-url . "https://www.ncftp.com/download/")))
  120. (build-system gnu-build-system)
  121. (arguments
  122. '(#:phases
  123. (modify-phases %standard-phases
  124. (replace 'configure
  125. (lambda* (#:key outputs #:allow-other-keys)
  126. ;; This is an old 'configure' script that doesn't
  127. ;; understand variables passed as arguments.
  128. (let ((out (assoc-ref outputs "out")))
  129. (setenv "CONFIG_SHELL" (which "sh"))
  130. (setenv "SHELL" (which "sh"))
  131. (invoke "./configure"
  132. (string-append "--prefix=" out))))))
  133. #:tests? #f)) ;there are no tests
  134. (inputs `(("ncurses" ,ncurses)))
  135. (home-page "https://www.ncftp.com/ncftp/")
  136. (synopsis "Command-line File Transfer Protocol (FTP) client")
  137. (description
  138. "NcFTP Client (or just NcFTP) is a set of command-line programs to access
  139. File Transfer Protocol (FTP) servers. This includes @code{ncftp}, an interactive
  140. FTP browser, as well as non-interactive commands such as @code{ncftpput} and
  141. @code{ncftpget}.")
  142. (license clarified-artistic)))
  143. (define-public weex
  144. (package
  145. (name "weex")
  146. (version "2.8.2")
  147. (source
  148. (origin
  149. (method url-fetch)
  150. (uri
  151. (string-append "mirror://sourceforge/weex/weex/"
  152. "/weex_" version ".tar.gz"))
  153. (sha256
  154. (base32
  155. "1ir761hjncr1bamaqcw9j7x57xi3s9jax3223bxwbq30a0vsw1pd"))))
  156. (build-system gnu-build-system)
  157. (native-inputs
  158. `(("automake" ,automake)
  159. ("autoconf" ,autoconf)
  160. ("gettext" ,gettext-minimal)))
  161. (home-page "http://weex.sourceforge.net/")
  162. (synopsis "Non-interactive client for FTP synchronization")
  163. (description
  164. "Weex is a utility designed to automate the task of remotely
  165. maintaining a web page or other FTP archive. It synchronizes a set of
  166. local files to a remote server by performing uploads and remote deletes
  167. as required.")
  168. (license gpl2+)))
  169. (define-public libfilezilla
  170. (package
  171. (name "libfilezilla")
  172. (version "0.31.1")
  173. (source
  174. (origin
  175. (method url-fetch)
  176. (uri (string-append "https://download.filezilla-project.org/"
  177. "libfilezilla/libfilezilla-" version ".tar.bz2"))
  178. (sha256
  179. (base32 "0vqn6gkwyin9hml39d74vcjcnbwlnk2cpc3msdlkhpq1ns3mhzcr"))))
  180. (build-system gnu-build-system)
  181. (arguments
  182. `(#:configure-flags
  183. (list "--disable-static")))
  184. (native-inputs
  185. `(("cppunit" ,cppunit)
  186. ("gcc" ,gcc-8) ; XXX remove when it's the default
  187. ("gettext" ,gettext-minimal)
  188. ("pkg-config" ,pkg-config)))
  189. (inputs
  190. `(("gnutls" ,gnutls)
  191. ("nettle" ,nettle)))
  192. (home-page "https://lib.filezilla-project.org")
  193. (synopsis "Cross-platform C++ library used by Filezilla client")
  194. (description
  195. "This package provides some basic functionality to build high-performing,
  196. platform-independent programs.
  197. Some of the highlights include:
  198. @itemize
  199. @item
  200. A type-safe, multi-threaded event system that's simple to use yet efficient.
  201. @item
  202. Timers for periodic events.
  203. @item
  204. A @code{datetime} class that not only tracks timestamp but also their accuracy,
  205. which simplifies dealing with timestamps originating from different sources.
  206. @item
  207. Simple process handling for spawning child processes with redirected input and
  208. output.
  209. @end itemize\n")
  210. (license gpl2+)))
  211. (define-public filezilla
  212. (package
  213. (name "filezilla")
  214. (version "3.55.1")
  215. (source
  216. (origin
  217. (method url-fetch)
  218. (uri (string-append "https://download.filezilla-project.org/client/"
  219. "FileZilla_" version "_src.tar.bz2"))
  220. (sha256
  221. (base32 "19bnyx89jg0ll8a8mr4y8gp26gizs11ckgrwglh27zak3zhx1y37"))))
  222. (build-system gnu-build-system)
  223. (arguments
  224. ;; Don't let filezilla phone home to check for updates.
  225. '(#:configure-flags '("--disable-autoupdatecheck")))
  226. (native-inputs
  227. `(("cppunit" ,cppunit)
  228. ("gettext" ,gettext-minimal)
  229. ("pkg-config" ,pkg-config)
  230. ("xdg-utils" ,xdg-utils)))
  231. (inputs
  232. `(("dbus" ,dbus)
  233. ("gnutls" ,gnutls)
  234. ("gtk+" ,gtk+)
  235. ("libfilezilla" ,libfilezilla)
  236. ("libidn" ,libidn)
  237. ("nettle" ,nettle)
  238. ("pugixml" ,pugixml)
  239. ("sqlite" ,sqlite)
  240. ("wxwidgets" ,wxwidgets)))
  241. (home-page "https://filezilla-project.org")
  242. (synopsis "Full-featured graphical FTP/FTPS/SFTP client")
  243. (description
  244. "Filezilla client supports FTP, FTP over SSL/TLS (FTPS),
  245. SSH File Transfer Protocol (SFTP), HTTP/1.1, SOCKS5, FTP-Proxy, IPv6
  246. and others features such as bookmarks, drag and drop, filename filters,
  247. directory comparison and more.")
  248. (license gpl2+)
  249. (properties '((upstream-name . "FileZilla")))))
  250. (define-public vsftpd
  251. (package
  252. (name "vsftpd")
  253. (version "3.0.5")
  254. (source
  255. (origin
  256. (method url-fetch)
  257. (uri (string-append "https://security.appspot.com/downloads/"
  258. "vsftpd-" version ".tar.gz"))
  259. (sha256
  260. (base32 "1lwipiq8q9qzvwv6f418fbvagpz0p6v0jjplkvcsc2sb8np05di6"))))
  261. (build-system gnu-build-system)
  262. (arguments
  263. `(#:make-flags
  264. (list (string-append "CC=" ,(cc-for-target))
  265. ;; vsf_findlibs.sh looks only for hard-coded {/usr,}/lib file names
  266. ;; that will never exist on Guix. Manage libraries ourselves.
  267. "LDFLAGS=-lcap -lpam"
  268. "INSTALL=install -D")
  269. #:tests? #f ; no test suite
  270. #:phases
  271. (modify-phases %standard-phases
  272. (add-after 'unpack 'build-SSL
  273. (lambda _
  274. (substitute* "builddefs.h"
  275. (("#undef (VSF_BUILD_SSL)" _ symbol)
  276. (string-append "#define " symbol)))))
  277. (add-after 'unpack 'append-make-flags
  278. (lambda _
  279. (substitute* "Makefile"
  280. (("(CFLAGS|LDFLAGS)[[:blank:]]*=" _ variable)
  281. (format #f "UPSTREAM_~a +=" variable))
  282. (("\\$\\((CFLAGS|LDFLAGS)\\)" _ variable)
  283. (format #f "$(UPSTREAM_~a) $(~@*~a)" variable)))))
  284. (add-after 'unpack 'patch-installation-directory
  285. (lambda* (#:key outputs #:allow-other-keys)
  286. (substitute* "Makefile"
  287. (("/usr") (assoc-ref outputs "out")))))
  288. (delete 'configure)))) ; no configure script
  289. (inputs
  290. `(("libcap" ,libcap)
  291. ("linux-pam" ,linux-pam)
  292. ("openssl" ,openssl)))
  293. (synopsis "Small FTP server with a focus on security")
  294. (description
  295. "The Very Secure File Transfer Protocol Daemon or @command{vsftpd} is a
  296. server that listens on a TCP socket for clients and gives them access to local
  297. files via @acronym{FTP, the File Transfer Protocol}. Security is a goal; not a
  298. guarantee.")
  299. (home-page "https://security.appspot.com/vsftpd.html")
  300. (license gpl2))) ; with OpenSSL exception