Bug 173366 - rpmbuild fails to install working kernel modules
rpmbuild fails to install working kernel modules
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
4
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Dave Jones
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-11-16 11:53 EST by Cameron Kellough
Modified: 2015-01-04 17:23 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-11-28 18:15:16 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
This is a patch that implements my workaround (839 bytes, patch)
2005-11-16 11:55 EST, Cameron Kellough
no flags Details | Diff

  None (edit)
Description Cameron Kellough 2005-11-16 11:53:46 EST
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@localhost.i686.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 11:55:42 EST
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 11:46:09 EST
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.

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