ftp.scm 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  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. ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
  9. ;;;
  10. ;;; This file is part of GNU Guix.
  11. ;;;
  12. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  13. ;;; under the terms of the GNU General Public License as published by
  14. ;;; the Free Software Foundation; either version 3 of the License, or (at
  15. ;;; your option) any later version.
  16. ;;;
  17. ;;; GNU Guix is distributed in the hope that it will be useful, but
  18. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  19. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. ;;; GNU General Public License for more details.
  21. ;;;
  22. ;;; You should have received a copy of the GNU General Public License
  23. ;;; 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 (guix utils)
  30. #:use-module (gnu packages)
  31. #:use-module (gnu packages autotools)
  32. #:use-module (gnu packages check)
  33. #:use-module (gnu packages compression)
  34. #:use-module (gnu packages freedesktop)
  35. #:use-module (gnu packages gcc)
  36. #:use-module (gnu packages gettext)
  37. #:use-module (gnu packages glib)
  38. #:use-module (gnu packages gtk)
  39. #:use-module (gnu packages libidn)
  40. #:use-module (gnu packages linux)
  41. #:use-module (gnu packages ncurses)
  42. #:use-module (gnu packages nettle)
  43. #:use-module (gnu packages pkg-config)
  44. #:use-module (gnu packages readline)
  45. #:use-module (gnu packages sqlite)
  46. #:use-module (gnu packages tls)
  47. #:use-module (gnu packages wxwidgets)
  48. #:use-module (gnu packages xml))
  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. (define-public ncftp
  95. (package
  96. (name "ncftp")
  97. (version "3.2.6")
  98. (source (origin
  99. (method url-fetch)
  100. (uri (string-append "ftp://ftp.ncftp.com/ncftp/ncftp-"
  101. version "-src.tar.xz"))
  102. (sha256
  103. (base32
  104. "1389657cwgw5a3kljnqmhvfh4vr2gcr71dwz1mlhf22xq23hc82z"))
  105. (modules '((guix build utils)))
  106. (snippet
  107. '(begin
  108. ;; Use the right 'rm' and 'ls'.
  109. (substitute* (cons "configure"
  110. (find-files "."
  111. "^(Makefile\\.in|.*\\.sh)$"))
  112. (("/bin/(rm|ls)" _ command)
  113. command))
  114. ;; This is free software, avoid any confusion.
  115. (substitute* (find-files "." "\\.c$")
  116. (("a freeware program")
  117. "free software"))
  118. #t))))
  119. (properties
  120. `((release-monitoring-url . "https://www.ncftp.com/download/")))
  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. (setenv "CFLAGS" "-fcommon")
  133. (invoke "./configure"
  134. (string-append "--prefix=" out))))))
  135. #:tests? #f)) ;there are no tests
  136. (inputs `(("ncurses" ,ncurses)))
  137. (home-page "https://www.ncftp.com/ncftp/")
  138. (synopsis "Command-line File Transfer Protocol (FTP) client")
  139. (description
  140. "NcFTP Client (or just NcFTP) is a set of command-line programs to access
  141. File Transfer Protocol (FTP) servers. This includes @code{ncftp}, an interactive
  142. FTP browser, as well as non-interactive commands such as @code{ncftpput} and
  143. @code{ncftpget}.")
  144. (license clarified-artistic)))
  145. (define-public weex
  146. (package
  147. (name "weex")
  148. (version "2.8.2")
  149. (source
  150. (origin
  151. (method url-fetch)
  152. (uri
  153. (string-append "mirror://sourceforge/weex/weex/"
  154. "/weex_" version ".tar.gz"))
  155. (sha256
  156. (base32
  157. "1ir761hjncr1bamaqcw9j7x57xi3s9jax3223bxwbq30a0vsw1pd"))))
  158. (build-system gnu-build-system)
  159. (native-inputs
  160. `(("automake" ,automake)
  161. ("autoconf" ,autoconf)
  162. ("gettext" ,gettext-minimal)))
  163. (home-page "http://weex.sourceforge.net/")
  164. (synopsis "Non-interactive client for FTP synchronization")
  165. (description
  166. "Weex is a utility designed to automate the task of remotely
  167. maintaining a web page or other FTP archive. It synchronizes a set of
  168. local files to a remote server by performing uploads and remote deletes
  169. as required.")
  170. (license gpl2+)))
  171. (define-public libfilezilla
  172. (package
  173. (name "libfilezilla")
  174. (version "0.31.1")
  175. (source
  176. (origin
  177. (method url-fetch)
  178. (uri (string-append "https://download.filezilla-project.org/"
  179. "libfilezilla/libfilezilla-" version ".tar.bz2"))
  180. (sha256
  181. (base32 "0vqn6gkwyin9hml39d74vcjcnbwlnk2cpc3msdlkhpq1ns3mhzcr"))))
  182. (build-system gnu-build-system)
  183. (arguments
  184. `(#:configure-flags
  185. (list "--disable-static")))
  186. (native-inputs
  187. `(("cppunit" ,cppunit)
  188. ("gcc" ,gcc-8) ; XXX remove when it's the default
  189. ("gettext" ,gettext-minimal)
  190. ("pkg-config" ,pkg-config)))
  191. (inputs
  192. `(("gnutls" ,gnutls)
  193. ("nettle" ,nettle)))
  194. (home-page "https://lib.filezilla-project.org")
  195. (synopsis "Cross-platform C++ library used by Filezilla client")
  196. (description
  197. "This package provides some basic functionality to build high-performing,
  198. platform-independent programs.
  199. Some of the highlights include:
  200. @itemize
  201. @item
  202. A type-safe, multi-threaded event system that's simple to use yet efficient.
  203. @item
  204. Timers for periodic events.
  205. @item
  206. A @code{datetime} class that not only tracks timestamp but also their accuracy,
  207. which simplifies dealing with timestamps originating from different sources.
  208. @item
  209. Simple process handling for spawning child processes with redirected input and
  210. output.
  211. @end itemize\n")
  212. (license gpl2+)))
  213. (define-public filezilla
  214. (package
  215. (name "filezilla")
  216. (version "3.55.1")
  217. (source
  218. (origin
  219. (method url-fetch)
  220. (uri (string-append "https://download.filezilla-project.org/client/"
  221. "FileZilla_" version "_src.tar.bz2"))
  222. (sha256
  223. (base32 "19bnyx89jg0ll8a8mr4y8gp26gizs11ckgrwglh27zak3zhx1y37"))))
  224. (build-system gnu-build-system)
  225. (arguments
  226. ;; Don't let filezilla phone home to check for updates.
  227. '(#:configure-flags '("--disable-autoupdatecheck")))
  228. (native-inputs
  229. `(("cppunit" ,cppunit)
  230. ("gettext" ,gettext-minimal)
  231. ("pkg-config" ,pkg-config)
  232. ("xdg-utils" ,xdg-utils)))
  233. (inputs
  234. `(("dbus" ,dbus)
  235. ("gnutls" ,gnutls)
  236. ("gtk+" ,gtk+)
  237. ("libfilezilla" ,libfilezilla)
  238. ("libidn" ,libidn)
  239. ("nettle" ,nettle)
  240. ("pugixml" ,pugixml)
  241. ("sqlite" ,sqlite)
  242. ("wxwidgets" ,wxwidgets)))
  243. (home-page "https://filezilla-project.org")
  244. (synopsis "Full-featured graphical FTP/FTPS/SFTP client")
  245. (description
  246. "Filezilla client supports FTP, FTP over SSL/TLS (FTPS),
  247. SSH File Transfer Protocol (SFTP), HTTP/1.1, SOCKS5, FTP-Proxy, IPv6
  248. and others features such as bookmarks, drag and drop, filename filters,
  249. directory comparison and more.")
  250. (license gpl2+)
  251. (properties '((upstream-name . "FileZilla")))))
  252. (define-public vsftpd
  253. (package
  254. (name "vsftpd")
  255. (version "3.0.5")
  256. (source
  257. (origin
  258. (method url-fetch)
  259. (uri (string-append "https://security.appspot.com/downloads/"
  260. "vsftpd-" version ".tar.gz"))
  261. (sha256
  262. (base32 "1lwipiq8q9qzvwv6f418fbvagpz0p6v0jjplkvcsc2sb8np05di6"))))
  263. (build-system gnu-build-system)
  264. (arguments
  265. `(#:make-flags
  266. (list (string-append "CC=" ,(cc-for-target))
  267. ;; vsf_findlibs.sh looks only for hard-coded {/usr,}/lib file names
  268. ;; that will never exist on Guix. Manage libraries ourselves.
  269. "LDFLAGS=-lcap -lpam"
  270. "INSTALL=install -D")
  271. #:tests? #f ; no test suite
  272. #:phases
  273. (modify-phases %standard-phases
  274. (add-after 'unpack 'build-SSL
  275. (lambda _
  276. (substitute* "builddefs.h"
  277. (("#undef (VSF_BUILD_SSL)" _ symbol)
  278. (string-append "#define " symbol)))))
  279. (add-after 'unpack 'append-make-flags
  280. (lambda _
  281. (substitute* "Makefile"
  282. (("(CFLAGS|LDFLAGS)[[:blank:]]*=" _ variable)
  283. (format #f "UPSTREAM_~a +=" variable))
  284. (("\\$\\((CFLAGS|LDFLAGS)\\)" _ variable)
  285. (format #f "$(UPSTREAM_~a) $(~@*~a)" variable)))))
  286. (add-after 'unpack 'patch-installation-directory
  287. (lambda* (#:key outputs #:allow-other-keys)
  288. (substitute* "Makefile"
  289. (("/usr") (assoc-ref outputs "out")))))
  290. (delete 'configure)))) ; no configure script
  291. (inputs
  292. `(("libcap" ,libcap)
  293. ("linux-pam" ,linux-pam)
  294. ("openssl" ,openssl)))
  295. (synopsis "Small FTP server with a focus on security")
  296. (description
  297. "The Very Secure File Transfer Protocol Daemon or @command{vsftpd} is a
  298. server that listens on a TCP socket for clients and gives them access to local
  299. files via @acronym{FTP, the File Transfer Protocol}. Security is a goal; not a
  300. guarantee.")
  301. (home-page "https://security.appspot.com/vsftpd.html")
  302. (license gpl2))) ; with OpenSSL exception