summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-08-01 21:25:59 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2021-08-01 21:32:38 +0200
commit5ef49fb17ef357eb022915082470ccbe8537b199 (patch)
treeb78af62b4d11fbc1ef940420d3efb1e74292980f
parentnet-libs/libcrafter: update EAPI 7 -> 8 (diff)
downloadgentoo-5ef49fb17ef357eb022915082470ccbe8537b199.tar.gz
gentoo-5ef49fb17ef357eb022915082470ccbe8537b199.tar.bz2
gentoo-5ef49fb17ef357eb022915082470ccbe8537b199.zip
kde-frameworks/solid: Backport upstream port to qstrcmp()
Upstream commit e5964d13f36901e7768ca38064125a5c5c28a939 See also: https://mail.kde.org/pipermail/distributions/2021-July/001036.html Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
-rw-r--r--kde-frameworks/solid/files/solid-5.84.0-qstrcmp.patch35
-rw-r--r--kde-frameworks/solid/solid-5.84.0-r1.ebuild53
2 files changed, 88 insertions, 0 deletions
diff --git a/kde-frameworks/solid/files/solid-5.84.0-qstrcmp.patch b/kde-frameworks/solid/files/solid-5.84.0-qstrcmp.patch
new file mode 100644
index 00000000000..bdba981b8ac
--- /dev/null
+++ b/kde-frameworks/solid/files/solid-5.84.0-qstrcmp.patch
@@ -0,0 +1,35 @@
+From e5964d13f36901e7768ca38064125a5c5c28a939 Mon Sep 17 00:00:00 2001
+From: Ahmad Samir <a.samirh78@gmail.com>
+Date: Thu, 22 Jul 2021 01:26:37 +0200
+Subject: [PATCH] Use qstrcmp instead of strcmp
+
+qstrcmp can handle NULL args.
+
+This fixes an issue on Slackware, which doesn't use systemd and /var/run
+is a bind mount of /run, and for some reason mnt_fs_get_root(fs) would return
+NULL, which led to crashes in dolphin and plasmashell, see:
+https://invent.kde.org/frameworks/solid/-/commit/ef0b0dfa00b1de70c6d8e6913bbfdb79e7d3d1b6#note_276583
+---
+ src/solid/devices/backends/udisks2/udisksstorageaccess.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp b/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp
+index 1566787..35d1aa8 100644
+--- a/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp
++++ b/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp
+@@ -92,9 +92,9 @@ static QString baseMountPoint(const QByteArray &dev)
+ const QByteArray devicePath = dev.endsWith('\x00') ? dev.chopped(1) : dev;
+
+ while (mnt_table_next_fs(table, itr, &fs) == 0) {
+- if (mnt_fs_get_srcpath(fs) == devicePath
+- // Base mount point will have "/" as root fs
+- && (strcmp(mnt_fs_get_root(fs), "/") == 0)) {
++ if (mnt_fs_get_srcpath(fs) == devicePath //
++ && (qstrcmp(mnt_fs_get_root(fs), "/") == 0) // Base mount point will have "/" as root fs
++ ) {
+ mountPoint = QFile::decodeName(mnt_fs_get_target(fs));
+ break;
+ }
+--
+GitLab
+
diff --git a/kde-frameworks/solid/solid-5.84.0-r1.ebuild b/kde-frameworks/solid/solid-5.84.0-r1.ebuild
new file mode 100644
index 00000000000..dfd61f86b42
--- /dev/null
+++ b/kde-frameworks/solid/solid-5.84.0-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+QTMIN=5.15.2
+VIRTUALX_REQUIRED="test"
+inherit ecm kde.org optfeature
+
+DESCRIPTION="Provider for platform independent hardware discovery, abstraction and management"
+
+LICENSE="LGPL-2.1+"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="ios nls"
+
+RDEPEND="
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtdeclarative-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtxml-${QTMIN}:5
+ sys-apps/util-linux
+ sys-fs/udisks:2
+ virtual/libudev:=
+ ios? (
+ app-pda/libimobiledevice:=
+ app-pda/libplist:=
+ )
+"
+DEPEND="${RDEPEND}
+ test? ( >=dev-qt/qtconcurrent-${QTMIN}:5 )
+"
+BDEPEND="
+ sys-devel/bison
+ sys-devel/flex
+ nls? ( >=dev-qt/linguist-tools-${QTMIN}:5 )
+"
+
+PATCHES=( "${FILESDIR}/${P}-qstrcmp.patch" )
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake_use_find_package ios IMobileDevice)
+ $(cmake_use_find_package ios PList)
+ )
+ ecm_src_configure
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ optfeature "media player devices support" app-misc/media-player-info
+ fi
+ ecm_pkg_postinst
+}