Skip to content

Commit

Permalink
Set RUSTUP_TOOLCHAIN explicitly to prevent Rust toolchain shenanigans
Browse files Browse the repository at this point in the history
  • Loading branch information
elprans committed Oct 17, 2024
1 parent ad94045 commit bdc4ef8
Show file tree
Hide file tree
Showing 23 changed files with 54 additions and 32 deletions.
7 changes: 4 additions & 3 deletions integration/linux/build/Dockerfile-centos.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ FROM ${DOCKER_ARCH}centos:%%PLACEHOLDER%%

ENTRYPOINT ["/entrypoint.sh"]

ENV PATH /usr/local/bin:/usr/local/cargo/bin:/usr/local/go/bin:$PATH
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib"

ENV LANG C

ENV PATH /usr/local/bin:/usr/local/cargo/bin:/usr/local/go/bin:$PATH
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib"
ENV RUSTUP_HOME /usr/local/rustup
ENV CARGO_HOME /usr/local/cargo
ENV RUSTUP_TOOLCHAIN stable

%%IF VARIANT=7%%
ENV OPENSSL_VERSION 1.1.1w
ENV PYTHON_LOCAL_OPENSSL 1
Expand Down
1 change: 1 addition & 0 deletions integration/linux/build/Dockerfile-debian.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ENV PATH /usr/local/bin:/usr/local/cargo/bin:/usr/local/go/bin:$PATH
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib"
ENV RUSTUP_HOME /usr/local/rustup
ENV CARGO_HOME /usr/local/cargo
ENV RUSTUP_TOOLCHAIN stable

RUN apt-get update \
&& apt-get dist-upgrade -y \
Expand Down
1 change: 1 addition & 0 deletions integration/linux/build/Dockerfile-fedora.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ENV PATH /usr/local/bin:/usr/local/cargo/bin:/usr/local/go/bin:$PATH
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib"
ENV RUSTUP_HOME /usr/local/rustup
ENV CARGO_HOME /usr/local/cargo
ENV RUSTUP_TOOLCHAIN stable

RUN echo precedence ::ffff:0:0/96 100 >> /etc/gai.conf \
&& dnf install -y \
Expand Down
1 change: 1 addition & 0 deletions integration/linux/build/Dockerfile-linux.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ENV PATH /usr/local/bin:/usr/local/cargo/bin:/usr/local/go/bin:$PATH
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib"
ENV RUSTUP_HOME /usr/local/rustup
ENV CARGO_HOME /usr/local/cargo
ENV RUSTUP_TOOLCHAIN stable

%%IF VARIANT=aarch64%%
ENV GCC_VERSION 10
Expand Down
5 changes: 3 additions & 2 deletions integration/linux/build/Dockerfile-linuxmusl.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ FROM ${DOCKER_ARCH}alpine:3.16

ENTRYPOINT ["/entrypoint.sh"]

ENV LANG C.UTF-8

ENV PATH /usr/local/bin:/usr/local/cargo/bin:/usr/local/go/bin:$PATH
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib"

ENV LANG C.UTF-8
ENV RUSTUP_HOME /usr/local/rustup
ENV CARGO_HOME /usr/local/cargo
ENV RUSTUP_TOOLCHAIN stable

RUN apk add --no-cache \
bash \
Expand Down
1 change: 1 addition & 0 deletions integration/linux/build/Dockerfile-rockylinux.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ENV PATH /usr/local/bin:/usr/local/cargo/bin:/usr/local/go/bin:$PATH
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib"
ENV RUSTUP_HOME /usr/local/rustup
ENV CARGO_HOME /usr/local/cargo
ENV RUSTUP_TOOLCHAIN stable

RUN echo precedence ::ffff:0:0/96 100 >> /etc/gai.conf \
&& dnf install --enablerepo=devel --enablerepo=crb -y \
Expand Down
2 changes: 1 addition & 1 deletion integration/linux/build/_bootstrap/rust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -ex

cd /usr/src
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- \
-y --no-modify-path --profile minimal \
-y --no-modify-path --profile default \
--default-toolchain "$RUST_VERSION"

chmod -R a+w "$RUSTUP_HOME" "$CARGO_HOME"
9 changes: 5 additions & 4 deletions integration/linux/build/centos-7/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions integration/linux/build/centos-8/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion integration/linux/build/debian-bookworm/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion integration/linux/build/debian-bullseye/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion integration/linux/build/debian-buster/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion integration/linux/build/fedora-40/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ENV PATH /usr/local/bin:/usr/local/cargo/bin:/usr/local/go/bin:$PATH
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib"
ENV RUSTUP_HOME /usr/local/rustup
ENV CARGO_HOME /usr/local/cargo
ENV RUSTUP_TOOLCHAIN stable

RUN echo precedence ::ffff:0:0/96 100 >> /etc/gai.conf \
&& dnf install -y \
Expand Down Expand Up @@ -568,7 +569,7 @@ set -ex\n\
\n\
cd /usr/src\n\
curl --proto '\''=https'\'' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- \\\n\
-y --no-modify-path --profile minimal \\\n\
-y --no-modify-path --profile default \\\n\
--default-toolchain "$RUST_VERSION"\n\
\n\
chmod -R a+w "$RUSTUP_HOME" "$CARGO_HOME"\n\' >/_bootstrap/rust.sh; chmod +x /_bootstrap/rust.sh
Expand Down
3 changes: 2 additions & 1 deletion integration/linux/build/linux-aarch64/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion integration/linux/build/linux-x86_64/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions integration/linux/build/linuxmusl-aarch64/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions integration/linux/build/linuxmusl-x86_64/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion integration/linux/build/rockylinux-9/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion integration/linux/build/ubuntu-bionic/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion integration/linux/build/ubuntu-focal/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion integration/linux/build/ubuntu-hirsute/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion integration/linux/build/ubuntu-jammy/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion integration/linux/build/ubuntu-noble/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bdc4ef8

Please sign in to comment.