From 9899755577accfa1c2f7310b41e13eda97d3c5a7 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-59081 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 c95c18f..604dd97 100644 --- a/microcode_ctl.spec +++ b/microcode_ctl.spec @@ -408,9 +408,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?".