Skip to content

Commit 2cc9f24

Browse files
authored
Use curl and not wget by default to avoid LetsEncrypt SSL handshake failures (#2742)
Signed-off-by: Stewart X Addison <[email protected]>
1 parent 0829acb commit 2cc9f24

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

build-farm/platform-specific-configurations/linux.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ if [ ! -d "$(eval echo "\$$BOOT_JDK_VARIABLE")" ]; then
137137
# make-adopt-build-farm.sh has 'set -e'. We need to disable that for
138138
# the fallback mechanism, as downloading of the GA binary might fail.
139139
set +e
140-
wget -q -O - "${apiURL}" | tar xpzf - --strip-components=1 -C "$bootDir"
140+
curl -L "${apiURL}" | tar xpzf - --strip-components=1 -C "$bootDir"
141141
retVal=$?
142142
set -e
143143
if [ $retVal -ne 0 ]; then
@@ -151,7 +151,7 @@ if [ ! -d "$(eval echo "\$$BOOT_JDK_VARIABLE")" ]; then
151151
apiURL=$(eval echo ${apiUrlTemplate})
152152
echo "Attempting to download EA release of boot JDK version ${JDK_BOOT_VERSION} from ${apiURL}"
153153
set +e
154-
wget -q -O - "${apiURL}" | tar xpzf - --strip-components=1 -C "$bootDir"
154+
curl -L "${apiURL}" | tar xpzf - --strip-components=1 -C "$bootDir"
155155
retVal=$?
156156
set -e
157157
if [ $retVal -ne 0 ]; then
@@ -163,7 +163,7 @@ if [ ! -d "$(eval echo "\$$BOOT_JDK_VARIABLE")" ]; then
163163
vendor="adoptopenjdk"
164164
apiURL=$(eval echo ${apiUrlTemplate})
165165
echo "Attempting to download GA release of boot JDK version ${JDK_BOOT_VERSION} from ${apiURL}"
166-
wget -q -O - "${apiURL}" | tar xpzf - --strip-components=1 -C "$bootDir"
166+
curl -L "${apiURL}" | tar xpzf - --strip-components=1 -C "$bootDir"
167167
fi
168168
fi
169169
fi
@@ -222,7 +222,7 @@ if [ "${ARCHITECTURE}" == "riscv64" ] && [ "${NATIVE_API_ARCH}" != "riscv64" ];
222222
rm -rf "$BUILDJDK"
223223
mkdir "$BUILDJDK"
224224
# TOFIX: Switch this back once Semeru has an API to pull the nightly builds.
225-
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"
225+
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"
226226
"$BUILDJDK/bin/java" -version 2>&1 | sed 's/^/CROSSBUILD JDK > /g' || exit 1
227227
CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --with-build-jdk=$BUILDJDK --disable-ddr"
228228
if [ -d /usr/local/openssl102 ]; then

sbin/prepareWorkspace.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -408,11 +408,11 @@ checkingAndDownloadingFreemarker() {
408408
#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"
409409

410410
wget "https://www.apache.org/dist/freemarker/engine/${FREEMARKER_LIB_VERSION}/binaries/apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz" ||
411-
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"
411+
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"
412412

413413
# Allow fallback to curl since wget fails cert check on macos - issue #1194
414414
wget "https://www.apache.org/dist/freemarker/engine/${FREEMARKER_LIB_VERSION}/binaries/apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz.asc" ||
415-
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"
415+
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"
416416

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

0 commit comments

Comments
 (0)