summaryrefslogtreecommitdiffstats
path: root/abuild.in
diff options
context:
space:
mode:
authorTiago Ilieve <tiago.myhro@gmail.com>2018-10-28 12:34:02 +0000
committerCarlo Landmeter <clandmeter@alpinelinux.org>2018-11-08 10:27:47 +0000
commit0bfe4efa99eb52eb137b478b88d8b66853fabc80 (patch)
tree19e5cb636669c5ede67a84895aaf4cbb92fa8777 /abuild.in
parent100202920be59bb6841ccdd937c5f88c72266de3 (diff)
downloadabuild-0bfe4efa99eb52eb137b478b88d8b66853fabc80.tar.bz2
abuild-0bfe4efa99eb52eb137b478b88d8b66853fabc80.tar.xz
abuild.in: add multithreaded compression
The 'Compressing data' step takes a significant amount of time when packaging software with huge binaries, like Kubernetes. This can certainly be shortened using multithreaded compression, like 'pigz'.
Diffstat (limited to 'abuild.in')
-rw-r--r--abuild.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/abuild.in b/abuild.in
index b7921f1..a771b80 100644
--- a/abuild.in
+++ b/abuild.in
@@ -1451,6 +1451,7 @@ human_size() {
create_apks() {
local file= dir= name= ver= apk= datadir= size=
+ local gzip=$(command -v pigz || echo gzip)
getpkgver || return 1
if ! options_has "!tracedeps"; then
for file in "$pkgbasedir"/.control.*/.PKGINFO; do
@@ -1487,7 +1488,7 @@ create_apks() {
touch .dummy
set -- .dummy
fi
- tar --xattrs -f - -c "$@" | abuild-tar --hash | gzip -9 >"$dir"/data.tar.gz
+ tar --xattrs -f - -c "$@" | abuild-tar --hash | $gzip -9 >"$dir"/data.tar.gz
msg "Create checksum..."
# append the hash for data.tar.gz