Bug 23619 - binary lm_sensors in init.d
Summary: binary lm_sensors in init.d
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 6
Hardware: All Linux
Priority: Low minor
Target Milestone: ---
Assignee: Peter Semiletov
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-29 21:03 CEST by Zamir Ostroukhov
Modified: 2019-02-19 14:01 CET (History)
3 users (show)

See Also:
Source RPM: lm_sensors-3.4.0.git20180318-1.mga6
CVE:
Status comment:


Attachments

Description Zamir Ostroukhov 2018-09-29 21:03:51 CEST
Description of problem:

# file /etc/init.d/lm_sensors
/etc/init.d/lm_sensors: gzip compressed data, from Unix

Version-Release number of selected component:

lm_sensors-3.4.0.git20180318-1.mga6

How reproducible:

# rpm -qf /etc/init.d/lm_sensors 
lm_sensors-3.4.0.git20180318-1.mga6

# file /etc/init.d/lm_sensors
/etc/init.d/lm_sensors: gzip compressed data, from Unix

# /etc/init.d/lm_sensors status
bash: /etc/init.d/lm_sensors: cannot execute binary file: ...
Zamir Ostroukhov 2018-09-29 21:04:21 CEST

Priority: Normal => Low

Comment 1 Marja Van Waes 2018-09-30 17:09:19 CEST
Assigning to the registered maintainer.

CC: (none) => marja11
Assignee: bugsquad => peter.semiletov

Comment 2 Peter Semiletov 2018-09-30 21:11:45 CEST
I'm trying to figure out what for this /etc/init.d/lm_sensors...
Comment 3 Peter Semiletov 2018-09-30 21:26:56 CEST
From /etc/sysconfig/lm_sensors:

-----------
# Generated by sensors-detect on Sat Jul 29 18:36:40 2017
# 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).

HWMON_MODULES="coretemp nct6775"
----------

So as far I understand /etc/init.d/lm_sensors is the sensors database. Why it is located at /etc/init.d/? Maybe because it's accessible at early boot stages?
Is that normal? I think I need time and help to understand all this things.
Comment 4 Zamir Ostroukhov 2018-10-02 14:16:36 CEST
Hi Peter and Marja,

I think, there is cosmetic bug. Need audit of spec-file.
You can compare for mageia 5:

# rpm -qf /etc/init.d/lm_sensors
lm_sensors-3.3.5-3.mga5

# file /etc/init.d/lm_sensors
/etc/init.d/lm_sensors: POSIX shell script, ASCII text executable

# head /etc/init.d/lm_sensors
#!/bin/sh
#
# sensors    This shell script takes care of starting and stopping
#               sensord.
#
# description: sensors is a sensors daemon which can be used to alert you in the
#               event of a hardware health monitoring alarm.
#
# chkconfig: 2345 26 74
#

# systemctl status lm_sensors
● lm_sensors.service - Initialize hardware monitoring sensors
   Loaded: loaded (/usr/lib/systemd/system/lm_sensors.service; enabled)
   Active: active (exited) since Вт 2018-01-30 00:15:58 MSK; 8 months 2 days ago
 Main PID: 2253 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/lm_sensors.service

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

# ls -l /usr/lib/systemd/system/lm_sensors.service
-rw-r--r-- 1 root root 330 окт 17  2014 /usr/lib/systemd/system/lm_sensors.service

Best regads,
Zamir
Comment 5 Peter Semiletov 2018-10-02 18:22:57 CEST
So is it can be considered as the bug? 
I see the Mageia 1 lm_sensors package with same behaviour (/etc/init.d/lm_sensors), and all following lm_sensors packages for all Mageia too.
Comment 6 Marja Van Waes 2018-10-02 19:29:52 CEST
(In reply to Peter Semiletov from comment #5)
> So is it can be considered as the bug? 
> I see the Mageia 1 lm_sensors package with same behaviour
> (/etc/init.d/lm_sensors), and all following lm_sensors packages for all
> Mageia too.

I really don't know.

CC'ing all packagers collectively, one of them might know and have time to reply.

CC: (none) => pkg-bugs

Comment 7 Thomas Backlund 2018-10-02 20:18:56 CEST
(In reply to Peter Semiletov from comment #5)
> So is it can be considered as the bug? 
> I see the Mageia 1 lm_sensors package with same behaviour
> (/etc/init.d/lm_sensors), and all following lm_sensors packages for all
> Mageia too.

Yeah, but you screwed it up here: :)
http://svnweb.mageia.org/packages/cauldron/lm_sensors/current/SPECS/lm_sensors.spec?r1=1145035&r2=1184569

with this part:
-install -m 755 %{SOURCE2} %{buildroot}%{_initrddir}/lm_sensors
+install -m 755 %{SOURCE0} %{buildroot}%{_initrddir}/lm_sensors

and no-one noticed it (me included) until cjw cleaned it up in:
http://svnweb.mageia.org/packages/cauldron/lm_sensors/current/SPECS/lm_sensors.spec?r1=1234055&r2=1245879

So the fix by cjw should be done for mga6 too

CC: (none) => tmb

Comment 8 Peter Semiletov 2018-10-02 20:45:19 CEST
First I need to test is lm_sensors usable without /etc/init.d/lm_sensors at its "historical" location.
Comment 9 Thomas Backlund 2018-10-02 20:48:31 CEST
It is, as it provides real systemd service files

/usr/lib/systemd/system/lm_sensors.service
/usr/lib/systemd/system/sensord.service
Comment 10 Thomas Backlund 2018-10-02 20:49:27 CEST
init.d files are only needed for old sysvinit that we dont support anynore
Comment 11 Thomas Backlund 2018-10-02 20:50:23 CEST
And I suggest to update it to a newer snapshot at the same time
Comment 12 Peter Semiletov 2018-10-02 22:00:14 CEST
Thanks to all!
How to properly submit it to mga6? 
mgarepo submit 6
or 
mgarepo submit 6/lm_sensors --define section=core/updates_testing -t 6

P.S. I've never submitted outside of the Cauldron before...
Comment 13 Thomas Backlund 2018-10-02 22:06:46 CEST
No, you must checkout the package from updates/6 first:

mgarepo co -d 6 lm_sensors

do your fixes, commit them there, and submit to testing with:

mgarepo submit -t 6 --define section=core/updates_testing
Comment 14 Thomas Backlund 2018-10-02 22:09:23 CEST
And remember, always do fixes in cauldron first, then in stable release so we dont regress on distro upgrades
Comment 15 Peter Semiletov 2018-10-02 23:27:51 CEST
Thanks for advice, Thomas!
Comment 16 Peter Semiletov 2019-02-19 14:01:02 CET
Issue has been solved at 2018

Resolution: (none) => FIXED
Status: NEW => RESOLVED


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