Skip to content

Commit 5de9ba7

Browse files
committed
integration/linux/build: Switch from curl to wget for bootstrap
Curl is annoying to get to retry on all network errors on all distros, whereas wget just does it by default.
1 parent 3739b5d commit 5de9ba7

File tree

35 files changed

+565
-493
lines changed

35 files changed

+565
-493
lines changed

integration/linux/build/Dockerfile-amazonlinux.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ RUN dnf install -y \
5858
zstd \
5959
&& dnf swap -y gnupg2-minimal gnupg2-full
6060

61+
# wget option defaults for bootstrap
62+
ENV WGET="wget --no-verbose --secure-protocol=TLSv1_2 --continue"
63+
6164
%%SCRIPTS%%
6265

6366
RUN set -ex \

integration/linux/build/Dockerfile-centos.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ RUN ulimit -n 1024 \
6464
RUN localedef -f UTF-8 -i en_US en_US.UTF-8
6565
%%ENDIF%%
6666

67+
# wget option defaults for bootstrap
68+
ENV WGET="wget --no-verbose --secure-protocol=TLSv1_2 --continue"
69+
6770
%%SCRIPTS%%
6871

6972
RUN set -ex \

integration/linux/build/Dockerfile-debian.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ RUN apt-get update \
2626
zstd \
2727
&& rm -rf /var/lib/apt/lists/*
2828

29+
# wget option defaults for bootstrap
30+
ENV WGET="wget --no-verbose --secure-protocol=TLSv1_2 --continue"
31+
2932
%%SCRIPTS%%
3033

3134
RUN set -ex \

integration/linux/build/Dockerfile-fedora.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ RUN dnf install -y \
5353
zlib-devel \
5454
zstd
5555

56+
# wget option defaults for bootstrap
57+
ENV WGET="wget --no-verbose --secure-protocol=TLSv1_2 --continue"
58+
5659
%%SCRIPTS%%
5760

5861
RUN set -ex \

integration/linux/build/Dockerfile-linux.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ RUN localedef -f UTF-8 -i en_US en_US.UTF-8
7474
# Needed to pick up SCL stuff from profile.d/
7575
SHELL ["/bin/bash", "--login", "-c"]
7676

77+
# wget option defaults for bootstrap
78+
ENV WGET="wget --no-verbose --secure-protocol=TLSv1_2 --continue"
79+
7780
%%SCRIPTS%%
7881

7982
ENV OPENSSL_VERSION 1.1.1w

integration/linux/build/Dockerfile-linuxmusl.template

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,16 @@ RUN apk add --no-cache \
3838
tar \
3939
tcl \
4040
util-linux-dev \
41+
wget \
4142
xz \
4243
xz-dev \
4344
yarn \
4445
zip \
4546
zstd
4647

48+
# wget option defaults for bootstrap
49+
ENV WGET="wget --no-verbose --secure-protocol=TLSv1_2 --continue"
50+
4751
%%SCRIPTS%%
4852

4953
RUN set -ex \

integration/linux/build/Dockerfile-rockylinux.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ RUN dnf install -y \
5757
zlib-devel \
5858
zstd
5959

60+
# wget option defaults for bootstrap
61+
ENV WGET="wget --no-verbose --secure-protocol=TLSv1_2 --continue"
62+
6063
%%SCRIPTS%%
6164

6265
RUN set -ex \

integration/linux/build/_bootstrap/cmake.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,21 @@ mkdir -p /usr/src/cmake
3232
cd /usr/src
3333

3434
_server="https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}"
35-
curl -fsSLO "${_server}/cmake-${CMAKE_VERSION}-SHA-256.txt"
36-
curl -fsSLO "${_server}/cmake-${CMAKE_VERSION}-SHA-256.txt.asc"
35+
$WGET "${_server}/cmake-${CMAKE_VERSION}-SHA-256.txt"
36+
$WGET "${_server}/cmake-${CMAKE_VERSION}-SHA-256.txt.asc"
3737

3838
gpg --batch --verify "cmake-${CMAKE_VERSION}-SHA-256.txt.asc" "cmake-${CMAKE_VERSION}-SHA-256.txt"
3939
rm -f "cmake-${CMAKE_VERSION}-SHA-256.txt.asc"
4040

4141
if [ -n "${CMAKE_ARCH}" ]; then
42-
curl -fsSLO "${_server}/cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}.tar.gz"
42+
$WGET "${_server}/cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}.tar.gz"
4343
grep " cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}.tar.gz\$" "cmake-${CMAKE_VERSION}-SHA-256.txt" | sha256sum -c -
4444
rm -f "cmake-${CMAKE_VERSION}-SHA-256.txt"
4545

4646
tar -xzf "cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}.tar.gz" -C /usr/local --strip-components=1 --no-same-owner
4747
rm -f "cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}.tar.gz"
4848
else
49-
curl -fsSLO "${_server}/cmake-${CMAKE_VERSION}.tar.gz"
49+
$WGET "${_server}/cmake-${CMAKE_VERSION}.tar.gz"
5050
grep " cmake-${CMAKE_VERSION}.tar.gz\$" "cmake-${CMAKE_VERSION}-SHA-256.txt" | sha256sum -c -
5151
rm -f "cmake-${CMAKE_VERSION}-SHA-256.txt"
5252

integration/linux/build/_bootstrap/git.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ fetch_keys "${GIT_KEYS[@]}"
1414
mkdir -p /usr/src/git
1515
cd /usr/src
1616

17-
curl -fsSLo git.tar.xz "https://www.kernel.org/pub/software/scm/git/git-${GIT_VERSION}.tar.xz"
18-
curl -fsSLo git.tar.sign "https://www.kernel.org/pub/software/scm/git/git-${GIT_VERSION}.tar.sign"
17+
$WGET -O git.tar.xz "https://www.kernel.org/pub/software/scm/git/git-${GIT_VERSION}.tar.xz"
18+
$WGET -O git.tar.sign "https://www.kernel.org/pub/software/scm/git/git-${GIT_VERSION}.tar.sign"
1919

2020
# gpg --batch --verify git.tar.sign git.tar.xz
2121
rm -f git.tar.sign

integration/linux/build/_bootstrap/gzip.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ fetch_keys "${GZIP_KEYS[@]}"
1414
mkdir -p /usr/src/gzip
1515
cd /usr/src
1616

17-
curl -fsSLo gzip.tar.gz "https://ftp.gnu.org/gnu/gzip/gzip-${GZIP_VERSION}.tar.gz"
18-
curl -fsSLo gzip.tar.gz.sign "https://ftp.gnu.org/gnu/gzip/gzip-${GZIP_VERSION}.tar.gz.sig"
17+
$WGET -O gzip.tar.gz "https://ftp.gnu.org/gnu/gzip/gzip-${GZIP_VERSION}.tar.gz"
18+
$WGET -O gzip.tar.gz.sign "https://ftp.gnu.org/gnu/gzip/gzip-${GZIP_VERSION}.tar.gz.sig"
1919

2020
gpg --batch --verify gzip.tar.gz.sign gzip.tar.gz
2121
rm -f gzip.tar.gz.sign

0 commit comments

Comments
 (0)