Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 640392 - app-emulation/virtualbox-modules-5.1.30: Instructions for openrc users cause kernel modules to be loaded twice
Summary: app-emulation/virtualbox-modules-5.1.30: Instructions for openrc users cause ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-09 15:27 UTC by Andreas Proteus
Modified: 2018-02-16 13:21 UTC (History)
4 users (show)

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


Attachments
Output of emerge --info (emerge.info.txt,6.55 KB, text/plain)
2017-12-09 15:27 UTC, Andreas Proteus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Proteus 2017-12-09 15:27:53 UTC
Created attachment 509098 [details]
Output of emerge --info

After merging any version of virtualbox-modules, a post installation message advises openrc users as follows: 
"If you are using sys-apps/openrc, please add "vboxdrv", "vboxnetflt",
 "vboxnetadp" and "vboxpci" to: /etc/conf.d/modules.

If you follow this instruction you end up loading the kernel modules twice, because the ebuild installs a kernel module configuration file:
"/usr/lib/modules-load.d/virtualbox.conf" which openrc 
reads at boot time and loads the modules listed there, and then proceeds to load from the usual openrc location (/etc/conf.d/modules).

P.S. My emerge.info shows openrc-0.17 which I installed after I discovered this surreptitious loading of modules and because I do not like the "surprises" of the later versions of openrc.
Comment 1 Andreas Proteus 2017-12-09 16:05:09 UTC
I suggest that the instructions for openrc users be changed to reflect the new openrc behaviour.
Comment 2 Andreas Proteus 2017-12-20 10:06:14 UTC
Same problem with virtualbox-modules-5.2.2
Comment 3 Wadlax 2017-12-21 09:33:29 UTC
Andreas, please explain a way to check that modules was loaded twice.

I have
1) /usr/lib/modules-load.d/virtualbox.conf  with modules names
2) /etc/conf.d/modules  with added modules names

And "cat /proc/modules" shows them only once.

(I have sys-apps/openrc-0.34.11)
Comment 4 Andreas Proteus 2017-12-21 12:10:05 UTC
/etc/init.d/modules, before loading any modules from 
'/etc/conf.d/modules', first calls the script '/etc/init.d/modules-load' (which according to its description: "Loads a list of modules from systemd-compatible locations."), which looks for modules to load in these directories:
"/usr/lib/modules-load.d /run/modules-load.d /etc/modules-load.d"

Thus if you do not follows the post install advice and do not add the module names to /etc/conf.d/modules the modules will be loaded from '/usr/lib/modules-load.d/virtualbox.conf' anyway.

If you now add the virtualbox-modules to /etc/conf/modules,
the init scripts will attempt to load the modules twice. Probably this is not possible but surely this cannot be a good thing. 

Anyhow, I no longer care about this, since I have gone back to openrc-0.17 which is not affected by systemd "mission creep". 
Also I have added 
INSTALL_MASK="/usr/lib/modules-load.d /usr/lib/systemd /etc/systemd"
to make.conf to prevent surreptitious systemd stuff being added to my system.
Comment 5 Larry the Git Cow gentoo-dev 2018-02-16 13:21:36 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee6e64af62963985d572c17ce83471c16076b0fc

commit ee6e64af62963985d572c17ce83471c16076b0fc
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2018-02-16 13:21:28 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2018-02-16 13:21:28 +0000

    app-emulation/virtualbox-modules: Removed superfluous elog message.
    
    Closes: https://bugs.gentoo.org/640392
    Package-Manager: Portage-2.3.24, Repoman-2.3.6

 app-emulation/virtualbox-modules/virtualbox-modules-5.1.32.ebuild | 3 ---
 app-emulation/virtualbox-modules/virtualbox-modules-5.2.6.ebuild  | 3 ---
 2 files changed, 6 deletions(-)