fixup! build: build NVRC from a pinned git ref

This commit is contained in:
Fabiano Fidêncio
2026-06-11 11:29:09 +02:00
parent c0af6781a0
commit 19113fa0f3
3 changed files with 11 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ RUN apt-get update && \
curl \
binutils \
gcc \
libc6-dev \
git \
make \
musl-tools && \

View File

@@ -17,6 +17,15 @@ source "${script_dir}/../../scripts/lib.sh"
[[ -n "${nvrc_repo}" ]] || die "failed to get nvrc repo"
# shellcheck disable=SC2154
[[ -n "${nvrc_ref}" ]] || die "failed to get nvrc git ref"
# shellcheck disable=SC2154
[[ -n "${nvrc_toolchain}" ]] || die "failed to get nvrc rust toolchain"
# The NVRC checkout lives inside the kata-containers tree, whose root carries a
# rust-toolchain.toml. rustup walks parent directories and would honour that pin
# (a different channel than the one baked into this builder image, which is the
# only toolchain with the musl target installed). Force our toolchain so the
# build is decoupled from kata's root pin and the musl std is always found.
export RUSTUP_TOOLCHAIN="${nvrc_toolchain}"
[[ -d "nvrc" ]] && rm -rf nvrc

View File

@@ -46,6 +46,7 @@ docker run --rm -i -v "${repo_root_dir}:${repo_root_dir}" \
--env DESTDIR="${DESTDIR}" \
--env nvrc_repo="${nvrc_repo}" \
--env nvrc_ref="${nvrc_ref}" \
--env nvrc_toolchain="${nvrc_toolchain}" \
--user "$(id -u)":"$(id -g)" \
"${container_image}" \
bash -c "${nvrc_builder}"