public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/kmod] rawhide: weak-modules: add support for zstd compression for initramfs
@ 2026-10-28 19:35 Eric Chanudet
0 siblings, 0 replies; only message in thread
From: Eric Chanudet @ 2026-10-28 19:35 UTC (permalink / raw)
To: git-commits
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-28 19:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-28 19:35 [rpms/kmod] rawhide: weak-modules: add support for zstd compression for initramfs Eric Chanudet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox