public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/kde:master commit in: kde-apps/dolphin/files/, kde-apps/dolphin/
@ 2018-07-08 15:48 Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2018-07-08 15:48 UTC (permalink / raw
  To: gentoo-commits

commit:     3b121eeec9664c836213b5bca2ae0a851cd17507
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Jul  8 15:40:37 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Jul  8 15:40:37 2018 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=3b121eee

kde-apps/dolphin: Backport start-as-root

Package-Manager: Portage-2.3.41, Repoman-2.3.9

 kde-apps/dolphin/dolphin-18.04.49.9999.ebuild      |  6 ++-
 .../dolphin/files/dolphin-18.04.3-root-user.patch  | 56 ++++++++++++++++++++++
 .../dolphin/files/dolphin-18.04.3-root-warn.patch  | 45 +++++++++++++++++
 3 files changed, 106 insertions(+), 1 deletion(-)

diff --git a/kde-apps/dolphin/dolphin-18.04.49.9999.ebuild b/kde-apps/dolphin/dolphin-18.04.49.9999.ebuild
index 4c25caa413..eb7c6223a4 100644
--- a/kde-apps/dolphin/dolphin-18.04.49.9999.ebuild
+++ b/kde-apps/dolphin/dolphin-18.04.49.9999.ebuild
@@ -62,7 +62,11 @@ RDEPEND="${DEPEND}
 
 RESTRICT+=" test"
 
-PATCHES=( "${FILESDIR}/${PN}-18.04.1-flto.patch" )
+PATCHES=(
+	"${FILESDIR}/${PN}-18.04.1-flto.patch"
+	"${FILESDIR}/${PN}-18.04.3-root-user.patch"
+	"${FILESDIR}/${PN}-18.04.3-root-warn.patch"
+)
 
 src_configure() {
 	local mycmakeargs=(

diff --git a/kde-apps/dolphin/files/dolphin-18.04.3-root-user.patch b/kde-apps/dolphin/files/dolphin-18.04.3-root-user.patch
new file mode 100644
index 0000000000..04baafa1d8
--- /dev/null
+++ b/kde-apps/dolphin/files/dolphin-18.04.3-root-user.patch
@@ -0,0 +1,56 @@
+From 40453cb627a39f1ff92373f865426f0bcdc83419 Mon Sep 17 00:00:00 2001
+From: Nathaniel Graham <nate@kde.org>
+Date: Wed, 9 May 2018 17:18:08 -0600
+Subject: Re-allow running Dolphin as the root user (but still not using sudo)
+
+Summary:
+Prohibiting the use of Dolphin as the actual root user (not using `sudo` or `kdesu`) breaks legitimate use cases for using the root user. An example is Kali, a distro that logs in as the root user by default as a deliberate design choice.
+
+In such an environment, there is no additional security vulnerability beyond what you're already potentially exposing yourself to. So, let's re-enable it.
+
+BUG: 387974
+FIXED-IN: 18.08.0
+
+Test Plan:
+- Log in as normal user and run `sudo dolphin`: you get an error message.
+- Log in as normal user and run `kdesu dolphin`: you get an error message.
+- Log in as the root user and run dolphin normally: it works.
+
+Reviewers: markg, elvisangelaccio, #dolphin
+
+Reviewed By: markg
+
+Subscribers: chinmoyr, cfeck, elvisangelaccio, mmustac, Fuchs, markg, graesslin, nicolasfella, zzag, kfm-devel, emmanuelp
+
+Tags: #dolphin
+
+Differential Revision: https://phabricator.kde.org/D12795
+---
+ src/main.cpp | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/src/main.cpp b/src/main.cpp
+index db52e11..75bab67 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -43,10 +43,15 @@
+ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
+ {
+ #ifndef Q_OS_WIN
+-    // Check whether we are running as root
++    // Prohibit using sudo or kdesu (but allow using the root user directly)
+     if (getuid() == 0) {
+-        std::cout << "Executing Dolphin as root is not possible." << std::endl;
+-        return EXIT_FAILURE;
++        if (!qEnvironmentVariableIsEmpty("SUDO_USER")) {
++            std::cout << "Executing Dolphin with sudo is not possible due to unfixable security vulnerabilities." << std::endl;
++            return EXIT_FAILURE;
++        } else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) {
++            std::cout << "Executing Dolphin with kdesu is not possible due to unfixable security vulnerabilities." << std::endl;
++            return EXIT_FAILURE;
++        }
+     }
+ #endif
+ 
+-- 
+cgit v0.11.2

diff --git a/kde-apps/dolphin/files/dolphin-18.04.3-root-warn.patch b/kde-apps/dolphin/files/dolphin-18.04.3-root-warn.patch
new file mode 100644
index 0000000000..bd6e2ab0d8
--- /dev/null
+++ b/kde-apps/dolphin/files/dolphin-18.04.3-root-warn.patch
@@ -0,0 +1,45 @@
+From 621cd24acfec8cbed19e9aa6ff8650cd6f38f809 Mon Sep 17 00:00:00 2001
+From: Nathaniel Graham <nate@kde.org>
+Date: Sun, 6 May 2018 17:48:54 -0600
+Subject: Show a warning when running as the root user
+
+Summary: Now that Dolphin can be run as the root user again, let's show a warning.
+
+Test Plan:
+When run with the root user account:
+{F5882057}
+
+Reviewers: #dolphin, markg, elvisangelaccio
+
+Reviewed By: markg, elvisangelaccio
+
+Subscribers: acooligan, anthonyfieroni, chinmoyr, kfm-devel, rikmills, emmanuelp, zzag, nicolasfella, elvisangelaccio, Fuchs, mmustac, markg
+
+Tags: #dolphin
+
+Differential Revision: https://phabricator.kde.org/D12732
+---
+ src/dolphinviewcontainer.cpp | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp
+index bf8ac88..7b99595 100644
+--- a/src/dolphinviewcontainer.cpp
++++ b/src/dolphinviewcontainer.cpp
+@@ -108,6 +108,14 @@ DolphinViewContainer::DolphinViewContainer(const QUrl& url, QWidget* parent) :
+     m_messageWidget->setCloseButtonVisible(true);
+     m_messageWidget->hide();
+ 
++#ifndef Q_OS_WIN
++    if (getuid() == 0) {
++
++        // We must be logged in as the root user; show a big scary warning
++        showMessage(i18n("Running Dolphin as root can be dangerous. Please be careful."), Warning);
++    }
++#endif
++
+     m_view = new DolphinView(url, this);
+     connect(m_view, &DolphinView::urlChanged,
+             m_urlNavigator, &KUrlNavigator::setLocationUrl);
+-- 
+cgit v0.11.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-apps/dolphin/files/, kde-apps/dolphin/
@ 2019-12-07 11:43 Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2019-12-07 11:43 UTC (permalink / raw
  To: gentoo-commits

commit:     4db428442545ec02ad7867d7895e6db8ac8e89aa
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  6 21:08:46 2019 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Dec  7 11:42:39 2019 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=4db42844

kde-apps/dolphin: Fix build with Qt 5.14.0 RC

See also https://mail.kde.org/pipermail/release-team/2019-December/011688.html

Package-Manager: Portage-2.3.81, Repoman-2.3.20
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 kde-apps/dolphin/dolphin-19.12.0.ebuild            |  2 +
 .../dolphin/files/dolphin-19.12.0-qt-5.14.patch    | 81 ++++++++++++++++++++++
 2 files changed, 83 insertions(+)

diff --git a/kde-apps/dolphin/dolphin-19.12.0.ebuild b/kde-apps/dolphin/dolphin-19.12.0.ebuild
index fcaf127a47..1b4b3ad99a 100644
--- a/kde-apps/dolphin/dolphin-19.12.0.ebuild
+++ b/kde-apps/dolphin/dolphin-19.12.0.ebuild
@@ -64,6 +64,8 @@ RDEPEND="${DEPEND}
 
 RESTRICT+=" test"
 
+PATCHES=( "${FILESDIR}"/${P}-qt-5.14.patch ) # not yet upstream
+
 src_configure() {
 	local mycmakeargs=(
 		$(cmake_use_find_package activities KF5Activities)

diff --git a/kde-apps/dolphin/files/dolphin-19.12.0-qt-5.14.patch b/kde-apps/dolphin/files/dolphin-19.12.0-qt-5.14.patch
new file mode 100644
index 0000000000..02ad279aeb
--- /dev/null
+++ b/kde-apps/dolphin/files/dolphin-19.12.0-qt-5.14.patch
@@ -0,0 +1,81 @@
+diff --git a/src/global.h b/src/global.h
+--- a/src/global.h
++++ b/src/global.h
+@@ -22,6 +22,7 @@
+ 
+ #include <QList>
+ #include <QUrl>
++#include <QWidget>
+ 
+ namespace Dolphin {
+     QList<QUrl> validateUris(const QStringList& uriList);
+diff --git a/src/kitemviews/kstandarditem.h b/src/kitemviews/kstandarditem.h
+--- a/src/kitemviews/kstandarditem.h
++++ b/src/kitemviews/kstandarditem.h
+@@ -25,6 +25,7 @@
+ #include <QByteArray>
+ #include <QHash>
+ #include <QObject>
++#include <QSet>
+ #include <QVariant>
+ 
+ class KStandardItemModel;
+diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp
+--- a/src/search/dolphinsearchbox.cpp
++++ b/src/search/dolphinsearchbox.cpp
+@@ -39,9 +39,11 @@
+ #include <QFontDatabase>
+ #include <QHBoxLayout>
+ #include <QIcon>
++#include <QKeyEvent>
+ #include <QLabel>
+ #include <QLineEdit>
+ #include <QScrollArea>
++#include <QShowEvent>
+ #include <QTimer>
+ #include <QToolButton>
+ #include <QUrlQuery>
+diff --git a/src/settings/dolphinsettingsdialog.cpp b/src/settings/dolphinsettingsdialog.cpp
+--- a/src/settings/dolphinsettingsdialog.cpp
++++ b/src/settings/dolphinsettingsdialog.cpp
+@@ -34,6 +34,7 @@
+ #include <KWindowConfig>
+ #include <KMessageBox>
+ 
++#include <QCloseEvent>
+ #include <QPushButton>
+ 
+ DolphinSettingsDialog::DolphinSettingsDialog(const QUrl& url, QWidget* parent) :
+diff --git a/src/settings/general/previewssettingspage.cpp b/src/settings/general/previewssettingspage.cpp
+--- a/src/settings/general/previewssettingspage.cpp
++++ b/src/settings/general/previewssettingspage.cpp
+@@ -32,6 +32,7 @@
+ #include <QLabel>
+ #include <QListView>
+ #include <QPainter>
++#include <QShowEvent>
+ #include <QSortFilterProxyModel>
+ #include <QSpinBox>
+ 
+diff --git a/src/settings/services/servicessettingspage.cpp b/src/settings/services/servicessettingspage.cpp
+--- a/src/settings/services/servicessettingspage.cpp
++++ b/src/settings/services/servicessettingspage.cpp
+@@ -36,6 +36,7 @@
+ #include <QGridLayout>
+ #include <QLabel>
+ #include <QListWidget>
++#include <QShowEvent>
+ #include <QSortFilterProxyModel>
+ 
+ namespace
+diff --git a/src/views/draganddrophelper.cpp b/src/views/draganddrophelper.cpp
+--- a/src/views/draganddrophelper.cpp
++++ b/src/views/draganddrophelper.cpp
+@@ -25,6 +25,7 @@
+ 
+ #include <QDBusConnection>
+ #include <QDBusMessage>
++#include <QDropEvent>
+ #include <QMimeData>
+ 
+ QHash<QUrl, bool> DragAndDropHelper::m_urlListMatchesUrlCache;


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-apps/dolphin/files/, kde-apps/dolphin/
@ 2021-05-09 16:32 Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2021-05-09 16:32 UTC (permalink / raw
  To: gentoo-commits

commit:     7d43b45056d41f698cb39dc1fe96f1d0264a8604
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat May  8 23:05:24 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun May  9 16:25:53 2021 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=7d43b450

kde-apps/dolphin: Fix startup error message

This is a downstream hack for now.

KDE-bug: https://bugs.kde.org/show_bug.cgi?id=435586
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 kde-apps/dolphin/dolphin-21.04.49.9999.ebuild      |  3 +++
 kde-apps/dolphin/dolphin-9999.ebuild               |  5 +++++
 .../dolphin-21.04.0-fix-no-semantic-desktop.patch  | 23 ++++++++++++++++++++++
 3 files changed, 31 insertions(+)

diff --git a/kde-apps/dolphin/dolphin-21.04.49.9999.ebuild b/kde-apps/dolphin/dolphin-21.04.49.9999.ebuild
index 5e3e20bd11..10e34f4c6d 100644
--- a/kde-apps/dolphin/dolphin-21.04.49.9999.ebuild
+++ b/kde-apps/dolphin/dolphin-21.04.49.9999.ebuild
@@ -62,6 +62,9 @@ RDEPEND="${DEPEND}
 	>=kde-apps/kio-extras-${PVCUT}:5
 "
 
+# TODO: Downstream hack, track upstream bug for better solution
+PATCHES=( "${FILESDIR}/${PN}-21.04.0-fix-no-semantic-desktop.patch" ) # KDE-bug 435586
+
 src_configure() {
 	local mycmakeargs=(
 		-DCMAKE_DISABLE_FIND_PACKAGE_PackageKitQt5=ON

diff --git a/kde-apps/dolphin/dolphin-9999.ebuild b/kde-apps/dolphin/dolphin-9999.ebuild
index a469a25ca7..530de3cad0 100644
--- a/kde-apps/dolphin/dolphin-9999.ebuild
+++ b/kde-apps/dolphin/dolphin-9999.ebuild
@@ -61,6 +61,11 @@ RDEPEND="${DEPEND}
 	>=kde-apps/kio-extras-${PVCUT}:5
 "
 
+PATCHES=(
+	# TODO: Downstream hack, track upstream bug for better solution
+	"${FILESDIR}/${PN}-21.04.0-fix-no-semantic-desktop.patch" # KDE-bug 435586
+)
+
 src_configure() {
 	local mycmakeargs=(
 		-DCMAKE_DISABLE_FIND_PACKAGE_PackageKitQt5=ON

diff --git a/kde-apps/dolphin/files/dolphin-21.04.0-fix-no-semantic-desktop.patch b/kde-apps/dolphin/files/dolphin-21.04.0-fix-no-semantic-desktop.patch
new file mode 100644
index 0000000000..4f97a53c52
--- /dev/null
+++ b/kde-apps/dolphin/files/dolphin-21.04.0-fix-no-semantic-desktop.patch
@@ -0,0 +1,23 @@
+diff --git a/src/search/dolphinfacetswidget.cpp b/src/search/dolphinfacetswidget.cpp
+index d52d146a8..9f0078631 100644
+--- a/src/search/dolphinfacetswidget.cpp
++++ b/src/search/dolphinfacetswidget.cpp
+@@ -7,6 +7,8 @@
+ 
+ #include "dolphinfacetswidget.h"
+ 
++#include <config-baloo.h>
++
+ #include <KLocalizedString>
+ 
+ #include <QComboBox>
+@@ -257,7 +259,9 @@ void DolphinFacetsWidget::updateTagsSelector()
+ void DolphinFacetsWidget::updateTagsMenu()
+ {
+     updateTagsMenuItems({}, {});
++#ifdef HAVE_BALOO
+     m_tagsLister.openUrl(QUrl(QStringLiteral("tags:/")), KCoreDirLister::OpenUrlFlag::Reload);
++#endif
+ }
+ 
+ void DolphinFacetsWidget::updateTagsMenuItems(const QUrl&, const KFileItemList& items)


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-apps/dolphin/files/, kde-apps/dolphin/
@ 2021-05-13 14:41 Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2021-05-13 14:41 UTC (permalink / raw
  To: gentoo-commits

commit:     f05339fe48803949f3b232aa3a231fbb9422b784
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu May 13 14:14:01 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu May 13 14:38:10 2021 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=f05339fe

kde-apps/dolphin: no-sematic-desktop.patch upstreamed

Upstream commit 29636baff0f0cf8d769aa75b1c458b96cf83b828

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 kde-apps/dolphin/dolphin-21.04.49.9999.ebuild      |  3 --
 kde-apps/dolphin/dolphin-9999.ebuild               |  3 --
 .../dolphin-21.04.1-fix-no-semantic-desktop.patch  | 41 ----------------------
 3 files changed, 47 deletions(-)

diff --git a/kde-apps/dolphin/dolphin-21.04.49.9999.ebuild b/kde-apps/dolphin/dolphin-21.04.49.9999.ebuild
index 7198ee2405..5e3e20bd11 100644
--- a/kde-apps/dolphin/dolphin-21.04.49.9999.ebuild
+++ b/kde-apps/dolphin/dolphin-21.04.49.9999.ebuild
@@ -62,9 +62,6 @@ RDEPEND="${DEPEND}
 	>=kde-apps/kio-extras-${PVCUT}:5
 "
 
-# pending https://invent.kde.org/system/dolphin/-/merge_requests/208
-PATCHES=( "${FILESDIR}/${PN}-21.04.1-fix-no-semantic-desktop.patch" ) # KDE-bug 435586
-
 src_configure() {
 	local mycmakeargs=(
 		-DCMAKE_DISABLE_FIND_PACKAGE_PackageKitQt5=ON

diff --git a/kde-apps/dolphin/dolphin-9999.ebuild b/kde-apps/dolphin/dolphin-9999.ebuild
index b043a6542c..a469a25ca7 100644
--- a/kde-apps/dolphin/dolphin-9999.ebuild
+++ b/kde-apps/dolphin/dolphin-9999.ebuild
@@ -61,9 +61,6 @@ RDEPEND="${DEPEND}
 	>=kde-apps/kio-extras-${PVCUT}:5
 "
 
-# pending https://invent.kde.org/system/dolphin/-/merge_requests/208
-PATCHES=( "${FILESDIR}/${PN}-21.04.1-fix-no-semantic-desktop.patch" ) # KDE-bug 435586
-
 src_configure() {
 	local mycmakeargs=(
 		-DCMAKE_DISABLE_FIND_PACKAGE_PackageKitQt5=ON

diff --git a/kde-apps/dolphin/files/dolphin-21.04.1-fix-no-semantic-desktop.patch b/kde-apps/dolphin/files/dolphin-21.04.1-fix-no-semantic-desktop.patch
deleted file mode 100644
index 5636d0532e..0000000000
--- a/kde-apps/dolphin/files/dolphin-21.04.1-fix-no-semantic-desktop.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 29636baff0f0cf8d769aa75b1c458b96cf83b828 Mon Sep 17 00:00:00 2001
-From: Ismael Asensio <isma.af@gmail.com>
-Date: Sun, 9 May 2021 21:10:44 +0200
-Subject: [PATCH] search/facetswidget: Check for protocol before trying to
- fetch tags
-
-This was causing an error when trying to list items from the
-non-existent `tags:` protocol.
-
-BUG: 435586
-FIXED-IN: 21.04.1
----
- src/search/dolphinfacetswidget.cpp | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/search/dolphinfacetswidget.cpp b/src/search/dolphinfacetswidget.cpp
-index d4079f1eb..e8a43101f 100644
---- a/src/search/dolphinfacetswidget.cpp
-+++ b/src/search/dolphinfacetswidget.cpp
-@@ -8,6 +8,7 @@
- #include "dolphinfacetswidget.h"
- 
- #include <KLocalizedString>
-+#include <KProtocolInfo>
- 
- #include <QComboBox>
- #include <QDate>
-@@ -245,7 +246,9 @@ void DolphinFacetsWidget::updateTagsSelector()
- void DolphinFacetsWidget::updateTagsMenu()
- {
-     updateTagsMenuItems({}, {});
--    m_tagsLister.openUrl(QUrl(QStringLiteral("tags:/")), KCoreDirLister::OpenUrlFlag::Reload);
-+    if (KProtocolInfo::isKnownProtocol(QStringLiteral("tags"))) {
-+        m_tagsLister.openUrl(QUrl(QStringLiteral("tags:/")), KCoreDirLister::OpenUrlFlag::Reload);
-+    }
- }
- 
- void DolphinFacetsWidget::updateTagsMenuItems(const QUrl&, const KFileItemList& items)
--- 
-GitLab
-


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] proj/kde:master commit in: kde-apps/dolphin/files/, kde-apps/dolphin/
@ 2021-09-02 11:55 Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2021-09-02 11:55 UTC (permalink / raw
  To: gentoo-commits

commit:     8f7e326d0097bd072ed9ce9a1a5d43d059ac22ab
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Sep  2 11:54:51 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Sep  2 11:54:51 2021 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=8f7e326d

kde-apps/dolphin: Port to KTerminalLauncherJob

See also:
https://mail.kde.org/pipermail/distributions/2021-September/001048.html

Upstream commit 27bfcde4efaf936243fc41e4a61d0cac32105ef6

Package-Manager: Portage-3.0.22, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 kde-apps/dolphin/dolphin-21.08.49.9999.ebuild      |   4 +
 ...phin-21.08.1-port-to-KTerminalLauncherJob.patch | 110 +++++++++++++++++++++
 2 files changed, 114 insertions(+)

diff --git a/kde-apps/dolphin/dolphin-21.08.49.9999.ebuild b/kde-apps/dolphin/dolphin-21.08.49.9999.ebuild
index b3aedd3464..883ba27bcc 100644
--- a/kde-apps/dolphin/dolphin-21.08.49.9999.ebuild
+++ b/kde-apps/dolphin/dolphin-21.08.49.9999.ebuild
@@ -61,6 +61,10 @@ RDEPEND="${DEPEND}
 	>=kde-apps/kio-extras-${PVCUT}:5
 "
 
+PATCHES=(
+	"${FILESDIR}/${PN}-21.08.1-port-to-KTerminalLauncherJob.patch" # KDE-bug 441072
+)
+
 src_configure() {
 	local mycmakeargs=(
 		-DCMAKE_DISABLE_FIND_PACKAGE_PackageKitQt5=ON

diff --git a/kde-apps/dolphin/files/dolphin-21.08.1-port-to-KTerminalLauncherJob.patch b/kde-apps/dolphin/files/dolphin-21.08.1-port-to-KTerminalLauncherJob.patch
new file mode 100644
index 0000000000..2189355de6
--- /dev/null
+++ b/kde-apps/dolphin/files/dolphin-21.08.1-port-to-KTerminalLauncherJob.patch
@@ -0,0 +1,110 @@
+From 27bfcde4efaf936243fc41e4a61d0cac32105ef6 Mon Sep 17 00:00:00 2001
+From: Nate Graham <nate@kde.org>
+Date: Tue, 31 Aug 2021 09:09:14 -0600
+Subject: [PATCH] Port to KTerminalLauncherJob
+
+Dolphin still uses KToolInvocation::invokeTerminal() which is
+deprecated and requires KInit. However Dolphin was ported away from
+requiring it in other ways, so it is now possible to have Dolphin
+running but not KInit, which breaks the "Open in Terminal"
+functionality.
+
+Using KTerminalLauncherJob fixes this. It was introduced in Frameworks
+5.83, so the CMake dependency version is accordingly increased.
+
+BUG: 441072
+FIXED-IN: 21.12
+---
+ CMakeLists.txt            |  2 +-
+ src/dolphinmainwindow.cpp | 14 ++++++++++----
+ src/dolphinpart.cpp       |  6 ++++--
+ 3 files changed, 15 insertions(+), 7 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7d50205bc..ec87cdecc 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -8,7 +8,7 @@ set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE
+ project(Dolphin VERSION ${RELEASE_SERVICE_VERSION})
+ 
+ set(QT_MIN_VERSION "5.15.0")
+-set(KF5_MIN_VERSION "5.81.0")
++set(KF5_MIN_VERSION "5.83.0")
+ 
+ set(CMAKE_CXX_STANDARD 17)
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
+index 62e347032..f3a5e3b4e 100644
+--- a/src/dolphinmainwindow.cpp
++++ b/src/dolphinmainwindow.cpp
+@@ -56,10 +56,10 @@
+ #include <KStandardAction>
+ #include <KStartupInfo>
+ #include <KSycoca>
++#include <KTerminalLauncherJob>
+ #include <KToggleAction>
+ #include <KToolBar>
+ #include <KToolBarPopupAction>
+-#include <KToolInvocation>
+ #include <KUrlComboBox>
+ #include <KUrlNavigator>
+ #include <KWindowSystem>
+@@ -1033,7 +1033,9 @@ void DolphinMainWindow::openTerminal()
+     const QUrl url = m_activeViewContainer->url();
+ 
+     if (url.isLocalFile()) {
+-        KToolInvocation::invokeTerminal(QString(), {}, url.toLocalFile());
++        auto job = new KTerminalLauncherJob(QString());
++        job->setWorkingDirectory(url.toLocalFile());
++        job->start();
+         return;
+     }
+ 
+@@ -1047,14 +1049,18 @@ void DolphinMainWindow::openTerminal()
+                 statUrl = job->mostLocalUrl();
+             }
+ 
+-            KToolInvocation::invokeTerminal(QString(), {}, statUrl.isLocalFile() ? statUrl.toLocalFile() : QDir::homePath());
++            auto job = new KTerminalLauncherJob(QString());
++            job->setWorkingDirectory(statUrl.isLocalFile() ? statUrl.toLocalFile() : QDir::homePath());
++            job->start();
+         });
+ 
+         return;
+     }
+ 
+     // Nothing worked, just use $HOME
+-    KToolInvocation::invokeTerminal(QString(), {}, QDir::homePath());
++    auto job = new KTerminalLauncherJob(QString());
++    job->setWorkingDirectory(QDir::homePath());
++    job->start();
+ }
+ 
+ void DolphinMainWindow::editSettings()
+diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp
+index 9c551d67a..8d528f418 100644
+--- a/src/dolphinpart.cpp
++++ b/src/dolphinpart.cpp
+@@ -32,7 +32,7 @@
+ #include <KPluginFactory>
+ #include <KIO/CommandLauncherJob>
+ #include <KSharedConfig>
+-#include <KToolInvocation>
++#include <KTerminalLauncherJob>
+ 
+ #include <QActionGroup>
+ #include <QApplication>
+@@ -567,7 +567,9 @@ QString DolphinPart::localFilePathOrHome() const
+ 
+ void DolphinPart::slotOpenTerminal()
+ {
+-    KToolInvocation::invokeTerminal(QString(), {}, localFilePathOrHome());
++    auto job = new KTerminalLauncherJob(QString());
++    job->setWorkingDirectory(localFilePathOrHome());
++    job->start();
+ }
+ 
+ void DolphinPart::slotFindFile()
+-- 
+GitLab
+


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-09-02 11:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-02 11:55 [gentoo-commits] proj/kde:master commit in: kde-apps/dolphin/files/, kde-apps/dolphin/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2021-05-13 14:41 Andreas Sturmlechner
2021-05-09 16:32 Andreas Sturmlechner
2019-12-07 11:43 Andreas Sturmlechner
2018-07-08 15:48 Andreas Sturmlechner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox