mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-29 04:04:45 +00:00
virtiofsd: Pass the expected toolchain to the build container
Let's ensure we're building virtiofsd with a specific toolchain that's known to not cause any issues, instead of always using the latest one. On each bump of the virtiofsd, we'll make sure to adjust this according to what's been used by the virtiofsd community. Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
7ee00d8e57
commit
8c227e2471
@ -20,15 +20,18 @@ container_image="kata-virtiofsd-builder"
|
||||
kata_version="${kata_version:-}"
|
||||
virtiofsd_repo="${virtiofsd_repo:-}"
|
||||
virtiofsd_version="${virtiofsd_version:-}"
|
||||
virtiofsd_toolchain="${virtiofsd_toolchain:-}"
|
||||
virtiofsd_zip="${virtiofsd_zip:-}"
|
||||
package_output_dir="${package_output_dir:-}"
|
||||
|
||||
[ -n "${virtiofsd_repo}" ] || virtiofsd_repo=$(get_from_kata_deps "externals.virtiofsd.url")
|
||||
[ -n "${virtiofsd_version}" ] || virtiofsd_version=$(get_from_kata_deps "externals.virtiofsd.version")
|
||||
[ -n "${virtiofsd_toolchain}" ] || virtiofsd_toolchain=$(get_from_kata_deps "externals.virtiofsd.toolchain")
|
||||
[ -n "${virtiofsd_zip}" ] || virtiofsd_zip=$(get_from_kata_deps "externals.virtiofsd.meta.binary")
|
||||
|
||||
[ -n "${virtiofsd_repo}" ] || die "Failed to get virtiofsd repo"
|
||||
[ -n "${virtiofsd_version}" ] || die "Failed to get virtiofsd version or commit"
|
||||
[ -n "${virtiofsd_toolchain}" ] || die "Failed to get the rust toolchain to build virtiofsd"
|
||||
[ -n "${virtiofsd_zip}" ] || die "Failed to get virtiofsd binary URL"
|
||||
|
||||
ARCH=$(uname -m)
|
||||
@ -48,6 +51,7 @@ case ${ARCH} in
|
||||
esac
|
||||
|
||||
sudo docker build \
|
||||
--build-arg RUST_TOOLCHAIN="${virtiofsd_toolchain}" \
|
||||
-t "${container_image}" "${script_dir}/${libc}"
|
||||
|
||||
sudo docker run --rm -i -v "${repo_root_dir}:${repo_root_dir}" \
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
FROM ubuntu:20.04
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ARG RUST_TOOLCHAIN
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
RUN apt-get update && \
|
||||
@ -16,4 +17,4 @@ RUN apt-get update && \
|
||||
libseccomp-dev \
|
||||
unzip && \
|
||||
apt-get clean && rm -rf /var/lib/lists/ && \
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain ${RUST_TOOLCHAIN}
|
||||
|
@ -3,6 +3,7 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
FROM alpine:3.16.2
|
||||
ARG RUST_TOOLCHAIN
|
||||
|
||||
SHELL ["/bin/ash", "-o", "pipefail", "-c"]
|
||||
RUN apk --no-cache add \
|
||||
@ -13,4 +14,4 @@ RUN apk --no-cache add \
|
||||
libcap-ng-static \
|
||||
libseccomp-static \
|
||||
musl-dev && \
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain ${RUST_TOOLCHAIN}
|
||||
|
@ -291,6 +291,7 @@ externals:
|
||||
description: "vhost-user virtio-fs device backend written in Rust"
|
||||
url: "https://gitlab.com/virtio-fs/virtiofsd"
|
||||
version: "v1.3.0"
|
||||
toolchain: "1.62.0"
|
||||
meta:
|
||||
# From https://gitlab.com/virtio-fs/virtiofsd/-/releases/v1.3.0,
|
||||
# this is the link labelled virtiofsd-v1.3.0.zip
|
||||
|
Loading…
Reference in New Issue
Block a user