From 8ac485d881884764574c60a3c54c7f94308f222e Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 21 May 2018 19:07:53 +0800 Subject: build and test libre on travis (#4256) * build and test libre on travis * remove libressl jenkinsfile data --- .travis/install.sh | 25 +++++++++++++++++++------ .travis/run.sh | 3 +++ 2 files changed, 22 insertions(+), 6 deletions(-) (limited to '.travis') diff --git a/.travis/install.sh b/.travis/install.sh index 6698b5c9..2858d25d 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -3,6 +3,14 @@ set -e set -x +shlib_sed() { + # modify the shlib version to a unique one to make sure the dynamic + # linker doesn't load the system one. + sed -i "s/^SHLIB_MAJOR=.*/SHLIB_MAJOR=100/" Makefile + sed -i "s/^SHLIB_MINOR=.*/SHLIB_MINOR=0.0/" Makefile + sed -i "s/^SHLIB_VERSION_NUMBER=.*/SHLIB_VERSION_NUMBER=100.0.0/" Makefile +} + # download, compile, and install if it's not already present via travis # cache if [ -n "${OPENSSL}" ]; then @@ -12,15 +20,20 @@ if [ -n "${OPENSSL}" ]; then tar zxf "openssl-${OPENSSL}.tar.gz" cd "openssl-${OPENSSL}" ./config shared no-asm no-ssl2 no-ssl3 -fPIC --prefix="$HOME/$OPENSSL_DIR" - # modify the shlib version to a unique one to make sure the dynamic - # linker doesn't load the system one. This isn't required for 1.1.0 at the - # moment since our Travis builders have a diff shlib version, but it doesn't hurt - sed -i "s/^SHLIB_MAJOR=.*/SHLIB_MAJOR=100/" Makefile - sed -i "s/^SHLIB_MINOR=.*/SHLIB_MINOR=0.0/" Makefile - sed -i "s/^SHLIB_VERSION_NUMBER=.*/SHLIB_VERSION_NUMBER=100.0.0/" Makefile + shlib_sed make depend make install fi +elif [ -n "${LIBRESSL}" ]; then + LIBRESSL_DIR="ossl-1/${LIBRESSL}" + if [[ ! -f "$HOME/$LIBRESSL_DIR/bin/openssl" ]]; then + curl -O "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${LIBRESSL}.tar.gz" + tar zxf "libressl-${LIBRESSL}.tar.gz" + cd "libressl-${LIBRESSL}" + ./config -Wl -Wl,-Bsymbolic-functions -fPIC shared --prefix="$HOME/$LIBRESSL_DIR" + shlib_sed + make -j"$(nproc)" install + fi fi pip install virtualenv diff --git a/.travis/run.sh b/.travis/run.sh index ed237253..19f8c483 100755 --- a/.travis/run.sh +++ b/.travis/run.sh @@ -8,6 +8,9 @@ if [[ "${TOXENV}" == "pypy" ]]; then PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)" fi +if [ -n "${LIBRESSL}" ]; then + OPENSSL=$LIBRESSL +fi if [ -n "${OPENSSL}" ]; then OPENSSL_DIR="ossl-1/${OPENSSL}" -- cgit v1.2.3