speed up the download packages when use https 51/191851/1
authorjingui.ren <jingui.ren@samsung.com>
Wed, 24 Oct 2018 08:17:08 +0000 (16:17 +0800)
committerjingui.ren <jingui.ren@samsung.com>
Wed, 24 Oct 2018 09:21:53 +0000 (17:21 +0800)
Change-Id: Ibd74db0b98d17f93eb37cc9ed555c533a9235297

download
packaging/build.spec

index a597e62..9297e30 100755 (executable)
--- 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;
index 5f8a71d..c0c5ac1 100644 (file)
@@ -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