gnu: wget: Fix compilation with Perl 5.26; skip faulty tests.

* gnu/packages/wget.scm (wget)[arguments]: New field.
[source](patches): Add "wget-perl-5.26.patch".
* gnu/packages/patches/wget-perl-5.26.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
This commit is contained in:
Ludovic Courtès 2017-07-07 16:34:10 +02:00
parent c89e210788
commit 7f0980839e
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
3 changed files with 111 additions and 2 deletions

View File

@ -1028,6 +1028,7 @@ dist_patch_DATA = \
%D%/packages/patches/weechat-python.patch \
%D%/packages/patches/wget-CVE-2017-6508.patch \
%D%/packages/patches/wget-fix-504-test-timeout.patch \
%D%/packages/patches/wget-perl-5.26.patch \
%D%/packages/patches/wicd-bitrate-none-fix.patch \
%D%/packages/patches/wicd-get-selected-profile-fix.patch \
%D%/packages/patches/wicd-urwid-1.3.patch \

View File

@ -0,0 +1,96 @@
This upstream commit adjusts tests for Perl 5.26.
commit 7ffe93cabb181f39ad5091c31ab9f61bd940a55f
Author: Anton Yuzhaninov <citrin+github@citrin.ru>
Date: Wed Apr 5 19:06:42 2017 +0300
Fix perl warnings in tests
* tests/FTPServer.pm: Escape '{' in RE to fix warnings
* tests/FTPTest.pm: Likewise
* tests/HTTPServer.pm: Likewise
* tests/HTTPTest.pm: Likewise
* tests/Test-proxied-https-auth-keepalive.px: Likewise
* tests/Test-proxied-https-auth.px: Likewise
Escape '{' in RE to fix warnings:
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/{{ <-- HERE port}}/
diff --git a/tests/FTPServer.pm b/tests/FTPServer.pm
index a5185d66..cac80942 100644
--- a/tests/FTPServer.pm
+++ b/tests/FTPServer.pm
@@ -589,7 +589,7 @@ sub new
foreach my $file (keys %{$self->{_input}})
{
my $ref = \$self->{_input}{$file}{content};
- $$ref =~ s/{{port}}/$self->sockport/eg;
+ $$ref =~ s/\Q{{port}}/$self->sockport/eg;
}
return $self;
diff --git a/tests/FTPTest.pm b/tests/FTPTest.pm
index 50385ad0..0a1c768c 100644
--- a/tests/FTPTest.pm
+++ b/tests/FTPTest.pm
@@ -53,7 +53,7 @@ sub _substitute_port
{
my $self = shift;
my $ret = shift;
- $ret =~ s/{{port}}/$self->{_server}->sockport/eg;
+ $ret =~ s/\Q{{port}}/$self->{_server}->sockport/eg;
return $ret;
}
diff --git a/tests/HTTPServer.pm b/tests/HTTPServer.pm
index dd8ec043..78609f65 100644
--- a/tests/HTTPServer.pm
+++ b/tests/HTTPServer.pm
@@ -310,7 +310,7 @@ sub _substitute_port
{
my $self = shift;
my $ret = shift;
- $ret =~ s/{{port}}/$self->sockport/eg;
+ $ret =~ s/\Q{{port}}/$self->sockport/eg;
return $ret;
}
diff --git a/tests/HTTPTest.pm b/tests/HTTPTest.pm
index 00f079f8..6225c7f1 100644
--- a/tests/HTTPTest.pm
+++ b/tests/HTTPTest.pm
@@ -47,7 +47,7 @@ sub _substitute_port
{
my $self = shift;
my $ret = shift;
- $ret =~ s/{{port}}/$self->{_server}->sockport/eg;
+ $ret =~ s/\Q{{port}}/$self->{_server}->sockport/eg;
return $ret;
}
diff --git a/tests/Test-proxied-https-auth-keepalive.px b/tests/Test-proxied-https-auth-keepalive.px
index 049bebec..2a18ccfd 100755
--- a/tests/Test-proxied-https-auth-keepalive.px
+++ b/tests/Test-proxied-https-auth-keepalive.px
@@ -153,7 +153,7 @@ my $cmdline = $WgetTest::WGETPATH . " --user=fiddle-dee-dee"
. " --password=Dodgson -e https_proxy=localhost:{{port}}"
. " --no-check-certificate"
. " https://no.such.domain/needs-auth.txt";
-$cmdline =~ s/{{port}}/$SOCKET->sockport()/e;
+$cmdline =~ s/\Q{{port}}/$SOCKET->sockport()/e;
if (defined $srcdir) {
$VALGRIND_SUPP_FILE = $srcdir . '/valgrind-suppressions-ssl';
diff --git a/tests/Test-proxied-https-auth.px b/tests/Test-proxied-https-auth.px
index ce4e736c..878114e7 100755
--- a/tests/Test-proxied-https-auth.px
+++ b/tests/Test-proxied-https-auth.px
@@ -152,7 +152,7 @@ my $cmdline = $WgetTest::WGETPATH . " --user=fiddle-dee-dee"
. " --password=Dodgson -e https_proxy=localhost:{{port}}"
. " --no-check-certificate"
. " https://no.such.domain/needs-auth.txt";
-$cmdline =~ s/{{port}}/$SOCKET->sockport()/e;
+$cmdline =~ s/\Q{{port}}/$SOCKET->sockport()/e;
if (defined $srcdir) {
$VALGRIND_SUPP_FILE = $srcdir . '/valgrind-suppressions-ssl';

View File

@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
@ -41,11 +41,23 @@
(uri (string-append "mirror://gnu/wget/wget-"
version ".tar.xz"))
(patches (search-patches "wget-CVE-2017-6508.patch"
"wget-fix-504-test-timeout.patch"))
"wget-fix-504-test-timeout.patch"
"wget-perl-5.26.patch"))
(sha256
(base32
"1ljcfhbkdsd0zjfm520rbl1ai62fc34i7c45sfj244l8f6b0p58c"))))
(build-system gnu-build-system)
(arguments
'(#:phases (modify-phases %standard-phases
(add-before 'check 'disable-https-tests
(lambda _
;; XXX: Skip TLS tests, which fail with "The
;; certificate's owner does not match hostname" for
;; obscure reasons reported at:
;; <https://lists.gnu.org/archive/html/bug-wget/2017-06/msg00009.html>.
(substitute* "testenv/Makefile"
(("SSL_TESTS=1") ""))
#t)))))
(inputs
`(("gnutls" ,gnutls)
("libidn2" ,libidn2)