mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
kde-frameworks/kio: KMountPoint: Revert to pre-libblkid parsing
Upstream commit 221a94a66c4d2f6e4f2dc938ee8a63a6ca739477 KDE-bug: https://bugs.kde.org/show_bug.cgi?id=442106 Thanks-to: Norman Back <gentoo2@thebacks.co.uk> Bug: https://bugs.gentoo.org/821103 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
@@ -0,0 +1,128 @@
|
||||
From 221a94a66c4d2f6e4f2dc938ee8a63a6ca739477 Mon Sep 17 00:00:00 2001
|
||||
From: Ahmad Samir <a.samirh78@gmail.com>
|
||||
Date: Wed, 20 Oct 2021 20:01:40 +0200
|
||||
Subject: [PATCH] KMountPoint: revert to parsing /dev/disk/by-{uuid,label}/
|
||||
manually
|
||||
|
||||
Apparently libblkid is causing some performance issues when resolving
|
||||
UUID/LABEL tags from fstab when the device that has that UUID/LABEL isn't
|
||||
present.
|
||||
|
||||
Parsing /dev/disk/by-* is more basic, since it's a simple check resolving
|
||||
some symlinks.
|
||||
|
||||
Thanks to the users in the bug report for the investigative work, because
|
||||
personally I couldn't reproduce the problem on my machine no matter what I
|
||||
tried.
|
||||
|
||||
BUG: 442106
|
||||
FIXED-IN: 5.88
|
||||
---
|
||||
CMakeLists.txt | 3 +--
|
||||
src/core/CMakeLists.txt | 5 ++---
|
||||
src/core/config-kmountpoint.h.cmake | 2 +-
|
||||
src/core/kmountpoint.cpp | 18 ++++--------------
|
||||
4 files changed, 8 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index ca374a4cb..f1bb1a59b 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -130,8 +130,7 @@ set_package_properties(ACL PROPERTIES DESCRIPTION "LibACL"
|
||||
# Used by KMountPoint
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
find_package(LibMount REQUIRED)
|
||||
- find_package(Blkid REQUIRED)
|
||||
- set(HAVE_LIBS_MOUNT_AND_BLKID ${LibMount_FOUND} AND ${Blkid_FOUND})
|
||||
+ set(HAVE_LIB_MOUNT ${LibMount_FOUND})
|
||||
endif()
|
||||
|
||||
if (ANDROID)
|
||||
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
|
||||
index be19e9b62..67a1b1cf7 100644
|
||||
--- a/src/core/CMakeLists.txt
|
||||
+++ b/src/core/CMakeLists.txt
|
||||
@@ -236,9 +236,8 @@ if(ACL_FOUND)
|
||||
target_link_libraries(KF5KIOCore PRIVATE ${ACL_LIBS})
|
||||
endif()
|
||||
|
||||
-if(HAVE_LIBS_MOUNT_AND_BLKID)
|
||||
- # libmount links against blkid anyway
|
||||
- target_link_libraries(KF5KIOCore PRIVATE LibMount::LibMount Blkid::Blkid)
|
||||
+if(HAVE_LIB_MOUNT)
|
||||
+ target_link_libraries(KF5KIOCore PRIVATE LibMount::LibMount)
|
||||
endif()
|
||||
|
||||
# this should be done by cmake, see bug 371721
|
||||
diff --git a/src/core/config-kmountpoint.h.cmake b/src/core/config-kmountpoint.h.cmake
|
||||
index f824d4042..3673eb141 100644
|
||||
--- a/src/core/config-kmountpoint.h.cmake
|
||||
+++ b/src/core/config-kmountpoint.h.cmake
|
||||
@@ -1,7 +1,7 @@
|
||||
#cmakedefine01 HAVE_GETMNTINFO
|
||||
#cmakedefine01 GETMNTINFO_USES_STATVFS
|
||||
|
||||
-#cmakedefine01 HAVE_LIBS_MOUNT_AND_BLKID
|
||||
+#cmakedefine01 HAVE_LIB_MOUNT
|
||||
|
||||
#cmakedefine01 HAVE_SYS_MOUNT_H
|
||||
#cmakedefine01 HAVE_FSTAB_H
|
||||
diff --git a/src/core/kmountpoint.cpp b/src/core/kmountpoint.cpp
|
||||
index e2d32055c..f41cff5ee 100644
|
||||
--- a/src/core/kmountpoint.cpp
|
||||
+++ b/src/core/kmountpoint.cpp
|
||||
@@ -44,7 +44,7 @@ static const Qt::CaseSensitivity cs = Qt::CaseSensitive;
|
||||
#endif
|
||||
|
||||
// Linux
|
||||
-#if HAVE_LIBS_MOUNT_AND_BLKID
|
||||
+#if HAVE_LIB_MOUNT
|
||||
#include <libmount/libmount.h>
|
||||
#include <blkid/blkid.h>
|
||||
#endif
|
||||
@@ -176,7 +176,7 @@ KMountPoint::List KMountPoint::possibleMountPoints(DetailsNeededFlags infoNeeded
|
||||
#ifdef Q_OS_WIN
|
||||
result = KMountPoint::currentMountPoints(infoNeeded);
|
||||
|
||||
-#elif HAVE_LIBS_MOUNT_AND_BLKID
|
||||
+#elif HAVE_LIB_MOUNT
|
||||
if (struct libmnt_table *table = mnt_new_table()) {
|
||||
// By default parses "/etc/fstab"
|
||||
if (mnt_table_parse_fstab(table, nullptr) == 0) {
|
||||
@@ -202,23 +202,13 @@ KMountPoint::List KMountPoint::possibleMountPoints(DetailsNeededFlags infoNeeded
|
||||
// or some network mount
|
||||
if (const char *source = mnt_fs_get_source(fs)) {
|
||||
mp->d->m_mountedFrom = QFile::decodeName(source);
|
||||
- if (mp->d->m_mountedFrom.startsWith(QLatin1String("UUID")) || mp->d->m_mountedFrom.startsWith(QLatin1String("LABEL"))) {
|
||||
- // Use blkid to resolve UUID/LABEL to the device file
|
||||
- if (char *blkSource = blkid_evaluate_spec(source, nullptr)) {
|
||||
- mp->d->m_mountedFrom = QFile::decodeName(blkSource);
|
||||
- free(blkSource);
|
||||
- if ((infoNeeded & KMountPoint::NeedRealDeviceName) //
|
||||
- && mp->d->m_mountedFrom.startsWith(QLatin1String("/dev/"))) {
|
||||
- mp->d->m_device = mp->d->m_mountedFrom;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
}
|
||||
|
||||
if (infoNeeded & NeedMountOptions) {
|
||||
mp->d->m_mountOptions = QFile::decodeName(mnt_fs_get_options(fs)).split(QLatin1Char(','));
|
||||
}
|
||||
|
||||
+ mp->d->finalizePossibleMountPoint(infoNeeded);
|
||||
result.append(mp);
|
||||
}
|
||||
mnt_free_iter(itr);
|
||||
@@ -351,7 +341,7 @@ KMountPoint::List KMountPoint::currentMountPoints(DetailsNeededFlags infoNeeded)
|
||||
}
|
||||
}
|
||||
|
||||
-#elif HAVE_LIBS_MOUNT_AND_BLKID
|
||||
+#elif HAVE_LIB_MOUNT
|
||||
if (struct libmnt_table *table = mnt_new_table()) {
|
||||
// By default, parses "/proc/self/mountinfo"
|
||||
if (mnt_table_parse_mtab(table, nullptr) == 0) {
|
||||
--
|
||||
GitLab
|
||||
|
||||
100
kde-frameworks/kio/kio-5.85.0-r2.ebuild
Normal file
100
kde-frameworks/kio/kio-5.85.0-r2.ebuild
Normal file
@@ -0,0 +1,100 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
ECM_DESIGNERPLUGIN="true"
|
||||
ECM_TEST="forceoptional"
|
||||
PVCUT=$(ver_cut 1-2)
|
||||
QTMIN=5.15.2
|
||||
VIRTUALX_REQUIRED="test"
|
||||
inherit ecm kde.org xdg-utils
|
||||
|
||||
DESCRIPTION="Framework providing transparent file and data management"
|
||||
|
||||
LICENSE="LGPL-2+"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
|
||||
IUSE="acl +handbook kerberos +kwallet X"
|
||||
|
||||
# tests hang
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/libxml2
|
||||
dev-libs/libxslt
|
||||
>=dev-qt/qtdbus-${QTMIN}:5
|
||||
>=dev-qt/qtdeclarative-${QTMIN}:5
|
||||
>=dev-qt/qtgui-${QTMIN}:5
|
||||
>=dev-qt/qtnetwork-${QTMIN}:5[ssl]
|
||||
>=dev-qt/qtwidgets-${QTMIN}:5
|
||||
>=dev-qt/qtxml-${QTMIN}:5
|
||||
=kde-frameworks/kauth-${PVCUT}*:5
|
||||
=kde-frameworks/karchive-${PVCUT}*:5
|
||||
=kde-frameworks/kbookmarks-${PVCUT}*:5
|
||||
=kde-frameworks/kcodecs-${PVCUT}*:5
|
||||
=kde-frameworks/kcompletion-${PVCUT}*:5
|
||||
=kde-frameworks/kconfig-${PVCUT}*:5
|
||||
=kde-frameworks/kconfigwidgets-${PVCUT}*:5
|
||||
=kde-frameworks/kcoreaddons-${PVCUT}*:5
|
||||
=kde-frameworks/kcrash-${PVCUT}*:5
|
||||
=kde-frameworks/kdbusaddons-${PVCUT}*:5
|
||||
=kde-frameworks/kguiaddons-${PVCUT}*:5
|
||||
=kde-frameworks/ki18n-${PVCUT}*:5
|
||||
=kde-frameworks/kiconthemes-${PVCUT}*:5
|
||||
=kde-frameworks/kitemviews-${PVCUT}*:5
|
||||
=kde-frameworks/kjobwidgets-${PVCUT}*:5
|
||||
=kde-frameworks/knotifications-${PVCUT}*:5
|
||||
=kde-frameworks/kservice-${PVCUT}*:5
|
||||
=kde-frameworks/ktextwidgets-${PVCUT}*:5
|
||||
=kde-frameworks/kwidgetsaddons-${PVCUT}*:5
|
||||
=kde-frameworks/kwindowsystem-${PVCUT}*:5
|
||||
=kde-frameworks/kxmlgui-${PVCUT}*:5
|
||||
=kde-frameworks/solid-${PVCUT}*:5
|
||||
acl? (
|
||||
sys-apps/attr
|
||||
virtual/acl
|
||||
)
|
||||
handbook? ( =kde-frameworks/kdoctools-${PVCUT}*:5 )
|
||||
kerberos? ( virtual/krb5 )
|
||||
kwallet? ( =kde-frameworks/kwallet-${PVCUT}*:5 )
|
||||
X? ( >=dev-qt/qtx11extras-${QTMIN}:5 )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
>=dev-qt/qtconcurrent-${QTMIN}:5
|
||||
test? ( sys-libs/zlib )
|
||||
X? (
|
||||
x11-base/xorg-proto
|
||||
x11-libs/libX11
|
||||
x11-libs/libXrender
|
||||
)
|
||||
"
|
||||
PDEPEND=">=kde-frameworks/kded-${PVCUT}:5"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-KDirOperator-exp-to-url-only-in-detail-treeview.patch # KDE-bug 440475
|
||||
"${FILESDIR}"/${P}-allow-edit-icons-for-root-owned-desktop-files.patch # KDE-bug 429613
|
||||
"${FILESDIR}"/${P}-revert-to-pre-libblkid-parsing.patch # bug 821103, KDE-bug 442106
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DKIO_NO_PUBLIC_QTCONCURRENT=ON
|
||||
$(cmake_use_find_package acl ACL)
|
||||
$(cmake_use_find_package handbook KF5DocTools)
|
||||
$(cmake_use_find_package kerberos GSSAPI)
|
||||
$(cmake_use_find_package kwallet KF5Wallet)
|
||||
$(cmake_use_find_package X X11)
|
||||
)
|
||||
|
||||
ecm_src_configure
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ecm_pkg_postinst
|
||||
xdg_desktop_database_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
ecm_pkg_postrm
|
||||
xdg_desktop_database_update
|
||||
}
|
||||
98
kde-frameworks/kio/kio-5.87.0-r1.ebuild
Normal file
98
kde-frameworks/kio/kio-5.87.0-r1.ebuild
Normal file
@@ -0,0 +1,98 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
ECM_DESIGNERPLUGIN="true"
|
||||
ECM_TEST="forceoptional"
|
||||
PVCUT=$(ver_cut 1-2)
|
||||
QTMIN=5.15.2
|
||||
VIRTUALX_REQUIRED="test"
|
||||
inherit ecm kde.org xdg-utils
|
||||
|
||||
DESCRIPTION="Framework providing transparent file and data management"
|
||||
|
||||
LICENSE="LGPL-2+"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
|
||||
IUSE="acl +handbook kerberos +kwallet X"
|
||||
|
||||
# tests hang
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/libxml2
|
||||
dev-libs/libxslt
|
||||
>=dev-qt/qtdbus-${QTMIN}:5
|
||||
>=dev-qt/qtdeclarative-${QTMIN}:5
|
||||
>=dev-qt/qtgui-${QTMIN}:5
|
||||
>=dev-qt/qtnetwork-${QTMIN}:5[ssl]
|
||||
>=dev-qt/qtwidgets-${QTMIN}:5
|
||||
>=dev-qt/qtxml-${QTMIN}:5
|
||||
=kde-frameworks/kauth-${PVCUT}*:5
|
||||
=kde-frameworks/karchive-${PVCUT}*:5
|
||||
=kde-frameworks/kbookmarks-${PVCUT}*:5
|
||||
=kde-frameworks/kcodecs-${PVCUT}*:5
|
||||
=kde-frameworks/kcompletion-${PVCUT}*:5
|
||||
=kde-frameworks/kconfig-${PVCUT}*:5
|
||||
=kde-frameworks/kconfigwidgets-${PVCUT}*:5
|
||||
=kde-frameworks/kcoreaddons-${PVCUT}*:5
|
||||
=kde-frameworks/kcrash-${PVCUT}*:5
|
||||
=kde-frameworks/kdbusaddons-${PVCUT}*:5
|
||||
=kde-frameworks/kguiaddons-${PVCUT}*:5
|
||||
=kde-frameworks/ki18n-${PVCUT}*:5
|
||||
=kde-frameworks/kiconthemes-${PVCUT}*:5
|
||||
=kde-frameworks/kitemviews-${PVCUT}*:5
|
||||
=kde-frameworks/kjobwidgets-${PVCUT}*:5
|
||||
=kde-frameworks/knotifications-${PVCUT}*:5
|
||||
=kde-frameworks/kservice-${PVCUT}*:5
|
||||
=kde-frameworks/ktextwidgets-${PVCUT}*:5
|
||||
=kde-frameworks/kwidgetsaddons-${PVCUT}*:5
|
||||
=kde-frameworks/kwindowsystem-${PVCUT}*:5
|
||||
=kde-frameworks/kxmlgui-${PVCUT}*:5
|
||||
=kde-frameworks/solid-${PVCUT}*:5
|
||||
acl? (
|
||||
sys-apps/attr
|
||||
virtual/acl
|
||||
)
|
||||
handbook? ( =kde-frameworks/kdoctools-${PVCUT}*:5 )
|
||||
kerberos? ( virtual/krb5 )
|
||||
kwallet? ( =kde-frameworks/kwallet-${PVCUT}*:5 )
|
||||
X? ( >=dev-qt/qtx11extras-${QTMIN}:5 )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
>=dev-qt/qtconcurrent-${QTMIN}:5
|
||||
test? ( sys-libs/zlib )
|
||||
X? (
|
||||
x11-base/xorg-proto
|
||||
x11-libs/libX11
|
||||
x11-libs/libXrender
|
||||
)
|
||||
"
|
||||
PDEPEND=">=kde-frameworks/kded-${PVCUT}:5"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-5.85.0-revert-to-pre-libblkid-parsing.patch # bug 821103, KDE-bug 442106
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DKIO_NO_PUBLIC_QTCONCURRENT=ON
|
||||
$(cmake_use_find_package acl ACL)
|
||||
$(cmake_use_find_package handbook KF5DocTools)
|
||||
$(cmake_use_find_package kerberos GSSAPI)
|
||||
$(cmake_use_find_package kwallet KF5Wallet)
|
||||
$(cmake_use_find_package X X11)
|
||||
)
|
||||
|
||||
ecm_src_configure
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ecm_pkg_postinst
|
||||
xdg_desktop_database_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
ecm_pkg_postrm
|
||||
xdg_desktop_database_update
|
||||
}
|
||||
Reference in New Issue
Block a user