diff --git a/debian13/Dockerfile b/debian13/Dockerfile index 77c9831..9899448 100644 --- a/debian13/Dockerfile +++ b/debian13/Dockerfile @@ -23,9 +23,9 @@ RUN sed -i 's|deb.debian.org|mirrors.ustc.edu.cn|g' /etc/apt/sources.list.d/debi RUN git config --global url."https://wangguofang.net/github.com/".insteadOf "https://github.com/" -RUN --mount=type=bind,from=sources,source=rust-1.99.1.tar.xz,target=/tmp/rust.tar.xz \ +RUN --mount=type=bind,from=sources,source=rust,target=/tmp/rust \ mkdir rust-src \ - && tar -xJf /tmp/rust.tar.xz -C rust-src --strip-components=1 \ + && tar -xJf "/tmp/rust/rust-1.99.1-$(uname -m)-unknown-linux-gnu.tar.xz" -C rust-src --strip-components=1 \ && rust-src/install.sh --prefix=/usr/local --without=rust-docs \ && rm -rf rust-src diff --git a/fetch-sources.sh b/fetch-sources.sh index da0a0cc..540adf8 100755 --- a/fetch-sources.sh +++ b/fetch-sources.sh @@ -135,16 +135,16 @@ fetch lz4-v1.10.0.tar.gz \ fetch arrow-apache-arrow-25.0.1.tar.gz \ https://wangguofang.net/github.com/apache/arrow/archive/apache-arrow-25.0.1.tar.gz # Rust ships one standalone tarball per architecture, named after `uname -m` (x86_64, aarch64). -# The Dockerfiles mount it under the architecture-neutral name rust-1.99.1.tar.xz (a hard link -# that is refreshed on every run, so switching architectures never leaves a stale archive). +# It lives in its own sources/rust/ directory, which the Dockerfiles mount as a whole and pick the +# archive from by architecture, so adding other sources never invalidates the Rust build layer. rust_triple="$(uname -m)-unknown-linux-gnu" -fetch "rust-1.99.1-$rust_triple.tar.xz" \ +mkdir -p rust +fetch "rust/rust-1.99.1-$rust_triple.tar.xz" \ "https://mirrors.cloud.tencent.com/rustup/dist/rust-1.99.1-$rust_triple.tar.xz" \ "https://mirrors.tuna.tsinghua.edu.cn/rustup/dist/2026-10-15/rust-1.99.1-$rust_triple.tar.xz" \ "https://repo.huaweicloud.com/rustup/dist/rust-1.99.1-$rust_triple.tar.xz" \ "https://mirrors.ustc.edu.cn/rust-static/dist/rust-1.99.1-$rust_triple.tar.xz" \ "https://static.rust-lang.org/dist/rust-1.99.1-$rust_triple.tar.xz" -ln -f "rust-1.99.1-$rust_triple.tar.xz" rust-1.99.1.tar.xz fetch duckdb-v1.5.6.tar.gz \ https://wangguofang.net/github.com/duckdb/duckdb/archive/v1.5.6.tar.gz fetch duckdb-ui-0628932f74b1e2e9eaf68a05b22d737455541dca.tar.gz \ diff --git a/rocky9/Dockerfile b/rocky9/Dockerfile index e4417bf..1e3e8b6 100644 --- a/rocky9/Dockerfile +++ b/rocky9/Dockerfile @@ -36,9 +36,9 @@ RUN dnf install --assumeyes --enablerepo=crb \ RUN git config --global url."https://wangguofang.net/github.com/".insteadOf "https://github.com/" -RUN --mount=type=bind,from=sources,source=rust-1.99.1.tar.xz,target=/tmp/rust.tar.xz \ +RUN --mount=type=bind,from=sources,source=rust,target=/tmp/rust \ mkdir rust-src \ - && tar -xJf /tmp/rust.tar.xz -C rust-src --strip-components=1 \ + && tar -xJf "/tmp/rust/rust-1.99.1-$(uname -m)-unknown-linux-gnu.tar.xz" -C rust-src --strip-components=1 \ && rust-src/install.sh --prefix=/usr/local --without=rust-docs \ && rm -rf rust-src