Skip to content

Commit d7dec4f

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 #579 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1929891 13f79535-47bb-0310-9956-ffa450edef68
1 parent 99b02bf commit d7dec4f

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

test/travis_before_linux.sh

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,17 +163,29 @@ if test -v TEST_SSL; then
163163
popd
164164
fi
165165

166+
# Build the requested version of OpenSSL if it's not already installed
167+
# in the cached ~/root
166168
if test -v TEST_OPENSSL3; then
167-
# Build the requested version of OpenSSL if it's not already
168-
# installed in the cached ~/root
169+
# For a branch, rebuild if the remote branch has updated.
170+
if test -v TEST_OPENSSL3_BRANCH -a -f $HOME/root/openssl-is-${TEST_OPENSSL3}; then
171+
latest=`git ls-remote https://github.com/openssl/openssl refs/heads/${TEST_OPENSSL3_BRANCH} | cut -f1`
172+
: Got branch latest commit ${latest}
173+
if grep -q ^${latest} $HOME/root/openssl-is-${TEST_OPENSSL3}; then
174+
: Cached repos already at ${latest}
175+
else
176+
: Forcing rebuild
177+
rm -f $HOME/root/openssl-is-${TEST_OPENSSL3}
178+
fi
179+
fi
180+
169181
if ! test -f $HOME/root/openssl-is-${TEST_OPENSSL3}; then
170182
# Remove any previous install.
171183
rm -rf $HOME/root/openssl3
172184

173185
mkdir -p build/openssl
174186
pushd build/openssl
175187
if test -v TEST_OPENSSL3_BRANCH; then
176-
git clone -b $TEST_OPENSSL3_BRANCH -q https://github.com/openssl/openssl openssl-${TEST_OPENSSL3}
188+
git clone --depth=1 -b $TEST_OPENSSL3_BRANCH -q https://github.com/openssl/openssl openssl-${TEST_OPENSSL3}
177189
else
178190
curl -L "https://github.com/openssl/openssl/releases/download/openssl-${TEST_OPENSSL3}/openssl-${TEST_OPENSSL3}.tar.gz" |
179191
tar -xzf -
@@ -185,7 +197,12 @@ if test -v TEST_OPENSSL3; then
185197
'-Wl,-rpath=$(LIBRPATH)'
186198
make $MFLAGS
187199
make install_sw
188-
touch $HOME/root/openssl-is-${TEST_OPENSSL3}
200+
if test -d .git; then
201+
: Caching git commit hash:
202+
git rev-parse HEAD | tee $HOME/root/openssl-is-${TEST_OPENSSL3}
203+
else
204+
touch $HOME/root/openssl-is-${TEST_OPENSSL3}
205+
fi
189206
popd
190207
fi
191208

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)