diff mbox series

scripts/rpm2cpio.sh: Use 'xz -dc' instead of xzcat

Message ID 20260615153944.112726-1-florin.diaconescu009@gmail.com
State Under Review
Headers show
Series scripts/rpm2cpio.sh: Use 'xz -dc' instead of xzcat | expand

Commit Message

Florin Diaconescu June 15, 2026, 3:39 p.m. UTC
rpm2cpio.sh calls xzcat to decompress,and xzcat is equivalent to:
xz --decompress --stdout (-d and -c, in short)

Since commit d1930f8, it is assumed that xz is provided, but 'xzcat'
used in rpm2cpio.sh is not listed in HOSTTOOLS. With it being only a
symlink, and with commit eb3ec74 replacing bzip2 with bunzip2 in a
similar way, this fixes the bin_package class for rpm without adding
xzcat to HOSTTOOLS.

Signed-off-by: Florin Diaconescu <florin.diaconescu009@gmail.com>
---
 scripts/rpm2cpio.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/scripts/rpm2cpio.sh b/scripts/rpm2cpio.sh
index 8199b43784..9343f70ea3 100755
--- a/scripts/rpm2cpio.sh
+++ b/scripts/rpm2cpio.sh
@@ -58,7 +58,7 @@  hdrsize=$rsize
 case "$(_dd $offset bs=2 count=1 | tr -d '\0')" in
 	"$(printf '\102\132')") _dd $offset | bunzip2 ;; # '\x42\x5a'
 	"$(printf '\037\213')") _dd $offset | gunzip  ;; # '\x1f\x8b'
-	"$(printf '\375\067')") _dd $offset | xzcat   ;; # '\xfd\x37'
+	"$(printf '\375\067')") _dd $offset | xz -dc  ;; # '\xfd\x37'
 	"$(printf '\135')") _dd $offset | unlzma      ;; # '\x5d\x00'
 	"$(printf '\050\265')") _dd $offset | unzstd  ;; # '\x28\xb5'
 	*) fatal "Unrecognized payload compression format in rpm file: $pkg" ;;