utils: Fix Kata tar archive check

The static tar archive published on GitHub (now) contains `./` which is
being being flagged as an "unknown path" and resulting in the
`kata-manager.sh` script failing.

Partially fixes: #3674.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
James O. D. Hunt 2022-02-15 13:29:27 +00:00
parent f4d1e45c33
commit ae21fcc799

View File

@ -473,7 +473,7 @@ install_kata()
# Since we're unpacking to the root directory, perform a sanity check # Since we're unpacking to the root directory, perform a sanity check
# on the archive first. # on the archive first.
local unexpected=$(tar -tf "${file}" |\ local unexpected=$(tar -tf "${file}" |\
egrep -v "^(\./opt/$|\.${kata_install_dir}/)" || true) egrep -v "^(\./$|\./opt/$|\.${kata_install_dir}/)" || true)
[ -n "$unexpected" ] && die "File '$file' contains unexpected paths: '$unexpected'" [ -n "$unexpected" ] && die "File '$file' contains unexpected paths: '$unexpected'"