Bug 173366

Summary: rpmbuild fails to install working kernel modules
Product: [Fedora] Fedora Reporter: Cameron Kellough <cameron.kellough>
Component: kernelAssignee: Dave Jones <davej>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: pfrields, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-11-28 23:15:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
This is a patch that implements my workaround none

Description Cameron Kellough 2005-11-16 16:53:46 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041217

Description of problem:
Running rpmbuild on a local machine instead of the beehive environment produces a an rpm which installs modules in the wrong place resulting in a kernel that doesn't work.  

The %rhbsys macro in kernel.2.6.spec appends uname@localhost to the Revision field but this doesn't propogate correctly to the module installation

The associated lines from the original spec file:

%define rhbsys  %([ -r /etc/beehive-root -o -n "%{?__beehive_build}" ] && echo || echo .`whoami`@`hostname -s|sed s/-//`)
%define release %(R="$Revision: 1.1637 $"; RR="${R##: }"; echo ${RR%%?})_FC4%{rhbsys}

The fix I used which gets it working but isn't a fix of root cause is to remove the %rhbsys macro from the definition of the %release macro

%define rhbsys  %([ -r /etc/beehive-root -o -n "%{?__beehive_build}" ] && echo || echo .`whoami`@`hostname -s|sed s/-//`)
%define release %(R="$Revision: 1.1637 $"; RR="${R##: }"; echo ${RR%%?})_FC4


I've attched this fix as a patch but it might be worth figuring out if %rhbsys needs to be added somewhere else in the spec to make modules work correctly.  I don't know whether there is an issue with the @ sign in the path that the above definition of %rhbsys causes or whther there is simply an omission in the module installation. 




Version-Release number of selected component (if applicable):
kernel-2.6.14-1.1637_FC4

How reproducible:
Always

Steps to Reproduce:
1.  Install kernel kernel-2.6.14-1.1637_FC4.src.rpm on local machine as root
2.  cd /usr/src/redhat
3.  rpmbuild -ba SPECS/kernel-2.6.spec
4.  rpm -i kernel-2.6.14-1.1637_FC4.root.rpm  
5.  reboot on new kernel

Actual Results:  Get message:

modprobe: FATAL: Could not load /lib/modules/kernel-2.6.14-1.1637_FC4.root/modules.dep: No such file or directory

on all module load attempts.

Expected Results:  Modules should have loaded nomally as they do for the rpm binary distributed at fedora.

Additional info:

Comment 1 Cameron Kellough 2005-11-16 16:55:42 UTC
Created attachment 121138 [details]
This is a patch that implements my workaround

This patch removes %rhbsys from %release in the kernel spec file.

Comment 2 Dave Jones 2005-11-21 16:46:09 UTC
argh, I already fixed this one, and it crept back in somehow.

I've fixed it in CVS. Will be fixed in builds 1641 and above.