public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kio/files/, kde-frameworks/kio/
Date: Wed, 29 Nov 2017 16:40:08 +0000 (UTC)	[thread overview]
Message-ID: <1511973600.97d55e9f2677dbc82a438cfede01b01b85138a49.asturm@gentoo> (raw)

commit:     97d55e9f2677dbc82a438cfede01b01b85138a49
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 29 16:38:11 2017 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Nov 29 16:40:00 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97d55e9f

kde-frameworks/kio: Fix knewfilemenu mkpath with >=Qt-5.9.3

See also:
https://mail.kde.org/pipermail/kde-distro-packagers/2017-November/000298.html

Package-Manager: Portage-2.3.16, Repoman-2.3.6

 .../kio-5.40.0-knewfilemenu-mkpath-qt-5.9.3.patch  | 80 +++++++++++++++++++++
 kde-frameworks/kio/kio-5.40.0-r2.ebuild            | 83 ++++++++++++++++++++++
 2 files changed, 163 insertions(+)

diff --git a/kde-frameworks/kio/files/kio-5.40.0-knewfilemenu-mkpath-qt-5.9.3.patch b/kde-frameworks/kio/files/kio-5.40.0-knewfilemenu-mkpath-qt-5.9.3.patch
new file mode 100644
index 00000000000..9645620d04d
--- /dev/null
+++ b/kde-frameworks/kio/files/kio-5.40.0-knewfilemenu-mkpath-qt-5.9.3.patch
@@ -0,0 +1,80 @@
+From 298c0e734efdd8a7b66a531959e3fb5357a6495d Mon Sep 17 00:00:00 2001
+From: Eike Hein <hein@kde.org>
+Date: Tue, 28 Nov 2017 19:42:46 +0900
+Subject: Fix creating a directory via KNewFileMenu+KIO::mkpath on Qt 5.9.3+
+
+Summary:
+f62768d04652 in qtbase.git introduced a behavior change in QUrl
+causing it to reject URLs with a path of "//foo" (note the double
+slash) as invalid.
+
+Both KNewFileMenu and KIO::mkpath contained code following this
+pattern:
+
+  url.path() + '/' + name
+
+This is a bad mix with forwarding slaves like kio_desktop, which
+translate a top-level path of / to some other URL:
+
+  (desktop:)/ + / + foo = //foo
+
+This patch addresses the two instances of this by wrapping the
+string building in QDir::cleanPath, which I think is the shortest
+and most readable way to go.
+
+2353119aae8f in kio.git (D8836) was another commit fixing fallout
+from this Qt change. Is unlikely this patch will be the last one.
+I suspect many other variations of this problem lurk about the
+codebase.
+
+BUG:387073
+
+Reviewers: dfaure, thiago, elvisangelaccio
+
+Subscribers: #frameworks
+
+Tags: #frameworks
+
+Differential Revision: https://phabricator.kde.org/D9029
+---
+ src/core/mkpathjob.cpp           | 3 ++-
+ src/filewidgets/knewfilemenu.cpp | 2 +-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/core/mkpathjob.cpp b/src/core/mkpathjob.cpp
+index c77a9fe..f67a489 100644
+--- a/src/core/mkpathjob.cpp
++++ b/src/core/mkpathjob.cpp
+@@ -25,6 +25,7 @@
+ #include "mkdirjob.h"
+ #include <QTimer>
+ #include <QDebug>
++#include <QDir>
+ #include <QFileInfo>
+ 
+ using namespace KIO;
+@@ -123,7 +124,7 @@ void MkpathJobPrivate::slotStart()
+     }
+ 
+     if (m_pathIterator != m_pathComponents.constEnd()) {
+-        m_url.setPath(m_url.path() + '/' + *m_pathIterator);
++        m_url.setPath(QDir::cleanPath(m_url.path() + '/' + *m_pathIterator));
+         KIO::Job* job = KIO::mkdir(m_url);
+         q->addSubjob(job);
+         q->setProcessedAmount(KJob::Directories, q->processedAmount(KJob::Directories) + 1);
+diff --git a/src/filewidgets/knewfilemenu.cpp b/src/filewidgets/knewfilemenu.cpp
+index 023eebd..98c9852 100644
+--- a/src/filewidgets/knewfilemenu.cpp
++++ b/src/filewidgets/knewfilemenu.cpp
+@@ -855,7 +855,7 @@ void KNewFileMenuPrivate::_k_slotCreateDirectory(bool writeHiddenDir)
+                 }
+             }
+             url = baseUrl;
+-            url.setPath(url.path() + '/' + name);
++            url.setPath(QDir::cleanPath(url.path() + '/' + name));
+         }
+     }
+ 
+-- 
+cgit v0.11.2
+

diff --git a/kde-frameworks/kio/kio-5.40.0-r2.ebuild b/kde-frameworks/kio/kio-5.40.0-r2.ebuild
new file mode 100644
index 00000000000..b0b6cd7af7e
--- /dev/null
+++ b/kde-frameworks/kio/kio-5.40.0-r2.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+KDE_TEST="forceoptional"
+VIRTUALX_REQUIRED="test"
+inherit kde5
+
+DESCRIPTION="Framework providing transparent file and data management"
+LICENSE="LGPL-2+"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="acl +handbook kerberos +kwallet X"
+
+RDEPEND="
+	$(add_frameworks_dep karchive)
+	$(add_frameworks_dep kbookmarks)
+	$(add_frameworks_dep kcodecs)
+	$(add_frameworks_dep kcompletion)
+	$(add_frameworks_dep kconfig)
+	$(add_frameworks_dep kconfigwidgets)
+	$(add_frameworks_dep kcoreaddons)
+	$(add_frameworks_dep kdbusaddons)
+	$(add_frameworks_dep ki18n)
+	$(add_frameworks_dep kiconthemes)
+	$(add_frameworks_dep kitemviews)
+	$(add_frameworks_dep kjobwidgets)
+	$(add_frameworks_dep knotifications)
+	$(add_frameworks_dep kservice)
+	$(add_frameworks_dep ktextwidgets)
+	$(add_frameworks_dep kwidgetsaddons)
+	$(add_frameworks_dep kwindowsystem)
+	$(add_frameworks_dep kxmlgui)
+	$(add_frameworks_dep solid)
+	$(add_qt_dep qtdbus)
+	$(add_qt_dep qtgui)
+	$(add_qt_dep qtnetwork 'ssl')
+	$(add_qt_dep qtscript)
+	$(add_qt_dep qtwidgets)
+	$(add_qt_dep qtxml)
+	dev-libs/libxml2
+	dev-libs/libxslt
+	acl? (
+		sys-apps/attr
+		virtual/acl
+	)
+	kerberos? ( virtual/krb5 )
+	kwallet? ( $(add_frameworks_dep kwallet) )
+	X? ( $(add_qt_dep qtx11extras) )
+"
+DEPEND="${RDEPEND}
+	$(add_qt_dep qtconcurrent)
+	handbook? ( $(add_frameworks_dep kdoctools) )
+	test? ( sys-libs/zlib )
+	X? (
+		x11-libs/libX11
+		x11-libs/libXrender
+		x11-proto/xproto
+	)
+"
+PDEPEND="
+	$(add_frameworks_dep kded)
+"
+
+PATCHES=(
+	"${FILESDIR}/${P}-mkpath-qt-5.9.3.patch"
+	"${FILESDIR}/${P}-knewfilemenu-mkpath-qt-5.9.3.patch"
+)
+
+# tests hang
+RESTRICT+=" test"
+
+src_configure() {
+	local mycmakeargs=(
+		$(cmake-utils_use_find_package acl ACL)
+		$(cmake-utils_use_find_package handbook KF5DocTools)
+		$(cmake-utils_use_find_package kerberos GSSAPI)
+		$(cmake-utils_use_find_package kwallet KF5Wallet)
+		$(cmake-utils_use_find_package X X11)
+	)
+
+	kde5_src_configure
+}


             reply	other threads:[~2017-11-29 16:40 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-29 16:40 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-12-25 19:51 [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kio/files/, kde-frameworks/kio/ Andreas Sturmlechner
2023-12-25 19:51 Andreas Sturmlechner
2023-09-19 10:40 Andreas Sturmlechner
2023-04-22 16:21 Andreas Sturmlechner
2023-02-18 23:05 Andreas Sturmlechner
2023-01-30 21:43 Andreas Sturmlechner
2022-06-29 19:53 Andreas Sturmlechner
2022-02-10  9:13 Andreas Sturmlechner
2021-11-05 16:24 Andreas Sturmlechner
2021-09-14  9:04 Andreas Sturmlechner
2021-08-15 18:57 Andreas Sturmlechner
2021-07-11 20:47 Andreas Sturmlechner
2021-04-04 13:23 Andreas Sturmlechner
2021-02-03 22:33 Andreas Sturmlechner
2020-10-15 18:48 Andreas Sturmlechner
2020-09-29 12:49 Andreas Sturmlechner
2020-05-16  9:08 Andreas Sturmlechner
2020-05-15  8:16 Andreas Sturmlechner
2020-02-09 22:28 Andreas Sturmlechner
2019-12-22 22:48 Andreas Sturmlechner
2019-12-19  9:45 Andreas Sturmlechner
2019-01-12 14:35 Andreas Sturmlechner
2018-11-27  7:49 Andreas Sturmlechner
2017-11-26 18:57 Andreas Sturmlechner
2017-05-29 22:58 Andreas Sturmlechner
2016-09-29 11:39 Michael Palimaka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1511973600.97d55e9f2677dbc82a438cfede01b01b85138a49.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox