Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 595006 - sys-apps/lm_sensors-3.4.0_p20160725 : wrong path for module loading
Summary: sys-apps/lm_sensors-3.4.0_p20160725 : wrong path for module loading
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: SELinux (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-24 09:03 UTC by Thomas Capricelli
Modified: 2018-03-06 10:43 UTC (History)
1 user (show)

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 Thomas Capricelli 2016-09-24 09:03:21 UTC
Since last update, /etc/conf.d/lm_sensors says:

+# For module loading please use /etc/modules-load.d/lm_sensors.conf


But I don't think that's the proper directory/file on gentoo. Probably rather something like /etc/conf.d/modules
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2016-09-26 18:40:59 UTC
No, this was the scope of the rewrite/bump. Please read commit message and see bug 480018.
Comment 2 Guy 2016-10-06 10:31:19 UTC
This should probably be re-opened. 

After upgrading to sys-apps/lm_sensors-3.4.0_p20160725, I ran into the same problem.

There are two different issues:

1) the ebuild doesn't create the new configuration directory.

2) As a result of not creating the new configuration directory, there is no default module load script installed.

This makes the updates to /etc/conf.d/lm_sensors meaningless.

e.g.


Showing differences between /etc/conf.d/lm_sensors and /etc/conf.d/._cfg0000_lm_sensors
--- /etc/conf.d/lm_sensors      2016-10-03 05:55:06.432732134 -0400
+++ /etc/conf.d/._cfg0000_lm_sensors    2016-10-06 00:36:56.958984128 -0400
@@ -1,25 +1,4 @@
-# Generated by sensors-detect on Tue Oct 18 14:32:33 2011
-# This file is sourced by /etc/init.d/lm_sensors and defines the modules to
-# be loaded/unloaded.
-#
-# The format of this file is a shell script that simply defines variables:
-# HWMON_MODULES for hardware monitoring driver modules, and optionally
-# BUS_MODULES for any required bus driver module (for example for I2C or SPI).
+# /etc/conf.d/lm_sensors
 
-# Load modules at startup
-LOADMODULES=yes
-
-# Initialize sensors at startup
-INITSENSORS=yes
-
-HWMON_MODULES="it87"
-
-# For compatibility reasons, modules are also listed individually as variables
-#    MODULE_0, MODULE_1, MODULE_2, etc.
-# Please note that the numbers in MODULE_X must start at 0 and increase in
-# steps of 1. Any number that is missing will make the init script skip the
-# rest of the modules. Use MODULE_X_ARGS for arguments.
-#
-# You should use BUS_MODULES and HWMON_MODULES instead if possible.
-
-MODULE_0=it87
+# NOTE:
+# For module loading please use /etc/modules-load.d/lm_sensors.conf
Comment 3 Guy 2016-10-06 10:43:38 UTC
It looks like we need to do the following after upgrading:

# mkdir /etc/modules-load.d
# cp /etc/conf.d/lm_sensors.new /etc/modules-load.d/lm_sensors.conf
Comment 4 Thomas Deutschmann (RETIRED) gentoo-dev 2016-10-06 10:48:11 UTC
> [...]
> This makes the updates to /etc/conf.d/lm_sensors meaningless.

YES! And that's expected. That's what the comment

> For module loading please use /etc/modules-load.d/lm_sensors.conf

tries to tell you.


I don't get the problem. Is it all about that you are confused by a non-existing folder? Remember that lm_sensors don't own that folder (I think this will be part of the next baselayout). So we can't create it when merging the package.

Also not everybody has to load modules. So there's no need to create that file on every system per default...


(In reply to Guy from comment #3)
> It looks like we need to do the following after upgrading:
> 
> # mkdir /etc/modules-load.d
> # cp /etc/conf.d/lm_sensors.new /etc/modules-load.d/lm_sensors.conf

No! The old format from /etc/conf.d/lm_sensors isn't compatible with the new format used by the modules-load service.
Like the elog told you you _have to_ re-create your configuration. Either by manually moving existing modules from /etc/conf.d/lm_sensors to "/etc/modules-load.d/lm_sensors.conf" _before_ updating your configuration using dispatch-conf/etc-update etc. OR by using the updated sensors-detect script.


Would it help you if we would change the text from

> For module loading please use /etc/modules-load.d/lm_sensors.conf

into

> For module loading please use your modules-load service your init system provides

?
Comment 5 Guy 2016-10-06 10:59:00 UTC
I confirmed that 'sensors-detect' does indeed prompt for writing the newly generated /etc/modules-load.d/lm_sensors.conf file.

However, when emerging sys-apps/lm_sensors-3.4.0_p20160725 there is no message indicating that sensors-detect needs to be re-run.

e.g.

# emerge -1 =sys-apps/lm_sensors-3.4.0_p20160725
Calculating dependencies... done!
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) sys-apps/lm_sensors-3.4.0_p20160725::gentoo
>>> Installing (1 of 1) sys-apps/lm_sensors-3.4.0_p20160725::gentoo
>>> Jobs: 1 of 1 complete                           Load avg: 1.00, 0.80, 0.96
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.
Comment 6 Guy 2016-10-06 11:06:07 UTC
(In reply to Thomas Deutschmann from comment #4)
> Would it help you if we would change the text from
> 
> > For module loading please use /etc/modules-load.d/lm_sensors.conf
> 
> into
> 
> > For module loading please use your modules-load service your init system provides
> 
> ?
The above message should probleably be changed to / or added:

Please run 'sensors-detect' to complete this package upgrade.


Also, for those of us that actually read the emerge results messages, it would be good to have a message indicating that sensors-detect needs to be re-run.

BTW - thank you!
Comment 7 Thomas Deutschmann (RETIRED) gentoo-dev 2016-10-06 11:08:25 UTC
You are running emerge in quiet mode (well, that's the default mode). Then you have to use the ELOG system to save elogs (or use the "echo" mode to show them).

For more details please see /usr/share/portage/config/make.conf.example for details about PORTAGE_ELOG_SYSTEM.
Comment 8 stqn 2016-12-21 00:45:00 UTC
I just upgraded to lm_sensors 3.4.0_p20160725 and also found the upgrade procedure very unclear. (Also the wiki page still has outdated info so I couldn’t find help there.)

A post-install message saying what to do with the old conf.d config file and we have to re-run sensors-detect would help. Also I don’t know if I have to enable the modules-load service and if yes, at which runlevel (boot?).