[pacman-dev] [PATCH 2/3] makepkg: add support for the zst format

Eli Schwartz eschwartz at archlinux.org
Tue Aug 29 05:01:16 UTC 2017


Signed-off-by: Eli Schwartz <eschwartz at archlinux.org>
---

This shouldn't be added until we are sure pacman actually knows how to
read .zst files, which requires libarchive support that is currently
only in git master.

I have no idea when either libarchive or pacman plan to make a new
release. Though at least this isn't the default, and would require
explicit opt-in...

 doc/makepkg.conf.5.txt | 3 ++-
 etc/makepkg.conf.in    | 1 +
 scripts/makepkg.sh.in  | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/doc/makepkg.conf.5.txt b/doc/makepkg.conf.5.txt
index 5bd3472f..d01c13b6 100644
--- a/doc/makepkg.conf.5.txt
+++ b/doc/makepkg.conf.5.txt
@@ -246,6 +246,7 @@ Options
 **COMPRESSGZ=**"(gzip -c -f -n)"::
 **COMPRESSBZ2=**"(bzip2 -c -f)"::
 **COMPRESSXZ=**"(xz -c -z -)"::
+**COMPRESSZST=**"(zstd -c -z -)"::
 **COMPRESSLZO**"(lzop -q)"::
 **COMPRESSLRZ=**"(lrzip -q)"::
 **COMPRESSZ=**"(compress -c -f)"::
@@ -254,7 +255,7 @@ Options

 **PKGEXT=**".pkg.tar.gz", **SRCEXT=**".src.tar.gz"::
 	Sets the compression used when making compiled or source packages.
-	Valid suffixes are `.tar`, `.tar.gz`, `.tar.bz2`, `.tar.xz`,
+	Valid suffixes are `.tar`, `.tar.gz`, `.tar.bz2`, `.tar.xz`, `.tar.zst`,
 	`.tar.lzo`, `.tar.lrz`, and `.tar.Z`.
 	Do not touch these unless you know what you are doing.

diff --git a/etc/makepkg.conf.in b/etc/makepkg.conf.in
index 71293970..4787855c 100644
--- a/etc/makepkg.conf.in
+++ b/etc/makepkg.conf.in
@@ -126,6 +126,7 @@ PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
 COMPRESSGZ=(gzip -c -f -n)
 COMPRESSBZ2=(bzip2 -c -f)
 COMPRESSXZ=(xz -c -z -)
+COMPRESSXZ=(zstd -c -z -q -)
 COMPRESSLRZ=(lrzip -q)
 COMPRESSLZO=(lzop -q)
 COMPRESSZ=(compress -c -f)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index a5c216dd..d9b5ea2d 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -709,6 +709,7 @@ compress_as() {
 		*tar.gz)  ${COMPRESSGZ[@]:-gzip -c -f -n} ;;
 		*tar.bz2) ${COMPRESSBZ2[@]:-bzip2 -c -f} ;;
 		*tar.xz)  ${COMPRESSXZ[@]:-xz -c -z -} ;;
+		*tar.zst) ${COMPRESSZST[@]:-zstd -c -z -q -} ;;
 		*tar.lrz) ${COMPRESSLRZ[@]:-lrzip -q} ;;
 		*tar.lzo) ${COMPRESSLZO[@]:-lzop -q} ;;
 		*tar.Z)   ${COMPRESSZ[@]:-compress -c -f} ;;
--
2.14.1


More information about the pacman-dev mailing list