Bug 1003267

Summary: cannot install kmod rpm of a kernel package on RHEL7.0 Alpha3
Product: Red Hat Enterprise Linux 7 Reporter: Alaa Hleihel <alaa>
Component: redhat-rpm-configAssignee: Weiping Pan <wpan>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.0CC: jeremie.galarneau, mdcb808, pmatilai, prrao, ruyang, ssujith, stbechto
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-22 03:19:29 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:

Description Alaa Hleihel 2013-09-01 12:21:07 UTC
Description of problem:
i created a kmod rpm for a kernel package, but the installation of the rpm failed with the following error on RHEL7.0 Alpha3:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Preparing...                          ################################# [100%]
        file /lib/modules/3.7.0-0.36.el7.x86_64/modules.devname from install of kmod-mlnx-ofa_kernel-2.0-OFED.2.0.9.9.9.20130827.0822.g11932fd.rhel7.x86_64 conflicts with file from package kernel-3.7.0-0.36.el7.x86_64
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

(Note: On RHEL6.x the rpm was built and installed successfully).


Only on RHEL 7.0 (Alpha3) the following files were included in the kmod rpm:
/lib/modules/3.7.0-0.36.el7.x86_64/modules.alias
/lib/modules/3.7.0-0.36.el7.x86_64/modules.alias.bin
/lib/modules/3.7.0-0.36.el7.x86_64/modules.builtin.bin
/lib/modules/3.7.0-0.36.el7.x86_64/modules.dep
/lib/modules/3.7.0-0.36.el7.x86_64/modules.dep.bin
/lib/modules/3.7.0-0.36.el7.x86_64/modules.devname
/lib/modules/3.7.0-0.36.el7.x86_64/modules.softdep
/lib/modules/3.7.0-0.36.el7.x86_64/modules.symbols
/lib/modules/3.7.0-0.36.el7.x86_64/modules.symbols.bin


**** On RHEL6.x none of the above files was part of the kmod rpm.

---------------------------------------------------------------------------------------------
How reproducible:
always

Steps to Reproduce:
1. create kmod rpm using kernel_module_package
2. install
3. will fail with the above error.


---------------------------------------------------------------------------------------------
Additional info:
# uname -r
3.7.0-0.36.el7.x86_64
# cat /etc/issue
Red Hat Enterprise Linux Server release 7.0 Alpha3 (Maipo)
Kernel \r on an \m

redhat-rpm-config-9.1.0-49.el7.noarch.rpm

Comment 2 Panu Matilainen 2013-09-02 05:41:44 UTC
It is not a RHEL-6 issue if its occuring on RHEL-7 alpha, adjusting product accordingly and component to redhat-rpm-macros which is where the kmod macros come from.

Comment 4 Weiping Pan 2013-11-22 03:19:29 UTC
Hi, Alaa,

I think this bug is a duplicate of bz1029867,
we can use bz1029867 to track this issue.

thanks
Weiping Pan

*** This bug has been marked as a duplicate of bug 1029867 ***

Comment 5 m 2014-02-22 00:28:07 UTC
I'm having the same problem.
The bugs referenced in Comment4 by Weiping Pan leads me to a page showing in red "You are not authorized to access bug #1029867."

Where/how can I track this issue? Thanks

Comment 6 Jérémie Galarneau 2014-03-07 22:47:22 UTC
(In reply to m from comment #5)
> I'm having the same problem.
> The bugs referenced in Comment4 by Weiping Pan leads me to a page showing in
> red "You are not authorized to access bug #1029867."
> 
> Where/how can I track this issue? Thanks

Got the same issue on my end. Any chance we get an update on this?

Comment 7 Alaa Hleihel 2014-03-08 12:05:06 UTC
(In reply to Jérémie Galarneau from comment #6)
> (In reply to m from comment #5)
> > I'm having the same problem.
> > The bugs referenced in Comment4 by Weiping Pan leads me to a page showing in
> > red "You are not authorized to access bug #1029867."
> > 
> > Where/how can I track this issue? Thanks
> 
> Got the same issue on my end. Any chance we get an update on this?

Hi,

You need to add the following command to the install section in your spec file (after "make -C %{kernel_source $flavor} modules_install M=$PWD/obj/$flavor"):

# Cleanup unnecessary kernel-generated module dependency files.
find $INSTALL_MOD_PATH/lib/modules -iname 'modules.*' -exec rm {} \;


You can find more details in the DUP book for RHEL7:
http://people.redhat.com/wpan/doc/rhel7/docs/How_to_Create_a_Driver_Update_Package_on_RHEL7_v0.1.pdf

Thanks,
Alaa