Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use curl and not wget by default to avoid LetsEncrypt SSL handshake for freemarker and boot JDK downloads #2742

Merged
merged 1 commit into from
Oct 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions build-farm/platform-specific-configurations/linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ if [ ! -d "$(eval echo "\$$BOOT_JDK_VARIABLE")" ]; then
# make-adopt-build-farm.sh has 'set -e'. We need to disable that for
# the fallback mechanism, as downloading of the GA binary might fail.
set +e
wget -q -O - "${apiURL}" | tar xpzf - --strip-components=1 -C "$bootDir"
curl -L "${apiURL}" | tar xpzf - --strip-components=1 -C "$bootDir"
retVal=$?
set -e
if [ $retVal -ne 0 ]; then
Expand All @@ -151,7 +151,7 @@ if [ ! -d "$(eval echo "\$$BOOT_JDK_VARIABLE")" ]; then
apiURL=$(eval echo ${apiUrlTemplate})
echo "Attempting to download EA release of boot JDK version ${JDK_BOOT_VERSION} from ${apiURL}"
set +e
wget -q -O - "${apiURL}" | tar xpzf - --strip-components=1 -C "$bootDir"
curl -L "${apiURL}" | tar xpzf - --strip-components=1 -C "$bootDir"
retVal=$?
set -e
if [ $retVal -ne 0 ]; then
Expand All @@ -163,7 +163,7 @@ if [ ! -d "$(eval echo "\$$BOOT_JDK_VARIABLE")" ]; then
vendor="adoptopenjdk"
apiURL=$(eval echo ${apiUrlTemplate})
echo "Attempting to download GA release of boot JDK version ${JDK_BOOT_VERSION} from ${apiURL}"
wget -q -O - "${apiURL}" | tar xpzf - --strip-components=1 -C "$bootDir"
curl -L "${apiURL}" | tar xpzf - --strip-components=1 -C "$bootDir"
fi
fi
fi
Expand Down Expand Up @@ -222,7 +222,7 @@ if [ "${ARCHITECTURE}" == "riscv64" ] && [ "${NATIVE_API_ARCH}" != "riscv64" ];
rm -rf "$BUILDJDK"
mkdir "$BUILDJDK"
# TOFIX: Switch this back once Semeru has an API to pull the nightly builds.
wget -q -O - "https://api.adoptopenjdk.net/v3/binary/latest/${JAVA_FEATURE_VERSION}/ga/linux/${NATIVE_API_ARCH}/jdk/openj9/normal/adoptopenjdk" | tar xpzf - --strip-components=1 -C "$BUILDJDK"
curl -L "https://api.adoptopenjdk.net/v3/binary/latest/${JAVA_FEATURE_VERSION}/ga/linux/${NATIVE_API_ARCH}/jdk/openj9/normal/adoptopenjdk" | tar xpzf - --strip-components=1 -C "$BUILDJDK"
"$BUILDJDK/bin/java" -version 2>&1 | sed 's/^/CROSSBUILD JDK > /g' || exit 1
CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --with-build-jdk=$BUILDJDK --disable-ddr"
if [ -d /usr/local/openssl102 ]; then
Expand Down
4 changes: 2 additions & 2 deletions sbin/prepareWorkspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -408,11 +408,11 @@ checkingAndDownloadingFreemarker() {
#wget -nc --no-check-certificate "https://www.mirrorservice.org/sites/ftp.apache.org/freemarker/engine/${FREEMARKER_LIB_VERSION}/binaries/apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz"

wget "https://www.apache.org/dist/freemarker/engine/${FREEMARKER_LIB_VERSION}/binaries/apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz" ||
curl -o "apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz" "https://www.apache.org/dist/freemarker/engine/${FREEMARKER_LIB_VERSION}/binaries/apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz"
curl -L -o "apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz" "https://www.apache.org/dist/freemarker/engine/${FREEMARKER_LIB_VERSION}/binaries/apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz"

# Allow fallback to curl since wget fails cert check on macos - issue #1194
wget "https://www.apache.org/dist/freemarker/engine/${FREEMARKER_LIB_VERSION}/binaries/apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz.asc" ||
curl -o "apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz.asc" "https://www.apache.org/dist/freemarker/engine/${FREEMARKER_LIB_VERSION}/binaries/apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz.asc"
curl -L -o "apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz.asc" "https://www.apache.org/dist/freemarker/engine/${FREEMARKER_LIB_VERSION}/binaries/apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz.asc"

FREEMARKER_BUILD_INFO="https://www.apache.org/dist/freemarker/engine/${FREEMARKER_LIB_VERSION}/binaries/apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz"

Expand Down