gnu: wget: Update to 1.19.2 [fixes CVE-2017-13089 and CVE-2017-13090].
[jackhill/guix/guix.git] / gnu / packages / wget.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
5 ;;;
6 ;;; This file is part of GNU Guix.
7 ;;;
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
12 ;;;
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
17 ;;;
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21 (define-module (gnu packages wget)
22 #:use-module (guix licenses)
23 #:use-module (gnu packages)
24 #:use-module (gnu packages compression)
25 #:use-module (gnu packages libidn)
26 #:use-module (gnu packages python)
27 #:use-module (gnu packages perl)
28 #:use-module (gnu packages web)
29 #:use-module (gnu packages pkg-config)
30 #:use-module (gnu packages tls)
31 #:use-module (guix packages)
32 #:use-module (guix download)
33 #:use-module (guix build-system gnu))
34
35 (define-public wget
36 (package
37 (name "wget")
38 (version "1.19.2")
39 (source
40 (origin
41 (method url-fetch)
42 (uri (string-append "mirror://gnu/wget/wget-"
43 version ".tar.lz"))
44 (sha256
45 (base32
46 "01yzal7xm85543x02bij3capnigr063d6c5vc039f8n5s9d796nm"))))
47 (build-system gnu-build-system)
48 (arguments
49 '(#:phases (modify-phases %standard-phases
50 (add-before 'check 'disable-https-tests
51 (lambda _
52 ;; XXX: Skip TLS tests, which fail with "The
53 ;; certificate's owner does not match hostname" as
54 ;; reported at:
55 ;; <https://lists.gnu.org/archive/html/bug-wget/2017-07/msg00012.html>.
56 ;; The problem appears to be due to a change in GnuTLS
57 ;; 3.5.12, whereby 'gnutls_x509_crt_check_hostname2' no
58 ;; longer matches IP address against the 'CN' or
59 ;; 'DNSname' fields of certificates.
60 (substitute* "testenv/Makefile"
61 (("SSL_TESTS=1") ""))
62 #t)))))
63 (inputs
64 `(("gnutls" ,gnutls)
65 ("libidn2" ,libidn2)
66 ("libpsl" ,libpsl)
67 ("lzip" ,lzip)))
68 (native-inputs
69 `(("pkg-config" ,pkg-config)
70 ("perl" ,perl)
71 ("python" ,python) ;for testenv suite
72 ("perl-http-daemon" ,perl-http-daemon)
73 ("perl-io-socket-ssl" ,perl-io-socket-ssl)))
74 (home-page "https://www.gnu.org/software/wget/")
75 (synopsis "Non-interactive command-line utility for downloading files")
76 (description
77 "GNU Wget is a non-interactive tool for fetching files using the HTTP,
78 HTTPS and FTP protocols. It can resume interrupted downloads, use file name
79 wild cards, supports proxies and cookies, and it can convert absolute links
80 in downloaded documents to relative links.")
81 (license gpl3+))) ; some files are under GPLv2+
82
83 (define-public wgetpaste
84 (package
85 (name "wgetpaste")
86 (version "2.28")
87 (source
88 (origin
89 (method url-fetch)
90 (uri (string-append "http://wgetpaste.zlin.dk/wgetpaste-"
91 version ".tar.bz2"))
92 (sha256
93 (base32
94 "1hh9svyypqcvdg5mjxyyfzpdzhylhf7s7xq5dzglnm4injx3i3ak"))))
95 (build-system gnu-build-system)
96 (arguments
97 '(#:phases
98 (modify-phases %standard-phases
99 (delete 'configure)
100 (delete 'build)
101 (replace 'install
102 (lambda* (#:key outputs #:allow-other-keys)
103 (let* ((out (assoc-ref outputs "out"))
104 (bin (string-append out "/bin"))
105 (zsh (string-append out "/share/zsh/site-functions")))
106 (install-file "wgetpaste" bin)
107 (install-file "_wgetpaste" zsh)))))
108 #:tests? #f)) ; no test target
109 (home-page "http://wgetpaste.zlin.dk/")
110 (synopsis "Script that automates pasting to a number of pastebin services")
111 (description
112 "@code{wgetpaste} is an extremely simple command-line interface to various
113 online pastebin services.")
114 (license public-domain)))