ftp.scm 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  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. ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
  10. ;;;
  11. ;;; This file is part of GNU Guix.
  12. ;;;
  13. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  14. ;;; under the terms of the GNU General Public License as published by
  15. ;;; the Free Software Foundation; either version 3 of the License, or (at
  16. ;;; your option) any later version.
  17. ;;;
  18. ;;; GNU Guix is distributed in the hope that it will be useful, but
  19. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  20. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. ;;; GNU General Public License for more details.
  22. ;;;
  23. ;;; You should have received a copy of the GNU General Public License
  24. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  25. (define-module (gnu packages ftp)
  26. #:use-module ((guix licenses) #:select (gpl2 gpl2+ gpl3+ clarified-artistic))
  27. #:use-module (guix build-system gnu)
  28. #:use-module (guix download)
  29. #:use-module (guix packages)
  30. #:use-module (guix utils)
  31. #:use-module (gnu packages)
  32. #:use-module (gnu packages autotools)
  33. #:use-module (gnu packages check)
  34. #:use-module (gnu packages compression)
  35. #:use-module (gnu packages freedesktop)
  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. (list pkg-config))
  68. (inputs
  69. (list zlib readline gnutls))
  70. (arguments
  71. `(#:phases
  72. (modify-phases %standard-phases
  73. ;; Disable tests that require network access, which is most of them.
  74. (add-before 'check 'disable-impure-tests
  75. (lambda _
  76. (substitute* "tests/Makefile"
  77. (("(ftp-cls-l|ftp-list|http-get)\\$\\(EXEEXT\\)") "")
  78. (("lftp-https-get ") ""))
  79. #t)))
  80. #:configure-flags
  81. (list (string-append "--with-readline="
  82. (assoc-ref %build-inputs "readline")))))
  83. (home-page "https://lftp.tech/")
  84. (synopsis "Command-line file transfer program")
  85. (description
  86. "LFTP is a sophisticated FTP/HTTP client, and a file transfer program
  87. supporting a number of network protocols. Like Bash, it has job control and
  88. uses the Readline library for input. It has bookmarks, a built-in mirror
  89. command, and can transfer several files in parallel. It was designed with
  90. reliability in mind.")
  91. (license gpl3+)))
  92. (define-public ncftp
  93. (package
  94. (name "ncftp")
  95. (version "3.2.6")
  96. (source (origin
  97. (method url-fetch)
  98. (uri (string-append "ftp://ftp.ncftp.com/ncftp/ncftp-"
  99. version "-src.tar.xz"))
  100. (sha256
  101. (base32
  102. "1389657cwgw5a3kljnqmhvfh4vr2gcr71dwz1mlhf22xq23hc82z"))
  103. (patches
  104. (search-patches
  105. "ncftp-reproducible.patch"))
  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. ;; This is free software, avoid any confusion.
  116. (substitute* (find-files "." "\\.c$")
  117. (("a freeware program")
  118. "free software"))
  119. #t))))
  120. (properties
  121. `((release-monitoring-url . "https://www.ncftp.com/download/")))
  122. (build-system gnu-build-system)
  123. (arguments
  124. '(#:phases
  125. (modify-phases %standard-phases
  126. (replace 'configure
  127. (lambda* (#:key outputs #:allow-other-keys)
  128. ;; This is an old 'configure' script that doesn't
  129. ;; understand variables passed as arguments.
  130. (let ((out (assoc-ref outputs "out")))
  131. (setenv "CONFIG_SHELL" (which "sh"))
  132. (setenv "SHELL" (which "sh"))
  133. (setenv "CFLAGS" "-fcommon")
  134. (invoke "./configure"
  135. (string-append "--prefix=" out))))))
  136. #:tests? #f)) ;there are no tests
  137. (inputs (list ncurses))
  138. (home-page "https://www.ncftp.com/ncftp/")
  139. (synopsis "Command-line File Transfer Protocol (FTP) client")
  140. (description
  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
  144. @code{ncftpget}.")
  145. (license clarified-artistic)))
  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. (list automake autoconf gettext-minimal))
  162. (home-page "https://weex.sourceforge.net/")
  163. (synopsis "Non-interactive client for FTP synchronization")
  164. (description
  165. "Weex is a utility designed to automate the task of remotely
  166. maintaining a web page or other FTP archive. It synchronizes a set of
  167. local files to a remote server by performing uploads and remote deletes
  168. as required.")
  169. (license gpl2+)))
  170. (define-public libfilezilla
  171. (package
  172. (name "libfilezilla")
  173. (version "0.39.2")
  174. (source
  175. (origin
  176. (method url-fetch)
  177. (uri (string-append "https://download.filezilla-project.org/"
  178. "libfilezilla/libfilezilla-" version ".tar.bz2"))
  179. (sha256
  180. (base32 "1x2rixppmvdpn9m01hmh3yqzpczxbkw301hx27n5bfq0dbnx9aar"))))
  181. (build-system gnu-build-system)
  182. (arguments
  183. `(#:configure-flags
  184. (list "--disable-static")))
  185. (native-inputs
  186. (list cppunit gettext-minimal pkg-config))
  187. (inputs
  188. (list gnutls nettle))
  189. (home-page "https://lib.filezilla-project.org")
  190. (synopsis "Cross-platform C++ library used by Filezilla client")
  191. (description
  192. "This package provides some basic functionality to build high-performing,
  193. platform-independent programs.
  194. Some of the highlights include:
  195. @itemize
  196. @item
  197. A type-safe, multi-threaded event system that's simple to use yet efficient.
  198. @item
  199. Timers for periodic events.
  200. @item
  201. A @code{datetime} class that not only tracks timestamp but also their accuracy,
  202. which simplifies dealing with timestamps originating from different sources.
  203. @item
  204. Simple process handling for spawning child processes with redirected input and
  205. output.
  206. @end itemize\n")
  207. (license gpl2+)))
  208. (define-public filezilla
  209. (package
  210. (name "filezilla")
  211. (version "3.62.2")
  212. (source
  213. (origin
  214. (method url-fetch)
  215. (uri (string-append "https://download.filezilla-project.org/client/"
  216. "FileZilla_" version "_src.tar.bz2"))
  217. (sha256
  218. (base32 "04lcffmvl1356iyc14pikq3z6jikj6qn0v0zd57lgsm0biihjrx7"))))
  219. (build-system gnu-build-system)
  220. (arguments
  221. ;; Don't let filezilla phone home to check for updates.
  222. '(#:configure-flags '("--disable-autoupdatecheck")))
  223. (native-inputs
  224. (list cppunit gettext-minimal pkg-config xdg-utils))
  225. (inputs
  226. (list dbus
  227. gnutls
  228. gtk+
  229. libfilezilla
  230. libidn
  231. nettle
  232. pugixml
  233. sqlite
  234. wxwidgets-3.0))
  235. (home-page "https://filezilla-project.org")
  236. (synopsis "Full-featured graphical FTP/FTPS/SFTP client")
  237. (description
  238. "Filezilla client supports FTP, FTP over SSL/TLS (FTPS),
  239. SSH File Transfer Protocol (SFTP), HTTP/1.1, SOCKS5, FTP-Proxy, IPv6
  240. and others features such as bookmarks, drag and drop, filename filters,
  241. directory comparison and more.")
  242. (license gpl2+)
  243. (properties '((upstream-name . "FileZilla")))))
  244. (define-public vsftpd
  245. (package
  246. (name "vsftpd")
  247. (version "3.0.5")
  248. (source
  249. (origin
  250. (method url-fetch)
  251. (uri (string-append "https://security.appspot.com/downloads/"
  252. "vsftpd-" version ".tar.gz"))
  253. (sha256
  254. (base32 "1lwipiq8q9qzvwv6f418fbvagpz0p6v0jjplkvcsc2sb8np05di6"))))
  255. (build-system gnu-build-system)
  256. (arguments
  257. `(#:make-flags
  258. (list (string-append "CC=" ,(cc-for-target))
  259. ;; vsf_findlibs.sh looks only for hard-coded {/usr,}/lib file names
  260. ;; that will never exist on Guix. Manage libraries ourselves.
  261. "LDFLAGS=-lcap -lpam"
  262. "INSTALL=install -D")
  263. #:tests? #f ; no test suite
  264. #:phases
  265. (modify-phases %standard-phases
  266. (add-after 'unpack 'build-SSL
  267. (lambda _
  268. (substitute* "builddefs.h"
  269. (("#undef (VSF_BUILD_SSL)" _ symbol)
  270. (string-append "#define " symbol)))))
  271. (add-after 'unpack 'append-make-flags
  272. (lambda _
  273. (substitute* "Makefile"
  274. (("(CFLAGS|LDFLAGS)[[:blank:]]*=" _ variable)
  275. (format #f "UPSTREAM_~a +=" variable))
  276. (("\\$\\((CFLAGS|LDFLAGS)\\)" _ variable)
  277. (format #f "$(UPSTREAM_~a) $(~@*~a)" variable)))))
  278. (add-after 'unpack 'patch-installation-directory
  279. (lambda* (#:key outputs #:allow-other-keys)
  280. (substitute* "Makefile"
  281. (("/usr") (assoc-ref outputs "out")))))
  282. (delete 'configure)))) ; no configure script
  283. (inputs
  284. (list libcap linux-pam openssl))
  285. (synopsis "Small FTP server with a focus on security")
  286. (description
  287. "The Very Secure File Transfer Protocol Daemon or @command{vsftpd} is a
  288. server that listens on a TCP socket for clients and gives them access to local
  289. files via @acronym{FTP, the File Transfer Protocol}. Security is a goal; not a
  290. guarantee.")
  291. (home-page "https://security.appspot.com/vsftpd.html")
  292. (license gpl2))) ; with OpenSSL exception