From 53d752577a8902eed9b1bfb2c92d42b930186b24 Mon Sep 17 00:00:00 2001 From: zyy17 Date: Tue, 2 Jul 2024 11:21:51 +0800 Subject: [PATCH 1/3] ci: use 'vault.centos.org' as default yum for centos:7 image --- docker/dev-builder/centos/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/dev-builder/centos/Dockerfile b/docker/dev-builder/centos/Dockerfile index ded906fbede5..c43fe427da89 100644 --- a/docker/dev-builder/centos/Dockerfile +++ b/docker/dev-builder/centos/Dockerfile @@ -2,6 +2,10 @@ FROM centos:7 as builder ENV LANG en_US.utf8 +# Note: CentOS 7 has reached EOL since 2024-07-01 thus `mirror.centos.org` is no longer available and we need to use `vault.centos.org` instead. +RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo +RUN sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo + # Install dependencies RUN ulimit -n 1024000 && yum groupinstall -y 'Development Tools' RUN yum install -y epel-release \ From e72e0d304f3ef149aed5b5f99aee3982554ef6d5 Mon Sep 17 00:00:00 2001 From: zyy17 Date: Tue, 2 Jul 2024 12:17:05 +0800 Subject: [PATCH 2/3] ci: fix cargo-binstall version to adapt rust toolchain --- docker/dev-builder/centos/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/dev-builder/centos/Dockerfile b/docker/dev-builder/centos/Dockerfile index c43fe427da89..935f324dd279 100644 --- a/docker/dev-builder/centos/Dockerfile +++ b/docker/dev-builder/centos/Dockerfile @@ -30,5 +30,5 @@ ARG RUST_TOOLCHAIN RUN rustup toolchain install ${RUST_TOOLCHAIN} # Install nextest. -RUN cargo install cargo-binstall --locked +RUN cargo install cargo-binstall --version 1.6.6 --locked RUN cargo binstall cargo-nextest --no-confirm From 62e69f8b388429ad2ced4ce464fd59c9bfc54fcc Mon Sep 17 00:00:00 2001 From: zyy17 Date: Tue, 2 Jul 2024 14:23:03 +0800 Subject: [PATCH 3/3] ci: specify cargo-binstall version to adapt current rust toolchain --- docker/ci/centos/Dockerfile | 4 ++++ docker/dev-builder/centos/Dockerfile | 6 +++++- docker/dev-builder/ubuntu/Dockerfile | 5 ++++- docker/dev-builder/ubuntu/Dockerfile-18.10 | 5 ++++- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/docker/ci/centos/Dockerfile b/docker/ci/centos/Dockerfile index 1ca6f32acb3b..8cddcfc53963 100644 --- a/docker/ci/centos/Dockerfile +++ b/docker/ci/centos/Dockerfile @@ -1,5 +1,9 @@ FROM centos:7 +# Note: CentOS 7 has reached EOL since 2024-07-01 thus `mirror.centos.org` is no longer available and we need to use `vault.centos.org` instead. +RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo +RUN sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo + RUN yum install -y epel-release \ openssl \ openssl-devel \ diff --git a/docker/dev-builder/centos/Dockerfile b/docker/dev-builder/centos/Dockerfile index 935f324dd279..af7e778e03d4 100644 --- a/docker/dev-builder/centos/Dockerfile +++ b/docker/dev-builder/centos/Dockerfile @@ -29,6 +29,10 @@ ENV PATH /opt/rh/rh-python38/root/usr/bin:/usr/local/bin:/root/.cargo/bin/:$PATH ARG RUST_TOOLCHAIN RUN rustup toolchain install ${RUST_TOOLCHAIN} -# Install nextest. + +# Install cargo-binstall with a specific version to adapt the current rust toolchain. +# Note: if we use the latest version, we may encounter the following `use of unstable library feature 'io_error_downcast'` error. RUN cargo install cargo-binstall --version 1.6.6 --locked + +# Install nextest. RUN cargo binstall cargo-nextest --no-confirm diff --git a/docker/dev-builder/ubuntu/Dockerfile b/docker/dev-builder/ubuntu/Dockerfile index 1e0a902eea47..3f76d80eff2c 100644 --- a/docker/dev-builder/ubuntu/Dockerfile +++ b/docker/dev-builder/ubuntu/Dockerfile @@ -55,6 +55,9 @@ ENV PATH /root/.cargo/bin/:$PATH ARG RUST_TOOLCHAIN RUN rustup toolchain install ${RUST_TOOLCHAIN} +# Install cargo-binstall with a specific version to adapt the current rust toolchain. +# Note: if we use the latest version, we may encounter the following `use of unstable library feature 'io_error_downcast'` error. +RUN cargo install cargo-binstall --version 1.6.6 --locked + # Install nextest. -RUN cargo install cargo-binstall --locked RUN cargo binstall cargo-nextest --no-confirm diff --git a/docker/dev-builder/ubuntu/Dockerfile-18.10 b/docker/dev-builder/ubuntu/Dockerfile-18.10 index 73d99415ed35..1e3357be810b 100644 --- a/docker/dev-builder/ubuntu/Dockerfile-18.10 +++ b/docker/dev-builder/ubuntu/Dockerfile-18.10 @@ -43,6 +43,9 @@ ENV PATH /root/.cargo/bin/:$PATH ARG RUST_TOOLCHAIN RUN rustup toolchain install ${RUST_TOOLCHAIN} +# Install cargo-binstall with a specific version to adapt the current rust toolchain. +# Note: if we use the latest version, we may encounter the following `use of unstable library feature 'io_error_downcast'` error. +RUN cargo install cargo-binstall --version 1.6.6 --locked + # Install nextest. -RUN cargo install cargo-binstall --locked RUN cargo binstall cargo-nextest --no-confirm