Skip to content

Commit 11beeb9

Browse files
committed
Fix the buildx Dockerfile to use --strip-components=1 for aarch64
1 parent 0aecb26 commit 11beeb9

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

nightly-main/amazonlinux/2/buildx/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,9 @@ ARG SWIFT_WEBROOT=https://download.swift.org/development
3535
# Because of https://bugs.swift.org/browse/SR-14872 we need adjust tar options.
3636
FROM base AS base-amd64
3737
ARG OS_ARCH_SUFFIX=
38-
ARG ADDITIONAL_TAR_OPTIONS="--strip-components=1"
3938

4039
FROM base AS base-arm64
4140
ARG OS_ARCH_SUFFIX=-aarch64
42-
ARG ADDITIONAL_TAR_OPTIONS=
4341

4442
FROM base-$TARGETARCH AS final
4543

@@ -61,7 +59,7 @@ RUN set -e; \
6159
&& curl -fSsL https://swift.org/keys/all-keys.asc | gpg --import - \
6260
&& gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
6361
# - Unpack the toolchain, set libs permissions, and clean up.
64-
&& tar -xzf latest_toolchain.tar.gz --directory / ${ADDITIONAL_TAR_OPTIONS} \
62+
&& tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \
6563
&& chmod -R o+r /usr/lib/swift \
6664
&& rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
6765

nightly-main/ubuntu/20.04/buildx/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,9 @@ ARG SWIFT_WEBROOT=https://download.swift.org/development
3737
# Because of https://bugs.swift.org/browse/SR-14872 we need adjust tar options.
3838
FROM base AS base-amd64
3939
ARG OS_ARCH_SUFFIX=
40-
ARG ADDITIONAL_TAR_OPTIONS="--strip-components=1"
4140

4241
FROM base AS base-arm64
4342
ARG OS_ARCH_SUFFIX=-aarch64
44-
ARG ADDITIONAL_TAR_OPTIONS=
4543

4644
FROM base-$TARGETARCH AS final
4745

@@ -66,7 +64,7 @@ RUN set -e; \
6664
&& curl -fSsL https://swift.org/keys/all-keys.asc | gpg --import - \
6765
&& gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
6866
# - Unpack the toolchain, set libs permissions, and clean up.
69-
&& tar -xzf latest_toolchain.tar.gz --directory / ${ADDITIONAL_TAR_OPTIONS} \
67+
&& tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \
7068
&& chmod -R o+r /usr/lib/swift \
7169
&& rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
7270
&& apt-get purge --auto-remove -y curl

0 commit comments

Comments
 (0)