]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CI: adopt openssl download script to download all versions
authorIlya Shipitsin <chipitsine@gmail.com>
Tue, 7 Apr 2020 18:35:49 +0000 (23:35 +0500)
committerWilliam Lallemand <wlallemand@haproxy.org>
Tue, 7 Apr 2020 20:02:41 +0000 (22:02 +0200)
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

index 60b876c5db2bcc49e18f50b464d5705024008e6b..0940f3c2223f2e7da4e3ea3adb87cbbb537c7e6b 100755 (executable)
@@ -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
 }