aboutsummaryrefslogtreecommitdiffstats
path: root/main/abuild
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@alpinelinux.org>2018-11-08 10:38:01 +0000
committerCarlo Landmeter <clandmeter@alpinelinux.org>2018-11-08 10:45:48 +0000
commitbd7dfffa42a4cb3b62deb42055e0492651ce587f (patch)
tree4024d399e1cecaf71dc4be26ccdd0bb29ec2727e /main/abuild
parent547142025a3ed969e8e80288dfa0540f8d672f12 (diff)
downloadaports-bd7dfffa42a4cb3b62deb42055e0492651ce587f.tar.bz2
aports-bd7dfffa42a4cb3b62deb42055e0492651ce587f.tar.xz
main/abuild: add multithreaded compression support
Diffstat (limited to 'main/abuild')
-rw-r--r--main/abuild/APKBUILD8
-rw-r--r--main/abuild/add-multithreaded-compression.patch33
2 files changed, 39 insertions, 2 deletions
diff --git a/main/abuild/APKBUILD b/main/abuild/APKBUILD
index fcd58a625a..e8cd1ba0f0 100644
--- a/main/abuild/APKBUILD
+++ b/main/abuild/APKBUILD
@@ -21,7 +21,10 @@ subpackages="apkbuild-cpan:cpan:noarch apkbuild-gem-resolver:gems:noarch
options="suid !check"
pkggroups="abuild"
source="https://dev.alpinelinux.org/archive/abuild/abuild-$_ver.tar.xz
- 0001-abuild-rmtemp-Do-not-follow-symbolic-links.patch"
+ 0001-abuild-rmtemp-Do-not-follow-symbolic-links.patch
+ add-multithreaded-compression.patch
+ "
+
builddir="$srcdir/$pkgname-$_ver"
prepare() {
@@ -68,4 +71,5 @@ _rootbld() {
}
sha512sums="5d3c2c04a7d6ede2c08b524423f9594ced42d4d67f10327996a38e0782fc2de1f8086187aa9a9072df5c1aced540bdcf1b8002b832df4cf2c6a56f6f89657aa7 abuild-3.3.0_pre1.tar.xz
-e2cefff3b9d460132a7ef90c5f8ddb309b748e2ef40157c31d3dc047b0516838d8c5a0fe51952e004252ad15a76c5758d61f8deb35a970a0841fec188f8d521d 0001-abuild-rmtemp-Do-not-follow-symbolic-links.patch"
+e2cefff3b9d460132a7ef90c5f8ddb309b748e2ef40157c31d3dc047b0516838d8c5a0fe51952e004252ad15a76c5758d61f8deb35a970a0841fec188f8d521d 0001-abuild-rmtemp-Do-not-follow-symbolic-links.patch
+933430cfa7f1e37eb3a1867fbf99581e6ae67be4d0a31c84d1a392ccf3ce95862a9b5a0a8cafd8b65edad46ef900bb6ca6a10666993c972b65fdd92b7c07f2d3 add-multithreaded-compression.patch"
diff --git a/main/abuild/add-multithreaded-compression.patch b/main/abuild/add-multithreaded-compression.patch
new file mode 100644
index 0000000000..a89a6bdb20
--- /dev/null
+++ b/main/abuild/add-multithreaded-compression.patch
@@ -0,0 +1,33 @@
+From 21b62c7675dc63d01b84eb7127227033389f35ae Mon Sep 17 00:00:00 2001
+From: Tiago Ilieve <tiago.myhro@gmail.com>
+Date: Sun, 28 Oct 2018 12:34:02 +0000
+Subject: [PATCH] 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'.
+---
+ abuild.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/abuild.in b/abuild.in
+index 42382e5..ec57104 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