aboutsummaryrefslogtreecommitdiffstats
path: root/.travis
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2016-01-02 19:53:18 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2016-01-03 09:59:08 -0600
commitf3184d202190a5e6e1bcc7b6e2bddf29130be735 (patch)
treedb833bda2be987d486da176aa4b32e2543be8802 /.travis
parentad3020ef8b7a67d55e68405598a0f94678dffd6d (diff)
downloadcryptography-f3184d202190a5e6e1bcc7b6e2bddf29130be735.tar.gz
cryptography-f3184d202190a5e6e1bcc7b6e2bddf29130be735.tar.bz2
cryptography-f3184d202190a5e6e1bcc7b6e2bddf29130be735.zip
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..f04c2ff3 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 [ ! -z "$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 23b9e89e..c8707a4f 100755
--- a/.travis/run.sh
+++ b/.travis/run.sh
@@ -24,10 +24,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 [ ! -z "$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