summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjingui.ren <jingui.ren@samsung.com>2018-10-24 16:17:08 +0800
committerjingui.ren <jingui.ren@samsung.com>2018-10-24 17:21:53 +0800
commit6c1605660ecd96517debb6107b35e8bed9b8404e (patch)
tree8dcdd904271e2d6ae224f947e83b0af9466df781
parentca7770959a280a3c0ac9c8fdf331ee4071ea5f93 (diff)
downloadbuild-6c1605660ecd96517debb6107b35e8bed9b8404e.tar.gz
build-6c1605660ecd96517debb6107b35e8bed9b8404e.tar.bz2
build-6c1605660ecd96517debb6107b35e8bed9b8404e.zip
speed up the download packages when use https
Change-Id: Ibd74db0b98d17f93eb37cc9ed555c533a9235297
-rwxr-xr-xdownload9
-rw-r--r--packaging/build.spec3
2 files changed, 6 insertions, 6 deletions
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