[PATCH] CI: fix openssl download script

2020-04-07 Thread Илья Шипицин
Hello,

previous patch fixed builds for openssl-1.1.1f
however, links for download latest and previous releases are now different,
so I adopted script to handle older releases too.


Cheers,
Ilya Shipitcin
From c0023f9a7328980e7313c0f7ebfb6d355dab0ea9 Mon Sep 17 00:00:00 2001
From: Ilya Shipitsin 
Date: Tue, 7 Apr 2020 23:35:49 +0500
Subject: [PATCH] CI: adopt openssl download script to download all versions

with recent change, OpenSSL download URL was changed in
incompatiable way. i.e. only the most recent openssl version
might be downloaded using previous script.

older versions are available under different URLs. as we need
several openssl versions, let us adopt script accordingly.

bug was caught after travis-ci cache was purged for some reason.
---
 scripts/build-ssl.sh | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/scripts/build-ssl.sh b/scripts/build-ssl.sh
index 60b876c5d..e9d46bb76 100755
--- a/scripts/build-ssl.sh
+++ b/scripts/build-ssl.sh
@@ -3,8 +3,17 @@ set -eux
 
 download_openssl () {
 if [ ! -f "download-cache/openssl-${OPENSSL_VERSION}.tar.gz" ]; then
+
+#
+# OpenSSL has different links for latest and previous releases
+# since we want to download several versions, let us try to treat
+# current version as latest, if it fails, follow with previous
+# 
+
+	wget -P download-cache/ \
+	"https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz"; || \
 wget -P download-cache/ \
-"https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz";
+"https://www.openssl.org/source/old/${OPENSSL_VERSION%[a-z]}/openssl-${OPENSSL_VERSION}.tar.gz";
 fi
 }
 
-- 
2.25.1



Re: [PATCH] CI: fix openssl download script

2020-04-07 Thread William Lallemand
On Tue, Apr 07, 2020 at 11:38:23PM +0500, Илья Шипицин wrote:
> Hello,
> 
> previous patch fixed builds for openssl-1.1.1f
> however, links for download latest and previous releases are now different,
> so I adopted script to handle older releases too.
> 
> 
> Cheers,
> Ilya Shipitcin

> From c0023f9a7328980e7313c0f7ebfb6d355dab0ea9 Mon Sep 17 00:00:00 2001
> From: Ilya Shipitsin 
> Date: Tue, 7 Apr 2020 23:35:49 +0500
> Subject: [PATCH] CI: adopt openssl download script to download all versions
> 

Merged, thanks!


-- 
William Lallemand