Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package gkrellm for openSUSE:Factory checked in at 2026-01-05 14:55:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gkrellm (Old) and /work/SRC/openSUSE:Factory/.gkrellm.new.1928 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gkrellm" Mon Jan 5 14:55:12 2026 rev:45 rq:1325378 version:2.5.0 Changes: -------- --- /work/SRC/openSUSE:Factory/gkrellm/gkrellm.changes 2026-01-01 15:02:02.429417825 +0100 +++ /work/SRC/openSUSE:Factory/.gkrellm.new.1928/gkrellm.changes 2026-01-05 14:58:12.698878593 +0100 @@ -1,0 +2,10 @@ +Sun Jan 4 17:43:56 UTC 2026 - Hans-Peter Jansen <[email protected]> + +- Apply d26f500ce30592313051e5c2f96b90cfd285791b.patch with minor + adjustments +- Add temporary build hack to build without switching to meson + implies systemd dependency is always on now +- Remove build conditionals for suse_version > 12.2 +- Refresh gkrellm-lib64-plugins-dir.patch + +------------------------------------------------------------------- New: ---- d26f500ce30592313051e5c2f96b90cfd285791b.patch ----------(New B)---------- New: - Apply d26f500ce30592313051e5c2f96b90cfd285791b.patch with minor adjustments ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gkrellm.spec ++++++ --- /var/tmp/diff_new_pack.8Mriph/_old 2026-01-05 14:58:14.894969842 +0100 +++ /var/tmp/diff_new_pack.8Mriph/_new 2026-01-05 14:58:14.894969842 +0100 @@ -1,7 +1,7 @@ # # spec file for package gkrellm # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2026 SUSE LLC and contributors # Copyright (c) 2025 Andreas Stieger <[email protected]> # # All modifications and additions to the file contributed by third parties @@ -30,17 +30,16 @@ Source3: gkrellm-24.png Source4: gkrellm-32.png Source5: gkrellm-48.png -%if 0%{?suse_version} > 1220 Source6: gkrellmd.service -%endif # PATCH-FIX-OPENSUSE gkrellm-lib64-plugins-dir.patch [email protected] -- look also into /usr/lib64/gkrellm2/plugins Patch1: %{name}-lib64-plugins-dir.patch +# PATCH-FIX-UPSTREAM d26f500ce30592313051e5c2f96b90cfd285791b.patch [email protected] -- use libsystemd to read user count +Patch2: d26f500ce30592313051e5c2f96b90cfd285791b.patch BuildRequires: gtk2-devel BuildRequires: libsensors4-devel -%if 0%{?suse_version} > 1220 -BuildRequires: systemd-rpm-macros -%endif BuildRequires: openssl-devel +BuildRequires: systemd-devel +BuildRequires: systemd-rpm-macros BuildRequires: update-desktop-files BuildRequires: xorg-x11-libSM-devel Recommends: %{name}-lang @@ -105,6 +104,8 @@ %prep %autosetup -p1 +sed -i 's|(SENSORS_LIBS)\\|(SENSORS_LIBS) -lsystemd\\|' src/Makefile +sed -i 's|(SENSORS_LIBS)|(SENSORS_LIBS) -lsystemd|' server/Makefile %build cd src @@ -112,7 +113,7 @@ #e. g. bnc#803967 bnc#803081 ./configure cd .. -make CFLAGS="%{optflags} -Wno-error=incompatible-pointer-types" X11_LIBS="-L/usr/X11R6/%{_lib} -lX11 -lSM -lICE" GTOP_LIBS="-lgmodule-2.0" PREFIX=%{_prefix} +make CFLAGS="%{optflags} -Wno-error=incompatible-pointer-types -DHAVE_LIBSYSTEMD" X11_LIBS="-L/usr/X11R6/%{_lib} -lX11 -lSM -lICE" GTOP_LIBS="-lgmodule-2.0" PREFIX=%{_prefix} %install make install STRIP= \ ++++++ d26f500ce30592313051e5c2f96b90cfd285791b.patch ++++++ >From d26f500ce30592313051e5c2f96b90cfd285791b Mon Sep 17 00:00:00 2001 From: Stefan Gehn <[email protected]> Date: Sat, 3 Jan 2026 11:34:20 +0100 Subject: [PATCH] Optionally use libsystemd to read user count Newer Linux systems do not write a utmp file anymore. Add a user count based on systemd login sessions fetched via libsystemd when that library is found and systemd support has not been disabled via the 'systemd' Meson option. This fix/feature requires building with Meson. Fixes #88 --- CHANGELOG.md | 1 + meson.build | 9 ++++++++- meson.options | 5 +++-- src/sysdeps/linux.c | 31 +++++++++++++++++++++++++++++++ 4 files changed, 43 insertions(+), 3 deletions(-) Index: b/CHANGELOG.md =================================================================== --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # GKrellM Changelog +### Fixed + +- Linux: Fix user count on Linux distros that have disabled utmp writing but use systemd/logind. Only supported when building with Meson. + ## [2.5.0](https://git.srcbox.net/gkrellm/gkrellm/releases/tag/gkrellm-2.5.0) - 2025-12-14 - Add Meson build rules covering FreeBSD, Linux, macOS as well as Windows so Index: b/meson.build =================================================================== --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2025 Stefan Gehn <[email protected]> +# SPDX-FileCopyrightText: 2025-2026 Stefan Gehn <[email protected]> # SPDX-License-Identifier: CC0-1.0 project( @@ -51,6 +51,12 @@ if intl_dep.found() project_cflags += '-DENABLE_NLS' endif +systemd_opt = get_option('systemd').disable_auto_if(host_machine.system() != 'linux') +libsystemd_dep = dependency('libsystemd', required: systemd_opt) +if libsystemd_dep.found() + project_cflags += '-DHAVE_LIBSYSTEMD' +endif + project_cflags_check = [ '-Wformat-security', '-Wformat-y2k', @@ -70,6 +76,7 @@ common_deps = [ gthread_dep, intl_dep, lmsensors_dep, + libsystemd_dep, ] # linker args shared between gkrellmd and gkrellm Index: b/meson.options =================================================================== --- a/meson.options +++ b/meson.options @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2025 Stefan Gehn <[email protected]> +# SPDX-FileCopyrightText: 2025-2026 Stefan Gehn <[email protected]> # SPDX-License-Identifier: CC0-1.0 option( @@ -55,8 +55,9 @@ option( 'systemd', type: 'feature', value: 'auto', - description: 'enable gkrellmd systemd service file (Linux only).', + description: 'enable gkrellmd systemd service file and logind user count (Linux only).', ) + option( 'systemd-unit-dir', type: 'string', Index: b/src/sysdeps/linux.c =================================================================== --- a/src/sysdeps/linux.c +++ b/src/sysdeps/linux.c @@ -41,6 +41,9 @@ #include <inttypes.h> +#if defined(HAVE_LIBSYSTEMD) +#include <systemd/sd-login.h> +#endif static gboolean need_locale_fix, have_sysfs, @@ -664,6 +667,33 @@ gkrellm_sys_proc_read_data(void) void gkrellm_sys_proc_read_users(void) { +#if defined(HAVE_LIBSYSTEMD) + char **sessions = NULL; + const int sessions_count = sd_get_sessions(&sessions); + if (sessions_count < 0) { + return; + } + + int users_count = 0; + for (int i = 0; i < sessions_count; ++i) + { + char *session_class = NULL; + if (sd_session_get_class(sessions[i], &session_class) < 0) + continue; + + // only count actual users, not login managers or others + if (strcmp(session_class, "user") == 0) + ++users_count; + + free(session_class); + } + + for (int i = 0; i < sessions_count; ++i) + free(sessions[i]); + free(sessions); + + gkrellm_proc_assign_users(users_count); +#else // read from utmp struct utmp *ut; struct stat s; static time_t utmp_mtime; @@ -679,6 +709,7 @@ gkrellm_sys_proc_read_users(void) utmp_mtime = s.st_mtime; gkrellm_proc_assign_users(n_users); } +#endif } gboolean ++++++ gkrellm-lib64-plugins-dir.patch ++++++ --- /var/tmp/diff_new_pack.8Mriph/_old 2026-01-05 14:58:14.978973332 +0100 +++ /var/tmp/diff_new_pack.8Mriph/_new 2026-01-05 14:58:14.982973498 +0100 @@ -2,7 +2,7 @@ =================================================================== --- a/src/gkrellm.h +++ b/src/gkrellm.h -@@ -142,6 +142,9 @@ +@@ -119,6 +119,9 @@ G_BEGIN_DECLS #if !defined(SYSTEM_PLUGINS_DIR) #define SYSTEM_PLUGINS_DIR "/usr/lib/gkrellm2/plugins" #endif @@ -16,7 +16,7 @@ =================================================================== --- a/src/plugins.c +++ b/src/plugins.c -@@ -1283,6 +1283,10 @@ gkrellm_plugins_load(void) +@@ -1267,6 +1267,10 @@ gkrellm_plugins_load(void) #if defined(SYSTEM_PLUGINS_DIR) scan_for_plugins(SYSTEM_PLUGINS_DIR); #endif
