public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH 4/4] linux-mod.eclass: Fix xz compression options
Date: Thu, 28 Dec 2023 11:35:36 +0100	[thread overview]
Message-ID: <20231228103536.420981-4-mgorny@gentoo.org> (raw)
In-Reply-To: <20231228103536.420981-1-mgorny@gentoo.org>

Match xz compression options to the ones used by the kernel,
as the xz decoder used by the kernel supports only a subset of the xz
format.

Bug: https://bugs.gentoo.org/920837
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 eclass/linux-mod.eclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass
index 26d8cac47ef0..c71ace53aa00 100644
--- a/eclass/linux-mod.eclass
+++ b/eclass/linux-mod.eclass
@@ -689,7 +689,9 @@ linux-mod_src_install() {
 		# and similarly compress the module being built if != NONE.
 
 		if linux_chkconfig_present MODULE_COMPRESS_XZ; then
-			xz -T$(makeopts_jobs) --memlimit-compress=50% -q ${modulename}.${KV_OBJ} || die "Compressing ${modulename}.${KV_OBJ} with xz failed"
+			# match kernel compression options for compatibility
+			# https://bugs.gentoo.org/920837
+			xz -T$(makeopts_jobs) --memlimit-compress=50% -q --check=crc32 --lzma2=dict=1MiB ${modulename}.${KV_OBJ} || die "Compressing ${modulename}.${KV_OBJ} with xz failed"
 			doins ${modulename}.${KV_OBJ}.xz
 			KV_OBJ_COMPRESS_EXT=".xz"
 		elif linux_chkconfig_present MODULE_COMPRESS_GZIP; then
-- 
2.43.0



      parent reply	other threads:[~2023-12-28 10:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-28 10:35 [gentoo-dev] [PATCH 1/4] profiles/use.desc: Add global USE=modules-compress Michał Górny
2023-12-28 10:35 ` [gentoo-dev] [PATCH 2/4] kernel-{build,install}.eclass: Rename flag to modules-compress Michał Górny
2023-12-28 10:35 ` [gentoo-dev] [PATCH 3/4] linux-mod-r1.eclass: Add USE=modules-compress Michał Górny
2023-12-28 10:35 ` Michał Górny [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231228103536.420981-4-mgorny@gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox