From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D70011580B3 for ; Sat, 4 Sep 2021 21:01:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2BE32E0814; Sat, 4 Sep 2021 21:01:25 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F3E98E0814 for ; Sat, 4 Sep 2021 21:01:24 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 88C5C33FEFB for ; Sat, 4 Sep 2021 21:01:22 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0E59DA7 for ; Sat, 4 Sep 2021 21:01:21 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1630789122.5264f7036d35cdffaef2f60da50074f5b6cd264e.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kglobalaccel/files/, kde-frameworks/kglobalaccel/ X-VCS-Repository: repo/gentoo X-VCS-Files: kde-frameworks/kglobalaccel/files/kglobalaccel-5.85.0-start-processes-w-kstart5-if-available.patch kde-frameworks/kglobalaccel/kglobalaccel-5.85.0-r1.ebuild X-VCS-Directories: kde-frameworks/kglobalaccel/files/ kde-frameworks/kglobalaccel/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 5264f7036d35cdffaef2f60da50074f5b6cd264e X-VCS-Branch: master Date: Sat, 4 Sep 2021 21:01:21 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 1940833d-2241-464c-bf48-173cc4b67957 X-Archives-Hash: 73c04cc02fe37f1de474d4431ae0dd25 commit: 5264f7036d35cdffaef2f60da50074f5b6cd264e Author: Andreas Sturmlechner gentoo org> AuthorDate: Sat Sep 4 10:55:36 2021 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Sat Sep 4 20:58:42 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5264f703 kde-frameworks/kglobalaccel: Start processes with kstart5 if available Upstream commits: c6c14830a98050cbee5aa48dd8812e2197515de3 061c45df933f6a346c85c34fe10df6f1bd857908 KDE-bug: https://bugs.kde.org/show_bug.cgi?id=433362 Package-Manager: Portage-3.0.22, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner gentoo.org> ....0-start-processes-w-kstart5-if-available.patch | 67 ++++++++++++++++++++++ .../kglobalaccel/kglobalaccel-5.85.0-r1.ebuild | 39 +++++++++++++ 2 files changed, 106 insertions(+) diff --git a/kde-frameworks/kglobalaccel/files/kglobalaccel-5.85.0-start-processes-w-kstart5-if-available.patch b/kde-frameworks/kglobalaccel/files/kglobalaccel-5.85.0-start-processes-w-kstart5-if-available.patch new file mode 100644 index 00000000000..0a5dcd5c4f3 --- /dev/null +++ b/kde-frameworks/kglobalaccel/files/kglobalaccel-5.85.0-start-processes-w-kstart5-if-available.patch @@ -0,0 +1,67 @@ +From c6c14830a98050cbee5aa48dd8812e2197515de3 Mon Sep 17 00:00:00 2001 +From: David Redondo +Date: Mon, 30 Aug 2021 15:45:36 +0200 +Subject: [PATCH] Start processes with kstart5 if available + +The intention of 717e4ea9f8e9d3f9ea5e6c8de2efbffd5ef2af82 was to start +processes with kstart5 so they are in the correct cgroup. We should +always check if it's available first as we still want to prefer it once +klauncher is registered. +BUG:433362 + +* asturm 2021-09-04: Merged with: + +From 061c45df933f6a346c85c34fe10df6f1bd857908 Mon Sep 17 00:00:00 2001 +From: Nikos Chantziaras +Date: Thu, 2 Sep 2021 09:42:51 -0600 +Subject: [PATCH] Fix launching commands with args using kstart5 + +By prepending "--" to the command, kstart5 parses it all as one thing, +so additional arguments are executed as expected. + +BUG: 433362 +--- + src/runtime/kserviceactioncomponent.cpp | 17 +++++++++-------- + 1 file changed, 9 insertions(+), 8 deletions(-) + +diff --git a/src/runtime/kserviceactioncomponent.cpp b/src/runtime/kserviceactioncomponent.cpp +index 8bb6962..09b3d7a 100644 +--- a/src/runtime/kserviceactioncomponent.cpp ++++ b/src/runtime/kserviceactioncomponent.cpp +@@ -48,7 +48,13 @@ + } + + const QString command = parts.takeFirst(); +- if (klauncherAvailable) { ++ ++ const auto kstart = QStandardPaths::findExecutable(QStringLiteral("kstart5")); ++ if (!kstart.isEmpty()) { ++ parts.prepend(command); ++ parts.prepend(QStringLiteral("--")); ++ QProcess::startDetached(kstart, parts); ++ } else if (klauncherAvailable) { + QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.klauncher5"), + QStringLiteral("/KLauncher"), + QStringLiteral("org.kde.KLauncher"), +@@ -57,18 +63,14 @@ + + QDBusConnection::sessionBus().asyncCall(msg); + } else { +- const auto kstart = QStandardPaths::findExecutable(QStringLiteral("kstart5")); +- if (kstart.isEmpty()) { +- QProcess::startDetached(command, parts); +- } else { +- parts.prepend(command); +- QProcess::startDetached(kstart, parts); +- } ++ QProcess::startDetached(command, parts); + } + } + + void KServiceActionComponent::emitGlobalShortcutPressed(const GlobalShortcut &shortcut) + { ++ // TODO KF6 use ApplicationLauncherJob to start processes when it's available in a framework that we depend on ++ + // DBusActivatatable spec as per https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#dbus + if (m_desktopFile->desktopGroup().readEntry("DBusActivatable", false)) { + QString method; diff --git a/kde-frameworks/kglobalaccel/kglobalaccel-5.85.0-r1.ebuild b/kde-frameworks/kglobalaccel/kglobalaccel-5.85.0-r1.ebuild new file mode 100644 index 00000000000..9dbbb618d88 --- /dev/null +++ b/kde-frameworks/kglobalaccel/kglobalaccel-5.85.0-r1.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PVCUT=$(ver_cut 1-2) +QTMIN=5.15.2 +VIRTUALX_REQUIRED="test" +inherit ecm kde.org + +DESCRIPTION="Framework to handle global shortcuts" + +LICENSE="LGPL-2+" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" +IUSE="nls" + +DEPEND=" + >=dev-qt/qtdbus-${QTMIN}:5 + >=dev-qt/qtgui-${QTMIN}:5 + >=dev-qt/qtwidgets-${QTMIN}:5 + >=dev-qt/qtx11extras-${QTMIN}:5 + =kde-frameworks/kconfig-${PVCUT}*:5 + =kde-frameworks/kcoreaddons-${PVCUT}*:5 + =kde-frameworks/kcrash-${PVCUT}*:5 + =kde-frameworks/kdbusaddons-${PVCUT}*:5 + =kde-frameworks/kwindowsystem-${PVCUT}*:5[X] + x11-libs/libxcb + x11-libs/xcb-util-keysyms +" +RDEPEND="${DEPEND}" +BDEPEND="nls? ( >=dev-qt/linguist-tools-${QTMIN}:5 )" + +PATCHES=( + "${FILESDIR}"/${P}-start-processes-w-kstart5-if-available.patch # KDE-bug 433362 +) + +src_test() { + XDG_CURRENT_DESKTOP="KDE" ecm_src_test # bug 789342 +}