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/files/, kde-frameworks/kio/
Date: Fri, 05 Nov 2021 16:24:22
Message-Id: 1636129440.ec28b59c42e6c7a7de5c17c4ac2cfe9763192524.asturm@gentoo
1 commit: ec28b59c42e6c7a7de5c17c4ac2cfe9763192524
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Fri Nov 5 16:22:55 2021 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Fri Nov 5 16:24:00 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec28b59c
7
8 kde-frameworks/kio: KMountPoint: Revert to pre-libblkid parsing
9
10 Upstream commit 221a94a66c4d2f6e4f2dc938ee8a63a6ca739477
11
12 KDE-bug: https://bugs.kde.org/show_bug.cgi?id=442106
13 Thanks-to: Norman Back <gentoo2 <AT> thebacks.co.uk>
14 Bug: https://bugs.gentoo.org/821103
15 Package-Manager: Portage-3.0.28, Repoman-3.0.3
16 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
17
18 ...kio-5.85.0-revert-to-pre-libblkid-parsing.patch | 128 +++++++++++++++++++++
19 kde-frameworks/kio/kio-5.85.0-r2.ebuild | 100 ++++++++++++++++
20 kde-frameworks/kio/kio-5.87.0-r1.ebuild | 98 ++++++++++++++++
21 3 files changed, 326 insertions(+)
22
23 diff --git a/kde-frameworks/kio/files/kio-5.85.0-revert-to-pre-libblkid-parsing.patch b/kde-frameworks/kio/files/kio-5.85.0-revert-to-pre-libblkid-parsing.patch
24 new file mode 100644
25 index 00000000000..1f4c7cf0615
26 --- /dev/null
27 +++ b/kde-frameworks/kio/files/kio-5.85.0-revert-to-pre-libblkid-parsing.patch
28 @@ -0,0 +1,128 @@
29 +From 221a94a66c4d2f6e4f2dc938ee8a63a6ca739477 Mon Sep 17 00:00:00 2001
30 +From: Ahmad Samir <a.samirh78@×××××.com>
31 +Date: Wed, 20 Oct 2021 20:01:40 +0200
32 +Subject: [PATCH] KMountPoint: revert to parsing /dev/disk/by-{uuid,label}/
33 + manually
34 +
35 +Apparently libblkid is causing some performance issues when resolving
36 +UUID/LABEL tags from fstab when the device that has that UUID/LABEL isn't
37 +present.
38 +
39 +Parsing /dev/disk/by-* is more basic, since it's a simple check resolving
40 +some symlinks.
41 +
42 +Thanks to the users in the bug report for the investigative work, because
43 +personally I couldn't reproduce the problem on my machine no matter what I
44 +tried.
45 +
46 +BUG: 442106
47 +FIXED-IN: 5.88
48 +---
49 + CMakeLists.txt | 3 +--
50 + src/core/CMakeLists.txt | 5 ++---
51 + src/core/config-kmountpoint.h.cmake | 2 +-
52 + src/core/kmountpoint.cpp | 18 ++++--------------
53 + 4 files changed, 8 insertions(+), 20 deletions(-)
54 +
55 +diff --git a/CMakeLists.txt b/CMakeLists.txt
56 +index ca374a4cb..f1bb1a59b 100644
57 +--- a/CMakeLists.txt
58 ++++ b/CMakeLists.txt
59 +@@ -130,8 +130,7 @@ set_package_properties(ACL PROPERTIES DESCRIPTION "LibACL"
60 + # Used by KMountPoint
61 + if (CMAKE_SYSTEM_NAME MATCHES "Linux")
62 + find_package(LibMount REQUIRED)
63 +- find_package(Blkid REQUIRED)
64 +- set(HAVE_LIBS_MOUNT_AND_BLKID ${LibMount_FOUND} AND ${Blkid_FOUND})
65 ++ set(HAVE_LIB_MOUNT ${LibMount_FOUND})
66 + endif()
67 +
68 + if (ANDROID)
69 +diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
70 +index be19e9b62..67a1b1cf7 100644
71 +--- a/src/core/CMakeLists.txt
72 ++++ b/src/core/CMakeLists.txt
73 +@@ -236,9 +236,8 @@ if(ACL_FOUND)
74 + target_link_libraries(KF5KIOCore PRIVATE ${ACL_LIBS})
75 + endif()
76 +
77 +-if(HAVE_LIBS_MOUNT_AND_BLKID)
78 +- # libmount links against blkid anyway
79 +- target_link_libraries(KF5KIOCore PRIVATE LibMount::LibMount Blkid::Blkid)
80 ++if(HAVE_LIB_MOUNT)
81 ++ target_link_libraries(KF5KIOCore PRIVATE LibMount::LibMount)
82 + endif()
83 +
84 + # this should be done by cmake, see bug 371721
85 +diff --git a/src/core/config-kmountpoint.h.cmake b/src/core/config-kmountpoint.h.cmake
86 +index f824d4042..3673eb141 100644
87 +--- a/src/core/config-kmountpoint.h.cmake
88 ++++ b/src/core/config-kmountpoint.h.cmake
89 +@@ -1,7 +1,7 @@
90 + #cmakedefine01 HAVE_GETMNTINFO
91 + #cmakedefine01 GETMNTINFO_USES_STATVFS
92 +
93 +-#cmakedefine01 HAVE_LIBS_MOUNT_AND_BLKID
94 ++#cmakedefine01 HAVE_LIB_MOUNT
95 +
96 + #cmakedefine01 HAVE_SYS_MOUNT_H
97 + #cmakedefine01 HAVE_FSTAB_H
98 +diff --git a/src/core/kmountpoint.cpp b/src/core/kmountpoint.cpp
99 +index e2d32055c..f41cff5ee 100644
100 +--- a/src/core/kmountpoint.cpp
101 ++++ b/src/core/kmountpoint.cpp
102 +@@ -44,7 +44,7 @@ static const Qt::CaseSensitivity cs = Qt::CaseSensitive;
103 + #endif
104 +
105 + // Linux
106 +-#if HAVE_LIBS_MOUNT_AND_BLKID
107 ++#if HAVE_LIB_MOUNT
108 + #include <libmount/libmount.h>
109 + #include <blkid/blkid.h>
110 + #endif
111 +@@ -176,7 +176,7 @@ KMountPoint::List KMountPoint::possibleMountPoints(DetailsNeededFlags infoNeeded
112 + #ifdef Q_OS_WIN
113 + result = KMountPoint::currentMountPoints(infoNeeded);
114 +
115 +-#elif HAVE_LIBS_MOUNT_AND_BLKID
116 ++#elif HAVE_LIB_MOUNT
117 + if (struct libmnt_table *table = mnt_new_table()) {
118 + // By default parses "/etc/fstab"
119 + if (mnt_table_parse_fstab(table, nullptr) == 0) {
120 +@@ -202,23 +202,13 @@ KMountPoint::List KMountPoint::possibleMountPoints(DetailsNeededFlags infoNeeded
121 + // or some network mount
122 + if (const char *source = mnt_fs_get_source(fs)) {
123 + mp->d->m_mountedFrom = QFile::decodeName(source);
124 +- if (mp->d->m_mountedFrom.startsWith(QLatin1String("UUID")) || mp->d->m_mountedFrom.startsWith(QLatin1String("LABEL"))) {
125 +- // Use blkid to resolve UUID/LABEL to the device file
126 +- if (char *blkSource = blkid_evaluate_spec(source, nullptr)) {
127 +- mp->d->m_mountedFrom = QFile::decodeName(blkSource);
128 +- free(blkSource);
129 +- if ((infoNeeded & KMountPoint::NeedRealDeviceName) //
130 +- && mp->d->m_mountedFrom.startsWith(QLatin1String("/dev/"))) {
131 +- mp->d->m_device = mp->d->m_mountedFrom;
132 +- }
133 +- }
134 +- }
135 + }
136 +
137 + if (infoNeeded & NeedMountOptions) {
138 + mp->d->m_mountOptions = QFile::decodeName(mnt_fs_get_options(fs)).split(QLatin1Char(','));
139 + }
140 +
141 ++ mp->d->finalizePossibleMountPoint(infoNeeded);
142 + result.append(mp);
143 + }
144 + mnt_free_iter(itr);
145 +@@ -351,7 +341,7 @@ KMountPoint::List KMountPoint::currentMountPoints(DetailsNeededFlags infoNeeded)
146 + }
147 + }
148 +
149 +-#elif HAVE_LIBS_MOUNT_AND_BLKID
150 ++#elif HAVE_LIB_MOUNT
151 + if (struct libmnt_table *table = mnt_new_table()) {
152 + // By default, parses "/proc/self/mountinfo"
153 + if (mnt_table_parse_mtab(table, nullptr) == 0) {
154 +--
155 +GitLab
156 +
157
158 diff --git a/kde-frameworks/kio/kio-5.85.0-r2.ebuild b/kde-frameworks/kio/kio-5.85.0-r2.ebuild
159 new file mode 100644
160 index 00000000000..ad40012c385
161 --- /dev/null
162 +++ b/kde-frameworks/kio/kio-5.85.0-r2.ebuild
163 @@ -0,0 +1,100 @@
164 +# Copyright 1999-2021 Gentoo Authors
165 +# Distributed under the terms of the GNU General Public License v2
166 +
167 +EAPI=8
168 +
169 +ECM_DESIGNERPLUGIN="true"
170 +ECM_TEST="forceoptional"
171 +PVCUT=$(ver_cut 1-2)
172 +QTMIN=5.15.2
173 +VIRTUALX_REQUIRED="test"
174 +inherit ecm kde.org xdg-utils
175 +
176 +DESCRIPTION="Framework providing transparent file and data management"
177 +
178 +LICENSE="LGPL-2+"
179 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
180 +IUSE="acl +handbook kerberos +kwallet X"
181 +
182 +# tests hang
183 +RESTRICT="test"
184 +
185 +RDEPEND="
186 + dev-libs/libxml2
187 + dev-libs/libxslt
188 + >=dev-qt/qtdbus-${QTMIN}:5
189 + >=dev-qt/qtdeclarative-${QTMIN}:5
190 + >=dev-qt/qtgui-${QTMIN}:5
191 + >=dev-qt/qtnetwork-${QTMIN}:5[ssl]
192 + >=dev-qt/qtwidgets-${QTMIN}:5
193 + >=dev-qt/qtxml-${QTMIN}:5
194 + =kde-frameworks/kauth-${PVCUT}*:5
195 + =kde-frameworks/karchive-${PVCUT}*:5
196 + =kde-frameworks/kbookmarks-${PVCUT}*:5
197 + =kde-frameworks/kcodecs-${PVCUT}*:5
198 + =kde-frameworks/kcompletion-${PVCUT}*:5
199 + =kde-frameworks/kconfig-${PVCUT}*:5
200 + =kde-frameworks/kconfigwidgets-${PVCUT}*:5
201 + =kde-frameworks/kcoreaddons-${PVCUT}*:5
202 + =kde-frameworks/kcrash-${PVCUT}*:5
203 + =kde-frameworks/kdbusaddons-${PVCUT}*:5
204 + =kde-frameworks/kguiaddons-${PVCUT}*:5
205 + =kde-frameworks/ki18n-${PVCUT}*:5
206 + =kde-frameworks/kiconthemes-${PVCUT}*:5
207 + =kde-frameworks/kitemviews-${PVCUT}*:5
208 + =kde-frameworks/kjobwidgets-${PVCUT}*:5
209 + =kde-frameworks/knotifications-${PVCUT}*:5
210 + =kde-frameworks/kservice-${PVCUT}*:5
211 + =kde-frameworks/ktextwidgets-${PVCUT}*:5
212 + =kde-frameworks/kwidgetsaddons-${PVCUT}*:5
213 + =kde-frameworks/kwindowsystem-${PVCUT}*:5
214 + =kde-frameworks/kxmlgui-${PVCUT}*:5
215 + =kde-frameworks/solid-${PVCUT}*:5
216 + acl? (
217 + sys-apps/attr
218 + virtual/acl
219 + )
220 + handbook? ( =kde-frameworks/kdoctools-${PVCUT}*:5 )
221 + kerberos? ( virtual/krb5 )
222 + kwallet? ( =kde-frameworks/kwallet-${PVCUT}*:5 )
223 + X? ( >=dev-qt/qtx11extras-${QTMIN}:5 )
224 +"
225 +DEPEND="${RDEPEND}
226 + >=dev-qt/qtconcurrent-${QTMIN}:5
227 + test? ( sys-libs/zlib )
228 + X? (
229 + x11-base/xorg-proto
230 + x11-libs/libX11
231 + x11-libs/libXrender
232 + )
233 +"
234 +PDEPEND=">=kde-frameworks/kded-${PVCUT}:5"
235 +
236 +PATCHES=(
237 + "${FILESDIR}"/${P}-KDirOperator-exp-to-url-only-in-detail-treeview.patch # KDE-bug 440475
238 + "${FILESDIR}"/${P}-allow-edit-icons-for-root-owned-desktop-files.patch # KDE-bug 429613
239 + "${FILESDIR}"/${P}-revert-to-pre-libblkid-parsing.patch # bug 821103, KDE-bug 442106
240 +)
241 +
242 +src_configure() {
243 + local mycmakeargs=(
244 + -DKIO_NO_PUBLIC_QTCONCURRENT=ON
245 + $(cmake_use_find_package acl ACL)
246 + $(cmake_use_find_package handbook KF5DocTools)
247 + $(cmake_use_find_package kerberos GSSAPI)
248 + $(cmake_use_find_package kwallet KF5Wallet)
249 + $(cmake_use_find_package X X11)
250 + )
251 +
252 + ecm_src_configure
253 +}
254 +
255 +pkg_postinst() {
256 + ecm_pkg_postinst
257 + xdg_desktop_database_update
258 +}
259 +
260 +pkg_postrm() {
261 + ecm_pkg_postrm
262 + xdg_desktop_database_update
263 +}
264
265 diff --git a/kde-frameworks/kio/kio-5.87.0-r1.ebuild b/kde-frameworks/kio/kio-5.87.0-r1.ebuild
266 new file mode 100644
267 index 00000000000..d33ade8d220
268 --- /dev/null
269 +++ b/kde-frameworks/kio/kio-5.87.0-r1.ebuild
270 @@ -0,0 +1,98 @@
271 +# Copyright 1999-2021 Gentoo Authors
272 +# Distributed under the terms of the GNU General Public License v2
273 +
274 +EAPI=8
275 +
276 +ECM_DESIGNERPLUGIN="true"
277 +ECM_TEST="forceoptional"
278 +PVCUT=$(ver_cut 1-2)
279 +QTMIN=5.15.2
280 +VIRTUALX_REQUIRED="test"
281 +inherit ecm kde.org xdg-utils
282 +
283 +DESCRIPTION="Framework providing transparent file and data management"
284 +
285 +LICENSE="LGPL-2+"
286 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
287 +IUSE="acl +handbook kerberos +kwallet X"
288 +
289 +# tests hang
290 +RESTRICT="test"
291 +
292 +RDEPEND="
293 + dev-libs/libxml2
294 + dev-libs/libxslt
295 + >=dev-qt/qtdbus-${QTMIN}:5
296 + >=dev-qt/qtdeclarative-${QTMIN}:5
297 + >=dev-qt/qtgui-${QTMIN}:5
298 + >=dev-qt/qtnetwork-${QTMIN}:5[ssl]
299 + >=dev-qt/qtwidgets-${QTMIN}:5
300 + >=dev-qt/qtxml-${QTMIN}:5
301 + =kde-frameworks/kauth-${PVCUT}*:5
302 + =kde-frameworks/karchive-${PVCUT}*:5
303 + =kde-frameworks/kbookmarks-${PVCUT}*:5
304 + =kde-frameworks/kcodecs-${PVCUT}*:5
305 + =kde-frameworks/kcompletion-${PVCUT}*:5
306 + =kde-frameworks/kconfig-${PVCUT}*:5
307 + =kde-frameworks/kconfigwidgets-${PVCUT}*:5
308 + =kde-frameworks/kcoreaddons-${PVCUT}*:5
309 + =kde-frameworks/kcrash-${PVCUT}*:5
310 + =kde-frameworks/kdbusaddons-${PVCUT}*:5
311 + =kde-frameworks/kguiaddons-${PVCUT}*:5
312 + =kde-frameworks/ki18n-${PVCUT}*:5
313 + =kde-frameworks/kiconthemes-${PVCUT}*:5
314 + =kde-frameworks/kitemviews-${PVCUT}*:5
315 + =kde-frameworks/kjobwidgets-${PVCUT}*:5
316 + =kde-frameworks/knotifications-${PVCUT}*:5
317 + =kde-frameworks/kservice-${PVCUT}*:5
318 + =kde-frameworks/ktextwidgets-${PVCUT}*:5
319 + =kde-frameworks/kwidgetsaddons-${PVCUT}*:5
320 + =kde-frameworks/kwindowsystem-${PVCUT}*:5
321 + =kde-frameworks/kxmlgui-${PVCUT}*:5
322 + =kde-frameworks/solid-${PVCUT}*:5
323 + acl? (
324 + sys-apps/attr
325 + virtual/acl
326 + )
327 + handbook? ( =kde-frameworks/kdoctools-${PVCUT}*:5 )
328 + kerberos? ( virtual/krb5 )
329 + kwallet? ( =kde-frameworks/kwallet-${PVCUT}*:5 )
330 + X? ( >=dev-qt/qtx11extras-${QTMIN}:5 )
331 +"
332 +DEPEND="${RDEPEND}
333 + >=dev-qt/qtconcurrent-${QTMIN}:5
334 + test? ( sys-libs/zlib )
335 + X? (
336 + x11-base/xorg-proto
337 + x11-libs/libX11
338 + x11-libs/libXrender
339 + )
340 +"
341 +PDEPEND=">=kde-frameworks/kded-${PVCUT}:5"
342 +
343 +PATCHES=(
344 + "${FILESDIR}"/${PN}-5.85.0-revert-to-pre-libblkid-parsing.patch # bug 821103, KDE-bug 442106
345 +)
346 +
347 +src_configure() {
348 + local mycmakeargs=(
349 + -DKIO_NO_PUBLIC_QTCONCURRENT=ON
350 + $(cmake_use_find_package acl ACL)
351 + $(cmake_use_find_package handbook KF5DocTools)
352 + $(cmake_use_find_package kerberos GSSAPI)
353 + $(cmake_use_find_package kwallet KF5Wallet)
354 + $(cmake_use_find_package X X11)
355 + )
356 +
357 + ecm_src_configure
358 +}
359 +
360 +pkg_postinst() {
361 + ecm_pkg_postinst
362 + xdg_desktop_database_update
363 +}
364 +
365 +pkg_postrm() {
366 + ecm_pkg_postrm
367 + xdg_desktop_database_update
368 +}