From 61f292fef46930f2da543e910a911db58f084578 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Fri, 3 Mar 2023 14:25:01 -0500 Subject: [PATCH] common/hooks/do-extract/00-distfiles.sh: support .tar.zst and .zst .tar.zst: bsdtar is built with support for it, so this shouldn't cause issues .zst: zstd isn't in base-chroot, so it will need to be specified explicitly --- common/hooks/do-extract/00-distfiles.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/common/hooks/do-extract/00-distfiles.sh b/common/hooks/do-extract/00-distfiles.sh index eba3ba04bbaf..07e987a6862b 100644 --- a/common/hooks/do-extract/00-distfiles.sh +++ b/common/hooks/do-extract/00-distfiles.sh @@ -56,9 +56,12 @@ hook() { *.tbz) cursufx="tbz";; *.tar.gz) cursufx="tgz";; *.tgz) cursufx="tgz";; + *.tar.zst) cursufx="tzst";; + *.tzst) cursufx="tzst";; *.gz) cursufx="gz";; *.xz) cursufx="xz";; *.bz2) cursufx="bz2";; + *.zst) cursufx="zst";; *.tar) cursufx="tar";; *.zip) cursufx="zip";; *.rpm) cursufx="rpm";; @@ -74,13 +77,13 @@ hook() { esac case ${cursufx} in - tar|txz|tbz|tlz|tgz|crate) + tar|txz|tbz|tlz|tgz|tzst|crate) $TAR_CMD -x --no-same-permissions --no-same-owner -f $srcdir/$curfile -C "$extractdir" if [ $? -ne 0 ]; then msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n" fi ;; - gz|bz2|xz) + gz|bz2|xz|zst) cp -f $srcdir/$curfile "$extractdir" cd "$extractdir" case ${cursufx} in @@ -90,9 +93,12 @@ hook() { bz2) bunzip2 -f $curfile ;; - *) + xz) unxz -f $curfile ;; + zst) + unzstd $curfile + ;; esac ;; zip)