Hello community,

here is the log from the commit of package xosview for openSUSE:Factory checked 
in at 2020-03-30 23:05:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xosview (Old)
 and      /work/SRC/openSUSE:Factory/.xosview.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xosview"

Mon Mar 30 23:05:33 2020 rev:46 rq:789754 version:1.21

Changes:
--------
--- /work/SRC/openSUSE:Factory/xosview/xosview.changes  2019-02-27 
15:07:36.586420325 +0100
+++ /work/SRC/openSUSE:Factory/.xosview.new.3160/xosview.changes        
2020-03-30 23:05:40.296254044 +0200
@@ -1,0 +2,6 @@
+Mon Mar 23 11:29:53 UTC 2020 - Dr. Werner Fink <[email protected]>
+
+- Add patch xosview-1.21-lmstemp.patch to be able to determine
+  dynamically the coretemp intpu files below sys 
+
+-------------------------------------------------------------------

New:
----
  xosview-1.21-lmstemp.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xosview.spec ++++++
--- /var/tmp/diff_new_pack.qYzK5j/_old  2020-03-30 23:05:40.944254413 +0200
+++ /var/tmp/diff_new_pack.qYzK5j/_new  2020-03-30 23:05:40.944254413 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package xosview
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
@@ -33,7 +33,7 @@
 Summary:        System Load Information
 License:        GPL-2.0-or-later
 Group:          System/Monitoring
-Url:            https://github.com/hills/%{name}
+URL:            https://github.com/hills/%{name}
 Source:         
https://github.com/hills/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
 Source1:        rc.config.xosview
 Source2:        xosview.png
@@ -43,11 +43,14 @@
 Patch0:         xosview-1.19.dif
 Patch10:        xosview-1.19-appdef.patch
 Patch11:        xosview-1.16-diskstat.patch
+# PATCH-FIX-SUSE: allow more than one maybe not exsting lmstemp resource entry
+Patch12:        xosview-1.21-lmstemp.patch
 # NOTE: We don't want this dependency and desktop-data-SuSE is in all
 # desktop selections.
 #Requires:    desktop-data-SuSE
 # /usr/bin/xrdb
 Requires:       xrdb
+Requires(post): sed
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
@@ -59,6 +62,7 @@
 %setup -q
 %patch10  -b .appdef
 %patch11  -b .diskstat
+%patch12  -b .lmst
 %patch0   -b .p0
 
 %build
@@ -97,6 +101,16 @@
 mkdir -p %{buildroot}%{_datadir}/applications
 install -m 644 %{SOURCE3} %{buildroot}%{_datadir}/applications
 
+%post
+mon=1
+for lmstemp in /sys/devices/platform/coretemp.0/hwmon/hwmon*/temp*_input
+do
+    test -e "${lmstemp}" || continue
+    test -e %{_appdefdir}/XOsview || break
+    sed -ri "s@\![[:space:]]+(\\*lmstemp${mon}:[[:space:]]+)temp${mon}@\1 
${lmstemp}@" %{_appdefdir}/XOsview
+    mon=$((1+$mon))
+done
+
 %files
 %defattr(-,root,root)
 %{_datadir}/pixmaps/xosview.png
@@ -108,7 +122,7 @@
 %{_bindir}/xosview
 %{_bindir}/xosview.bin
 %dir %{_appdefdir}
-%config %{_appdefdir}/XOsview
+%config %verify(not md5 size mtime) %{_appdefdir}/XOsview
 %{_mandir}/man1/xosview.1%{ext_man}
 %dir %{_docdir}/xosview/
 %doc %{_docdir}/xosview/README

++++++ xosview-1.21-lmstemp.patch ++++++
---
 linux/MeterMaker.cc |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- linux/MeterMaker.cc
+++ linux/MeterMaker.cc 2020-03-23 09:48:53.634728539 +0000
@@ -215,11 +215,14 @@ void MeterMaker::makeMeters(void){
     const char *tempfile, *highfile, *lowfile, *name, *label;
     snprintf( caption, 16, "ACT/HIGH/%s",
               _xos->getResourceOrUseDefault("lmstempHighest", "100") );
-    for (int i = 1 ; ; i++) {
+    for (int i = 1 ; i < 1000 ; i++) {
       snprintf(s, 16, "lmstemp%d", i);
-      tempfile = _xos->getResourceOrUseDefault(s, NULL);
+      tempfile = (char*)_xos->getResourceOrUseDefault(s, NULL);
       if (!tempfile || !*tempfile)
         break;
+      std::ifstream stats(tempfile);
+      if (!stats)
+        continue;
       snprintf(s, 16, "lmshigh%d", i);
       highfile = _xos->getResourceOrUseDefault(s, NULL);
       snprintf(s, 16, "lmslow%d", i);


Reply via email to