Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1343376

Summary: weak-modules remove weak-updates directory which is owned by kernel
Product: Red Hat Enterprise Linux 6 Reporter: Tuomo Soini <tis>
Component: module-init-toolsAssignee: Tony Camuso <tcamuso>
Status: CLOSED ERRATA QA Contact: Robin Hack <rhack>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.8CC: ajb, bhu, jfeeney, jshortt, kit.pierce, pasteur, qe-baseos-daemons, rhack, rwilliam, tcamuso, tis, toracat
Target Milestone: rc   
Target Release: 6.9   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-21 11:42:22 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: 1346447    
Attachments:
Description Flags
Backpored fix from rhel 7.2 kmod package none

Description Tuomo Soini 2016-06-07 08:46:43 UTC
Created attachment 1165534 [details]
Backpored fix from rhel 7.2 kmod package

Description of problem:

After upate to 6.8 updating kernel causes following warnings on removal of old kernel:

warning:    erase unlink of /lib/modules/2.6.32-573.22.1.el6.x86_64/weak-updates failed: No such file or directory
warning:    erase unlink of /lib/modules/2.6.32-573.22.1.el6.x86_64/modules.order failed: No such file or directory
warning:    erase unlink of /lib/modules/2.6.32-573.22.1.el6.x86_64/modules.networking failed: No such file or directory
warning:    erase unlink of /lib/modules/2.6.32-573.22.1.el6.x86_64/modules.modesetting failed: No such file or directory
warning:    erase unlink of /lib/modules/2.6.32-573.22.1.el6.x86_64/modules.drm failed: No such file or directory
warning:    erase unlink of /lib/modules/2.6.32-573.22.1.el6.x86_64/modules.block failed: No such file or directory

This bug is only about first line in these warnings.

weak-modules script remove directory owned by kernel package causing this warning from rpm.

Comment 4 Tony Camuso 2016-10-25 17:57:53 UTC
Test rpm available at :
http://people.redhat.com/tcamuso/module-init-tools/module-init-tools-3.9-26.el6.x86_64.rpm

Please let us know if this fixes the problem.

Comment 5 Tuomo Soini 2016-10-25 19:33:52 UTC
Source rpm is crap. It has patched weak-modules file in it and when you try to build it it try to patch weak-modules file again. If you want to patch Source file in rpm you must really copy it to buildroot or something before you patch it so that file in sourcedir won't change at build time.

I'll let you know if actual weak-modules change work but testing is kind of painful because it requires installing older kernels to a system and then running kenrel updates.

Comment 6 Tuomo Soini 2016-10-25 19:37:43 UTC
+ echo 'Patch #41 (weak-modules-1-3-dont-remove-weak-updates-dir.patch):'
Patch #41 (weak-modules-1-3-dont-remove-weak-updates-dir.patch):
+ /bin/cat /builddir/build/SOURCES/weak-modules-1-3-dont-remove-weak-updates-dir.patch
+ /usr/bin/patch -p1 -b --suffix .weak-updates-dir --fuzz=0 -d ../
can't find file to patch at input line 43
Perhaps you used the wrong -p or --strip option?

Comment 7 Tuomo Soini 2016-10-25 19:38:14 UTC
This can't be the rpm file you want me to test.

Comment 8 Tony Camuso 2016-10-26 18:39:02 UTC
OK, I see the problem. 

Working on it now.

Comment 9 Tony Camuso 2016-10-26 19:25:24 UTC
rpm, src.rpm, and debug rpm for testing.

http://people.redhat.com/tcamuso/module-init-tools/

Comment 10 Tuomo Soini 2016-10-27 18:43:22 UTC
Yes, new version seem to work.

Comment 11 Tony Camuso 2016-10-27 18:46:41 UTC
(In reply to Tuomo Soini from comment #10)
> Yes, new version seem to work.

Many thanks for testing!

Comment 18 errata-xmlrpc 2017-03-21 11:42:22 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, 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://rhn.redhat.com/errata/RHBA-2017-0772.html