From 8ccff780f49a24f01c44d31f4fe3bc1ea0a36d5c Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sat, 8 Jan 2022 23:29:23 +0100 Subject: [PATCH] support/download/helpers: use tar xzf in post_process_unpack() For now, the download post-process logic uses mk_tar_gz, which repacks a tarball compressed with gzip. So we can only accept as input a tarball also compressed with gzip. To enforce that, this commit changes post_process_unpack() to use tar xzf. This makes sure that if a tarball compressed with something else than gzip gets used, it will bail out and we will notice. Support for other compression schemes can be added later on. Signed-off-by: Thomas Petazzoni --- support/download/helpers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/download/helpers b/support/download/helpers index 4c5eb466cc..ab31e27a69 100755 --- a/support/download/helpers +++ b/support/download/helpers @@ -78,7 +78,7 @@ post_process_unpack() { local one_file mkdir "${dest}" - tar -C "${dest}" --strip-components=1 -xf "${tarball}" + tar -C "${dest}" --strip-components=1 -xzf "${tarball}" one_file="$(find "${dest}" -type f -print0 |LC_ALL=C sort -z |head -z -n1 |tr -d "\0")" touch -r "${one_file}" "${dest}.timestamp" }