Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package supermin for openSUSE:Factory checked in at 2022-01-04 19:38:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/supermin (Old) and /work/SRC/openSUSE:Factory/.supermin.new.1896 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "supermin" Tue Jan 4 19:38:10 2022 rev:15 rq:943756 version:5.2.1 Changes: -------- --- /work/SRC/openSUSE:Factory/supermin/supermin.changes 2021-09-20 23:34:41.351287432 +0200 +++ /work/SRC/openSUSE:Factory/.supermin.new.1896/supermin.changes 2022-01-04 19:38:37.110018672 +0100 @@ -1,0 +2,7 @@ +Tue Dec 21 15:33:22 UTC 2021 - Beno??t Monin <benoit.mo...@gmx.fr> + +- Add initrd_support_ztd-compressed_modules.patch: + backport of 4306a131c6cd to add support of zstd compressed kernel + modules. + +------------------------------------------------------------------- New: ---- initrd_support_ztd-compressed_modules.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ supermin.spec ++++++ --- /var/tmp/diff_new_pack.OB1Tay/_old 2022-01-04 19:38:37.562019264 +0100 +++ /var/tmp/diff_new_pack.OB1Tay/_new 2022-01-04 19:38:37.570019274 +0100 @@ -31,6 +31,8 @@ Patch10: suse_release.patch Patch11: supermin-kernel_version_compressed.patch Patch12: disable-test-if-newer-ext2.patch +# Backport of https://github.com/libguestfs/supermin/commit/4306a131c6cde92f8d0a2dd9376f4096ee538eff.patch +Patch13: initrd_support_ztd-compressed_modules.patch BuildRequires: augeas BuildRequires: autoconf BuildRequires: automake @@ -48,6 +50,7 @@ BuildRequires: xz BuildRequires: xz-devel BuildRequires: zlib-devel +BuildRequires: zstd BuildRequires: zypper BuildRequires: pkgconfig(com_err) BuildRequires: pkgconfig(ext2fs) ++++++ initrd_support_ztd-compressed_modules.patch ++++++ >From 4306a131c6cde92f8d0a2dd9376f4096ee538eff Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" <rjo...@redhat.com> Date: Thu, 5 Aug 2021 08:16:28 +0100 Subject: [PATCH] initrd: Support ztd-compressed modules Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1990209 --- README | 2 ++ configure.ac | 3 +++ src/config.ml.in | 1 + src/format_ext2_initrd.ml | 16 ++++++++++++++-- 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/README b/README index e5187a6..ccd6f96 100644 --- a/README +++ b/README @@ -102,6 +102,8 @@ are building: xzcat (command) - if your kernel uses xz-compressed modules + zstdcat (command) - if your kernel uses zstd-compressed modules + Building and installing ----------------------- diff --git a/configure.ac b/configure.ac index cd5d8c0..ad86ca5 100644 --- a/configure.ac +++ b/configure.ac @@ -157,6 +157,9 @@ AC_PATH_PROG(ZCAT,[zcat],[no]) dnl Check for xzcat, only needed if you have xz-compressed kernel modules. AC_PATH_PROG(XZCAT,[xzcat],[no]) +dnl Check for zstdcat, only needed if you have zstd-compressed kernel modules. +AC_PATH_PROG(ZSTDCAT,[zstdcat],[no]) + dnl mke2fs. AC_PATH_PROG([MKE2FS],[mke2fs],[no], [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR]) diff --git a/src/config.ml.in b/src/config.ml.in index 313d6e6..b0953dc 100644 --- a/src/config.ml.in +++ b/src/config.ml.in @@ -39,6 +39,7 @@ let urpmi = "@URPMI@" let yumdownloader = "@YUMDOWNLOADER@" let xzcat = "@XZCAT@" let zcat = "@ZCAT@" +let zstdcat = "@ZSTDCAT@" let zypper = "@ZYPPER@" let mke2fs = "@MKE2FS@" diff --git a/src/format_ext2_initrd.ml b/src/format_ext2_initrd.ml index 6268442..98d2692 100644 --- a/src/format_ext2_initrd.ml +++ b/src/format_ext2_initrd.ml @@ -106,12 +106,24 @@ let rec build_initrd debug tmpdir modpath initrd = visit deps; (* Copy module to the init directory. - * Uncompress the module, if the name ends in .xz or .gz. + * Uncompress the module, if the name ends in .zst, .xz or .gz. *) let basename = Filename.basename modl in let basename = let len = String.length basename in - if Config.xzcat <> "no" && + if Config.zstdcat <> "no" && + Filename.check_suffix basename ".zst" + then ( + let basename = String.sub basename 0 (len-4) in + let cmd = sprintf "%s %s > %s" + (quote Config.zstdcat) + (quote (modpath // modl)) + (quote (initdir // basename)) in + if debug >= 2 then printf "supermin: %s\n" cmd; + run_command cmd; + basename + ) + else if Config.xzcat <> "no" && Filename.check_suffix basename ".xz" then ( let basename = String.sub basename 0 (len-3) in