Replace fix for rhbz#1464548 from upstream commit

Add upstream patch to fix README
This commit is contained in:
Björn Esser 2017-07-01 09:55:06 +02:00
parent 5edf9f427d
commit 7edc25c2b5
4 changed files with 64 additions and 17 deletions

View File

@ -0,0 +1,23 @@
From 18d6ca75bbc504aaf9fe862dc1c10c3c65fbe7bd Mon Sep 17 00:00:00 2001
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Fri, 30 Jun 2017 10:23:48 -0700
Subject: [PATCH] Initialize lowest_valid_index to prevent SEGV
Chris Murphy reported ThermalMonitor crash by signal 11.
Fix this by initializing lowest_valid_index to 0.
---
tools/thermal_monitor/thermaldinterface.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/thermal_monitor/thermaldinterface.cpp b/tools/thermal_monitor/thermaldinterface.cpp
index eca8d74..e73b7a5 100644
--- a/tools/thermal_monitor/thermaldinterface.cpp
+++ b/tools/thermal_monitor/thermaldinterface.cpp
@@ -453,6 +453,7 @@ int ThermaldInterface::getZoneInformation(uint index, zoneInformationType &info)
info.name = result.arguments().at(0).toString();
info.sensor_count = result.arguments().at(1).toInt();
info.trip_count = result.arguments().at(2).toInt();
+ info.lowest_valid_index = 0;
return 0;
} else {
qCritical() << "error from" << iface->interface() << result.errorMessage();

View File

@ -1,12 +0,0 @@
Index: thermal_daemon-1.6/tools/thermal_monitor/thermaldinterface.cpp
===================================================================
--- thermal_daemon-1.6.orig/tools/thermal_monitor/thermaldinterface.cpp
+++ thermal_daemon-1.6/tools/thermal_monitor/thermaldinterface.cpp
@@ -453,6 +453,7 @@ int ThermaldInterface::getZoneInformatio
info.name = result.arguments().at(0).toString();
info.sensor_count = result.arguments().at(1).toInt();
info.trip_count = result.arguments().at(2).toInt();
+ info.lowest_valid_index = 0;
return 0;
} else {
qCritical() << "error from" << iface->interface() << result.errorMessage();

View File

@ -0,0 +1,34 @@
From 07d7077af1992d52733b0dcf18538690a87b877f Mon Sep 17 00:00:00 2001
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Fri, 30 Jun 2017 10:42:17 -0700
Subject: [PATCH] Update README to start service
Added comment for starting service when using upstart and systemd.
---
README.txt | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/README.txt b/README.txt
index 26ba507..f67bf7f 100644
--- a/README.txt
+++ b/README.txt
@@ -66,8 +66,17 @@ Build
(It will give error for systemd configuration, but ignore)
cp data/thermald.conf /etc/init/
3.
-Use "sudo start thermald" to start
-Use "sudo stop thermald" to stop
+If using upstart
+ Use "sudo start thermald" to start
+ Use "sudo stop thermald" to stop
+
+If using systemd, use
+- start service
+ sudo systemctl start thermald.service
+- Get status
+ sudo systemctl status thermald.service
+- Stop service
+ sudo systemctl stop thermald.service
-------------------------------------------

View File

@ -8,7 +8,7 @@
Name: thermald
Version: 1.6
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Thermal Management daemon
License: GPLv2+
@ -27,10 +27,8 @@ Patch7: %{url}/commit/8f7d49be960dd19edaef452a89b541e4509caef7.patch#/%{name}-1
Patch8: %{url}/commit/18989faac5138213a99f63346e49f4279caad9fb.patch#/%{name}-1.6-dont_terminate_the_thermald_engine_if_thd_engine_is_null.patch
Patch9: %{url}/commit/90169f80a70efd4d5b6101e87666cd355dbd786f.patch#/%{name}-1.6-removed_compile_flags.patch
Patch10: %{url}/commit/9c5d8354dd8efff340a030c05f7beda03061cd0a.patch#/%{name}-1.6-fix_dbus_re-init_accessing_deleted_pointer.patch
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1464548
# https://github.com/intel/thermal_daemon/issues/132
Patch1000: %{name}-1.6-rhbz1464548.patch
Patch11: %{url}/commit/18d6ca75bbc504aaf9fe862dc1c10c3c65fbe7bd.patch#/%{name}-1.6-initialize_lowest_valid_index_to_prevent_SEGV.patch
Patch12: %{url}/commit/07d7077af1992d52733b0dcf18538690a87b877f.patch#/%{name}-1.6-update_README_to_start_service.patch
# No cpuid.h on other arches.
ExclusiveArch: %{ix86} x86_64
@ -275,6 +273,10 @@ fi
%changelog
* Sat Jul 01 2017 Björn Esser <besser82@fedoraproject.org> - 1.6-5
- Replace fix for rhbz#1464548 from upstream commit
- Add upstream patch to fix README
* Fri Jun 30 2017 Björn Esser <besser82@fedoraproject.org> - 1.6-4
- Add upstream patch to fix ThermalMonitor (rhbz#1464548)
- Add several fixes from upstream