[pacman-dev,v3,3/4] makepkg: add support for the zst format

Message ID 20171030181519.24501-3-eschwartz@archlinux.org
State Accepted, archived
Headers show
Series [pacman-dev,v3,1/4] libmakepkg: fix .gitignore to simply ignore all generated .sh files | expand

Commit Message

Eli Schwartz Oct. 30, 2017, 6:15 p.m. UTC
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
---

v3: fix typo

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

Comments

Allan McRae Dec. 7, 2017, 5:51 a.m. UTC | #1
On 31/10/17 04:15, Eli Schwartz wrote:
> Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
> ---

This and the repo-add patch look fine, but will not be pulled until
libarchive supporting these formats is released.

> 
> v3: fix typo
> 
>  doc/makepkg.conf.5.txt                 | 3 ++-
>  etc/makepkg.conf.in                    | 1 +
>  scripts/libmakepkg/util/compress.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)"::

There has got to be a better way than continuously extending this
variable list...

A
Eli Schwartz Sept. 4, 2018, 8:14 a.m. UTC | #2
On 12/7/17 12:51 AM, Allan McRae wrote:
> On 31/10/17 04:15, Eli Schwartz wrote:
>> Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
>> ---
> 
> This and the repo-add patch look fine, but will not be pulled until
> libarchive supporting these formats is released.

libarchive 3.3.3 is now released and in [testing] as of 45 minutes ago
so this is good to go!
Allan McRae Sept. 19, 2018, 8:16 a.m. UTC | #3
On 4/9/18 6:14 pm, Eli Schwartz wrote:
> On 12/7/17 12:51 AM, Allan McRae wrote:
>> On 31/10/17 04:15, Eli Schwartz wrote:
>>> Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
>>> ---
>>
>> This and the repo-add patch look fine, but will not be pulled until
>> libarchive supporting these formats is released.
> 
> libarchive 3.3.3 is now released and in [testing] as of 45 minutes ago
> so this is good to go!
> 

rebased and applied.

A

Patch

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..7782d0de 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 -)
+COMPRESSZST=(zstd -c -z -q -)
 COMPRESSLRZ=(lrzip -q)
 COMPRESSLZO=(lzop -q)
 COMPRESSZ=(compress -c -f)
diff --git a/scripts/libmakepkg/util/compress.sh.in b/scripts/libmakepkg/util/compress.sh.in
index 4e020e7f..b246197e 100644
--- a/scripts/libmakepkg/util/compress.sh.in
+++ b/scripts/libmakepkg/util/compress.sh.in
@@ -37,6 +37,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} ;;