Bug 158572 - sys-cluster/cman-kernel-1.03, dlm-kernel, gfs-kernel, gnbd-kernel install kernel mods in '/' instead of the '/lib/modules/${KV_FULL}'
Bug#: 158572 Product:  Gentoo Linux Version: 2006.1 Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: hp-cluster@gentoo.org Reported By: jasmine.aura@yahoo.com
Component: Ebuilds
URL: 
Summary: sys-cluster/cman-kernel-1.03, dlm-kernel, gfs-kernel, gnbd-kernel install kernel mods in '/' instead of the '/lib/modules/${KV_FULL}'
Keywords:  
Status Whiteboard: 
Opened: 2006-12-19 11:51 0000
Description:   Opened: 2006-12-19 11:51 0000
for some odd reason, module_dir is no longer being defined by redhat-cluster
(GFS) sources. Now, what happens after emerge gfs-kernel-1.03, is that the
compiled modules are installed to '/' instead of '/lib/modules/${KV_FULL}
for example, '/fs/gfs/gfs.ko' is merged to '/', creating a "/fs" directory on
'/', where it should actually be installing to
/lib/modules/${KV_FULL}/fs/gfs/gfs.ko

I found the problem started happening last month (after portage update) with
all the following packages:

sys-cluster/cman-kernel-1.03
sys-cluster/dlm-kernel-1.03
sys-cluster/gfs-kernel-1.03
sys-cluster/gnbd-kernel-1.03


Solution:
In the source_install() of the ebuild file, change this:
emake DESTDIR=${D} install || die "install error"

to this:
emake DESTDIR=${D} module_dir=${D}/lib/modules/${KV_FULL} install || die
"install error"


I will make a seperate bug report for sys-cluster/gnbd-kernel-1.03 because it
also failed to compile because of devfs stuff which breaks the compile against
recent kernels with udev (ebuild requires 2.6.16 or higher kernel anyways,
tested with 2.6.17-gentoo-r8), so requires additional patch to the source

------- Comment #1 From Jasmine 2006-12-19 11:54:11 0000 -------
Created an attachment (id=104379) [details]
sys-cluster/cman-kernel ebuild patch

------- Comment #2 From Jakub Moc (RETIRED) 2006-12-19 11:54:14 0000 -------
*** Bug 156526 has been marked as a duplicate of this bug. ***

------- Comment #3 From Jasmine 2006-12-19 11:54:43 0000 -------
Created an attachment (id=104380) [details]
sys-cluster/dlm-kernel ebuild patch

------- Comment #4 From Jasmine 2006-12-19 11:55:07 0000 -------
Created an attachment (id=104381) [details]
sys-cluster/gfs-kernel ebuild patch

------- Comment #5 From Micheal Marineau 2007-01-13 01:57:09 0000 -------
cman-kernel and dlm-kernel are fixed in CVS. I don't use gfs or gndb, but I'll
fix those soon if no one else does.

------- Comment #6 From Christian Zoffoli 2007-03-03 00:00:48 0000 -------
gfs and gndb fixed.