From f493ddecac957a63e0ffb71febc2fcf454113aa3 Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Thu, 19 Jan 2023 00:40:12 +0000 Subject: Thu Jan 19 00:40:12 UTC 2023 a/kernel-firmware-20230117_7e4f0ed-noarch-1.txz: Upgraded. a/kernel-generic-6.1.7-x86_64-1.txz: Upgraded. a/kernel-huge-6.1.7-x86_64-1.txz: Upgraded. a/kernel-modules-6.1.7-x86_64-1.txz: Upgraded. a/pkgtools-15.1-noarch-3.txz: Rebuilt. installpkg: allow xz to use all the available CPU threads. makepkg: by default, allow xz to determine how many threads to use. However, on 32-bit platforms default to 2 threads since we were using this before. If allowed to decide, xz seems to only want to use a single thread on 32-bit. ap/nano-7.2-x86_64-1.txz: Upgraded. ap/sudo-1.9.12p2-x86_64-1.txz: Upgraded. This update fixes a flaw in sudo's -e option (aka sudoedit) that could allow a malicious user with sudoedit privileges to edit arbitrary files. For more information, see: https://www.cve.org/CVERecord?id=CVE-2023-22809 (* Security fix *) d/kernel-headers-6.1.7-x86-1.txz: Upgraded. k/kernel-source-6.1.7-noarch-1.txz: Upgraded. kde/plasma-wayland-protocols-1.10-x86_64-1.txz: Upgraded. isolinux/initrd.img: Rebuilt. kernels/*: Upgraded. usb-and-pxe-installers/usbboot.img: Rebuilt. --- source/a/pkgtools/scripts/installpkg | 8 ++++---- source/a/pkgtools/scripts/makepkg | 26 ++++++++++++++++---------- 2 files changed, 20 insertions(+), 14 deletions(-) (limited to 'source/a/pkgtools/scripts') diff --git a/source/a/pkgtools/scripts/installpkg b/source/a/pkgtools/scripts/installpkg index ee76cf134..64791afc6 100644 --- a/source/a/pkgtools/scripts/installpkg +++ b/source/a/pkgtools/scripts/installpkg @@ -268,8 +268,6 @@ while [ 0 ]; do elif [ "$1" = "-threads" -o "$1" = "--threads" ]; then THREADS="$2" shift 2 - # xz has not yet implemented multi-threaded decompression. - # Who knows if or how well it will work... XZ_THREADS_FORCED=yes elif [ "$1" = "-priority" -o "$1" = "--priority" ]; then if [ "$2" = "" ]; then @@ -365,7 +363,8 @@ if [ "$MODE" = "warn" ]; then if [ ! "$XZ_THREADS_FORCED" = "yes" ]; then packagecompression="xz --threads=${THREADS}" else - packagecompression="xz --threads=2" + # Let xz determine how many threads to use: + packagecompression="xz --threads=0" fi ;; esac @@ -453,7 +452,8 @@ for package in $* ; do if [ ! "$XZ_THREADS_FORCED" = "yes" ]; then packagecompression="xz --threads=${THREADS}" else - packagecompression="xz --threads=2" + # Let xz determine how many threads to use: + packagecompression="xz --threads=0" fi ;; esac diff --git a/source/a/pkgtools/scripts/makepkg b/source/a/pkgtools/scripts/makepkg index ddced779e..72746fa84 100644 --- a/source/a/pkgtools/scripts/makepkg +++ b/source/a/pkgtools/scripts/makepkg @@ -146,8 +146,6 @@ while [ 0 ]; do elif [ "$1" = "-threads" -o "$1" = "--threads" ]; then THREADS="$2" shift 2 - # xz has memory issues with threads it seems, so we'll use two threads by - # default unless we see that something else was user-selected: XZ_THREADS_FORCED=yes elif [ "$1" = "-compress" -o "$1" = "--compress" ]; then COMPRESS_OPTION="$2" @@ -253,10 +251,14 @@ elif [ ! "$(basename $PACKAGE_NAME .tar.lzma)" = "$PACKAGE_NAME" ]; then elif [ ! "$(basename $PACKAGE_NAME .txz)" = "$PACKAGE_NAME" ]; then EXTENSION="txz" if [ ! "$XZ_THREADS_FORCED" = "yes" ]; then - # Two threads by default with xz due to memory failures on 32-bit. Not that - # it matters much... if upstream ever gets around to implementing multi- - # threaded decompression we'll revisit this default. :-D - COMPRESSOR="xz ${COMPRESS_OPTION} --threads=2 -c" + # TODO: Add ARM 64-bit $ARCHes to this test: + if [ "$(uname -m)" = "x86_64" ]; then + # Allow xz to determine how many threads to use: + COMPRESSOR="xz ${COMPRESS_OPTION} --threads=0 -c" + else + # Default to 2 threads on 32-bit platforms: + COMPRESSOR="xz ${COMPRESS_OPTION} --threads=2 -c" + fi else COMPRESSOR="xz ${COMPRESS_OPTION} --threads=${THREADS} -c" fi @@ -267,10 +269,14 @@ elif [ ! "$(basename $PACKAGE_NAME .txz)" = "$PACKAGE_NAME" ]; then elif [ ! "$(basename $PACKAGE_NAME .tar.xz)" = "$PACKAGE_NAME" ]; then EXTENSION="tar.xz" if [ ! "$XZ_THREADS_FORCED" = "yes" ]; then - # Two threads by default with xz due to memory failures on 32-bit. Not that - # it matters much... if upstream ever gets around to implementing multi- - # threaded decompression we'll revisit this default. :-D - COMPRESSOR="xz ${COMPRESS_OPTION} --threads=2 -c" + # TODO: Add ARM 64-bit $ARCHes to this test: + if [ "$(uname -m)" = "x86_64" ]; then + # Allow xz to determine how many threads to use: + COMPRESSOR="xz ${COMPRESS_OPTION} --threads=0 -c" + else + # Default to 2 threads on 32-bit platforms: + COMPRESSOR="xz ${COMPRESS_OPTION} --threads=2 -c" + fi else COMPRESSOR="xz ${COMPRESS_OPTION} --threads=${THREADS} -c" fi -- cgit v1.2.3-65-gdbad