Skip to content

Commit 05fea04

Browse files
committed
CI: Try to fix ab failures during OpenSSL ech job, set RPATH via LDFLAGS
CI: For OpenSSL branch builds, always build a fresh version of the OpenSSL branch and cache the commit hash to allow checking for freshness. Also clone with --depth=1 to save time+bandwidth. Github: closes apache#579 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1929891 13f79535-47bb-0310-9956-ffa450edef68 (cherry picked from commit d7dec4f)
1 parent 3eaf20f commit 05fea04

2 files changed

Lines changed: 23 additions & 7 deletions

File tree

test/travis_before_linux.sh

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,17 +145,29 @@ if test -v TEST_SSL; then
145145
popd
146146
fi
147147

148+
# Build the requested version of OpenSSL if it's not already installed
149+
# in the cached ~/root
148150
if test -v TEST_OPENSSL3; then
149-
# Build the requested version of OpenSSL if it's not already
150-
# installed in the cached ~/root
151+
# For a branch, rebuild if the remote branch has updated.
152+
if test -v TEST_OPENSSL3_BRANCH -a -f $HOME/root/openssl-is-${TEST_OPENSSL3}; then
153+
latest=`git ls-remote https://github.com/openssl/openssl refs/heads/${TEST_OPENSSL3_BRANCH} | cut -f1`
154+
: Got branch latest commit ${latest}
155+
if grep -q ^${latest} $HOME/root/openssl-is-${TEST_OPENSSL3}; then
156+
: Cached repos already at ${latest}
157+
else
158+
: Forcing rebuild
159+
rm -f $HOME/root/openssl-is-${TEST_OPENSSL3}
160+
fi
161+
fi
162+
151163
if ! test -f $HOME/root/openssl-is-${TEST_OPENSSL3}; then
152164
# Remove any previous install.
153165
rm -rf $HOME/root/openssl3
154166

155167
mkdir -p build/openssl
156168
pushd build/openssl
157169
if test -v TEST_OPENSSL3_BRANCH; then
158-
git clone -b $TEST_OPENSSL3_BRANCH -q https://github.com/openssl/openssl openssl-${TEST_OPENSSL3}
170+
git clone --depth=1 -b $TEST_OPENSSL3_BRANCH -q https://github.com/openssl/openssl openssl-${TEST_OPENSSL3}
159171
else
160172
curl -L "https://github.com/openssl/openssl/releases/download/openssl-${TEST_OPENSSL3}/openssl-${TEST_OPENSSL3}.tar.gz" |
161173
tar -xzf -
@@ -167,7 +179,12 @@ if test -v TEST_OPENSSL3; then
167179
'-Wl,-rpath=$(LIBRPATH)'
168180
make $MFLAGS
169181
make install_sw
170-
touch $HOME/root/openssl-is-${TEST_OPENSSL3}
182+
if test -d .git; then
183+
: Caching git commit hash:
184+
git rev-parse HEAD | tee $HOME/root/openssl-is-${TEST_OPENSSL3}
185+
else
186+
touch $HOME/root/openssl-is-${TEST_OPENSSL3}
187+
fi
171188
popd
172189
fi
173190

test/travis_run_linux.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,9 @@ fi
6161

6262
if test -v TEST_OPENSSL3; then
6363
CONFIG="$CONFIG --with-ssl=$HOME/root/openssl3"
64-
# Temporarily set LD_RUN_PATH so that httpd/mod_ssl binaries pick
65-
# up the custom OpenSSL build
66-
export LD_RUN_PATH=$HOME/root/openssl3/lib:$HOME/root/openssl3/lib64
6764
export PATH=$HOME/root/openssl3/bin:$PATH
65+
# Force everything built to hard-code an RPATH
66+
export LDFLAGS="-Wl,-rpath,$HOME/root/openssl3/lib -Wl,-rpath,$HOME/root/openssl3/lib64"
6867
openssl version
6968
fi
7069

0 commit comments

Comments
 (0)