Bug 2192895

Summary: weak-modules: support symvers.xz
Product: Red Hat Enterprise Linux 9 Reporter: Prarit Bhargava <prarit>
Component: kmodAssignee: Eugene Syromiatnikov <esyr>
Status: CLOSED ERRATA QA Contact: Ziqian SUN (Zamir) <zsun>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.3CC: esyr, fdinitto, hkrzesin, ptalbert, scweaver, ykaliuta
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kmod-28-9.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-07 08:53:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2192557    

Description Prarit Bhargava 2023-05-03 12:46:12 UTC
Description of problem:  A recent kernel-ark change switched the symvers compression from gzip to xz, however, the /usr/sbin/weak-modules script only looks for gzip'd symvers files.


Version-Release number of selected component (if applicable): kmod-28-8.el9.x86_64


How reproducible: 100%


Steps to Reproduce:
1.  Download rpms from https://koji.fedoraproject.org/koji/buildinfo?buildID=2194617

kernel-6.4.0-0.rc0.20230501git58390c8ce1bd.10.eln126.x86_64.rpm
kernel-core-6.4.0-0.rc0.20230501git58390c8ce1bd.10.eln126.x86_64.rpm
kernel-modules-6.4.0-0.rc0.20230501git58390c8ce1bd.10.eln126.x86_64.rpm
kernel-modules-core-6.4.0-0.rc0.20230501git58390c8ce1bd.10.eln126.x86_64.rpm

2. Install them

Actual results:

[root@ci-vm-10-0-137-27 ~]# rpm -ivh kernel-*
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:kernel-modules-core-6.4.0-0.rc0.2################################# [ 25%]
   2:kernel-core-6.4.0-0.rc0.20230501g################################# [ 50%]
   3:kernel-modules-6.4.0-0.rc0.202305################################# [ 75%]
   4:kernel-6.4.0-0.rc0.20230501git583################################# [100%]
Symvers dump file is not found in /boot/symvers-6.4.0-0.rc0.20230501git58390c8ce1bd.10.eln126.x86_64.gz /lib/modules/6.4.0-0.rc0.20230501git58390c8ce1bd.10.eln126.x86_64/symvers.gz
warning: %posttrans(kernel-core-6.4.0-0.rc0.20230501git58390c8ce1bd.10.eln126.x86_64) scriptlet failed, exit status 1
[root@ci-vm-10-0-137-27 ~]#

Expected results: Installation completes

Additional info: The find_symvers_file function should be changed to

find_symvers_file() {
    local krel="$1"
    local print="$2"

    if find_kernel_file "$krel" symvers .gz > /dev/null; then
        find_kernel_file "$krel" symvers .gz "$print"
        return $?
    else
        find_kernel_file "$krel" symvers .xz "$print"
        return $?
    fi
}

Comment 10 Prarit Bhargava 2023-05-16 11:21:56 UTC
Eugene, this is needed to test ELN builds on RHEL9.  Is there any timeline on a fix for RHEL9?

P.

Comment 15 errata-xmlrpc 2023-11-07 08:53:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (kmod bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:6636