kata-containers/tools/packaging/static-build/scripts/qemu-build-post.sh
Fabiano Fidêncio d1f2852d8b tools: Stop building virtiofsd with qemu (for x86_64)
As we finally can move to using the rust virtiofs daemon, let's stop
bulding and packaging the C version of the virtiofsd for x86_64.

Fixes: #4249
Depends-on: github.com/kata-containers/tests#4785

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-05-16 09:30:24 +02:00

37 lines
848 B
Bash
Executable File

#!/usr/bin/env bash
#
# Copyright (c) 2020 Red Hat, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# This script process QEMU post-build.
#
set -e
script_dir="$(realpath $(dirname $0))"
source "${script_dir}/../qemu.blacklist"
if [[ -z "${QEMU_TARBALL}" || -z "${QEMU_DESTDIR}" ]]; then
echo "$0: needs QEMU_TARBALL and QEMU_DESTDIR exported"
exit 1
fi
pushd "${QEMU_DESTDIR}"
# Remove files to reduce the surface.
echo "INFO: remove uneeded files"
for pattern in ${qemu_black_list[@]}; do
find . -path "$pattern" | xargs rm -rfv
done
if [[ -n "${BUILD_SUFFIX}" ]]; then
echo "Rename binaries using $BUILD_SUFFIX"
find -name 'qemu-system-*' -exec mv {} {}-experimental \;
if [[ ${ARCH} != "x86_64" ]]; then
find -name 'virtiofsd' -exec mv {} {}-experimental \;
fi
fi
echo "INFO: create the tarball"
tar -czvf "${QEMU_TARBALL}" *
popd