public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Eric Chanudet <echanude@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/kmod] rawhide: weak-modules: add support for zstd compression for initramfs
Date: Wed, 28 Oct 2026 19:35:39 GMT [thread overview]
Message-ID: <179321613949.1.207442715319910775.rpms-kmod-0b8a2ceefb1d@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/kmod
Branch : rawhide
Commit : 0b8a2ceefb1d6ed03cca452043d502d6ad849cab
Author : Eric Chanudet <echanude@redhat.com>
Date : 2026-08-12T17:54:07-04:00
Stats : +7/-9 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/kmod/c/0b8a2ceefb1d6ed03cca452043d502d6ad849cab?branch=rawhide
Log:
weak-modules: add support for zstd compression for initramfs
* weak-modules (decompress_initramfs): Rewrite decompressing
of initramfs into a loop that iterates over different compression
programs, include zstd in the list.
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
[forward port from centos-stream:
9c37c7f5d405 ("weak-modules: add support for zstd compression for initramfs")]
Signed-off-by: Eric Chanudet <echanude@redhat.com>
---
diff --git a/weak-modules b/weak-modules
index 76523a7..624c38f 100644
--- a/weak-modules
+++ b/weak-modules
@@ -129,6 +129,7 @@ read_modules_list() {
decompress_initramfs() {
local input=$1
local output=$2
+ local zcmd
# First, check if this is compressed at all
if cpio -i -t < "$input" > /dev/null 2>/dev/null; then
@@ -146,15 +147,12 @@ decompress_initramfs() {
return 0
fi
- # Try gzip
- if gzip -cd < "$input" > "$output" 2>/dev/null ; then
- return 0
- fi
-
- # Next try xz
- if xz -cd < "$input" > "$output" 2>/dev/null ; then
- return 0
- fi
+ # Try zstd/xz/gzip for decompressing
+ for zcmd in zstd xz gzip; do
+ if "$zcmd" -cd < "$input" > "$output" 2>/dev/null ; then
+ return 0
+ fi
+ done
echo "Unable to decompress $input: Unknown format" >&2
return 1
reply other threads:[~2026-10-28 19:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=179321613949.1.207442715319910775.rpms-kmod-0b8a2ceefb1d@fedoraproject.org \
--to=echanude@redhat.com \
--cc=git-commits@fedoraproject.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