[pacman-dev] [PATCH] makepkg: add lz4 compression support

Alex Butler alexheretic at gmail.com
Tue Sep 12 09:09:26 UTC 2017


Adds opt-in lz4 compression of *pkg.tar files with makepkg.
This is nice to have as an option for very fast compression.

Signed-off-by: Alex Butler <alexheretic at gmail.com>
---
 etc/makepkg.conf.in   | 1 +
 scripts/makepkg.sh.in | 1 +
 2 files changed, 2 insertions(+)

diff --git a/etc/makepkg.conf.in b/etc/makepkg.conf.in
index 71293970..827aa4fc 100644
--- a/etc/makepkg.conf.in
+++ b/etc/makepkg.conf.in
@@ -129,6 +129,7 @@ COMPRESSXZ=(xz -c -z -)
 COMPRESSLRZ=(lrzip -q)
 COMPRESSLZO=(lzop -q)
 COMPRESSZ=(compress -c -f)
+COMPRESSLZ4=(lz4 -q)
 
 #########################################################################
 # EXTENSION DEFAULTS
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 20e9dd7e..feefe027 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -759,6 +759,7 @@ create_package() {
 		*tar.lrz) ${COMPRESSLRZ[@]:-lrzip -q} ;;
 		*tar.lzo) ${COMPRESSLZO[@]:-lzop -q} ;;
 		*tar.Z)   ${COMPRESSZ[@]:-compress -c -f} ;;
+		*tar.lz4) ${COMPRESSLZ4[@]:-lz4 -q} ;;
 		*tar)     cat ;;
 		*) warning "$(gettext "'%s' is not a valid archive extension.")" \
 			"$PKGEXT"; cat ;;
-- 
2.14.1


More information about the pacman-dev mailing list