From cb4be97bdf1da6f1f4254b3b5976fb7efcae8f96 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Wed, 2 May 2018 15:55:04 +0200 Subject: [PATCH] Add various libressl & openssl versions to build tests. --- .travis.yml | 5 +++++ extras/build-tests/nix/select-config | 33 ++++++++++++++++++++-------- 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 31d7b5f57..fbf0194bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,4 +11,9 @@ env: - BUILDCONFIG="system-cares" - BUILDCONFIG="system-cares system-curl" - BUILDCONFIG="local-curl" + - BUILDCONFIG="libressl-25" + - BUILDCONFIG="libressl-26" - BUILDCONFIG="libressl-27" + - BUILDCONFIG="openssl-102" + - BUILDCONFIG="openssl-110" + - BUILDCONFIG="openssl-111" diff --git a/extras/build-tests/nix/select-config b/extras/build-tests/nix/select-config index e100e4c62..c42b6611e 100755 --- a/extras/build-tests/nix/select-config +++ b/extras/build-tests/nix/select-config @@ -4,6 +4,19 @@ # It is not meant to be used by end-users # +function build_ssl { + DIR="$2" + URL="$1/$2.tar.gz" + savewd="$PWD" + cd ~ + wget "$URL" || exit 1 + tar xzvf $DIR.tar.gz + cd "$DIR" + (./configure --prefix=$HOME/ssl && make -j2 && make install) || exit 1 + cd "$savewd" + echo "SSLDIR=$HOME/ssl" >>config.settings +} + if [ ! -d extras ]; then echo "This tool is supposed to be run from the source root, so ~/unrealircd-4.0.x or similar" exit 1 @@ -67,16 +80,18 @@ do fi echo 'REMOTEINC=1' >>config.settings echo "CURLDIR=`pwd`/extras/curl" >>config.settings + elif [ "$1" = "libressl-25" ]; then + build_ssl https://ftp.openbsd.org/pub/OpenBSD/LibreSSL libressl-2.5.5 + elif [ "$1" = "libressl-26" ]; then + build_ssl https://ftp.openbsd.org/pub/OpenBSD/LibreSSL libressl-2.6.4 elif [ "$1" = "libressl-27" ]; then - LIBREVER="2.7.2" - savewd="$PWD" - cd ~ - wget https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-$LIBREVER.tar.gz - tar xzvf libressl-$LIBREVER.tar.gz - cd libressl-$LIBREVER - (./configure --prefix=$HOME/libressl && make -j2 && make install) || exit 1 - cd "$savewd" - echo "SSLDIR=$HOME/libressl" >>config.settings + build_ssl https://ftp.openbsd.org/pub/OpenBSD/LibreSSL libressl-2.7.2 + elif [ "$1" = "openssl-102" ]; then + build_ssl https://www.openssl.org/source openssl-1.0.2o + elif [ "$1" = "openssl-110" ]; then + build_ssl https://www.openssl.org/source openssl-1.1.0h + elif [ "$1" = "openssl-111" ]; then + build_ssl https://www.openssl.org/source openssl-1.1.1-pre6 else echo "Unknown option $1" exit 1