Bug 179953 - "make modules_install" with only -devel package installed not a good idea
"make modules_install" with only -devel package installed not a good idea
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Dave Jones
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2006-02-03 19:58 EST by Joe
Modified: 2015-01-04 17:24 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-03 22:26:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Joe 2006-02-03 19:58:10 EST
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):
(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.")

all: modules

install: modules_install

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

        @$(MAKE) -C $(KERNEL_DIR) -s modules_install
Comment 1 Dave Jones 2006-02-03 22:26:02 EST
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

Comment 2 Joe 2006-02-05 20:21:11 EST
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 13:03:15 EST
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-13 19:07:42 EST
Am I the only one who thinks this is a bug?

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