mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-15 05:49:05 +00:00
kata-deploy: tools: tests: Use zstd instead of xz
Although the compress ratio is not as optimal as using xz, it's way faster to compress / uncompress, and it's "good enough". This change is not small, but it's still self-contained, and has to get in at once, in order to help bisects in the future. Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
This commit is contained in:
committed by
Fabiano Fidêncio
parent
9cc97ad35c
commit
ad240a39e6
@@ -26,6 +26,7 @@ RUN apk update && apk add --no-cache \
|
||||
musl-dev \
|
||||
protoc \
|
||||
tar \
|
||||
xz
|
||||
xz \
|
||||
zstd
|
||||
# aarch64 requires this name -- link for all
|
||||
RUN ln -s /usr/bin/gcc "/usr/bin/$(uname -m)-linux-musl-gcc"
|
||||
|
@@ -11,6 +11,7 @@ RUN tdnf -y install \
|
||||
dnf \
|
||||
git \
|
||||
tar \
|
||||
xz
|
||||
xz \
|
||||
zstd
|
||||
|
||||
@INSTALL_RUST@
|
||||
|
@@ -33,7 +33,8 @@ RUN apt-get update && apt-get --no-install-recommends install -y \
|
||||
tar \
|
||||
vim \
|
||||
wget \
|
||||
xz-utils
|
||||
xz-utils \
|
||||
zstd
|
||||
# aarch64 requires this name -- link for all
|
||||
RUN ln -s /usr/bin/musl-gcc "/usr/bin/$(uname -m)-linux-musl-gcc"
|
||||
|
||||
|
@@ -123,7 +123,7 @@ setup_nvidia_gpu_rootfs_stage_one() {
|
||||
|
||||
# We need the kernel packages for building the drivers cleanly will be
|
||||
# deinstalled and removed from the roofs once the build finishes.
|
||||
tar -xvf "${BUILD_DIR}"/kata-static-kernel-nvidia-gpu"${appendix}"-headers.tar.xz -C .
|
||||
tar --zstd -xvf "${BUILD_DIR}"/kata-static-kernel-nvidia-gpu"${appendix}"-headers.tar.zst -C .
|
||||
|
||||
# If we find a local downloaded run file build the kernel modules
|
||||
# with it, otherwise use the distribution packages. Run files may have
|
||||
@@ -237,7 +237,7 @@ chisseled_gpudirect() {
|
||||
|
||||
chisseled_init() {
|
||||
echo "nvidia: chisseling init"
|
||||
tar xvf "${BUILD_DIR}"/kata-static-busybox.tar.xz -C .
|
||||
tar --zstd -xvf "${BUILD_DIR}"/kata-static-busybox.tar.zst -C .
|
||||
|
||||
mkdir -p dev etc proc run/cdi sys tmp usr var lib/modules lib/firmware \
|
||||
usr/share/nvidia lib/"${machine_arch}"-linux-gnu lib64 \
|
||||
|
@@ -190,7 +190,7 @@ AGENT_SOURCE_BIN Path to the directory of agent binary.
|
||||
AGENT_SOURCE_BIN and AGENT_TARBALL should never be used toghether.
|
||||
Default value: <not set>
|
||||
|
||||
AGENT_TARBALL Path to the kata-agent.tar.xz tarball to be unpacked inside the
|
||||
AGENT_TARBALL Path to the kata-agent.tar.zst tarball to be unpacked inside the
|
||||
rootfs.
|
||||
If set, this will take the priority and will be used instead of
|
||||
building the agent.
|
||||
@@ -205,7 +205,7 @@ ARCH Target architecture (according to \`uname -m\`).
|
||||
and glibc agents.
|
||||
Default value: $(uname -m)
|
||||
|
||||
COCO_GUEST_COMPONENTS_TARBALL Path to the kata-coco-guest-components.tar.xz tarball to be unpacked inside the
|
||||
COCO_GUEST_COMPONENTS_TARBALL Path to the kata-coco-guest-components.tar.zst tarball to be unpacked inside the
|
||||
rootfs.
|
||||
If set, the tarball will be unpacked onto the rootfs.
|
||||
Default value: <not set>
|
||||
@@ -234,7 +234,7 @@ KERNEL_MODULES_DIR Path to a directory containing kernel modules to include in
|
||||
LIBC libc the agent is built against (gnu or musl).
|
||||
Default value: ${LIBC} (varies with architecture)
|
||||
|
||||
PAUSE_IMAGE_TARBALL Path to the kata-static-pause-image.tar.xz tarball to be unpacked inside the
|
||||
PAUSE_IMAGE_TARBALL Path to the kata-static-pause-image.tar.zst tarball to be unpacked inside the
|
||||
rootfs.
|
||||
If set, the tarball will be unpacked onto the rootfs.
|
||||
Default value: <not set>
|
||||
@@ -756,7 +756,7 @@ EOF
|
||||
cp ${AGENT_SOURCE_BIN} ${AGENT_DEST}
|
||||
OK "cp ${AGENT_SOURCE_BIN} ${AGENT_DEST}"
|
||||
else
|
||||
tar xvJpf ${AGENT_TARBALL} -C ${ROOTFS_DIR}
|
||||
tar --zstd -xvf ${AGENT_TARBALL} -C ${ROOTFS_DIR}
|
||||
fi
|
||||
|
||||
${stripping_tool} ${ROOTFS_DIR}/usr/bin/kata-agent
|
||||
@@ -803,7 +803,7 @@ EOF
|
||||
|
||||
if [[ -n "${GUEST_HOOKS_TARBALL}" ]]; then
|
||||
info "Install the ${GUEST_HOOKS_TARBALL} guest hooks"
|
||||
tar xvJpf "${GUEST_HOOKS_TARBALL}" -C "${ROOTFS_DIR}"
|
||||
tar --zstd -xvf "${GUEST_HOOKS_TARBALL}" -C "${ROOTFS_DIR}"
|
||||
fi
|
||||
|
||||
info "Check init is installed"
|
||||
@@ -812,12 +812,12 @@ EOF
|
||||
|
||||
if [ -n "${PAUSE_IMAGE_TARBALL}" ] ; then
|
||||
info "Installing the pause image tarball"
|
||||
tar xvJpf ${PAUSE_IMAGE_TARBALL} -C ${ROOTFS_DIR}
|
||||
tar --zstd -xvf ${PAUSE_IMAGE_TARBALL} -C ${ROOTFS_DIR}
|
||||
fi
|
||||
|
||||
if [ -n "${COCO_GUEST_COMPONENTS_TARBALL}" ] ; then
|
||||
info "Installing the Confidential Containers guest components tarball"
|
||||
tar xvJpf ${COCO_GUEST_COMPONENTS_TARBALL} -C ${ROOTFS_DIR}
|
||||
tar --zstd -xvf ${COCO_GUEST_COMPONENTS_TARBALL} -C ${ROOTFS_DIR}
|
||||
fi
|
||||
|
||||
# Create an empty /etc/resolv.conf, to allow agent to bind mount container resolv.conf to Kata VM
|
||||
|
Reference in New Issue
Block a user