From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-plasma/libksysguard/, kde-plasma/libksysguard/files/
Date: Mon, 14 Aug 2023 13:56:35 +0000 (UTC) [thread overview]
Message-ID: <1692021371.04932d9fd380df7153152c2041b02a9f4b8ba2fc.asturm@gentoo> (raw)
commit: 04932d9fd380df7153152c2041b02a9f4b8ba2fc
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 14 13:53:41 2023 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Aug 14 13:56:11 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04932d9f
kde-plasma/libksysguard: sensors: Correctly handle the return value
...of QCollator::compare
Fixes: sensor list in system monitor are changed every time and not
correct with C locale
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=461070
Bug: https://bugs.gentoo.org/911788
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
....27.7-sensors-correctly-handle-return-val.patch | 36 ++++++++++
.../libksysguard/libksysguard-5.27.7-r1.ebuild | 79 ++++++++++++++++++++++
2 files changed, 115 insertions(+)
diff --git a/kde-plasma/libksysguard/files/libksysguard-5.27.7-sensors-correctly-handle-return-val.patch b/kde-plasma/libksysguard/files/libksysguard-5.27.7-sensors-correctly-handle-return-val.patch
new file mode 100644
index 000000000000..599648228272
--- /dev/null
+++ b/kde-plasma/libksysguard/files/libksysguard-5.27.7-sensors-correctly-handle-return-val.patch
@@ -0,0 +1,36 @@
+From bf2685a3628f213e930743676a6d713e630c6a59 Mon Sep 17 00:00:00 2001
+From: Maciej Stanczew <maciej.stanczew@gmail.com>
+Date: Sun, 6 Aug 2023 20:23:01 +0200
+Subject: [PATCH] sensors: Correctly handle the return value of
+ QCollator::compare
+
+QCollator::compare() can return any integer, not just [-1, 0, 1].
+Comparing the result with -1 happened to work with most locales,
+but it broke with the C locale. As a result, when sensors were put
+into std::map, they were sometimes erroneously treated as duplicates,
+leading to a randomly incomplete and garbled sensor list.
+
+BUG: 461070
+
+
+(cherry picked from commit 0a7efca4b331eb9619a2a88fe9093cbbbd351b6e)
+---
+ sensors/SensorTreeModel.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sensors/SensorTreeModel.cpp b/sensors/SensorTreeModel.cpp
+index 6f318035..8487730b 100644
+--- a/sensors/SensorTreeModel.cpp
++++ b/sensors/SensorTreeModel.cpp
+@@ -44,7 +44,7 @@ struct Compare {
+ collator->setCaseSensitivity(Qt::CaseInsensitive);
+ }
+
+- return collator->compare(first, second) == -1;
++ return collator->compare(first, second) < 0;
+ }
+
+ // This uses thread-local storage because QCollator may not be thread safe.
+--
+GitLab
+
diff --git a/kde-plasma/libksysguard/libksysguard-5.27.7-r1.ebuild b/kde-plasma/libksysguard/libksysguard-5.27.7-r1.ebuild
new file mode 100644
index 000000000000..7d102918a2db
--- /dev/null
+++ b/kde-plasma/libksysguard/libksysguard-5.27.7-r1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_DESIGNERPLUGIN="true"
+ECM_TEST="true"
+KFMIN=5.106.0
+QTMIN=5.15.9
+inherit ecm plasma.kde.org
+
+DESCRIPTION="Task management and system monitoring library"
+
+LICENSE="LGPL-2+"
+SLOT="5/9"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="webengine"
+
+# kde-frameworks/kwindowsystem[X]: Unconditional use of KX11Extras
+COMMON_DEPEND="
+ dev-libs/libnl:3
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtdeclarative-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtnetwork-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=dev-qt/qtx11extras-${QTMIN}:5
+ >=kde-frameworks/kauth-${KFMIN}:5
+ >=kde-frameworks/kcompletion-${KFMIN}:5
+ >=kde-frameworks/kconfig-${KFMIN}:5[qml]
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/kjobwidgets-${KFMIN}:5
+ >=kde-frameworks/knewstuff-${KFMIN}:5
+ >=kde-frameworks/kpackage-${KFMIN}:5
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5[X]
+ net-libs/libpcap
+ sys-apps/lm-sensors:=
+ sys-libs/libcap
+ sys-libs/zlib
+ x11-libs/libX11
+ x11-libs/libXres
+ webengine? (
+ >=dev-qt/qtwebchannel-${QTMIN}:5
+ >=dev-qt/qtwebengine-${QTMIN}:5
+ )
+"
+DEPEND="${COMMON_DEPEND}
+ >=kde-frameworks/kiconthemes-${KFMIN}:5
+ x11-base/xorg-proto
+"
+RDEPEND="${COMMON_DEPEND}
+ !<kde-plasma/ksysguard-5.21.90:5
+"
+
+PATCHES=(
+ # downstream patch
+ "${FILESDIR}/${PN}-5.22.80-no-detailed-mem-message.patch"
+ "${FILESDIR}/${P}-sensors-correctly-handle-return-val.patch" # KDE-bug 461070, 5.27.8
+)
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake_use_find_package webengine Qt5WebChannel)
+ $(cmake_use_find_package webengine Qt5WebEngineWidgets)
+ )
+
+ ecm_src_configure
+}
+
+src_test() {
+ # bugs 797898, 889942: flaky test
+ local myctestargs=(
+ -E "(sensortreemodeltest)"
+ )
+ LC_NUMERIC="C" ecm_src_test # bug 695514
+}
next reply other threads:[~2023-08-14 13:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-14 13:56 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-01-15 13:04 [gentoo-commits] repo/gentoo:master commit in: kde-plasma/libksysguard/, kde-plasma/libksysguard/files/ Andreas Sturmlechner
2022-01-25 9:49 Andreas Sturmlechner
2021-12-15 9:38 Andreas Sturmlechner
2021-02-17 22:13 Andreas Sturmlechner
2021-01-24 19:44 Andreas Sturmlechner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1692021371.04932d9fd380df7153152c2041b02a9f4b8ba2fc.asturm@gentoo \
--to=asturm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox