From cbaf17832edb9767a623034b7fe1dceb7b245854 Mon Sep 17 00:00:00 2001 From: Justin Kromlinger Date: Thu, 30 Jul 2020 17:55:36 +0200 Subject: [PATCH] Add the ability to adjust the thread count of xz, drop -e `xz --extreme` would only save us about 1MB but take ~50% longer. --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6bbf628..dfe2e9c 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,8 @@ DOCKER_IMAGE:=base BUILDDIR=build PWD=$(shell pwd) +XZ_THREADS ?= 0 + hooks: mkdir -p alpm-hooks/usr/share/libalpm/hooks find /usr/share/libalpm/hooks -exec ln -sf /dev/null $(PWD)/alpm-hooks{} \; @@ -30,8 +32,7 @@ rootfs: hooks archlinux.tar: rootfs compress-rootfs: archlinux.tar - xz -f archlinux.tar - xz -9e -T0 -f archlinux.tar + xz -9 -T"$(XZ_THREADS)" -f archlinux.tar docker-image: compress-rootfs docker build -t $(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE) .