Bug 622618 - kmodtool: A bug in PREUN script results in removing too many modules
Summary: kmodtool: A bug in PREUN script results in removing too many modules
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: redhat-rpm-config   
(Show other bugs)
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Panu Matilainen
QA Contact: Miroslav Vadkerti
Depends On: 558994 599677
Blocks: 503551
TreeView+ depends on / blocked
Reported: 2010-08-09 23:09 UTC by Jon Masters
Modified: 2010-11-11 16:22 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 599677
Last Closed: 2010-11-11 16:22:44 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Comment 2 Jon Masters 2010-08-09 23:27:02 UTC
Renaming this bug, since the problem is a one line bug in the kmodtool script that affects modules in general, not just the original example.

Comment 6 Miroslav Vadkerti 2010-08-20 05:22:51 UTC
I cannot find gfs-kmod package in RHEL6, seems it is it not included or depreceated. I will do only patch check in redhat-rpm-config.

Comment 7 Miroslav Vadkerti 2010-08-20 06:20:00 UTC
VERIFIED as fixed in redhat-rpm-config-9.0.3-25.el6

Patch applied during rebuild

Patch #15 (redhat-rpm-config-9.0.3-RHEL6-kmodtool-fix-module-removal.patch):
+ /bin/cat /root/rpmbuild/SOURCES/redhat-rpm-config-9.0.3-RHEL6-kmodtool-fix-module-removal.patch
+ /usr/bin/patch -s -p1 --fuzz=0
+ exit 0

# cat /root/rpmbuild/SOURCES/redhat-rpm-config-9.0.3-RHEL6-kmodtool-fix-module-removal.patch
diff -urNp redhat-rpm-config-9.0.3_old/kmodtool redhat-rpm-config-9.0.3/kmodtool
--- redhat-rpm-config-9.0.3_old/kmodtool	2010-08-09 16:36:43.581511561 -0400
+++ redhat-rpm-config-9.0.3/kmodtool	2010-08-09 17:05:50.600326999 -0400
@@ -172,8 +172,7 @@ EOF
 cat <<EOF
 %preun         -n kmod-${kmod_name}${dashvariant}
-rpm -ql kmod-${kmod_name}${dashvariant} | grep '\.ko$' \
-    > /var/run/rpm-kmod-${kmod_name}${dashvariant}-modules
+rpm -ql kmod-${kmod_name}${dashvariant}-%{kmod_version}-%{kmod_release}.$(arch) | grep '\.ko$' > /var/run/rpm-kmod-${kmod_name}${dashvariant}-modules
 cat <<EOF

Comment 8 Steve Whitehouse 2010-08-20 08:35:53 UTC
RE: comment #6

GFS is not in RHEL6 in any form, and GFS2 is part of the standard kernel package. I suspect the issue applies to other kmods though as well - I don't know whether there are any other kmods in RHEL6.

Comment 10 Jon Masters 2010-08-20 18:48:34 UTC
Thanks. There are other kmods in optional channels in RHEL6, not in the core release. And yes, this needed fixing in general, not for GFS :)

Comment 11 releng-rhel@redhat.com 2010-11-11 16:22:44 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Note You need to log in before you can comment on or make changes to this bug.