From 38cd406a2111464dc2b253875cc7c21745e3f31b Mon Sep 17 00:00:00 2001 From: Eugene Syromiatnikov Date: Mon, 23 Sep 2024 17:29:49 +0200 Subject: [PATCH] microcode_ctl.spec: check for symvers.xz as well in %posttrans Otherwise kernels that ship symvers.xz instead of symvers.gz won't get initramfs re-generated. * microcode_ctl.spec (%posttrans): Check for symvers.xz presence in addition to symvers.gz. Resolves: RHEL-58058 Signed-off-by: Eugene Syromiatnikov --- microcode_ctl.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/microcode_ctl.spec b/microcode_ctl.spec index 4b46cd2..ae67913 100644 --- a/microcode_ctl.spec +++ b/microcode_ctl.spec @@ -254,9 +254,13 @@ rpm -qa --qf "${qf}" ${pkgs} | sort -r -n -k'3,3' | { # https://bugzilla.redhat.com/show_bug.cgi?id=1609696 # So, we check for symvers file inside /lib/modules. # + # Also account for the fact that symvers compression has been + # switched from gzip to xz on newer kernels. + # # XXX: Not sure if this check is still needed, since we now # iterate over the rpm output. - [ -e "/lib/modules/${kver_uname}/symvers.gz" ] || continue + [ -e "/lib/modules/${kver_uname}/symvers.gz" -o \ + -e "/lib/modules/${kver_uname}/symvers.xz" ] || continue # Check that modules.dep for the kernel is present as well, # otherwise dracut complains with "/lib/modules/.../modules.dep # is missing. Did you run depmod?".