Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 478462 - sys-apps/kmod: Two Errors on mod-less kernel system
Summary: sys-apps/kmod: Two Errors on mod-less kernel system
Status: RESOLVED DUPLICATE of bug 463455
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-28 12:24 UTC by Klaus Kusche
Modified: 2013-07-29 14:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Kusche 2013-07-28 12:24:29 UTC
Due to virtual/modutils being a required system package (why???),
kmod is forced onto each gentoo linux system,
even on those with a fully static, no-modules kernel like mine,
which doesn't even have CONFIG_MODULES in its kernel config,
and which of course doesn't have a kernel modules directory.

This causes two problems:

1.) Emerging kmod gives an error message that the kernel config flags
CONFIG_MODULES and CONFIG_MODULE_UNLOAD are required.

Please remove that nonsense, Gentoo systems with a static kernel
are perfectly legal and functional, and in fact, 
not having the kernel module loader enabled at all
is highly advised for security-critical systems.

2.) The static-nodes init.d script which is installed by kmod
fails on system startup (showing a nasty red exclamation mark
and two error messages),
because the /lib/modules directory is of course missing.

kmod should either not ask to add static-nodes to the runlevels,
or static-nodes should behave well on a system with a static kernel.

And of course the best solution would be not to require the kmod package at all
on systems not having kernel modules.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-07-29 10:10:21 UTC
(In reply to Klaus Kusche from comment #0)
> Due to virtual/modutils being a required system package (why???),

It is not a "required system package" whatever that means. Some ebuild is pulling it in.

> kmod is forced onto each gentoo linux system,
> even on those with a fully static, no-modules kernel like mine,
> which doesn't even have CONFIG_MODULES in its kernel config,
> and which of course doesn't have a kernel modules directory.
> 
> This causes two problems:
> 
> 1.) Emerging kmod gives an error message that the kernel config flags
> CONFIG_MODULES and CONFIG_MODULE_UNLOAD are required.

It is not an error, it's a warning.

> 
> Please remove that nonsense, Gentoo systems with a static kernel
> are perfectly legal and functional, and in fact, 
> not having the kernel module loader enabled at all
> is highly advised for security-critical systems.

So it's fair to warn that without CONFIG_MODULES, kmod, which you're about to install, isn't going to work as intended. To the majority of users, that information is rather helpful.

> 2.) The static-nodes init.d script which is installed by kmod
> fails on system startup (showing a nasty red exclamation mark
> and two error messages),
> because the /lib/modules directory is of course missing.

Well, you had been warned.

[...]

> And of course the best solution would be not to require the kmod package at
> all on systems not having kernel modules.

So these aren't real problems if only you could get rid of virtual/modutils.

Perhaps you should run `equery d virtual/modutils'[1] and figure out which reverse dependencies you don't need?


[1] equery is installed by app-portage/gentoolkit
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2013-07-29 10:17:00 UTC
It looks like it just keeps coming back:
base/packages:
revision 1.60
date: 2012-02-04 00:30:14 +0100;  author: williamh;  state: Exp;  lines: +2 -2;  commitid: 6c8c4f2c6e064567;
replace sys-apps/module-init-tools with virtual/modutils for bug #401899.
----------------------------
revision 1.49
date: 2011-04-24 23:23:13 +0200;  author: ulm;  state: Exp;  lines: +2 -2;  commitid: 2ee14db494bd4567;
Remove old-style virtual/modutils, bug 358891.
----------------------------
revision 1.4
date: 2004-03-14 09:53:33 +0100;  author: seemant;  state: Exp;  lines: +1 -0;
removed linux specific stuff -- kernel, headers and modutils
Comment 3 Klaus Kusche 2013-07-29 10:26:16 UTC
(In reply to Jeroen Roovers from comment #1)
> (In reply to Klaus Kusche from comment #0)
> > Due to virtual/modutils being a required system package (why???),
> 
> It is not a "required system package" whatever that means. Some ebuild is
> pulling it in.

No. I've already checked carefully both with equery and by hand
before opening this bug.
I've zero packages depending on kmod or on virtual/modutils.
I've -kmod in my USE flags.

virtual/modutils is a "required system package",
i.e. it gets installed automatically even in a minimal gentoo system 
when your world file is empty.
It is listed in /usr/portage/profiles/base/packages.

> 
> > kmod is forced onto each gentoo linux system,
> > even on those with a fully static, no-modules kernel like mine,
> > which doesn't even have CONFIG_MODULES in its kernel config,
> > and which of course doesn't have a kernel modules directory.
> > 
> > This causes two problems:
> > 
> > 1.) Emerging kmod gives an error message that the kernel config flags
> > CONFIG_MODULES and CONFIG_MODULE_UNLOAD are required.
> 
> It is not an error, it's a warning.

Sorry. I didn't look close enough. 
But it's schown in red in elogviewer, so it is alarming.

> > Please remove that nonsense, Gentoo systems with a static kernel
> > are perfectly legal and functional, and in fact, 
> > not having the kernel module loader enabled at all
> > is highly advised for security-critical systems.
> 
> So it's fair to warn that without CONFIG_MODULES, kmod, which you're about
> to install, isn't going to work as intended. To the majority of users, that
> information is rather helpful.

I didn't install it. As said above, it is mandatory on all gentoo systems,
even with monolitic kernels, so it should not make administrators nervous
on such systems.

> > 2.) The static-nodes init.d script which is installed by kmod
> > fails on system startup (showing a nasty red exclamation mark
> > and two error messages),
> > because the /lib/modules directory is of course missing.
> 
> Well, you had been warned.
> 
> [...]
> 
> > And of course the best solution would be not to require the kmod package at
> > all on systems not having kernel modules.
> 
> So these aren't real problems if only you could get rid of virtual/modutils.

I can't, see above.
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2013-07-29 10:28:48 UTC

*** This bug has been marked as a duplicate of bug 463455 ***
Comment 5 Klaus Kusche 2013-07-29 10:47:11 UTC
(In reply to Samuli Suominen from comment #4)
> 
> *** This bug has been marked as a duplicate of bug 463455 ***

There is no progress for 4 months in 463455, 
and reading 463455 I get the impression that removing modutils is difficult.

So I propose the following quick fixes to make kmod 
install and work silently on systems with monolithic kernels:

1.) Issue the warning about CONFIG_MODULES and CONFIG_MODULE_UNLOAD
only if the kmod USE flag is either set or undefined,
but not for USE -kmod.

USE -kmod is a clear indication that this system is indended
to have no kernel modules.

2.) Either do not install static-nodes in the USE -kmod case,
or do not advise the user to add it to the boot runlevel for USE -kmod,
or (best solution) modify the static-nodes script to call kmod
only after checking that the modules directory is present 
(or after some other check that the kernel and installation support kmod).
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2013-07-29 11:01:34 UTC
(In reply to Klaus Kusche from comment #5)
> (In reply to Samuli Suominen from comment #4)
> > 
> > *** This bug has been marked as a duplicate of bug 463455 ***
> 
> There is no progress for 4 months in 463455, 
> and reading 463455 I get the impression that removing modutils is difficult.
> 
> So I propose the following quick fixes to make kmod 
> install and work silently on systems with monolithic kernels:
> 
> 1.) Issue the warning about CONFIG_MODULES and CONFIG_MODULE_UNLOAD
> only if the kmod USE flag is either set or undefined,
> but not for USE -kmod.

Bug 462926 is about CONFIG_MODULES/MODULES_UNLOAD warning. And USE="kmod" for sys-apps/kmod doesn't make sense.

> USE -kmod is a clear indication that this system is indended
> to have no kernel modules.
> 
> 2.) Either do not install static-nodes in the USE -kmod case,
> or do not advise the user to add it to the boot runlevel for USE -kmod,
> or (best solution) modify the static-nodes script to call kmod
> only after checking that the modules directory is present 
> (or after some other check that the kernel and installation support kmod).

All of this is unrequired once virtual/modutils is dropped from @system, then you simply don't have to install sys-apps/kmod.

And no, having 2 bugs open for 1 issue doesn't make them go faster.

*** This bug has been marked as a duplicate of bug 463455 ***
Comment 7 Klaus Kusche 2013-07-29 11:53:46 UTC
(In reply to Samuli Suominen from comment #6)
> (In reply to Klaus Kusche from comment #5)
> > (In reply to Samuli Suominen from comment #4)
> > > 
> > > *** This bug has been marked as a duplicate of bug 463455 ***
> > 
> > There is no progress for 4 months in 463455, 
> > and reading 463455 I get the impression that removing modutils is difficult.
> > 
> > So I propose the following quick fixes to make kmod 
> > install and work silently on systems with monolithic kernels:
> > 
> > 1.) Issue the warning about CONFIG_MODULES and CONFIG_MODULE_UNLOAD
> > only if the kmod USE flag is either set or undefined,
> > but not for USE -kmod.
> 
> Bug 462926 is about CONFIG_MODULES/MODULES_UNLOAD warning. And USE="kmod"
> for sys-apps/kmod doesn't make sense.

???

I do not understand your response at all.

This bug is about two annoying / misleading errors caused by kmod
(one warning during emerge, one error on each system startup)
which should be fixed. The original title of this bug was
"sys-apps/kmod: Two Errors on mod-less kernel system"

Removing kmod was not the original intention of this bug,
the original intention was to make kmod behave well on a non-modular system.
Removing kmod (bug 463455) is part of one possible solution, 
but not the only one, not a complete one, and definitely not the easiest one.

Even if bug 463455 is fixed, this one still needs fixing:
Even if kmod is emerged for some other reason 
(not because of @system, but e.g. by some other dependency), 
or if a system should be useable with both modular and non-modular kernels,
kmod should behave well on a non-modular system,
i.e. the two errors (or at least the second) should be fixed anyway!

Hence: Two different bugs, two different solutions.

The second of the two errors (the one by static-nodes on each startup)
has been newly introduced in kmod-14 or -14-r1,
and it should be silenced quickly before it hits the masses
(gets stabilized), independent of 463455.

462926 is not related to this problem at all as I read it:
It explains why both kernel configs must be checked,
but has nothing to do the fact these checks don't make sense
on non-modular systems.

And what's wrong with the use of USE -kmod?
It states "no kernel modules wanted on this system".
If kmod gets installed anyway (for whatever reasons),
it should act according to that information.

> > USE -kmod is a clear indication that this system is indended
> > to have no kernel modules.
> > 
> > 2.) Either do not install static-nodes in the USE -kmod case,
> > or do not advise the user to add it to the boot runlevel for USE -kmod,
> > or (best solution) modify the static-nodes script to call kmod
> > only after checking that the modules directory is present 
> > (or after some other check that the kernel and installation support kmod).
> 
> All of this is unrequired once virtual/modutils is dropped from @system,
> then you simply don't have to install sys-apps/kmod.
> 
> And no, having 2 bugs open for 1 issue doesn't make them go faster.
> 
> *** This bug has been marked as a duplicate of bug 463455 ***
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2013-07-29 14:09:40 UTC
You are treating warnings as errors needlessly, feel free to ignore them if you want. And bug 462926 is still open because we haven't decided what to do with the warnings yet; keep them or remove them. I think Jeroen made that very clear in Comment #1.
That leaves only virtual/modutils dropping from @system, and possibly elsewhere for which bug 463455 is for.
I think vapier made it pretty clear at https://bugs.gentoo.org/show_bug.cgi?id=463455#c1 -- which is why static-nodes init script will be added to runlevels by default and in special cases, like yours, gets removed from there.
Now, stop reopening this bug needlessly since there is nothing to be done here.

*** This bug has been marked as a duplicate of bug 463455 ***