Hello community,

here is the log from the commit of package conky for openSUSE:Leap:15.2 checked 
in at 2020-04-17 13:37:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/conky (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.conky.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "conky"

Fri Apr 17 13:37:49 2020 rev:10 rq:793929 version:1.11.5

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/conky/conky.changes    2020-01-15 
14:50:47.881429140 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.conky.new.2738/conky.changes  2020-04-17 
13:38:13.548250684 +0200
@@ -1,0 +2,96 @@
+Tue Apr 14 08:17:05 UTC 2020 - Simon Lees <sfl...@suse.com>
+
+- Don't require nano with the nano completions, conky shouldn't 
+  pull in nano just for completions.
+
+-------------------------------------------------------------------
+Fri Apr  3 09:24:53 UTC 2020 - Simon Lees <simonf.l...@suse.com>
+
+- Fix negative ram reporting #877 #878 #909 fix-negative-memory.patch
+
+-------------------------------------------------------------------
+Tue Feb 25 00:52:12 UTC 2020 - Simon Lees <sfl...@suse.de>
+
+- IRC support was not correctly disabled on SLE
+- Re add imlib2, librsvg + cairo support on SLE (we still ship it and I'd like 
to
+  use it in configs) it also means we don't need a second Leap package.
+- Run spec-cleaner
+
+-------------------------------------------------------------------
+Mon Dec  9 22:10:54 UTC 2019 - Christophe Giboudeaux <christo...@krop.fr>
+
+- Remove the xmms2 dependency on openSUSE Factory.
+
+-------------------------------------------------------------------
+Tue Aug 20 07:10:49 UTC 2019 - mvet...@suse.com
+
+- Update to 1.11.5:
+  * Fix graph leak and the uninitialized values (#858)
+  * Fix `link_qual_max` getting updated with bad value
+  * Fix heap use-after-free with setlocale
+  * Refactorings and cleanups
+  * For details see:
+    https://github.com/brndnmtthws/conky/compare/v1.11.4...v1.11.5
+- Remove conky-memory-leak-fix.patch: upstreamed
+
+-------------------------------------------------------------------
+Fri Jun 28 09:31:44 UTC 2019 - Dead Mozay <dead_mo...@opensuse.org>
+
+- Add conky-memory-leak-fix.patch Fixes a memory leak in Conky
+
+-------------------------------------------------------------------
+Mon Jun 24 06:07:34 UTC 2019 - mvet...@suse.com
+
+- Update to 1.11.4:
+  * Added option to disable redraw on desktop change
+  * Synchronize access to kstat
+  * Fix various issues
+  * For details see:
+    https://github.com/brndnmtthws/conky/compare/v1.11.3...v1.11.4
+
+-------------------------------------------------------------------
+Tue May 28 08:41:38 UTC 2019 - Simon Lees <sfl...@suse.de>
+
+- Clean up cmake macro's and paramaters further
+- Drop unneeded conky-1.10.4-ncurses.patch
+
+-------------------------------------------------------------------
+Tue May 28 06:33:42 UTC 2019 - Jan Engelhardt <jeng...@inai.de>
+
+- Use %cmake macro to resolve FIXMEs.
+- Trim bias from descriptions.
+
+-------------------------------------------------------------------
+Mon May 27 11:37:12 UTC 2019 - mvet...@suse.com
+
+- Update to 1.11.3:
+  * Allow hwmon command to accept hwmon device name
+  * For details see:
+    https://github.com/brndnmtthws/conky/compare/v1.11.2...v1.11.3
+- Update conky.timestamp.patch and conky-1.10.1-avoid-git.patch
+- Remove libical3.patch: upstreamed
+- Use lua 5.3
+- Install desktop file
+
+-------------------------------------------------------------------
+Mon Mar  5 08:46:59 UTC 2018 - adam.ma...@suse.de
+
+- New upstream version 1.10.8
+  + fixed segfault when HOME is unset
+  + Fix segfault when kernel reports non-sequential SMP CPU indices
+  + Provide support to query active port on PulseAudio's default sink
+  + enable persistent view of irc messages
+  + Fix SEGV in a CPU hotplug environment
+  + GPLv3 is the default license
+  + Support multiple include paths for libbircclient
+- conky-1.10.4-ncurses.patch: comment out - doesn't seem to be needed
+- conky-1.10.0-libircclient.patch: removed, upstreamed.
+- conky.luamm.patch: removed, upstreamed.
+- libical3.patch: adds support for libical 3.x
+
+-------------------------------------------------------------------
+Sat Mar  3 11:55:29 UTC 2018 - jeng...@inai.de
+
+- Explicitly request old libical
+
+-------------------------------------------------------------------
@@ -419,2 +514,0 @@
-
-

Old:
----
  conky-1.10.0-libircclient.patch
  conky-1.10.4-ncurses.patch
  conky-1.10.6.tar.gz
  conky.luamm.patch

New:
----
  conky-1.11.5.tar.gz
  fix-negative-memory.patch

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

Other differences:
------------------
++++++ conky.spec ++++++
--- /var/tmp/diff_new_pack.PEAtWc/_old  2020-04-17 13:38:14.628251496 +0200
+++ /var/tmp/diff_new_pack.PEAtWc/_new  2020-04-17 13:38:14.628251496 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package conky
 #
-# Copyright (c) 2017 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,58 +12,67 @@
 # 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/
 #
 
 
 %bcond_with    audacious
 %bcond_with    cmus
 %bcond_with    libXNVCtrl
-%if 0%{?is_opensuse}
+%if 0%{?is_opensuse} && 0%{?suse_version} <= 1500
 %bcond_without xmms2
 %else
 %bcond_with    xmms2
 %endif
-
 Name:           conky
-Version:        1.10.6
+Version:        1.11.5
 Release:        0
-Summary:        Lightweight System Monitor
-License:        GPL-3.0+ and LGPL-3.0+ and MIT
+Summary:        A System Monitor
+License:        GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT
 Group:          System/Monitoring
-Url:            https://github.com/brndnmtthws/conky
-Source:         
https://github.com/brndnmtthws/conky/archive/v%{version}/conky-%{version}.tar.gz
+URL:            https://github.com/brndnmtthws/conky
+Source:         
https://github.com/brndnmtthws/conky/archive/v%{version}.tar.gz#/conky-%{version}.tar.gz
 Source1:        conkyconf.SUSE
 Source2:        conky.conf.SUSE
 Source3:        README.SUSE
-Patch0:         conky-1.10.0-libircclient.patch
 Patch1:         conky-1.10.1-avoid-git.patch
-# our ncurses doesn't supply a .pc file
-Patch2:         conky-1.10.4-ncurses.patch
-Patch3:         conky.timestamp.patch
-Patch4:         conky.luamm.patch
+Patch2:         conky.timestamp.patch
+Patch3:         fix-negative-memory.patch
 BuildRequires:  cmake
 BuildRequires:  docbook-xsl-stylesheets
 BuildRequires:  docbook2x
 BuildRequires:  freetype2-devel
 BuildRequires:  gcc-c++
-BuildRequires:  libical-devel
+BuildRequires:  hicolor-icon-theme
 BuildRequires:  libiw-devel
 BuildRequires:  libmicrohttpd-devel
 BuildRequires:  libmysqld-devel
 BuildRequires:  libtool
 BuildRequires:  libxslt-tools
-BuildRequires:  lua51-devel
+BuildRequires:  lua53-devel
 BuildRequires:  ncurses-devel
-BuildRequires:  pkg-config
+BuildRequires:  ninja
+BuildRequires:  pkgconfig
 BuildRequires:  update-desktop-files
+BuildRequires:  pkgconfig(cairo)
+BuildRequires:  pkgconfig(cairo-xlib)
 BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(imlib2)
 BuildRequires:  pkgconfig(libcurl)
+BuildRequires:  pkgconfig(libical)
 BuildRequires:  pkgconfig(libpulse)
+BuildRequires:  pkgconfig(librsvg-2.0)
 BuildRequires:  pkgconfig(libxml-2.0)
 BuildRequires:  pkgconfig(xdamage)
 BuildRequires:  pkgconfig(xft)
 BuildRequires:  pkgconfig(xinerama)
+Requires:       fontawesome-fonts
+# This is required for imlib2 function properly.
+Requires:       imlib2-loaders
+Provides:       conky-cairo = %{version}
+Obsoletes:      conky-cairo < %{version}
+Provides:       conky-imlib2 = %{version}
+Obsoletes:      conky-imlib2 < %{version}
 %if %{with audacious}
 BuildRequires:  pkgconfig(audacious)
 BuildRequires:  pkgconfig(audclient)
@@ -76,8 +85,6 @@
 Provides:       conky-feature-nvidia = %{version}
 Obsoletes:      conky-feature-nvidia < %{version}
 %endif
-Provides:       conky-cairo = %{version}
-Obsoletes:      conky-cairo < %{version}
 %if 0%{?is_opensuse}
 %if 0%{?suse_version} >= 1315
 BuildRequires:  libircclient-devel
@@ -85,44 +92,20 @@
 %else
 BuildRequires:  tolua++
 %endif
-BuildRequires:  pkgconfig(cairo)
-BuildRequires:  pkgconfig(cairo-xlib)
-BuildRequires:  pkgconfig(imlib2)
-BuildRequires:  pkgconfig(librsvg-2.0)
 %if %{with xmms2}
 BuildRequires:  pkgconfig(xmms2-client)
 %endif
-# This is required for imlib2 function properly.
-Requires:       imlib2-loaders
-Provides:       conky-imlib2 = %{version}
-Obsoletes:      conky-imlib2 < %{version}
 %endif
-Requires:       fontawesome-fonts
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
-Conky is an advanced, highly configurable system monitor for X.
-
-This package is built with support for:
-%if %{with audacious}
-- audacious
-%endif
-%if %{with cmus}
-- cmus
-%endif
-%if %{with libXNVCtrl}
-- nVidia GPUs
-%endif
-%if %{with xmms2}
-- xmms2
-%endif
+Conky is an configurable system monitor.
 
 %package doc
 Summary:        Documentation for conky
 Group:          Documentation/HTML
 
 %description doc
-Conky is an advanced, highly configurable system monitor for X.
+Conky is an configurable system monitor for X.
 
 This package provides additional documentation about conky.
 
@@ -134,7 +117,7 @@
 Obsoletes:      conky-vim < %{version}
 
 %description -n vim-plugin-conky
-Conky is an advanced, highly configurable system monitor for X.
+Conky is an configurable system monitor for X.
 
 This package provides syntax highlighting support for conky
 configuration files in vim.
@@ -142,34 +125,34 @@
 %package -n nano-plugin-conky
 Summary:        Conky Configuration File Support for nano
 Group:          Productivity/Text/Editors
-Requires:       nano
 Provides:       conky-nano = %{version}
 Obsoletes:      conky-nano < %{version}
 
 %description -n nano-plugin-conky
-Conky is an advanced, highly configurable system monitor for X.
+Conky is an configurable system monitor for X.
 
 This package provides syntax highlighting support for conky
 configuration files in nano.
 
 %prep
 %setup -q
-%if 0%{?is_opensuse}
-%patch0 -p1
-%endif
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
+%autopatch -p1
 
 %build
-mkdir build && cd build
-cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-       -DLIB_INSTALL_DIR=%{_libdir} \
-       -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+%cmake -G Ninja \
        -DBUILD_APCUPSD=ON \
        -DBUILD_ARGB=ON \
+%if %{with audacious}
+       -DBUILD_AUDACIOUS=ON \
+%else
+    -DBUILD_AUDACIOUS=OFF \
+%endif
        -DBUILD_BMPX=OFF \
+%if %{with cmus}
+       -DBUILD_CMUS=ON \
+%else
+    -DBUILD_CMUS=OFF \
+%endif
        -DBUILD_CURL=ON \
        -DBUILD_EVE=ON \
        -DBUILD_HDDTEMP=ON \
@@ -178,22 +161,14 @@
        -DBUILD_IBM=ON \
        -DBUILD_ICAL=ON \
        -DBUILD_ICONV=ON \
-%if 0%{?is_opensuse}
        -DBUILD_LUA_CAIRO=ON \
        -DBUILD_IMLIB2=ON \
         -DBUILD_LUA_IMLIB2=ON \
-%if 0%{?suse_version} >= 1315
-       -DBUILD_IRC=ON \
-%else
-        -DBUILD_IRC=OFF \
-%endif
        -DBUILD_LUA_RSVG=ON \
+%if 0%{?is_opensuse}
+    -DBUILD_IRC=ON \
 %else
-       -DBUILD_LUA_CAIRO=OFF \
-       -DBUILD_IMLIB2=OFF \
-        -DBUILD_LUA_IMLIB2=OFF \
         -DBUILD_IRC=OFF \
-       -DBUILD_LUA_RSVG=OFF \
 %endif
 %if %{with xmms2}
        -DBUILD_XMMS2=ON \
@@ -207,6 +182,11 @@
        -DBUILD_MPD=ON \
        -DBUILD_MYSQL=ON \
        -DBUILD_NCURSES=ON \
+%if %{with libXNVCtrl}
+       -DBUILD_NVIDIA=ON \
+%else
+    -DBUILD_NVIDIA=OFF \
+%endif
        -DBUILD_PORT_MONITORS=ON \
        -DBUILD_PULSEAUDIO=ON \
        -DBUILD_RSS=ON \
@@ -220,22 +200,9 @@
        -DBUILD_XFT=ON \
        -DBUILD_XSHAPE=ON \
        -DOWN_WINDOW=ON \
-       -DBUILD_AUDACIOUS=OFF \
-       -DBUILD_CMUS=OFF \
-       -DBUILD_NVIDIA=OFF \
-       -DBUILD_XMMS2=OFF \
-%if %{with audacious}
-       -DBUILD_AUDACIOUS=ON \
-%endif
-%if %{with cmus}
-       -DBUILD_CMUS=ON \
-%endif
-%if %{with libXNVCtrl}
-       -DBUILD_NVIDIA=ON \
-%endif
-       ..
+       -DBUILD_XMMS2=OFF
 
-make %{?_smp_mflags}
+%ninja_build
 
 # build doc
 cd ../doc
@@ -254,9 +221,7 @@
 gzip conky.1
 
 %install
-cd build
-make DESTDIR=%{buildroot} install %{?_smp_mflags}
-cd ..
+%ninja_install -C build
 
 # not doc
 rm -rf %{buildroot}%{_datadir}/doc/%{name}-%{version}
@@ -281,29 +246,28 @@
 rm -rf %{buildroot}%{_libdir}/conky/*.{a,la}
 
 %files
-%defattr(-,root,root)
-%doc AUTHORS ChangeLog COPYING NEWS README.md TODO README.SUSE
+%license COPYING
+%doc AUTHORS README.md README.SUSE
 %dir %{_sysconfdir}/conky
 %{_sysconfdir}/conky/convert.lua
 %config(noreplace) %{_sysconfdir}/conky/conky.conf
 %config(noreplace) %{_sysconfdir}/conky/conky_no_x11.conf
 %{_bindir}/conky
 %{_bindir}/conkyconf
-%doc %{_mandir}/man1/conky.1%{ext_man}
-%if 0%{?is_opensuse}
+%{_mandir}/man1/conky.1%{?ext_man}
 %dir %{_libdir}/conky
 %{_libdir}/conky/libcairo.so
-%{_libdir}/conky/librsvg.so
 %{_libdir}/conky/libcairo_imlib2_helper.so
 %{_libdir}/conky/libimlib2.so
-%endif
+%{_libdir}/conky/librsvg.so
+%{_datadir}/applications/conky.desktop
+%{_datadir}/icons/hicolor/scalable/apps/conky-logomark-violet.svg
+%{_libdir}/libtcp-portmon.so
 
 %files doc
-%defattr(-,root,root)
 %doc doc/*.html
 
 %files -n vim-plugin-conky
-%defattr(-,root,root)
 %dir %{_datadir}/vim
 %dir %{_datadir}/vim/site
 %dir %{_datadir}/vim/site/syntax
@@ -312,7 +276,6 @@
 %{_datadir}/vim/site/syntax/conkyrc.vim
 
 %files -n nano-plugin-conky
-%defattr(-,root,root)
 %dir %{_datadir}/nano
 %{_datadir}/nano/conky.nanorc
 

++++++ conky-1.10.1-avoid-git.patch ++++++
--- /var/tmp/diff_new_pack.PEAtWc/_old  2020-04-17 13:38:14.664251523 +0200
+++ /var/tmp/diff_new_pack.PEAtWc/_new  2020-04-17 13:38:14.664251523 +0200
@@ -1,12 +1,11 @@
-Index: conky-1.10.1/cmake/Conky.cmake
-===================================================================
---- conky-1.10.1.orig/cmake/Conky.cmake
-+++ conky-1.10.1/cmake/Conky.cmake
-@@ -20,7 +20,7 @@
+diff -urEbw conky-1.11.3/cmake/Conky.cmake conky-1.11.3.new/cmake/Conky.cmake
+--- conky-1.11.3/cmake/Conky.cmake     2019-02-23 03:12:15.000000000 +0100
++++ conky-1.11.3.new/cmake/Conky.cmake 2019-05-27 13:28:10.901251709 +0200
+@@ -18,7 +18,7 @@
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  #
  
--#set(RELEASE true)
+-# set(RELEASE true)
 +set(RELEASE true)
  
  # Set system vars

++++++ conky-1.10.6.tar.gz -> conky-1.11.5.tar.gz ++++++
++++ 290748 lines of diff (skipped)

++++++ conky.timestamp.patch ++++++
--- /var/tmp/diff_new_pack.PEAtWc/_old  2020-04-17 13:38:15.012251784 +0200
+++ /var/tmp/diff_new_pack.PEAtWc/_new  2020-04-17 13:38:15.012251784 +0200
@@ -1,52 +1,57 @@
---- a/cmake/Conky.cmake
-+++ b/cmake/Conky.cmake
-@@ -105,7 +105,7 @@ mark_as_advanced(APP_AWK APP_WC APP_DATE
- #BUILD_ARCH="$(uname -sr) ($(uname -m))"
- execute_process(COMMAND ${APP_DATE} RESULT_VARIABLE RETVAL OUTPUT_VARIABLE
-       BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
--execute_process(COMMAND ${APP_UNAME} -srm RESULT_VARIABLE RETVAL
-+execute_process(COMMAND ${APP_UNAME} -sm RESULT_VARIABLE RETVAL
-       OUTPUT_VARIABLE BUILD_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
- 
- if(RELEASE)
---- a/src/llua.cc
-+++ b/src/llua.cc
-@@ -161,15 +161,12 @@ void llua_init(void)
-       free(old_path);
-       free(new_path);
- 
--      lua_pushstring(lua_L, PACKAGE_NAME" " VERSION" compiled " BUILD_DATE" 
for " BUILD_ARCH);
-+      lua_pushstring(lua_L, PACKAGE_NAME" " VERSION" compiled for " 
BUILD_ARCH);
-       lua_setglobal(lua_L, "conky_build_info");
+diff -urEbw conky-1.11.3/cmake/Conky.cmake conky-1.11.3.new/cmake/Conky.cmake
+--- conky-1.11.3/cmake/Conky.cmake     2019-02-23 03:12:15.000000000 +0100
++++ conky-1.11.3.new/cmake/Conky.cmake 2019-05-27 13:33:30.002789694 +0200
+@@ -155,7 +155,7 @@
+                 RESULT_VARIABLE RETVAL
+                 OUTPUT_VARIABLE BUILD_DATE
+                 OUTPUT_STRIP_TRAILING_WHITESPACE)
+-execute_process(COMMAND ${APP_UNAME} -srm
++execute_process(COMMAND ${APP_UNAME} -sm
+                 RESULT_VARIABLE RETVAL
+                 OUTPUT_VARIABLE BUILD_ARCH
+                 OUTPUT_STRIP_TRAILING_WHITESPACE)
+diff -urEbw conky-1.11.3/src/core.cc conky-1.11.3.new/src/core.cc
+--- conky-1.11.3/src/core.cc   2019-02-23 03:12:15.000000000 +0100
++++ conky-1.11.3.new/src/core.cc       2019-05-27 13:36:05.839543761 +0200
+@@ -823,7 +823,6 @@
+   obj->callbacks.free = &gen_free_opaque;
+ #endif /* BUILD_X11 */
+   END OBJ(conky_version, nullptr) obj_be_plain_text(obj, VERSION);
+-  END OBJ(conky_build_date, nullptr) obj_be_plain_text(obj, BUILD_DATE);
+   END OBJ(conky_build_arch, nullptr) obj_be_plain_text(obj, BUILD_ARCH);
+   END OBJ(downspeed, &update_net_stats)
+       parse_net_stat_arg(obj, arg, free_at_crash);
+diff -urEbw conky-1.11.3/src/llua.cc conky-1.11.3.new/src/llua.cc
+--- conky-1.11.3/src/llua.cc   2019-02-23 03:12:15.000000000 +0100
++++ conky-1.11.3.new/src/llua.cc       2019-05-27 13:33:30.034789848 +0200
+@@ -154,16 +154,12 @@
+   lua_setfield(lua_L, -3, "cpath");
+   lua_pop(lua_L, 2);
+ 
+-  lua_pushstring(lua_L, PACKAGE_NAME " " VERSION " compiled " BUILD_DATE
+-                                     " for " BUILD_ARCH);
++  lua_pushstring(lua_L, PACKAGE_NAME " " VERSION " compiled for " BUILD_ARCH);
+   lua_setglobal(lua_L, "conky_build_info");
  
-       lua_pushstring(lua_L, VERSION);
-       lua_setglobal(lua_L, "conky_version");
+   lua_pushstring(lua_L, VERSION);
+   lua_setglobal(lua_L, "conky_version");
  
--      lua_pushstring(lua_L, BUILD_DATE);
--      lua_setglobal(lua_L, "conky_build_date");
+-  lua_pushstring(lua_L, BUILD_DATE);
+-  lua_setglobal(lua_L, "conky_build_date");
 -
-       lua_pushstring(lua_L, BUILD_ARCH);
-       lua_setglobal(lua_L, "conky_build_arch");
+   lua_pushstring(lua_L, BUILD_ARCH);
+   lua_setglobal(lua_L, "conky_build_arch");
  
---- a/src/conky.cc
-+++ b/src/conky.cc
-@@ -246,7 +246,7 @@ static void reload_config(void);
- 
- static void print_version(void)
- {
--        std::cout << _(PACKAGE_NAME" " VERSION" compiled " BUILD_DATE" for " 
BUILD_ARCH"\n"
-+        std::cout << _(PACKAGE_NAME" " VERSION" compiled for " BUILD_ARCH"\n"
-                 "\nCompiled in features:\n\n"
-                 "System config file: " SYSTEM_CONFIG_FILE"\n"
-                 "Package library path: " PACKAGE_LIBDIR"\n\n")
---- a/src/core.cc
-+++ b/src/core.cc
-@@ -706,8 +706,6 @@ struct text_object *construct_text_objec
- #endif /* BUILD_X11 */
-       END OBJ(conky_version, 0)
-               obj_be_plain_text(obj, VERSION);
--      END OBJ(conky_build_date, 0)
--              obj_be_plain_text(obj, BUILD_DATE);
-       END OBJ(conky_build_arch, 0)
-               obj_be_plain_text(obj, BUILD_ARCH);
-       END OBJ(downspeed, &update_net_stats)
+diff -urEbw conky-1.11.3/src/main.cc conky-1.11.3.new/src/main.cc
+--- conky-1.11.3/src/main.cc   2019-02-23 03:12:15.000000000 +0100
++++ conky-1.11.3.new/src/main.cc       2019-05-27 13:35:28.959365326 +0200
+@@ -56,8 +56,7 @@
+ #endif /* BUILD_BUILTIN_CONFIG */
+ 
+ static void print_version() {
+-  std::cout << _(PACKAGE_NAME " " VERSION " compiled " BUILD_DATE
+-                              " for " BUILD_ARCH
++  std::cout << _(PACKAGE_NAME " " VERSION " compiled for " BUILD_ARCH
+                               "\n"
+                               "\nCompiled in features:\n\n"
+                               "System config file: " SYSTEM_CONFIG_FILE

++++++ fix-negative-memory.patch ++++++
commit 0d449029eaee689da88fcf1d0d572188f4e757d6
Author: Shark-Teeth <50938330+ctrlseque...@users.noreply.github.com>
Date:   Tue Aug 27 13:03:41 2019 -0400

    Fix negative RAM usage (#878)
    
    This seems to be causing some issues with clobbering memory values, and
    since there is callback functionality already working, this seems
    unnecessary.
    
    * Make all calculations local to function
    
    I moved from making the assignments and calculations of certain memory
    values to doing the calculations on local variables and assigning them
    at the end of the function for update_meminfo().
    
    This is to keep the info.memX variables from having 'intermediary'
    values that may give wrong values to other functions if the structure is
    read from while the function is currently executing.
    
    As a matter of keeping the variables consistent across function calls, I
    removed the zeroing out of certain info struct variables so that if they
    are read from, they'll still report a sane value. Since the only change
    to the value a direct assignment at the end of the function, they
    shouldn't need zeroing out in the first place.

diff --git a/src/linux.cc b/src/linux.cc
index 57760fac..c1e0634e 100644
--- a/src/linux.cc
+++ b/src/linux.cc
@@ -179,11 +179,18 @@ int update_meminfo(void) {
   /* unsigned int a; */
   char buf[256];
 
-  unsigned long long shmem = 0, sreclaimable = 0;
-
-  info.mem = info.memwithbuffers = info.memmax = info.memdirty = info.swap =
-      info.swapfree = info.swapmax = info.bufmem = info.buffers = info.cached =
-          info.memfree = info.memeasyfree = 0;
+  /* With multi-threading, calculations that require
+   * multple steps to reach a final result can cause havok
+   * if the intermediary calculations are directly assigned to the
+   * information struct (they may be read by other functions in the meantime).
+   * These variables keep the calculations local to the function and finish off
+   * the function by assigning the results to the information struct */
+  unsigned long long shmem = 0, sreclaimable = 0, curmem = 0, curbufmem = 0,
+                     cureasyfree = 0;
+
+  info.memmax = info.memdirty = info.swap = info.swapfree = info.swapmax =
+      info.memwithbuffers = info.buffers = info.cached = info.memfree =
+          info.memeasyfree = 0;
 
   if (!(meminfo_fp = open_file("/proc/meminfo", &reported))) { return 0; }
 
@@ -211,8 +218,8 @@ int update_meminfo(void) {
     }
   }
 
-  info.mem = info.memwithbuffers = info.memmax - info.memfree;
-  info.memeasyfree = info.memfree;
+  curmem = info.memwithbuffers = info.memmax - info.memfree;
+  cureasyfree = info.memfree;
   info.swap = info.swapmax - info.swapfree;
 
   /* Reclaimable memory: does not include shared memory, which is part of 
cached
@@ -220,17 +227,24 @@ int update_meminfo(void) {
      Note: when shared memory is swapped out, shmem decreases and swapfree
      decreases - we want this.
   */
-  info.bufmem = (info.cached - shmem) + info.buffers + sreclaimable;
+  curbufmem = (info.cached - shmem) + info.buffers + sreclaimable;
 
-  /* Now (info.mem - info.bufmem) is the *really used* (aka unreclaimable)
+  /* Now ('info.mem' - 'info.bufmem') is the *really used* (aka unreclaimable)
      memory. When this value reaches the size of the physical RAM, and swap is
      full or non-present, OOM happens. Therefore this is the value users want 
to
      monitor, regarding their RAM.
   */
   if (no_buffers.get(*state)) {
-    info.mem -= info.bufmem;
-    info.memeasyfree += info.bufmem;
+    curmem -= curbufmem;
+    cureasyfree += curbufmem;
   }
+
+  /* Now that we know that every calculation is finished we can wrap up
+   * by assigning the values to the information structure */
+  info.mem = curmem;
+  info.bufmem = curbufmem;
+  info.memeasyfree = cureasyfree;
+
   fclose(meminfo_fp);
   return 0;
 }
diff --git a/src/top.cc b/src/top.cc
index d3c5a7ad..a80e3b7a 100644
--- a/src/top.cc
+++ b/src/top.cc
@@ -390,10 +390,6 @@ static void process_find_top(struct process **cpu, struct 
process **mem,
 }
 
 int update_top() {
-  // XXX: this was a separate callback. and it should be again, as soon as it's
-  // possible
-  update_meminfo();
-
   process_find_top(info.cpu, info.memu, info.time
 #ifdef BUILD_IOSTATS
                    ,

Reply via email to