Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kio/, kde-frameworks/kio/files/
Date: Fri, 16 Jul 2021 15:21:09
Message-Id: 1626448850.798f6de5b40e392c7738342cab9f4b8eb75ebcf3.asturm@gentoo
1 commit: 798f6de5b40e392c7738342cab9f4b8eb75ebcf3
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jul 16 15:15:58 2021 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 16 15:20:50 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=798f6de5
7
8 kde-frameworks/kio: Fix selecting binaries from component chooser KCM
9
10 Upstream commit 8ad6921524c92a0cf1b58336b3ce29e159e83b7d
11
12 See also: https://mail.kde.org/pipermail/distributions/2021-July/001035.html
13 KDE-bug: https://bugs.kde.org/show_bug.cgi?id=439477
14 Package-Manager: Portage-3.0.20, Repoman-3.0.3
15 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
16
17 .../files/kio-5.84.0-fix-open-url-w-binary.patch | 53 +++++++++++
18 kde-frameworks/kio/kio-5.84.0-r1.ebuild | 100 +++++++++++++++++++++
19 2 files changed, 153 insertions(+)
20
21 diff --git a/kde-frameworks/kio/files/kio-5.84.0-fix-open-url-w-binary.patch b/kde-frameworks/kio/files/kio-5.84.0-fix-open-url-w-binary.patch
22 new file mode 100644
23 index 00000000000..cdccada57d9
24 --- /dev/null
25 +++ b/kde-frameworks/kio/files/kio-5.84.0-fix-open-url-w-binary.patch
26 @@ -0,0 +1,53 @@
27 +From 8ad6921524c92a0cf1b58336b3ce29e159e83b7d Mon Sep 17 00:00:00 2001
28 +From: David Edmundson <kde@×××××××××××××××××.uk>
29 +Date: Wed, 14 Jul 2021 17:06:59 +0100
30 +Subject: [PATCH] Fix selecting binaries from component chooser KCM
31 +
32 +In the kcmshell for a component chooser we use the open with dialog to
33 +select services for various scheme handlers.
34 +
35 +If you select a binary instead of a .desktop file a temporary .desktop
36 +file is created in ~/.local/share/applications
37 +
38 +This is in the format
39 +Exec=someBinary
40 +MimeType=x-scheme-handler/http
41 +
42 +When we then use this application for launching KIO::DesktopExecParser
43 +then (sort of correctly) determines that that the chosen service cannot
44 +handle the http scheme because even though it is a scheme handler it
45 +does not have a "%u" in the exec line.
46 +
47 +This leads to us potentially loading websites via kioclient or kio-fuse.
48 +
49 +Testing done:
50 + - kcmshell5 component chooser
51 + - web browser -> other -> type "/usr/bin/firefox"
52 + - kde-open5 http://kde.org
53 + - Previously this gave a local URL, now it is correct
54 +---
55 + src/widgets/kopenwithdialog.cpp | 8 ++++++++
56 + 1 file changed, 8 insertions(+)
57 +
58 +diff --git a/src/widgets/kopenwithdialog.cpp b/src/widgets/kopenwithdialog.cpp
59 +index 1831878ca..31295044d 100644
60 +--- a/src/widgets/kopenwithdialog.cpp
61 ++++ b/src/widgets/kopenwithdialog.cpp
62 +@@ -1088,6 +1088,14 @@ bool KOpenWithDialogPrivate::checkAccept()
63 + KConfigGroup cg = desktopFile.desktopGroup();
64 + cg.writeEntry("Type", "Application");
65 + cg.writeEntry("Name", initialServiceName);
66 ++
67 ++ // if we select a binary for a scheme handler, then it's safe to assume it can handle URLs
68 ++ if (qMimeType.startsWith(QLatin1String("x-scheme-handler/"))) {
69 ++ if (!typedExec.contains(QLatin1String("%u"), Qt::CaseInsensitive) && !typedExec.contains(QLatin1String("%f"), Qt::CaseInsensitive)) {
70 ++ fullExec += QStringLiteral(" %u");
71 ++ }
72 ++ }
73 ++
74 + cg.writeEntry("Exec", fullExec);
75 + cg.writeEntry("NoDisplay", true); // don't make it appear in the K menu
76 + if (terminal->isChecked()) {
77 +--
78 +GitLab
79 +
80
81 diff --git a/kde-frameworks/kio/kio-5.84.0-r1.ebuild b/kde-frameworks/kio/kio-5.84.0-r1.ebuild
82 new file mode 100644
83 index 00000000000..e4d40e939fa
84 --- /dev/null
85 +++ b/kde-frameworks/kio/kio-5.84.0-r1.ebuild
86 @@ -0,0 +1,100 @@
87 +# Copyright 1999-2021 Gentoo Authors
88 +# Distributed under the terms of the GNU General Public License v2
89 +
90 +EAPI=7
91 +
92 +ECM_DESIGNERPLUGIN="true"
93 +ECM_TEST="forceoptional"
94 +PVCUT=$(ver_cut 1-2)
95 +QTMIN=5.15.2
96 +VIRTUALX_REQUIRED="test"
97 +inherit ecm kde.org xdg-utils
98 +
99 +DESCRIPTION="Framework providing transparent file and data management"
100 +
101 +LICENSE="LGPL-2+"
102 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
103 +IUSE="acl +handbook kerberos +kwallet X"
104 +
105 +# tests hang
106 +RESTRICT+=" test"
107 +
108 +RDEPEND="
109 + dev-libs/libxml2
110 + dev-libs/libxslt
111 + >=dev-qt/qtdbus-${QTMIN}:5
112 + >=dev-qt/qtdeclarative-${QTMIN}:5
113 + >=dev-qt/qtgui-${QTMIN}:5
114 + >=dev-qt/qtnetwork-${QTMIN}:5[ssl]
115 + >=dev-qt/qtwidgets-${QTMIN}:5
116 + >=dev-qt/qtxml-${QTMIN}:5
117 + =kde-frameworks/kauth-${PVCUT}*:5
118 + =kde-frameworks/karchive-${PVCUT}*:5
119 + =kde-frameworks/kbookmarks-${PVCUT}*:5
120 + =kde-frameworks/kcodecs-${PVCUT}*:5
121 + =kde-frameworks/kcompletion-${PVCUT}*:5
122 + =kde-frameworks/kconfig-${PVCUT}*:5
123 + =kde-frameworks/kconfigwidgets-${PVCUT}*:5
124 + =kde-frameworks/kcoreaddons-${PVCUT}*:5
125 + =kde-frameworks/kcrash-${PVCUT}*:5
126 + =kde-frameworks/kdbusaddons-${PVCUT}*:5
127 + =kde-frameworks/kguiaddons-${PVCUT}*:5
128 + =kde-frameworks/ki18n-${PVCUT}*:5
129 + =kde-frameworks/kiconthemes-${PVCUT}*:5
130 + =kde-frameworks/kitemviews-${PVCUT}*:5
131 + =kde-frameworks/kjobwidgets-${PVCUT}*:5
132 + =kde-frameworks/knotifications-${PVCUT}*:5
133 + =kde-frameworks/kservice-${PVCUT}*:5
134 + =kde-frameworks/ktextwidgets-${PVCUT}*:5
135 + =kde-frameworks/kwidgetsaddons-${PVCUT}*:5
136 + =kde-frameworks/kwindowsystem-${PVCUT}*:5
137 + =kde-frameworks/kxmlgui-${PVCUT}*:5
138 + =kde-frameworks/solid-${PVCUT}*:5
139 + acl? (
140 + sys-apps/attr
141 + virtual/acl
142 + )
143 + handbook? ( =kde-frameworks/kdoctools-${PVCUT}*:5 )
144 + kerberos? ( virtual/krb5 )
145 + kwallet? ( =kde-frameworks/kwallet-${PVCUT}*:5 )
146 + X? ( >=dev-qt/qtx11extras-${QTMIN}:5 )
147 +"
148 +DEPEND="${RDEPEND}
149 + >=dev-qt/qtconcurrent-${QTMIN}:5
150 + test? ( sys-libs/zlib )
151 + X? (
152 + x11-base/xorg-proto
153 + x11-libs/libX11
154 + x11-libs/libXrender
155 + )
156 +"
157 +PDEPEND=">=kde-frameworks/kded-${PVCUT}:5"
158 +
159 +PATCHES=(
160 + "${FILESDIR}"/${P}-fix-qtconcurrent-private-link.patch # bug 784971
161 + "${FILESDIR}"/${P}-cxx17-std-mem_fn.patch # bug 802030
162 + "${FILESDIR}"/${P}-fix-open-url-w-binary.patch # KDE-bug 439477
163 +)
164 +
165 +src_configure() {
166 + local mycmakeargs=(
167 + -DKIO_NO_PUBLIC_QTCONCURRENT=ON
168 + $(cmake_use_find_package acl ACL)
169 + $(cmake_use_find_package handbook KF5DocTools)
170 + $(cmake_use_find_package kerberos GSSAPI)
171 + $(cmake_use_find_package kwallet KF5Wallet)
172 + $(cmake_use_find_package X X11)
173 + )
174 +
175 + ecm_src_configure
176 +}
177 +
178 +pkg_postinst() {
179 + ecm_pkg_postinst
180 + xdg_desktop_database_update
181 +}
182 +
183 +pkg_postrm() {
184 + ecm_pkg_postrm
185 + xdg_desktop_database_update
186 +}