From 70b4c6b4c9162eab9be53168e1d6342717fbcc71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Van=C4=9Bk?= Date: Mon, 25 May 2020 22:13:18 +0200 Subject: [PATCH] [pkg] fix: optimize compression operations This tries to use threaded programs for auxilliary compressions and decompressions. Replacing xz should have the largest impact - not only it is now threaded, but the compression level is also dropped sigificantly. Fixes https://github.com/ev3dev-lang-java/openjdk-ev3/issues/59 --- packaging/Dockerfile | 3 ++- packaging/package.sh | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packaging/Dockerfile b/packaging/Dockerfile index 9c98547..83e4675 100644 --- a/packaging/Dockerfile +++ b/packaging/Dockerfile @@ -13,7 +13,8 @@ RUN apt-get -qq update && \ devscripts debhelper fakeroot \ zip unzip \ gnupg dctrl-tools dput \ - liblcms2-2 + liblcms2-2 \ + pigz xz-utils # prepare a nonroot user COPY compiler.sudoers /etc/sudoers.d/compiler diff --git a/packaging/package.sh b/packaging/package.sh index 117a227..c400e25 100755 --- a/packaging/package.sh +++ b/packaging/package.sh @@ -53,9 +53,9 @@ PKGDIR="/build/pkg/$PKGNAME" rm -rf "/build/pkg" mkdir "/build/pkg" cd "/build/pkg" -tar -xf "/build/jri-${DEB_JRI_PLATFORM}.tar.gz" -C "/build/pkg" +tar -x -I 'pigz' -f "/build/jri-${DEB_JRI_PLATFORM}.tar.gz" -C "/build/pkg" mv "/build/pkg/jri" "$PKGDIR" -tar -cJf "$PKGDIR.orig.tar.xz" "$PKGNAME" +tar -c -I 'xz -T0 -1' -f "$PKGDIR.orig.tar.xz" "$PKGNAME" cp -rf /opt/jdkpkg/debian "$PKGDIR" cd "$PKGDIR"