From ec5d09c073ec9317dc3fb9e30d67c1d3e8f4530b Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Feb 13 2017 16:52:19 +0000 Subject: - fix build issue with gcc7 - commit the correct fix for the security issue --- diff --git a/plasma-desktop-5.8.5-gcc7-placeholder.patch b/plasma-desktop-5.8.5-gcc7-placeholder.patch new file mode 100644 index 0000000..3521f83 --- /dev/null +++ b/plasma-desktop-5.8.5-gcc7-placeholder.patch @@ -0,0 +1,12 @@ +diff -up plasma-desktop-5.8.5/imports/activitymanager/sortedactivitiesmodel.cpp.than plasma-desktop-5.8.5/imports/activitymanager/sortedactivitiesmodel.cpp +--- plasma-desktop-5.8.5/imports/activitymanager/sortedactivitiesmodel.cpp.than 2017-02-13 11:05:27.199853397 -0500 ++++ plasma-desktop-5.8.5/imports/activitymanager/sortedactivitiesmodel.cpp 2017-02-13 11:36:19.952794792 -0500 +@@ -17,6 +17,8 @@ + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + ++#include ++ + // Self + #include "sortedactivitiesmodel.h" + diff --git a/plasma-desktop-folderview-security.patch b/plasma-desktop-folderview-security.patch index bef1d42..e3ee4f6 100644 --- a/plasma-desktop-folderview-security.patch +++ b/plasma-desktop-folderview-security.patch @@ -1,33 +1,17 @@ -From 771e57f3b2c19f4e6f867c01c2457ec87531b4cf Mon Sep 17 00:00:00 2001 -From: Kai Uwe Broulik -Date: Tue, 31 Jan 2017 15:07:42 +0100 -Subject: [Folder View] show script execution prompt when clicking item - -When clicking a file in FolderView, we should ask for whether to open or run a script depending on user settings. -This is what Dolphin does. - -BUG: 375793 -FIXED-IN: 5.8.6 - -Differential Revision: https://phabricator.kde.org/D4367 ---- - containments/desktop/plugins/folder/foldermodel.cpp | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/containments/desktop/plugins/folder/foldermodel.cpp b/containments/desktop/plugins/folder/foldermodel.cpp -index 758f7f3..1ba1245 100644 ---- a/containments/desktop/plugins/folder/foldermodel.cpp -+++ b/containments/desktop/plugins/folder/foldermodel.cpp -@@ -509,7 +509,8 @@ void FolderModel::run(int row) +diff -up plasma-desktop-5.8.5/containments/desktop/plugins/folder/foldermodel.cpp.than plasma-desktop-5.8.5/containments/desktop/plugins/folder/foldermodel.cpp +--- plasma-desktop-5.8.5/containments/desktop/plugins/folder/foldermodel.cpp.than 2017-02-13 17:02:37.079245114 +0100 ++++ plasma-desktop-5.8.5/containments/desktop/plugins/folder/foldermodel.cpp 2017-02-13 17:46:04.152443288 +0100 +@@ -509,7 +509,12 @@ void FolderModel::run(int row) url.setScheme(QStringLiteral("file")); } - new KRun(url, 0); + KRun *run = new KRun(url, 0); -+ run->setShowScriptExecutionPrompt(true); ++ // On desktop:/ we want to be able to run .desktop files right away, ++ // otherwise ask for security reasons. We also don't use the targetUrl() ++ // from above since we don't want the resolved /home/foo/Desktop URL. ++ run->setShowScriptExecutionPrompt(item.url().scheme() != QLatin1String("desktop") ++ || item.url().adjusted(QUrl::RemoveFilename).path() != QLatin1String("/")); } void FolderModel::rename(int row, const QString& name) --- -cgit v0.11.2 - diff --git a/plasma-desktop.spec b/plasma-desktop.spec index 2889173..7f57d41 100644 --- a/plasma-desktop.spec +++ b/plasma-desktop.spec @@ -32,6 +32,8 @@ Patch200: plasma-desktop-folderview-security.patch ## upstream patches (master branch) ## upstreamable patches +# fix error: 'placeholders' is not a namespace-name with gcc-7 +Patch400: plasma-desktop-5.8.5-gcc7-placeholder.patch # filter qmk/plugins provides %global __provides_exclude_from ^(%{_kf5_qmldir}/.*\\.so|%{_kf5_qtplugindir}/.*\\.so)$ @@ -180,6 +182,9 @@ BuildArch: noarch ## upstream patches %patch200 -p1 +## upstreamable patches +%patch400 -p1 + %build %ifarch s390 %{arm} # Decrease debuginfo verbosity to reduce memory consumption even more @@ -334,6 +339,7 @@ fi * Mon Feb 13 2017 Than Ngo - 5.8.5-4 - backport upstream to security issue honor the setting for prompting when executing executable files on the desktop +- fixed error: placeholders is not a namespace-name with gcc7 * Sat Feb 11 2017 Fedora Release Engineering - 5.8.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild