mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-21 03:48:45 +00:00
kernel: Re-work get_tee_kernel()
00aadfe20a
introduced a regression on
`make cc-tdx-kernel-tarball` as we stopped passing all the needed
information to the `build-kernel.sh` script, leading to requiring `yq`
installed in the container used to build the kernel.
This commit partially reverts the faulty one, rewritting it in a way the
old behaviour is brought back, without changing the behaviour that was
added by the faulty commit.
Fixes: #5043
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
@@ -128,13 +128,12 @@ get_tee_kernel() {
|
||||
|
||||
[ -z "${kernel_url}" ] && kernel_url=$(get_from_kata_deps "assets.kernel.${tee}.url")
|
||||
|
||||
kernel_tarball="linux-${version}.tar.gz"
|
||||
tarball_name=$(get_from_kata_deps "assets.kernel.${tee}.tarball")
|
||||
[ -z "$tarball_name" ] || kernel_tarball="$tarball_name"
|
||||
local kernel_tarball="${version}.tar.gz"
|
||||
|
||||
if [ ! -f "${kernel_tarball}" ]; then
|
||||
curl --fail -OL "${kernel_url}/${kernel_tarball}"
|
||||
fi
|
||||
# Depending on where we're getting the terball from it may have a
|
||||
# different name, such as linux-${version}.tar.gz or simply
|
||||
# ${version}.tar.gz. Let's try both before failing.
|
||||
curl --fail -OL "${kernel_url}/linux-${kernel_tarball}" || curl --fail -OL "${kernel_url}/${kernel_tarball}"
|
||||
|
||||
mkdir -p ${kernel_path}
|
||||
tar --strip-components=1 -xf ${kernel_tarball} -C ${kernel_path}
|
||||
|
Reference in New Issue
Block a user