From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1927C139082 for ; Wed, 29 Nov 2017 16:40:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 48471E0BEF; Wed, 29 Nov 2017 16:40:16 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 17C7FE0BE7 for ; Wed, 29 Nov 2017 16:40:16 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6CB2133D3C7 for ; Wed, 29 Nov 2017 16:40:10 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D43BEABC2 for ; Wed, 29 Nov 2017 16:40:08 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1511973600.97d55e9f2677dbc82a438cfede01b01b85138a49.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kio/files/, kde-frameworks/kio/ X-VCS-Repository: repo/gentoo X-VCS-Files: kde-frameworks/kio/files/kio-5.40.0-knewfilemenu-mkpath-qt-5.9.3.patch kde-frameworks/kio/kio-5.40.0-r2.ebuild X-VCS-Directories: kde-frameworks/kio/files/ kde-frameworks/kio/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 97d55e9f2677dbc82a438cfede01b01b85138a49 X-VCS-Branch: master Date: Wed, 29 Nov 2017 16:40:08 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 2e750477-4086-4509-b5dd-bab654520024 X-Archives-Hash: 0bf0889257d68f707a6be36b6d080b75 commit: 97d55e9f2677dbc82a438cfede01b01b85138a49 Author: Andreas Sturmlechner gentoo org> AuthorDate: Wed Nov 29 16:38:11 2017 +0000 Commit: Andreas Sturmlechner gentoo 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 +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 + #include ++#include + #include + + 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 +}