summaryrefslogtreecommitdiff
path: root/kde-plasma/discover
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-11-28 10:54:09 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-11-28 10:54:09 +0000
commit3e690338421a6b64f6f44aa03db7416d75e0633a (patch)
treecb3907b4dfbc040edc539fd00645e851b14084bb /kde-plasma/discover
parenta6f8a4117d60ec2919f9b312dcb0b7baa6c58ab9 (diff)
gentoo auto-resync : 28:11:2023 - 10:54:09
Diffstat (limited to 'kde-plasma/discover')
-rw-r--r--kde-plasma/discover/Manifest3
-rw-r--r--kde-plasma/discover/discover-5.27.8-r1.ebuild99
-rw-r--r--kde-plasma/discover/files/discover-5.27.8-flatpak-qrunnable-thread.patch187
3 files changed, 0 insertions, 289 deletions
diff --git a/kde-plasma/discover/Manifest b/kde-plasma/discover/Manifest
index 3af382318e69..ff820169eba1 100644
--- a/kde-plasma/discover/Manifest
+++ b/kde-plasma/discover/Manifest
@@ -1,7 +1,4 @@
AUX discover-5.25.90-tests-optional.patch 3080 BLAKE2B 074ce41b4aee3fe8203f83fd63361189b78ddd4dc45a72a0d3e98a8ff50a92a463c680b93c7c7643e2bfc479e9374eda78148d41fed55c17035e751c0c584efa SHA512 bd82fe11d5ff1884c9457c655502831a3dab70ff172b5d49cdbdfa0cb6818735405ef1f4c519eaf46dd607bccf71077f11741cc11c85553f4e8f639125721767
-AUX discover-5.27.8-flatpak-qrunnable-thread.patch 6950 BLAKE2B d7b574f5c69119744b26f5eb6f5a362d2b238737b63fd0035b66f7be46f05d684dd29dfd4b76c4d2926e89d4f0b0a55e38b894172665deac91aa016b2ed24545 SHA512 ae1a269a3f572cddbfcb704bdf712fd0752fab163526b944084f223d1af2e25b0dec8c5f1dc055da093794b490c712cdba9b9f2d6125618bfa1afc2edb0e152a
-DIST discover-5.27.8.tar.xz 869332 BLAKE2B 103494eb04fe539113ddaae207a1bc49320330d9c469cdcfb9342efd5a735eb419c18b5b0c76b72abf7cff2ff15d440eede0ed264c86446a298606d6c48a6433 SHA512 a6872b7a6979a3a31abf96cced686fd878889931ac0fef9aac47da564939f756d8cb8ebe877a9af322344ba01899f1c247858ddb2b9ea5778126d5bcb02e3042
DIST discover-5.27.9.tar.xz 870444 BLAKE2B 03dd98bb66ada6ee29e3d099ea6a53a51a711e442a44fb81fa019e41fba9999e0c4e82762a217e0f42535f449ba374b52f8d74a3333e9dafa0967bb91373479d SHA512 c1049e022745fecd613d59434271e33789282f6915435db887fa9952e0b51955bc8453071c0da87d77d328f77d83204cfd8dc8db1bc489894e6fe3acafd7f798
-EBUILD discover-5.27.8-r1.ebuild 2836 BLAKE2B f8638a6328e480618bd1715de3527b324f95c6e402f7ddfa278a10aa61c5d672a7beb8ca161953c46ee448145b7e4ba98399a6bb040710f4199bd724c0c50ec9 SHA512 222723c451d4c0f72242fa153a7750092cffc4eea846a6516978f421eb0a6312606fd841d20c39ed773e5e81bebd38e2b71cc5272ae0bf6416276af244ce51ed
EBUILD discover-5.27.9.ebuild 2767 BLAKE2B f4a55bb5738765d13c41074a5caea42b268dcce4b292a54a90357491fb19c2b166b337ba2388c0949b21bb8f7df425054ad0937db9fe0411eab172312e22f48a SHA512 4ca5fe386aba409e2cfce3be9b30eb9d350d35ff3bf2c9fd74db9a331f9d5bb933e44f51ac26d84ee01cb7732006eff70c2f7c61b3fb61c4077d7c7c000498da
MISC metadata.xml 845 BLAKE2B 87d892ce29180263400147d7a7b98e42093d613897bc09764b58e43712faff76bc13f0b9e09782faf6c6f8c78d02a555271159be54ccc5213241422931d43e65 SHA512 6fda677eb8dfe74813872cad68d234d7f272f7466f654b1d0a2725b6ceb6872f51887b5861f419cf5aeb09ffc593af230a923eafa22c0db9e1353b831a4a7187
diff --git a/kde-plasma/discover/discover-5.27.8-r1.ebuild b/kde-plasma/discover/discover-5.27.8-r1.ebuild
deleted file mode 100644
index 2c0851211369..000000000000
--- a/kde-plasma/discover/discover-5.27.8-r1.ebuild
+++ /dev/null
@@ -1,99 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-ECM_TEST="true"
-KFMIN=5.106.0
-QTMIN=5.15.9
-inherit ecm plasma.kde.org
-
-DESCRIPTION="KDE Plasma resources management GUI"
-HOMEPAGE="https://userbase.kde.org/Discover"
-
-LICENSE="GPL-2" # TODO: CHECK
-SLOT="5"
-KEYWORDS="amd64 ~arm arm64 ~loong ~ppc64 ~riscv x86"
-IUSE="+firmware flatpak snap telemetry webengine"
-
-# libmarkdown (app-text/discount) only used in PackageKitBackend
-DEPEND="
- >=dev-libs/appstream-0.15.3:=
- >=dev-qt/qtconcurrent-${QTMIN}:5
- >=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
- >=kde-frameworks/attica-${KFMIN}:5
- >=kde-frameworks/kcmutils-${KFMIN}:5
- >=kde-frameworks/kconfig-${KFMIN}:5
- >=kde-frameworks/kconfigwidgets-${KFMIN}:5
- >=kde-frameworks/kcoreaddons-${KFMIN}:5
- >=kde-frameworks/kcrash-${KFMIN}:5
- >=kde-frameworks/kdbusaddons-${KFMIN}:5
- >=kde-frameworks/kdeclarative-${KFMIN}:5
- >=kde-frameworks/ki18n-${KFMIN}:5
- >=kde-frameworks/kidletime-${KFMIN}:5
- >=kde-frameworks/kio-${KFMIN}:5
- >=kde-frameworks/kirigami-${KFMIN}:5
- >=kde-frameworks/knewstuff-${KFMIN}:5
- >=kde-frameworks/knotifications-${KFMIN}:5
- >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
- >=kde-frameworks/kxmlgui-${KFMIN}:5
- >=kde-frameworks/purpose-${KFMIN}:5
- firmware? ( >=sys-apps/fwupd-1.5.0 )
- flatpak? ( sys-apps/flatpak )
- snap? ( sys-libs/snapd-glib:=[qt5] )
- telemetry? ( kde-frameworks/kuserfeedback:5 )
- webengine? ( >=dev-qt/qtwebview-${QTMIN}:5 )
-"
-RDEPEND="${DEPEND}
- >=dev-qt/qtquickcontrols2-${QTMIN}:5
- snap? ( app-containers/snapd )
-"
-BDEPEND=">=kde-frameworks/kcmutils-${KFMIN}:5"
-
-PATCHES=(
- "${FILESDIR}/${PN}-5.25.90-tests-optional.patch"
- "${FILESDIR}/${P}-flatpak-qrunnable-thread.patch" # KDE-bug 474231
-)
-
-src_prepare() {
- ecm_src_prepare
- # we don't need it with PackageKitBackend off
- ecm_punt_kf_module Archive
- # we don't do anything with this
- sed -e "s/^pkg_check_modules.*RpmOstree/#&/" \
- -e "s/^pkg_check_modules.*Ostree/#&/" \
- -i CMakeLists.txt || die
-}
-
-src_configure() {
- local mycmakeargs=(
- # TODO: Port PackageKit's portage back-end to python3
- -DCMAKE_DISABLE_FIND_PACKAGE_packagekitqt5=ON
- # Automated updates will not work for us
- # https://invent.kde.org/plasma/discover/-/merge_requests/142
- -DWITH_KCM=OFF
- -DBUILD_DummyBackend=OFF
- -DBUILD_FlatpakBackend=$(usex flatpak)
- -DBUILD_FwupdBackend=$(usex firmware)
- -DBUILD_RpmOstreeBackend=OFF
- -DBUILD_SnapBackend=$(usex snap)
- -DBUILD_SteamOSBackend=OFF
- $(cmake_use_find_package telemetry KUserFeedback)
- $(cmake_use_find_package webengine Qt5WebView)
- )
-
- ecm_src_configure
-}
-
-src_test() {
- # bug 686392: needs network connection
- local myctestargs=(
- -E "(knsbackendtest|flatpaktest)"
- )
-
- ecm_src_test
-}
diff --git a/kde-plasma/discover/files/discover-5.27.8-flatpak-qrunnable-thread.patch b/kde-plasma/discover/files/discover-5.27.8-flatpak-qrunnable-thread.patch
deleted file mode 100644
index 20525969b988..000000000000
--- a/kde-plasma/discover/files/discover-5.27.8-flatpak-qrunnable-thread.patch
+++ /dev/null
@@ -1,187 +0,0 @@
-From 46d14515c3105e4e318d28db41057d9f1df3ce4d Mon Sep 17 00:00:00 2001
-From: Harald Sitter <sitter@kde.org>
-Date: Mon, 11 Sep 2023 07:05:52 +0200
-Subject: [PATCH] flatpak: make FlatpakTransactionThread a qrunnable instead
-
-we can't just have an unlimited number of threads for flatpak
-transactions. it'd eventually cause excessive load on both CPU and
-network to the point where things will start misbehaving. we also run
-risk of exhausting other software limited resources such as file
-descriptors.
-
-to resolve this problem we now treat the transactionthread as runnable
-and put it in a limited threadpool for concurrent execution. the new
-runnable has a finished signal that is emitted on every return from
-run() to match the QThread API.
-
-concurrency is limited to no more than 4 runnables at a time. that
-should still be plenty concurrent while generally unexpected to exhaust
-the default 1024 file descriptor limit - an install transaction appears
-to weigh between 60 and 100 fds
-
-other backends don't necessarily have this problem since they have
-daemons that do the work for us so we have way fewer open fds for them.
-
-BUG: 474231
-
-(cherry picked from commit db0ebc855517f189f64c1602a5d27e185cf02833)
----
- .../FlatpakBackend/FlatpakJobTransaction.cpp | 34 ++++++++++++++++---
- .../FlatpakTransactionThread.cpp | 9 +++--
- .../FlatpakBackend/FlatpakTransactionThread.h | 5 ++-
- 3 files changed, 40 insertions(+), 8 deletions(-)
-
-diff --git a/libdiscover/backends/FlatpakBackend/FlatpakJobTransaction.cpp b/libdiscover/backends/FlatpakBackend/FlatpakJobTransaction.cpp
-index 613563755..b2c1fcc20 100644
---- a/libdiscover/backends/FlatpakBackend/FlatpakJobTransaction.cpp
-+++ b/libdiscover/backends/FlatpakBackend/FlatpakJobTransaction.cpp
-@@ -1,6 +1,7 @@
- /*
- * SPDX-FileCopyrightText: 2013 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
- * SPDX-FileCopyrightText: 2017 Jan Grulich <jgrulich@redhat.com>
-+ * SPDX-FileCopyrightText: 2023 Harald Sitter <sitter@kde.org>
- *
- * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
- */
-@@ -10,9 +11,30 @@
- #include "FlatpakResource.h"
- #include "FlatpakTransactionThread.h"
-
-+#include <thread>
-+
- #include <QDebug>
- #include <QTimer>
-
-+namespace
-+{
-+class ThreadPool : public QThreadPool
-+{
-+public:
-+ ThreadPool()
-+ {
-+ // Cap the amount of concurrency to prevent too many in-flight transactions. This in particular
-+ // prevents running out of file descriptors or other limited resources.
-+ // https://bugs.kde.org/show_bug.cgi?id=474231
-+ constexpr auto arbitraryMaxConcurrency = 4U;
-+ const auto concurrency = std::min(std::thread::hardware_concurrency(), arbitraryMaxConcurrency);
-+ setMaxThreadCount(std::make_signed_t<decltype(concurrency)>(concurrency));
-+ }
-+};
-+} // namespace
-+
-+Q_GLOBAL_STATIC(ThreadPool, s_pool);
-+
- FlatpakJobTransaction::FlatpakJobTransaction(FlatpakResource *app, Role role, bool delayStart)
- : Transaction(app->backend(), app, role, {})
- , m_app(app)
-@@ -27,11 +49,12 @@ FlatpakJobTransaction::FlatpakJobTransaction(FlatpakResource *app, Role role, bo
-
- FlatpakJobTransaction::~FlatpakJobTransaction()
- {
-- if (m_appJob->isRunning()) {
-- cancel();
-- m_appJob->wait();
-+ cancel();
-+ if (s_pool->tryTake(m_appJob)) { // immediately delete if the runnable hasn't started yet
-+ delete m_appJob;
-+ } else { // otherwise defer cleanup to the pool
-+ m_appJob->setAutoDelete(true);
- }
-- delete m_appJob;
- }
-
- void FlatpakJobTransaction::cancel()
-@@ -45,6 +68,7 @@ void FlatpakJobTransaction::start()
-
- // App job will be added every time
- m_appJob = new FlatpakTransactionThread(m_app, role());
-+ m_appJob->setAutoDelete(false);
- connect(m_appJob, &FlatpakTransactionThread::finished, this, &FlatpakJobTransaction::finishTransaction);
- connect(m_appJob, &FlatpakTransactionThread::progressChanged, this, &FlatpakJobTransaction::setProgress);
- connect(m_appJob, &FlatpakTransactionThread::speedChanged, this, &FlatpakJobTransaction::setDownloadSpeed);
-@@ -52,7 +76,7 @@ void FlatpakJobTransaction::start()
- connect(m_appJob, &FlatpakTransactionThread::webflowStarted, this, &FlatpakJobTransaction::webflowStarted);
- connect(m_appJob, &FlatpakTransactionThread::webflowDone, this, &FlatpakJobTransaction::webflowDone);
-
-- m_appJob->start();
-+ s_pool->start(m_appJob);
- }
-
- void FlatpakJobTransaction::finishTransaction()
-diff --git a/libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.cpp b/libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.cpp
-index 7072460ad..738a97a8c 100644
---- a/libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.cpp
-+++ b/libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.cpp
-@@ -1,5 +1,6 @@
- /*
- * SPDX-FileCopyrightText: 2017 Jan Grulich <jgrulich@redhat.com>
-+ * SPDX-FileCopyrightText: 2023 Harald Sitter <sitter@kde.org>
- *
- * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
- */
-@@ -10,6 +11,7 @@
- #include <KLocalizedString>
- #include <QDebug>
- #include <QDesktopServices>
-+#include <QScopeGuard>
-
- static int FLATPAK_CLI_UPDATE_FREQUENCY = 150;
-
-@@ -92,8 +94,7 @@ void FlatpakTransactionThread::webflowDoneCallback(FlatpakTransaction *transacti
- }
-
- FlatpakTransactionThread::FlatpakTransactionThread(FlatpakResource *app, Transaction::Role role)
-- : QThread()
-- , m_result(false)
-+ : m_result(false)
- , m_app(app)
- , m_role(role)
- {
-@@ -131,6 +132,10 @@ void FlatpakTransactionThread::cancel()
-
- void FlatpakTransactionThread::run()
- {
-+ auto finish = qScopeGuard([this] {
-+ Q_EMIT finished();
-+ });
-+
- if (!m_transaction)
- return;
- g_autoptr(GError) localError = nullptr;
-diff --git a/libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.h b/libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.h
-index 277c21902..8e3d0e2e2 100644
---- a/libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.h
-+++ b/libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.h
-@@ -1,5 +1,6 @@
- /*
- * SPDX-FileCopyrightText: 2017 Jan Grulich <jgrulich@redhat.com>
-+ * SPDX-FileCopyrightText: 2023 Harald Sitter <sitter@kde.org>
- *
- * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
- */
-@@ -11,12 +12,13 @@
- #include <glib.h>
-
- #include <QMap>
-+#include <QRunnable>
- #include <QStringList>
- #include <QThread>
- #include <Transaction/Transaction.h>
-
- class FlatpakResource;
--class FlatpakTransactionThread : public QThread
-+class FlatpakTransactionThread : public QObject, public QRunnable
- {
- Q_OBJECT
- public:
-@@ -49,6 +51,7 @@ Q_SIGNALS:
- void passiveMessage(const QString &msg);
- void webflowStarted(const QUrl &url, int id);
- void webflowDone(int id);
-+ void finished();
-
- private:
- static gboolean
---
-GitLab
-