From f434126ff374b8bd38bea2d319444895b2006012165de89243b51de1ca1bab45 Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Tue, 1 Jul 2014 22:28:13 +0000 Subject: [PATCH 1/4] 5.0.0 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kio?expand=0&rev=27 --- kio-4.100.0.tar.xz | 3 --- kio-5.0.0.tar.xz | 3 +++ kio.changes | 10 ++++++++++ kio.spec | 6 +++--- 4 files changed, 16 insertions(+), 6 deletions(-) delete mode 100644 kio-4.100.0.tar.xz create mode 100644 kio-5.0.0.tar.xz diff --git a/kio-4.100.0.tar.xz b/kio-4.100.0.tar.xz deleted file mode 100644 index 4145d13..0000000 --- a/kio-4.100.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2fb7e896fefe3c4650d7fdaad513c2f103fdf4f5005af811596573de91a0ea5f -size 2553204 diff --git a/kio-5.0.0.tar.xz b/kio-5.0.0.tar.xz new file mode 100644 index 0000000..53cfaa1 --- /dev/null +++ b/kio-5.0.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa5940d3b33f83279ab0382ff82f991a50f26a567e4553bda27f57688ee0cd8c +size 2538932 diff --git a/kio.changes b/kio.changes index d09ac33..26496da 100644 --- a/kio.changes +++ b/kio.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Jul 1 21:36:04 UTC 2014 - hrvoje.senjan@gmail.com + +- Update to 5.0.0 + * Final release of KDE Frameworks 5 + * API improvements and cleanups + * Buildsystem fixes + * For more details please see: + http://www.kde.org/announcements/announce-frameworks5-5.0.0.php + ------------------------------------------------------------------- Sun Jun 1 18:02:30 UTC 2014 - hrvoje.senjan@gmail.com diff --git a/kio.spec b/kio.spec index 0a52e28..f12e315 100644 --- a/kio.spec +++ b/kio.spec @@ -17,10 +17,10 @@ Name: kio -Version: 4.100.0 +Version: 5.0.0 Release: 0 BuildRequires: cmake >= 2.8.12 -BuildRequires: extra-cmake-modules >= 0.0.14 +BuildRequires: extra-cmake-modules >= 1.0.0 BuildRequires: fdupes BuildRequires: karchive-devel >= %{_kf5_version} BuildRequires: kbookmarks-devel >= %{_kf5_version} @@ -63,7 +63,7 @@ Summary: Network transparent access to files and data License: LGPL-2.1+ Group: System/GUI/KDE Url: http://www.kde.org -Source: http://download.kde.org/unstable/frameworks/%{version}/%{name}-%{version}.tar.xz +Source: http://download.kde.org/stable/frameworks/%{version}/%{name}-%{version}.tar.xz Source1: baselibs.conf BuildRoot: %{_tmppath}/%{name}-%{version}-build From ca4cef5831210afb65d4bacce9fc9b9f550c4b0391262b20d968cf64fa85256d Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Fri, 4 Jul 2014 20:42:11 +0000 Subject: [PATCH 2/4] OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kio?expand=0&rev=28 --- kio-5.0.0.tar.xz | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kio-5.0.0.tar.xz b/kio-5.0.0.tar.xz index 53cfaa1..e4c9d48 100644 --- a/kio-5.0.0.tar.xz +++ b/kio-5.0.0.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fa5940d3b33f83279ab0382ff82f991a50f26a567e4553bda27f57688ee0cd8c -size 2538932 +oid sha256:652c258fcb96d0b7bfecaa1dfef8b502f43b0dd01c3fe110cdb312eafb12f62f +size 2538568 From 64cb8d399ca18d5e5e21e7e434282629dac367bc4e21df2218f21ad2bc35d469 Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Tue, 8 Jul 2014 21:00:31 +0000 Subject: [PATCH 3/4] Fix announce link OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kio?expand=0&rev=29 --- kio.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kio.changes b/kio.changes index 26496da..00d0a74 100644 --- a/kio.changes +++ b/kio.changes @@ -6,7 +6,7 @@ Tue Jul 1 21:36:04 UTC 2014 - hrvoje.senjan@gmail.com * API improvements and cleanups * Buildsystem fixes * For more details please see: - http://www.kde.org/announcements/announce-frameworks5-5.0.0.php + http://www.kde.org/announcements/kde-frameworks-5.0.php ------------------------------------------------------------------- Sun Jun 1 18:02:30 UTC 2014 - hrvoje.senjan@gmail.com From 7ab5cf1eee65fe7210356911d08f1adee710b229c96f34df04f3c0cc68d02bff Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Fri, 11 Jul 2014 09:58:09 +0000 Subject: [PATCH 4/4] OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kio?expand=0&rev=30 --- ...ommands-set-the-working-directory-to.patch | 48 ++++++++++++ ...x-template-discovery-in-KNewFileMenu.patch | 54 +++++++++++++ ...kurlrequester-dialog-accept-handling.patch | 77 +++++++++++++++++++ ...ting-when-people-can-t-write-proper-.patch | 28 +++++++ kio.changes | 10 +++ kio.spec | 64 ++++++++------- 6 files changed, 254 insertions(+), 27 deletions(-) create mode 100644 0004-When-executing-commands-set-the-working-directory-to.patch create mode 100644 0005-Fix-template-discovery-in-KNewFileMenu.patch create mode 100644 0007-fix-kurlrequester-dialog-accept-handling.patch create mode 100644 0008-warn-about-asserting-when-people-can-t-write-proper-.patch diff --git a/0004-When-executing-commands-set-the-working-directory-to.patch b/0004-When-executing-commands-set-the-working-directory-to.patch new file mode 100644 index 0000000..24fd41c --- /dev/null +++ b/0004-When-executing-commands-set-the-working-directory-to.patch @@ -0,0 +1,48 @@ +From c0217c6e5e1e7592fcd0d808f1766e8be6289db0 Mon Sep 17 00:00:00 2001 +From: David Faure +Date: Fri, 4 Jul 2014 22:59:48 +0200 +Subject: [PATCH 04/10] When executing commands set the working directory to be + the current directory + +if not specified by the service. + +Forward port commit 89d4585 by Dawit which fixes #142597. ++ fix path() to toLocalFile(). + +REVIEW: 119020 +--- + src/widgets/krun.cpp | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/src/widgets/krun.cpp b/src/widgets/krun.cpp +index 77708a0..bc39d83 100644 +--- a/src/widgets/krun.cpp ++++ b/src/widgets/krun.cpp +@@ -176,7 +176,8 @@ bool KRun::runUrl(const QUrl &u, const QString &_mimetype, QWidget *window, bool + } else if (isExecutableFile(u, _mimetype)) { + if (u.isLocalFile() && runExecutables) { + if (KAuthorized::authorize("shell_access")) { +- return (KRun::runCommand(KShell::quoteArg(u.toLocalFile()), QString(), QString(), window, asn, u.adjusted(QUrl::RemoveFilename).path())); // just execute the url as a command ++ return (KRun::runCommand(KShell::quoteArg(u.toLocalFile()), QString(), QString(), ++ window, asn, u.adjusted(QUrl::RemoveFilename).toLocalFile())); // just execute the url as a command + // ## TODO implement deleting the file if tempFile==true + } else { + noAuth = true; +@@ -426,8 +427,13 @@ static bool runTempService(const KService &_service, const QList &_urls, Q + } + //qDebug() << "runTempService: KProcess args=" << args; + ++ QString path(_service.path()); ++ if (path.isEmpty() && !_urls.isEmpty() && _urls.first().isLocalFile()) { ++ path = _urls.first().adjusted(QUrl::RemoveFilename).toLocalFile(); ++ } ++ + return runCommandInternal(args.join(" "), &_service, KIO::DesktopExecParser::executablePath(_service.exec()), +- _service.name(), _service.icon(), window, asn, _service.path()); ++ _service.name(), _service.icon(), window, asn, path); + } + + // WARNING: don't call this from DesktopExecParser, since klauncher uses that too... +-- +2.0.0 + diff --git a/0005-Fix-template-discovery-in-KNewFileMenu.patch b/0005-Fix-template-discovery-in-KNewFileMenu.patch new file mode 100644 index 0000000..2c1f9e8 --- /dev/null +++ b/0005-Fix-template-discovery-in-KNewFileMenu.patch @@ -0,0 +1,54 @@ +From c42e52d366ffcc016a487627b935b34183af759a Mon Sep 17 00:00:00 2001 +From: Eike Hein +Date: Sat, 5 Jul 2014 20:52:52 +0200 +Subject: [PATCH 05/10] Fix template discovery in KNewFileMenu. + +Incorrect port to QStandardPaths was collecting dirs instead of +files within them. + +Reviewed-By: David Faure +REVIEW:119130 +--- + src/filewidgets/knewfilemenu.cpp | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) + +diff --git a/src/filewidgets/knewfilemenu.cpp b/src/filewidgets/knewfilemenu.cpp +index 4f1ca10..a24ac9c 100644 +--- a/src/filewidgets/knewfilemenu.cpp ++++ b/src/filewidgets/knewfilemenu.cpp +@@ -841,10 +841,12 @@ void KNewFileMenuPrivate::_k_slotFillTemplates() + { + KNewFileMenuSingleton *s = kNewMenuGlobals(); + //qDebug(); ++ ++ const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "templates", QStandardPaths::LocateDirectory); ++ + // Ensure any changes in the templates dir will call this + if (! s->dirWatch) { + s->dirWatch = new KDirWatch; +- const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "templates", QStandardPaths::LocateDirectory); + for (QStringList::const_iterator it = dirs.constBegin(); it != dirs.constEnd(); ++it) { + //qDebug() << "Templates resource dir:" << *it; + s->dirWatch->addDir(*it); +@@ -863,7 +865,17 @@ void KNewFileMenuPrivate::_k_slotFillTemplates() + s->templatesList->clear(); + + // Look into "templates" dirs. +- const QStringList files = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "templates", QStandardPaths::LocateDirectory); ++ QStringList files; ++ QDir dir; ++ ++ Q_FOREACH (const QString &path, dirs) { ++ dir.setPath(path); ++ const QStringList &entryList(dir.entryList(QStringList() << "*.desktop", QDir::Files)); ++ Q_FOREACH (const QString &entry, entryList) { ++ files.append(dir.path() + dir.separator() + entry); ++ } ++ } ++ + QMap slist; // used for sorting + Q_FOREACH (const QString &file, files) { + //qDebug() << file; +-- +2.0.0 + diff --git a/0007-fix-kurlrequester-dialog-accept-handling.patch b/0007-fix-kurlrequester-dialog-accept-handling.patch new file mode 100644 index 0000000..cde7de7 --- /dev/null +++ b/0007-fix-kurlrequester-dialog-accept-handling.patch @@ -0,0 +1,77 @@ +From bffdd7fa0c03f255bded5071e39f50c768891eca Mon Sep 17 00:00:00 2001 +From: Harald Sitter +Date: Tue, 8 Jul 2014 11:45:04 -0400 +Subject: [PATCH 07/10] fix kurlrequester dialog accept handling + +switch to qdialog::accepted signal, rename slot (on private class) and +remove accepted check in slot + +BUG: 337226 +REVIEW: 119174 +--- + src/widgets/kurlrequester.cpp | 16 +++++++--------- + src/widgets/kurlrequester.h | 2 +- + 2 files changed, 8 insertions(+), 10 deletions(-) + +diff --git a/src/widgets/kurlrequester.cpp b/src/widgets/kurlrequester.cpp +index bc40284..cf0b0c7 100644 +--- a/src/widgets/kurlrequester.cpp ++++ b/src/widgets/kurlrequester.cpp +@@ -213,7 +213,7 @@ public: + // slots + void _k_slotUpdateUrl(); + void _k_slotOpenDialog(); +- void _k_slotFileDialogFinished(); ++ void _k_slotFileDialogAccepted(); + + QUrl m_startDir; + KUrlRequester *m_parent; // TODO: rename to 'q' +@@ -408,18 +408,16 @@ void KUrlRequester::KUrlRequesterPrivate::_k_slotOpenDialog() + } + } + +-void KUrlRequester::KUrlRequesterPrivate::_k_slotFileDialogFinished() ++void KUrlRequester::KUrlRequesterPrivate::_k_slotFileDialogAccepted() + { + if (!myFileDialog) { + return; + } + +- if (myFileDialog->result() == QDialog::Accepted) { +- QUrl newUrl = myFileDialog->selectedUrls().first(); +- if (newUrl.isValid()) { +- m_parent->setUrl(newUrl); +- emit m_parent->urlSelected(url()); +- } ++ QUrl newUrl = myFileDialog->selectedUrls().first(); ++ if (newUrl.isValid()) { ++ m_parent->setUrl(newUrl); ++ emit m_parent->urlSelected(url()); + } + } + +@@ -466,7 +464,7 @@ QFileDialog *KUrlRequester::fileDialog() const + d->applyFileMode(d->myFileDialog, d->fileDialogMode); + + d->myFileDialog->setWindowModality(d->fileDialogModality); +- connect(d->myFileDialog, SIGNAL(finished()), SLOT(_k_slotFileDialogFinished())); ++ connect(d->myFileDialog, SIGNAL(accepted()), SLOT(_k_slotFileDialogAccepted())); + } + + return d->myFileDialog; +diff --git a/src/widgets/kurlrequester.h b/src/widgets/kurlrequester.h +index 528cffc..163c435 100644 +--- a/src/widgets/kurlrequester.h ++++ b/src/widgets/kurlrequester.h +@@ -328,7 +328,7 @@ private: + + Q_PRIVATE_SLOT(d, void _k_slotUpdateUrl()) + Q_PRIVATE_SLOT(d, void _k_slotOpenDialog()) +- Q_PRIVATE_SLOT(d, void _k_slotFileDialogFinished()) ++ Q_PRIVATE_SLOT(d, void _k_slotFileDialogAccepted()) + + }; + +-- +2.0.0 + diff --git a/0008-warn-about-asserting-when-people-can-t-write-proper-.patch b/0008-warn-about-asserting-when-people-can-t-write-proper-.patch new file mode 100644 index 0000000..aeec0b9 --- /dev/null +++ b/0008-warn-about-asserting-when-people-can-t-write-proper-.patch @@ -0,0 +1,28 @@ +From cf430d82c09978d4d9e43e90f6bc60e2a2900942 Mon Sep 17 00:00:00 2001 +From: David Faure +Date: Tue, 8 Jul 2014 17:48:23 +0200 +Subject: [PATCH 08/10] warn about asserting when people can't write proper + desktop files + +Tested by Eike Hein with mpv's desktop file. +--- + src/core/desktopexecparser.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/core/desktopexecparser.cpp b/src/core/desktopexecparser.cpp +index 085643d..be62791 100644 +--- a/src/core/desktopexecparser.cpp ++++ b/src/core/desktopexecparser.cpp +@@ -176,7 +176,8 @@ QStringList KIO::DesktopExecParser::supportedProtocols(const KService &service) + KRunMX1 mx1(service); + QString exec = service.exec(); + if (mx1.expandMacrosShellQuote(exec) && !mx1.hasUrls) { +- Q_ASSERT(supportedProtocols.isEmpty()); // huh? If you support protocols you need %u or %U... ++ qWarning() << service.entryPath() << "contains a X-KDE-Protocols line but doesn't use %u or %U in its Exec line! This is inconsistent."; ++ return QStringList(); + } else { + if (supportedProtocols.isEmpty()) { + // compat mode: assume KIO if not set and it's a KDE app (or a KDE service) +-- +2.0.0 + diff --git a/kio.changes b/kio.changes index 00d0a74..519b6fa 100644 --- a/kio.changes +++ b/kio.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri Jul 11 09:48:45 UTC 2014 - hrvoje.senjan@gmail.com + +- Define kf5_version within package +- Added patches from upstream: + 0004-When-executing-commands-set-the-working-directory-to.patch, + 0005-Fix-template-discovery-in-KNewFileMenu.patch, + 0007-fix-kurlrequester-dialog-accept-handling.patch and + 0008-warn-about-asserting-when-people-can-t-write-proper-.patch + ------------------------------------------------------------------- Tue Jul 1 21:36:04 UTC 2014 - hrvoje.senjan@gmail.com diff --git a/kio.spec b/kio.spec index f12e315..b5a10d4 100644 --- a/kio.spec +++ b/kio.spec @@ -19,34 +19,35 @@ Name: kio Version: 5.0.0 Release: 0 +%define kf5_version %{version} BuildRequires: cmake >= 2.8.12 BuildRequires: extra-cmake-modules >= 1.0.0 BuildRequires: fdupes -BuildRequires: karchive-devel >= %{_kf5_version} -BuildRequires: kbookmarks-devel >= %{_kf5_version} -BuildRequires: kcompletion-devel >= %{_kf5_version} -BuildRequires: kconfigwidgets-devel >= %{_kf5_version} -BuildRequires: kcoreaddons-devel >= %{_kf5_version} -BuildRequires: kcrash-devel >= %{_kf5_version} -BuildRequires: kdbusaddons-devel >= %{_kf5_version} -BuildRequires: kdoctools-devel >= %{_kf5_version} +BuildRequires: karchive-devel >= %{kf5_version} +BuildRequires: kbookmarks-devel >= %{kf5_version} +BuildRequires: kcompletion-devel >= %{kf5_version} +BuildRequires: kconfigwidgets-devel >= %{kf5_version} +BuildRequires: kcoreaddons-devel >= %{kf5_version} +BuildRequires: kcrash-devel >= %{kf5_version} +BuildRequires: kdbusaddons-devel >= %{kf5_version} +BuildRequires: kdoctools-devel >= %{kf5_version} BuildRequires: kf5-filesystem -BuildRequires: kguiaddons-devel >= %{_kf5_version} -BuildRequires: ki18n-devel >= %{_kf5_version} -BuildRequires: kiconthemes-devel >= %{_kf5_version} -BuildRequires: kitemviews-devel >= %{_kf5_version} -BuildRequires: kjobwidgets-devel >= %{_kf5_version} -BuildRequires: knotifications-devel >= %{_kf5_version} +BuildRequires: kguiaddons-devel >= %{kf5_version} +BuildRequires: ki18n-devel >= %{kf5_version} +BuildRequires: kiconthemes-devel >= %{kf5_version} +BuildRequires: kitemviews-devel >= %{kf5_version} +BuildRequires: kjobwidgets-devel >= %{kf5_version} +BuildRequires: knotifications-devel >= %{kf5_version} BuildRequires: krb5-devel -BuildRequires: kservice-devel >= %{_kf5_version} -BuildRequires: ktextwidgets-devel >= %{_kf5_version} -BuildRequires: kwallet-devel >= %{_kf5_version} -BuildRequires: kwidgetsaddons-devel >= %{_kf5_version} -BuildRequires: kwindowsystem-devel >= %{_kf5_version} -BuildRequires: kxmlgui-devel >= %{_kf5_version} +BuildRequires: kservice-devel >= %{kf5_version} +BuildRequires: ktextwidgets-devel >= %{kf5_version} +BuildRequires: kwallet-devel >= %{kf5_version} +BuildRequires: kwidgetsaddons-devel >= %{kf5_version} +BuildRequires: kwindowsystem-devel >= %{kf5_version} +BuildRequires: kxmlgui-devel >= %{kf5_version} BuildRequires: libacl-devel BuildRequires: libattr-devel -BuildRequires: solid-devel >= %{_kf5_version} +BuildRequires: solid-devel >= %{kf5_version} BuildRequires: pkgconfig(Qt5Concurrent) >= 5.2.0 BuildRequires: pkgconfig(Qt5Core) >= 5.2.0 BuildRequires: pkgconfig(Qt5DBus) >= 5.2.0 @@ -65,6 +66,11 @@ Group: System/GUI/KDE Url: http://www.kde.org Source: http://download.kde.org/stable/frameworks/%{version}/%{name}-%{version}.tar.xz Source1: baselibs.conf +# PATCH-FIX-UPSTREAMS +Patch1: 0004-When-executing-commands-set-the-working-directory-to.patch +Patch2: 0005-Fix-template-discovery-in-KNewFileMenu.patch +Patch3: 0007-fix-kurlrequester-dialog-accept-handling.patch +Patch4: 0008-warn-about-asserting-when-people-can-t-write-proper-.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -77,12 +83,12 @@ Summary: Network transparent access to files and data Group: Development/Libraries/KDE Requires: %{name} = %{version} Requires: extra-cmake-modules -Requires: kbookmarks-devel >= %{_kf5_version} -Requires: kcompletion-devel >= %{_kf5_version} -Requires: kjobwidgets-devel >= %{_kf5_version} -Requires: kservice-devel >= %{_kf5_version} -Requires: kxmlgui-devel >= %{_kf5_version} -Requires: solid-devel >= %{_kf5_version} +Requires: kbookmarks-devel >= %{kf5_version} +Requires: kcompletion-devel >= %{kf5_version} +Requires: kjobwidgets-devel >= %{kf5_version} +Requires: kservice-devel >= %{kf5_version} +Requires: kxmlgui-devel >= %{kf5_version} +Requires: solid-devel >= %{kf5_version} Requires: pkgconfig(Qt5Network) >= 5.2.0 %description devel @@ -94,6 +100,10 @@ Development files. %lang_package %prep %setup -q +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 %build %cmake_kf5 -d build