From 93db46921d32b60116730d53509682da00d3c515 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Mon, 23 Feb 2026 11:50:48 +0000 Subject: [PATCH] CI: Add alternative path to build APR/APR-util releases from a tarball if TEST_APR_TARBALL is set. GitHub: part of #605 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1932005 13f79535-47bb-0310-9956-ffa450edef68 --- test/travis_before_linux.sh | 45 ++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/test/travis_before_linux.sh b/test/travis_before_linux.sh index 0b7892cea8..d35f61cf63 100755 --- a/test/travis_before_linux.sh +++ b/test/travis_before_linux.sh @@ -60,17 +60,22 @@ function install_apx() { local giturl=https://github.com/apache/${name}.git local config=$3 local buildconf=$4 - - case $version in - trunk|*.x) ref=refs/heads/${version} ;; - *) ref=refs/tags/${version} ;; - esac - - # Fetch the object ID (hash) of latest commit - local commit=`git ls-remote ${giturl} ${ref} | cut -f1` - if test -z "$commit"; then - : Could not determine latest commit hash for ${ref} in ${giturl} - check branch is valid? - exit 1 + local commit=tarball + + mkdir -p ${HOME}/build + + if ! test -v TEST_APR_TARBALL; then + case $version in + trunk|*.x) ref=refs/heads/${version} ;; + *) ref=refs/tags/${version} ;; + esac + + # Fetch the object ID (hash) of latest commit + commit=`git ls-remote ${giturl} ${ref} | cut -f1` + if test -z "$commit"; then + : Could not determine latest commit hash for ${ref} in ${giturl} - check branch is valid? + exit 1 + fi fi # Blow away the cached install root if the cached install is stale @@ -81,16 +86,24 @@ function install_apx() { return 0 fi - git init -q ${build} - pushd $build + if test -v TEST_APR_TARBALL; then + curl https://archive.apache.org/dist/apr/${name}-${version}.tar.gz > apx.tar.gz + tar -C ${HOME}/build -xzf apx.tar.gz + rm apx.tar.gz + pushd ${build} + else + git init -q ${build} + pushd $build # Clone and checkout the commit identified above. git remote add origin ${giturl} git fetch -q --depth=1 origin ${commit} git checkout ${commit} ./buildconf ${buildconf} - ./configure --prefix=${prefix} ${config} - make -j2 - make install + fi + + ./configure --prefix=${prefix} ${config} + make -j2 + make install popd echo ${version} ${commit} "${config}" "CC=${CC}" > ${HOME}/root/.key-${name} -- 2.47.3