From: jingui.ren Date: Wed, 24 Oct 2018 08:17:08 +0000 (+0800) Subject: speed up the download packages when use https X-Git-Tag: accepted/tizen/devbase/tools/20190927.044855~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F51%2F191851%2F1;p=tools%2Fbuild.git speed up the download packages when use https Change-Id: Ibd74db0b98d17f93eb37cc9ed555c533a9235297 --- diff --git a/download b/download index a597e62..9297e30 100755 --- a/download +++ b/download @@ -20,9 +20,7 @@ # ################################################################ -use Net::SSL (); BEGIN { - $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0, unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build'); } @@ -45,7 +43,10 @@ my $dir = shift @ARGV; my $ua = LWP::UserAgent->new( agent => "openSUSE build script", - timeout => 42); + timeout => 42, + ssl_opts => { + verify_hostname => 1 +}); for my $url (@ARGV) { my $original = $url; @@ -87,7 +88,7 @@ for my $url (@ARGV) { $url = URI->new($url); } } - $ua->env_proxy if $url->scheme ne 'https'; + $ua->env_proxy if $url->scheme ne 'https'; my $dest = "$dir/".basename($url->path).".tmp"; unlink($dest); # just in case my $retry = 3; diff --git a/packaging/build.spec b/packaging/build.spec index 5f8a71d..c0c5ac1 100644 --- a/packaging/build.spec +++ b/packaging/build.spec @@ -42,11 +42,10 @@ Requires: binutils Requires: tar Requires: perl(LWP::Protocol::https) Requires: perl(LWP::UserAgent) -Requires: perl(Crypt::SSLeay) +Requires: perl(IO::Socket::SSL) Requires: perl(XML::Parser) Requires: perl(Archive::Tar) Requires: tizen-qemu-arm-static >= 2016.12.31 -Requires: perl-Crypt-SSLeay >= 0.64-tizen20130308 %if 0%{?fedora_version} || 0%{?suse_version} == 1220 || 0%{?centos_version} Requires: rpm-build