Accepting request 814368 from KDE:Frameworks5

KDE Frameworks 5.71.0

OBS-URL: https://build.opensuse.org/request/show/814368
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kio?expand=0&rev=96
This commit is contained in:
Dominique Leuenberger 2020-06-16 11:43:03 +00:00 committed by Git OBS Bridge
commit 539991d2f3
8 changed files with 28 additions and 205 deletions

View File

@ -1,95 +0,0 @@
From 8769b6360d87c1b688eac4d0ce97594351bad13c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?M=C3=A9ven=20Car?= <meven29@gmail.com>
Date: Fri, 15 May 2020 12:44:35 +0200
Subject: CopyJob: Check if destination dir is a symlink
Summary:
BUG: 421213
FIXED-IN: 5.71
Test Plan: ctest
Reviewers: #frameworks, dfaure, ngraham
Reviewed By: dfaure
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D29767
---
autotests/jobtest.cpp | 30 ++++++++++++++++++++++++++++++
autotests/jobtest.h | 1 +
src/core/copyjob.cpp | 2 +-
3 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/autotests/jobtest.cpp b/autotests/jobtest.cpp
index 5d5117a..0602319 100644
--- a/autotests/jobtest.cpp
+++ b/autotests/jobtest.cpp
@@ -619,6 +619,36 @@ void JobTest::copyDirectoryToExistingDirectory()
copyLocalDirectory(src, dest, AlreadyExists);
}
+void JobTest::copyDirectoryToExistingSymlinkedDirectory()
+{
+ // qDebug();
+ // just the same as copyDirectoryToSamePartition, but this time dest is a symlink.
+ // So we get a file in the symlink dir, "dirFromHome_symlink/dirFromHome" and
+ // "dirFromHome_symOrigin/dirFromHome"
+ const QString src = homeTmpDir() + "dirFromHome";
+ const QString origSymlink = homeTmpDir() + "dirFromHome_symOrigin";
+ const QString targetSymlink = homeTmpDir() + "dirFromHome_symlink";
+ createTestDirectory(src);
+ createTestDirectory(origSymlink);
+
+ bool ok = KIOPrivate::createSymlink(origSymlink, targetSymlink);
+ if (!ok) {
+ qFatal("couldn't create symlink: %s", strerror(errno));
+ }
+ QVERIFY(QFileInfo(targetSymlink).isSymLink());
+ QVERIFY(QFileInfo(targetSymlink).isDir());
+
+ KIO::Job *job = KIO::copy(QUrl::fromLocalFile(src), QUrl::fromLocalFile(targetSymlink), KIO::HideProgressInfo);
+ job->setUiDelegate(nullptr);
+ job->setUiDelegateExtension(nullptr);
+ QVERIFY2(job->exec(), qPrintable(job->errorString()));
+ QVERIFY(QFile::exists(src)); // still there
+
+ // file is visible in both places due to symlink
+ QVERIFY(QFileInfo(origSymlink + "/dirFromHome").isDir());;
+ QVERIFY(QFileInfo(targetSymlink + "/dirFromHome").isDir());
+}
+
void JobTest::copyFileToOtherPartition()
{
// qDebug();
diff --git a/autotests/jobtest.h b/autotests/jobtest.h
index d8ac33f..9ebb2ad 100644
--- a/autotests/jobtest.h
+++ b/autotests/jobtest.h
@@ -49,6 +49,7 @@ private Q_SLOTS:
void copyFileToSamePartition();
void copyDirectoryToSamePartition();
void copyDirectoryToExistingDirectory();
+ void copyDirectoryToExistingSymlinkedDirectory();
void copyFileToOtherPartition();
void copyDirectoryToOtherPartition();
void copyRelativeSymlinkToSamePartition();
diff --git a/src/core/copyjob.cpp b/src/core/copyjob.cpp
index 06e0612..ec15543 100644
--- a/src/core/copyjob.cpp
+++ b/src/core/copyjob.cpp
@@ -366,7 +366,7 @@ void CopyJobPrivate::slotStart()
state = STATE_STATING;
const QUrl dest = m_asMethod ? m_dest.adjusted(QUrl::RemoveFilename) : m_dest;
// We need isDir() and UDS_LOCAL_PATH (for slaves who set it). Let's assume the latter is part of StatBasic too.
- KIO::Job *job = KIO::statDetails(dest, StatJob::DestinationSide, KIO::StatBasic, KIO::HideProgressInfo);
+ KIO::Job *job = KIO::statDetails(dest, StatJob::DestinationSide, KIO::StatBasic | KIO::StatResolveSymlink, KIO::HideProgressInfo);
qCDebug(KIO_COPYJOB_DEBUG) << "CopyJob: stating the dest" << dest;
q->addSubjob(job);
}
--
cgit v1.1

View File

@ -1,90 +0,0 @@
From 6452a34cf01d03d3167b38bc28a2fe8e13569021 Mon Sep 17 00:00:00 2001
From: Jonathan Marten <jjm@keelhaul.me.uk>
Date: Thu, 14 May 2020 19:17:54 +0100
Subject: Fix service file specifying 'Run in terminal' giving an error code
100
Happens because KIO::DesktopExecParser::resultingArguments() prepends
the terminal application to the command line. If this is a relative path,
as it is most likely to be (and will be in the default 'konsole' case),
the "realExecutable" check in KProcessRunner::KProcessRunner() is triggered
and the job aborts with an error.
Expand the specified terminal executable into a full path in resultingArguments(),
and return an error immediately if it cannot be found. This full terminal path
is not relative for the KProcessRunner::KProcessRunner() check and does not fail.
Check that resultingArguments() is not empty (an error return) before accessing
the first word of the command, so that it does not assert if the list is empty.
Also only call resultingArguments() once.
BUG: 421374
FIXED-IN: 5.71
Differential Revision: https://phabricator.kde.org/D29738
---
src/core/desktopexecparser.cpp | 10 +++++++++-
src/gui/kprocessrunner.cpp | 17 +++++++++--------
2 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/src/core/desktopexecparser.cpp b/src/core/desktopexecparser.cpp
index a3b5219..fcf83d9 100644
--- a/src/core/desktopexecparser.cpp
+++ b/src/core/desktopexecparser.cpp
@@ -421,7 +421,15 @@ QStringList KIO::DesktopExecParser::resultingArguments() const
if (d->service.terminal()) {
KConfigGroup cg(KSharedConfig::openConfig(), "General");
QString terminal = cg.readPathEntry("TerminalApplication", QStringLiteral("konsole"));
- if (terminal == QLatin1String("konsole")) {
+ const bool isKonsole = (terminal == QLatin1String("konsole"));
+
+ QString terminalPath = QStandardPaths::findExecutable(terminal);
+ if (terminalPath.isEmpty()) {
+ qCWarning(KIO_CORE) << "Terminal" << terminal << "not found, service" << d->service.name();
+ return QStringList();
+ }
+ terminal = terminalPath;
+ if (isKonsole) {
if (!d->service.workingDirectory().isEmpty()) {
terminal += QLatin1String(" --workdir ") + KShell::quoteArg(d->service.workingDirectory());
}
diff --git a/src/gui/kprocessrunner.cpp b/src/gui/kprocessrunner.cpp
index a4701a7..cc57b54 100644
--- a/src/gui/kprocessrunner.cpp
+++ b/src/gui/kprocessrunner.cpp
@@ -88,9 +88,17 @@ KProcessRunner::KProcessRunner(const KService::Ptr &service, const QList<QUrl> &
emitDelayedError(i18n("The desktop entry file\n%1\nis not valid.", service->entryPath()));
return;
}
+
KIO::DesktopExecParser execParser(*service, urls);
+ execParser.setUrlsAreTempFiles(flags & KIO::ApplicationLauncherJob::DeleteTemporaryFiles);
+ execParser.setSuggestedFileName(suggestedFileName);
+ const QStringList args = execParser.resultingArguments();
+ if (args.isEmpty()) {
+ emitDelayedError(i18n("Error processing Exec field in %1", service->entryPath()));
+ return;
+ }
- const QString realExecutable = execParser.resultingArguments().at(0);
+ const QString realExecutable = args.at(0);
// realExecutable is a full path if DesktopExecParser was able to locate it. Otherwise it's still relative, which is a bad sign.
if (QDir::isRelativePath(realExecutable) || !QFileInfo(realExecutable).isExecutable()) {
// Does it really not exist, or is it non-executable? (bug #415567)
@@ -103,13 +111,6 @@ KProcessRunner::KProcessRunner(const KService::Ptr &service, const QList<QUrl> &
return;
}
- execParser.setUrlsAreTempFiles(flags & KIO::ApplicationLauncherJob::DeleteTemporaryFiles);
- execParser.setSuggestedFileName(suggestedFileName);
- const QStringList args = execParser.resultingArguments();
- if (args.isEmpty()) {
- emitDelayedError(i18n("Error processing Exec field in %1", service->entryPath()));
- return;
- }
//qDebug() << "KProcess args=" << args;
*m_process << args;
--
cgit v1.1

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0a99acc697f07eb3c27176c26f8904cb409628bfca46e2a1b0633cdcf84e4ce8
size 3200704

View File

@ -1,11 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQEzBAABCgAdFiEEU+a0e0XOo+DVt0V3WNDuZIpIs7sFAl6t9HwACgkQWNDuZIpI
s7txdwf+O7qnPY48+L0Xf19qL4TKvy5Lz2zeMGnWilbCQp49O92Ez/BWSMpLQ7xz
MfOZsxUCFaR8sjtmc6ZnP/Xo15UP5t5C3Ymq4qNh5Y+O/KjyiTkhVb70QSeS7OSP
fuk8naNW0fEyMQMRx8Lz24HxXTK4MRexy1sOGtU05BlxkJo/r2opriPdp8Vm9MkV
EaelduHxOYMcKRLBMHnvartJ7UOhzTX8FUzd5Xvtb+rq9KMvaSbP0WfhMvH3URrs
3dfFBVE+wrMmmmcRxd0ajYLDshw7gzzaJqYZHBifwwG7K8U61FI2+XU4mNF0jhZg
r2g12lKEFgDvwcrMurNuDfQUdsTlVA==
=aFlP
-----END PGP SIGNATURE-----

3
kio-5.71.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b972c8dede50be3e89babb5a536054759db2a87003e6df770c598c7c1c94b8d6
size 3249764

11
kio-5.71.0.tar.xz.sig Normal file
View File

@ -0,0 +1,11 @@
-----BEGIN PGP SIGNATURE-----
iQEzBAABCgAdFiEEU+a0e0XOo+DVt0V3WNDuZIpIs7sFAl7dOmsACgkQWNDuZIpI
s7vIqwf/d+Bys4RSDLt4lq0fiRxr0Ox/mb3aQcfPrEgJCEGbS054GoMoMfnm8T6+
Wa7eFS/u84yRlI0mjh3PhTlc7HR2onN+QBt/ays0SnaeolCIqytvc/Rnwvi6N30y
2hNbqkGiFBG5BSrDAojXWEqepx+7Xp4vd1SHVLgNvhEU/r7vbx2M6l9ji+yfUI32
0mSjWPACKxEiDW5Ay4wlSVmSddnokLsVTsHdetzGXPI16U8hcsU5lfo69BM2jS2y
Nd/YvJau8nXVCNbn0eI8fedwXmr/as4F7SMLrJv9bccV0JKJbC30h5GScsy2fzHv
YtmA4LppvHZaPKhCx9wHLP/Qwlms0w==
=DGRW
-----END PGP SIGNATURE-----

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Sun Jun 7 08:06:45 UTC 2020 - Christophe Giboudeaux <christophe@krop.fr>
- Update to 5.71.0
* New feature release
* For more details please see:
* https://kde.org/announcements/kde-frameworks-5.71.0
- Too many changes to list here.
- Drop upstream patches:
* Fix-service-file-specifying-Run-in-terminal-giving-error.patch
* CopyJob-Check-if-destination-dir-is-a-symlink.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Mon May 18 07:13:59 UTC 2020 - Antonio Larrosa <alarrosa@suse.com> Mon May 18 07:13:59 UTC 2020 - Antonio Larrosa <alarrosa@suse.com>

View File

@ -16,14 +16,14 @@
# #
%define _tar_path 5.70 %define _tar_path 5.71
# Full KF5 version (e.g. 5.33.0) # Full KF5 version (e.g. 5.33.0)
%{!?_kf5_version: %global _kf5_version %{version}} %{!?_kf5_version: %global _kf5_version %{version}}
# Last major and minor KF5 version (e.g. 5.33) # Last major and minor KF5 version (e.g. 5.33)
%{!?_kf5_bugfix_version: %define _kf5_bugfix_version %(echo %{_kf5_version} | awk -F. '{print $1"."$2}')} %{!?_kf5_bugfix_version: %define _kf5_bugfix_version %(echo %{_kf5_version} | awk -F. '{print $1"."$2}')}
%bcond_without lang %bcond_without lang
Name: kio Name: kio
Version: 5.70.0 Version: 5.71.0
Release: 0 Release: 0
Summary: Network transparent access to files and data Summary: Network transparent access to files and data
License: LGPL-2.1-or-later License: LGPL-2.1-or-later
@ -37,10 +37,6 @@ Source2: frameworks.keyring
Source99: baselibs.conf Source99: baselibs.conf
# PATCH-FIX-OPENSUSE kio_help-fallback-to-kde4-docs.patch -- allow kio_help to see into kde4 documentation, needed especially for khelpcenter5 # PATCH-FIX-OPENSUSE kio_help-fallback-to-kde4-docs.patch -- allow kio_help to see into kde4 documentation, needed especially for khelpcenter5
Patch0: kio_help-fallback-to-kde4-docs.patch Patch0: kio_help-fallback-to-kde4-docs.patch
# PATCH-FIX-UPSTREAM
Patch1: Fix-service-file-specifying-Run-in-terminal-giving-error.patch
# PATCH-FIX-UPSTREAM
Patch2: CopyJob-Check-if-destination-dir-is-a-symlink.patch
BuildRequires: cmake >= 3.0 BuildRequires: cmake >= 3.0
BuildRequires: extra-cmake-modules >= %{_kf5_bugfix_version} BuildRequires: extra-cmake-modules >= %{_kf5_bugfix_version}
BuildRequires: fdupes BuildRequires: fdupes