diff options
author | jingui.ren <jingui.ren@samsung.com> | 2018-10-24 16:17:08 +0800 |
---|---|---|
committer | jingui.ren <jingui.ren@samsung.com> | 2018-10-24 19:13:47 +0800 |
commit | 050eab62a8c016ba2449136462f9364c0023a8ea (patch) | |
tree | 133e8a44d66197071e252d9745c1ea7eb74a0d08 | |
parent | 51e7e57c5b62ac94cca644e58492924448ee7d71 (diff) | |
download | build-050eab62a8c016ba2449136462f9364c0023a8ea.tar.gz build-050eab62a8c016ba2449136462f9364c0023a8ea.tar.bz2 build-050eab62a8c016ba2449136462f9364c0023a8ea.zip |
speed up the download packages when use https
Change-Id: Ibd74db0b98d17f93eb37cc9ed555c533a9235297
-rwxr-xr-x | download | 9 | ||||
-rw-r--r-- | packaging/build.spec | 3 |
2 files changed, 6 insertions, 6 deletions
@@ -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 |