From d812007b998db99cacf9ecc3e9d9f0beff75d1ad Mon Sep 17 00:00:00 2001 From: "vac (Brendan)" Date: Mon, 20 May 2024 19:12:40 +0800 Subject: [PATCH] kata-deploy: Fix unbound VERSION_ID VERSION_ID is not guaranteed to be specified in os-release, this makes kaka-deploy breaks in rolling distros like arch linux and void linux. Note that operating system vendors may choose not to provide version information, for example to accommodate for rolling releases. In this case, VERSION and VERSION_ID may be unset. Applications should not rely on these fields to be set. Signed-off-by: vac --- tools/packaging/kata-deploy/scripts/kata-deploy.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/packaging/kata-deploy/scripts/kata-deploy.sh b/tools/packaging/kata-deploy/scripts/kata-deploy.sh index 6b795b1c6e..6c5f661b85 100755 --- a/tools/packaging/kata-deploy/scripts/kata-deploy.sh +++ b/tools/packaging/kata-deploy/scripts/kata-deploy.sh @@ -250,6 +250,7 @@ function install_artifacts() { fi if grep -q "tdx" <<< "$shim"; then + VERSION_ID=version_unset # VERSION_ID may be unset, see https://www.freedesktop.org/software/systemd/man/latest/os-release.html#Notes source /host/etc/os-release || source /host/usr/lib/os-release case ${ID} in ubuntu)