mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-07-27 17:26:29 +00:00
build(qemu): fix grep portability and document container-only rm -rf
Use 'CONFIG_VIRTIO_MEM=' prefix match instead of '\b' word boundary in grep -v: \b is a GNU extension not guaranteed by POSIX, making the ppc64le VIRTIO_MEM exclusion unreliable on non-GNU grep implementations. Add a comment on the rm -rf call to make clear this script always runs inside a dedicated build container, so deleting a relative path is safe. Assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
This commit is contained in:
@@ -26,6 +26,8 @@ HYPERVISOR_NAME="${HYPERVISOR_NAME:-}"
|
||||
PREFIX="${PREFIX:-}"
|
||||
PKGVERSION=${PKGVERSION:-}
|
||||
|
||||
# This script always runs inside a dedicated build container (see
|
||||
# static-build/qemu/Dockerfile), so rm -rf of a relative path is safe.
|
||||
rm -rf qemu
|
||||
git clone --depth=1 "${QEMU_REPO}" qemu
|
||||
pushd qemu
|
||||
@@ -85,7 +87,7 @@ elif [[ "${ARCH}" == "aarch64" ]]; then
|
||||
elif [[ "${ARCH}" == "ppc64le" ]]; then
|
||||
# VIRTIO_MEM depends on VIRTIO_MEM_SUPPORTED, which is only selected on
|
||||
# arm/i386/s390x — ppc64 PSeries does not support virtio-mem.
|
||||
_PPC64_DEVS=$(printf '%s' "${_COMMON_DEVS}" | grep -v 'VIRTIO_MEM\b')
|
||||
_PPC64_DEVS=$(printf '%s' "${_COMMON_DEVS}" | grep -v 'CONFIG_VIRTIO_MEM=')
|
||||
printf 'CONFIG_PSERIES=y\n%s\n' "${_PPC64_DEVS}" \
|
||||
>> configs/devices/ppc64-softmmu/default.mak
|
||||
unset _PPC64_DEVS
|
||||
|
||||
Reference in New Issue
Block a user