commit: 44db9a32adb0632ae6ae77dd63c83c010387bb5d Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> AuthorDate: Thu Dec 28 05:04:14 2023 +0000 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> CommitDate: Thu Dec 28 06:29:00 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44db9a32
linux-mod-r1.eclass: use kernel compatible xz settings for >=kmod-31 When the non-default CONFIG_KERNEL_DECOMPRESS option is set in kernel >6.4, >=kmod-31 will let the kernel handle decompression rather than use xz-utils. ...but kernel XZ decompressor is more limited, so need to use the same options the kernel does. -T/--threads fortunately is harmless to keep on top. Note crc32 is already the default and main problem was dict size, but still specify in case someone has e.g. XZ_DEFAULTS="--check=sha256". Closes: https://bugs.gentoo.org/920837 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> eclass/linux-mod-r1.eclass | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass index 858fb0628070..44fc927c3a70 100644 --- a/eclass/linux-mod-r1.eclass +++ b/eclass/linux-mod-r1.eclass @@ -837,7 +837,14 @@ _modules_prepare_toolchain() { _modules_process_compress() { local -a compress if linux_chkconfig_present MODULE_COMPRESS_XZ; then - compress=(xz -qT"$(makeopts_jobs)" --memlimit-compress=50%) + compress=( + xz -q + --memlimit-compress=50% + --threads="$(makeopts_jobs)" + # match options from kernel's Makefile.modinst (bug #920837) + --check=crc32 + --lzma2=dict=1MiB + ) elif linux_chkconfig_present MODULE_COMPRESS_GZIP; then if type -P pigz &>/dev/null; then compress=(pigz -p"$(makeopts_jobs)")