public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-cdr/dolphin-plugins-mountiso/, app-cdr/dolphin-plugins-mountiso/files/
@ 2021-04-04 13:23 Andreas Sturmlechner
  0 siblings, 0 replies; only message in thread
From: Andreas Sturmlechner @ 2021-04-04 13:23 UTC (permalink / raw
  To: gentoo-commits

commit:     54054bc3e52ebabee5dfb1e1dc5751751df7596c
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  4 12:18:23 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Apr  4 13:19:43 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54054bc3

app-cdr/dolphin-plugins-mountiso: Don't let ISO mount multiple times

Upstream commit f136702d2adc8643ea12f1b6e3bf97925f1b33f0

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

 .../dolphin-plugins-mountiso-20.12.3-r1.ebuild     | 69 ++++++++++++++++++++++
 ...iso-20.12.3-dont-mount-ISO-multiple-times.patch | 41 +++++++++++++
 2 files changed, 110 insertions(+)

diff --git a/app-cdr/dolphin-plugins-mountiso/dolphin-plugins-mountiso-20.12.3-r1.ebuild b/app-cdr/dolphin-plugins-mountiso/dolphin-plugins-mountiso-20.12.3-r1.ebuild
new file mode 100644
index 00000000000..b174fa15d36
--- /dev/null
+++ b/app-cdr/dolphin-plugins-mountiso/dolphin-plugins-mountiso-20.12.3-r1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+ECM_HANDBOOK="false"
+KDE_RELEASE_SERVICE="true"
+KDE_ORG_CATEGORY="sdk"
+KDE_ORG_NAME="dolphin-plugins"
+MY_PLUGIN_NAME="mountiso"
+KFMIN=5.75.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.15.2
+inherit ecm kde.org
+
+DESCRIPTION="Dolphin plugin for ISO loopback device mounting"
+HOMEPAGE="https://apps.kde.org/en/dolphin_plugins"
+
+LICENSE="GPL-2" # TODO: CHECK
+SLOT="5"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+IUSE=""
+
+DEPEND="
+	>=dev-qt/qtdbus-${QTMIN}:5
+	>=dev-qt/qtgui-${QTMIN}:5
+	>=dev-qt/qtwidgets-${QTMIN}:5
+	>=kde-apps/dolphin-${PVCUT}:5
+	>=kde-frameworks/kcompletion-${KFMIN}:5
+	>=kde-frameworks/kconfig-${KFMIN}:5
+	>=kde-frameworks/kcoreaddons-${KFMIN}:5
+	>=kde-frameworks/ki18n-${KFMIN}:5
+	>=kde-frameworks/kio-${KFMIN}:5
+	>=kde-frameworks/ktextwidgets-${KFMIN}:5
+	>=kde-frameworks/solid-${KFMIN}:5
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+	"${FILESDIR}/${P}-dont-mount-ISO-multiple-times.patch" # KDE-bug 434617
+)
+
+src_prepare() {
+	ecm_src_prepare
+	# kxmlgui, qtnetwork only required by dropbox
+	ecm_punt_bogus_dep Qt5 Network
+	ecm_punt_bogus_dep KF5 XmlGui
+	# delete non-${PN} translations
+	if [[ ${KDE_BUILD_TYPE} = release ]]; then
+		find po -type f -name "*po" -and -not -name "*${MY_PLUGIN_NAME}plugin" -delete || die
+	fi
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DBUILD_${MY_PLUGIN_NAME}=ON
+		-DBUILD_bazaar=OFF
+		-DBUILD_dropbox=OFF
+		-DBUILD_git=OFF
+		-DBUILD_hg=OFF
+		-DBUILD_svn=OFF
+	)
+	ecm_src_configure
+}
+
+src_install() {
+	ecm_src_install
+	rm "${D}"/usr/share/metainfo/org.kde.dolphin-plugins.metainfo.xml || die
+}

diff --git a/app-cdr/dolphin-plugins-mountiso/files/dolphin-plugins-mountiso-20.12.3-dont-mount-ISO-multiple-times.patch b/app-cdr/dolphin-plugins-mountiso/files/dolphin-plugins-mountiso-20.12.3-dont-mount-ISO-multiple-times.patch
new file mode 100644
index 00000000000..fc59e171850
--- /dev/null
+++ b/app-cdr/dolphin-plugins-mountiso/files/dolphin-plugins-mountiso-20.12.3-dont-mount-ISO-multiple-times.patch
@@ -0,0 +1,41 @@
+From f136702d2adc8643ea12f1b6e3bf97925f1b33f0 Mon Sep 17 00:00:00 2001
+From: Kwon-Young Choi <kwon-young.choi@hotmail.fr>
+Date: Fri, 19 Mar 2021 17:10:31 +0100
+Subject: [PATCH] BackingFile property should be use with StorageVolume instead
+ of StorageAccess
+
+BUG: 434617
+
+When mounting an iso with `udisksctl`, first a loop device is created
+`/dev/loop0` then a second device `/dev/loop0p1` is used to mount it on
+a filesystem location.
+
+Querying for StorageAccess devices sometimes only returns the `/dev/loop0p1`
+device without the `/dev/loop0` device and the BackingFile property does not
+work on `/dev/loop0p1`.
+
+Solution: query for StorageVolume instead which returns all loop devices:
+`/dev/loop0` and `/dev/loop1`.
+
+Warning: Because StorageVolume returns more devices, the function
+`getDeviceFromBackingFile` could be a little bit slower.
+---
+ mountiso/mountisoaction.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mountiso/mountisoaction.cpp b/mountiso/mountisoaction.cpp
+index e5575ae..d198a89 100644
+--- a/mountiso/mountisoaction.cpp
++++ b/mountiso/mountisoaction.cpp
+@@ -78,7 +78,7 @@ MountIsoAction::MountIsoAction(QObject *parent, const QVariantList &)
+ const Solid::Device getDeviceFromBackingFile(const QString &backingFile)
+ {
+     const QList<Solid::Device> blockDevices =
+-        Solid::Device::listFromQuery("[ IS StorageAccess AND IS GenericInterface ]");
++        Solid::Device::listFromQuery("[ IS StorageVolume AND IS GenericInterface ]");
+ 
+     for (const Solid::Device &device : blockDevices) {
+         auto genericDevice = device.as<Solid::GenericInterface>();
+-- 
+GitLab
+


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-04 13:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-04 13:23 [gentoo-commits] repo/gentoo:master commit in: app-cdr/dolphin-plugins-mountiso/, app-cdr/dolphin-plugins-mountiso/files/ Andreas Sturmlechner

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