mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-18 17:33:02 +00:00
Let's make sure the `qemu_suffix` and `qemu_tarball_name` can be specified. With this we make it really easy to reuse this script for any addition flavour of an experimental QEMU that ends up having to be built (specifically looking at the ones for Confidential Containers here). Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
32 lines
1009 B
Bash
Executable File
32 lines
1009 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Copyright (c) 2018 Intel Corporation
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
set -o errexit
|
|
set -o nounset
|
|
set -o pipefail
|
|
|
|
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
source "${script_dir}/../../scripts/lib.sh"
|
|
|
|
qemu_repo="${qemu_repo:-}"
|
|
qemu_version="${qemu_version:-}"
|
|
qemu_suffix="${qemu_suffix:-experimental}"
|
|
qemu_tarball_name="${qemu_tarball_name:-kata-static-qemu-experimental.tar.gz}"
|
|
|
|
if [ -z "$qemu_repo" ]; then
|
|
info "Get qemu information from runtime versions.yaml"
|
|
qemu_url=$(get_from_kata_deps "assets.hypervisor.qemu-experimental.url")
|
|
[ -n "$qemu_url" ] || die "failed to get qemu url"
|
|
qemu_repo="${qemu_url}.git"
|
|
fi
|
|
[ -n "$qemu_repo" ] || die "failed to get qemu repo"
|
|
|
|
[ -n "$qemu_version" ] || qemu_version=$(get_from_kata_deps "assets.hypervisor.qemu-experimental.version")
|
|
[ -n "$qemu_version" ] || die "failed to get qemu version"
|
|
|
|
"${script_dir}/build-base-qemu.sh" "${qemu_repo}" "${qemu_version}" "${qemu_suffix}" "${qemu_tarball_name}"
|