Bug 179953

Summary: "make modules_install" with only -devel package installed not a good idea
Product: [Fedora] Fedora Reporter: Joe <joeatjoe>
Component: kernelAssignee: Dave Jones <davej>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: high Docs Contact:
Priority: medium    
Version: 4CC: pfrields, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-04 03:26:02 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:

Description Joe 2006-02-04 00:58:10 UTC
Description of problem:
I followed the Release Notes for creating a module to build without the kernel 
source (just the devel package).

The build process worked fine...  the problem comes from using the same 
process to call "make modules_install".

With a full source tree, all modules are re-installed...  with just the -devel 
package installed, the /lib/modules/*/kernel dir is deleted and recreated 
without re-installing the modules that were there.  The /lib/modules/*/extra 
dir is filled with the target module.

While I'm not sure if this should be a bug with the kernel-devel package, it 
should _at least_ be a note in the Release Notes...

I'd rather see it fixed instead of documented but which component should I 
change this bug to?

Version-Release number of selected component (if applicable):
kernel-devel-2.6.12-1.1447_FC4.*.rpm
(probably applies to more)

Steps to Reproduce:
1. Default install
2. rpm -Uvh kernel-devel-*.rpm
3. make 
4. make install
# 3&4 are done using a module's source and the makefile below.
  
Actual results:
`ls -la /lib/modules/*/kernel/` resulted in nothing being listed.

Expected results:
`ls -la /lib/modules/*/kernel/` resulted in "arch" "crypto" "drivers" etc... 
being listed.

Additional info:
Example Makefile:

KERNEL_DIR := /lib/modules/$(shell uname -r)/build
MODULE_DIR := $(shell pwd)
MAKEFLAGS += --no-print-directory

ifeq ("$(KERNEL_DIR)", "")
  $(error "KERNEL_DIR is not defined.")
endif

all: modules

install: modules_install

modules modules_install clean::
        @$(MAKE) -C $(KERNEL_DIR) M=$(MODULE_DIR) $@

modules_install::
        @$(MAKE) -C $(KERNEL_DIR) -s modules_install

Comment 1 Dave Jones 2006-02-04 03:26:02 UTC
what do you expect the kernel's  'make modules_install' to do with your module ?
It has no clue where to install it!

For your install: line, just cp your .ko by hand to /lib/modules/`uname
-r`/kernel/wherever..



Comment 2 Joe 2006-02-06 01:21:11 UTC
I expected it to put it in 'extra'... It's not the fact of where to put it... 
it's the fact that it erased the entire existing modules tree!

I can do a cp, that's not the part I care about... doing the depmod/generating 
all the meta-data files (if necessary) is really the problem...

Is there a way of calling the makefile to 'add' a module to the tree without 
deleteing the entire tree?


Comment 3 Joe 2006-02-06 18:03:15 UTC
Let me put this another way:

1) Default install
2) Install kernel-devel-`uname -r`_FC4.i686.rpm
3) cd /lib/modules/`uname -r`/build
4) make modules_install

/lib/modules/*/kernel is empty!
Next time you reboot, any module you need to load will not be present...  Call 
me crazy, but I don't think this is the best behaviour...

Comment 4 Joe 2006-02-14 00:07:42 UTC
Am I the only one who thinks this is a bug?