aboutsummaryrefslogtreecommitdiffstats
path: root/.travis
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2016-01-03 12:34:52 -0500
committerAlex Gaynor <alex.gaynor@gmail.com>2016-01-03 12:34:52 -0500
commitec804d817a97f3fc4bbfd4096336aa19c01c1574 (patch)
tree8eb257e64cc587cb8b3e9a2200b8d3cb772d3b8a /.travis
parent636f119a208a6bddb71b52a136f33f04b11c48ac (diff)
parent1e953ee8b4068dc25025082ab0f5bb13380727b1 (diff)
downloadcryptography-ec804d817a97f3fc4bbfd4096336aa19c01c1574.tar.gz
cryptography-ec804d817a97f3fc4bbfd4096336aa19c01c1574.tar.bz2
cryptography-ec804d817a97f3fc4bbfd4096336aa19c01c1574.zip
Merge pull request #2629 from reaperhulk/travis-refactor
refactor travis custom openssl code to work with other versions
Diffstat (limited to '.travis')
-rwxr-xr-x.travis/install.sh36
-rwxr-xr-x.travis/run.sh12
2 files changed, 24 insertions, 24 deletions
diff --git a/.travis/install.sh b/.travis/install.sh
index 0e5cdb48..a4f99be4 100755
--- a/.travis/install.sh
+++ b/.travis/install.sh
@@ -62,26 +62,22 @@ else
pyenv global pypy-4.0.1
fi
if [[ "${OPENSSL}" == "0.9.8" ]]; then
- # download, compile, and install if it's not already present via travis cache
- # This is 0.9.8l rather than zh because we have some branches for handling
- # < 0.9.8m that won't be exercised with a newer OpenSSL. (RHEL5 is 0.9.8e with
- # patches, but while that's in jenkins we don't get coverage data from it)
- if [[ ! -f "$HOME/ossl-098l/bin/openssl" ]]; then
- curl -O https://www.openssl.org/source/openssl-0.9.8l.tar.gz
- tar zxf openssl-0.9.8l.tar.gz
- cd openssl-0.9.8l
- echo "OPENSSL_0.9.8L_CUSTOM {
- global:
- *;
- };" > openssl.ld
- ./config no-asm no-ssl2 -Wl,--version-script=openssl.ld -Wl,-Bsymbolic-functions -fPIC shared --prefix=$HOME/ossl-098l
- make depend
- make install
- fi
- export PATH="$HOME/ossl-098l/bin:$PATH"
- export CFLAGS="-I$HOME/ossl-098l/include"
- export LDFLAGS="-L$HOME/ossl-098l/lib"
- export LD_LIBRARY_PATH="$HOME/ossl-098l/lib"
+ # We use 0.9.8l rather than zh because we have some branches for handling
+ # < 0.9.8m that won't be exercised with a newer OpenSSL. (RHEL5 is 0.9.8e with
+ # patches, but while that's in jenkins we don't get coverage data from it).
+ OPENSSL_VERSION_NUMBER="0.9.8l"
+ OPENSSL_DIR="ossl-098l"
+ fi
+ # download, compile, and install if it's not already present via travis cache
+ if [ -n "$OPENSSL_DIR" ]; then
+ if [[ ! -f "$HOME/$OPENSSL_DIR/bin/openssl" ]]; then
+ curl -O https://www.openssl.org/source/openssl-$OPENSSL_VERSION_NUMBER.tar.gz
+ tar zxf openssl-$OPENSSL_VERSION_NUMBER.tar.gz
+ cd openssl-$OPENSSL_VERSION_NUMBER
+ ./config shared no-asm no-ssl2 -fPIC --prefix=$HOME/$OPENSSL_DIR
+ make depend
+ make install
+ fi
fi
pip install virtualenv
fi
diff --git a/.travis/run.sh b/.travis/run.sh
index 93dac33f..5470c828 100755
--- a/.travis/run.sh
+++ b/.travis/run.sh
@@ -27,10 +27,14 @@ else
eval "$(pyenv init -)"
fi
if [[ "${OPENSSL}" == "0.9.8" ]]; then
- export PATH="$HOME/ossl-098l/bin:$PATH"
- export CFLAGS="-I$HOME/ossl-098l/include"
- export LDFLAGS="-L$HOME/ossl-098l/lib"
- export LD_LIBRARY_PATH="$HOME/ossl-098l/lib"
+ OPENSSL_DIR="ossl-098l"
+ fi
+
+ if [ -n "$OPENSSL_DIR" ]; then
+ export PATH="$HOME/$OPENSSL_DIR/bin:$PATH"
+ export CFLAGS="-I$HOME/$OPENSSL_DIR/include"
+ # rpath on linux will cause it to use an absolute path so we don't need to do LD_LIBRARY_PATH
+ export LDFLAGS="-L$HOME/$OPENSSL_DIR/lib -Wl,-rpath=$HOME/$OPENSSL_DIR/lib"
fi
fi
source ~/.venv/bin/activate