diff --git a/change-pidfile-path-from-var-run-to-run.patch b/change-pidfile-path-from-var-run-to-run.patch new file mode 100644 index 0000000..b4c029d --- /dev/null +++ b/change-pidfile-path-from-var-run-to-run.patch @@ -0,0 +1,35 @@ +From: puneetse <22071208+puneetse@users.noreply.github.com> +Date: Wed, 11 Mar 2020 09:36:51 -0700 +Subject: Change PIDFile path from /var/run to /run +Git-commit: 25f4f8793730ef3d170f1f2bd729a82fd61a4784 +Patch-mainline: Yes +References: bsc#1185183 + +/var/run is considered a legacy directory by systemd 239+ and having it in unit files causes a warning to be emitted to the journal. +--- + prog/init/fancontrol.service | 2 +- + prog/init/sensord.service | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/prog/init/fancontrol.service ++++ b/prog/init/fancontrol.service +@@ -5,7 +5,7 @@ After=lm_sensors.service + + [Service] + Type=simple +-PIDFile=/var/run/fancontrol.pid ++PIDFile=/run/fancontrol.pid + ExecStart=/usr/sbin/fancontrol + + [Install] +--- a/prog/init/sensord.service ++++ b/prog/init/sensord.service +@@ -5,7 +5,7 @@ After=lm_sensors.service + [Service] + EnvironmentFile=/etc/sysconfig/sensord + Type=forking +-PIDFile=/var/run/sensord.pid ++PIDFile=/run/sensord.pid + ExecStart=/usr/sbin/sensord -i $INTERVAL -l $LOG_INTERVAL -f daemon $SENSORD_ARGS + + [Install] diff --git a/sensors.changes b/sensors.changes index 438d40f..8dd75f9 100644 --- a/sensors.changes +++ b/sensors.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Apr 26 13:06:50 UTC 2021 - Jean Delvare + +- change-pidfile-path-from-var-run-to-run.patch: Change PIDFile + path from /var/run to /run (bsc#1185183). +- var-run-deprecated.patch: /var/run is deprecated (bsc#1185183). + ------------------------------------------------------------------- Thu Feb 11 14:41:45 UTC 2021 - Jean Delvare diff --git a/sensors.spec b/sensors.spec index 511b36d..6ed9c99 100644 --- a/sensors.spec +++ b/sensors.spec @@ -43,12 +43,15 @@ Patch6: lm_sensors-3.4.0-sensord-service-extra-args.patch #PATCH-FEATURE-UPSTREAM add ftsteutates support Patch7: lm_sensors-3.4.0-sensors-detect-add-ftsteutates-support.patch Patch8: lm_sensors-3.5.0-libsensors-fix-soname.patch -#PATCH-FEATURE-UPSTREAM add ftsteutates support +#PATCH-FEATURE-UPSTREAM fix w83677hgi support Patch9: lm_sensors-3.6.0-sensors-detect-fix-driver-for-w83677hgi.patch #PATCH-FIX-UPSTREAM Deal gracefully with unreadable fan inputs Patch10: pwmconfig-handle-fan-input-error.patch #PATCH-FIX-UPSTREAM Further raise the fan threshold Patch11: pwmconfig-raise-fan-threshold.patch +#PATCH-FIX-UPSTREAM Change PIDFile path from /var/run to /run +Patch12: change-pidfile-path-from-var-run-to-run.patch +Patch13: var-run-deprecated.patch BuildRequires: bison BuildRequires: flex BuildRequires: rrdtool-devel @@ -120,6 +123,8 @@ sense to the user. %patch9 -p1 %patch10 -p1 %patch11 -p1 +%patch12 -p1 +%patch13 -p1 %build RPM_OPT_FLAGS="%{optflags}" diff --git a/var-run-deprecated.patch b/var-run-deprecated.patch new file mode 100644 index 0000000..9dcb3a4 --- /dev/null +++ b/var-run-deprecated.patch @@ -0,0 +1,69 @@ +From: Jean Delvare +Subject: /var/run is deprecated +Patch-mainline: Not yet, will submit later today +References: bsc#1185183 + +Systemd now wants PID files in /run, not /var/run. Service files have +been updated upstream already, but not the path used by the actual +programs. Change them too so that things don't break when the +/var/run symlink is eventually dropped. +--- + prog/pwm/fancontrol | 2 +- + prog/pwm/pwmconfig | 2 +- + prog/sensord/args.c | 4 ++-- + prog/sensord/sensord.8 | 2 +- + 4 files changed, 5 insertions(+), 5 deletions(-) + +--- a/prog/pwm/fancontrol ++++ b/prog/pwm/fancontrol +@@ -38,7 +38,7 @@ + # + # + +-PIDFILE="/var/run/fancontrol.pid" ++PIDFILE="/run/fancontrol.pid" + + #DEBUG=1 + MAX=255 +--- a/prog/pwm/pwmconfig ++++ b/prog/pwm/pwmconfig +@@ -30,7 +30,7 @@ + # + + LM_VERSION='3.6.0' +-PIDFILE="/var/run/fancontrol.pid" ++PIDFILE="/run/fancontrol.pid" + + if [ -f "$PIDFILE" ] + then +--- a/prog/sensord/args.c ++++ b/prog/sensord/args.c +@@ -33,7 +33,7 @@ + #include "version.h" + + struct sensord_arguments sensord_args = { +- .pidFile = "/var/run/sensord.pid", ++ .pidFile = "/run/sensord.pid", + .scanTime = 60, + .logTime = 30 * 60, + .rrdTime = 5 * 60, +@@ -97,7 +97,7 @@ static const char *daemonSyntax = + " -T, --rrd-no-average -- switch RRD in non-average mode\n" + " -r, --rrd-file -- RRD file (default )\n" + " -c, --config-file -- configuration file\n" +- " -p, --pid-file -- PID file (default /var/run/sensord.pid)\n" ++ " -p, --pid-file -- PID file (default /run/sensord.pid)\n" + " -f, --syslog-facility -- syslog facility to use (default local4)\n" + " -g, --rrd-cgi -- output an RRD CGI script and exit\n" + " -a, --load-average -- include load average in RRD file\n" +--- a/prog/sensord/sensord.8 ++++ b/prog/sensord/sensord.8 +@@ -86,7 +86,7 @@ configuration file is used. + + .IP "-p, --pid-file file" + Specify what PID file to write; the default is to write the file +-`/var/run/sensord.pid'. You should always specify an absolute path ++`/run/sensord.pid'. You should always specify an absolute path + here. The file is removed when the daemon exits. + .IP "-f, --syslog-facility facility" + Specify the