From a5f92b79f1bda384c75a7e24dcc3f2aa71be0aef Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 14 Aug 2013 07:27:03 -0500 Subject: [PATCH] upstream patches, including plasma crasher fix (kde#320855) --- ...-lzma-and-xz-tar-archives-downloaded.patch | 27 ++++++++++ ...zma-compressed-tars-in-PackageStruct.patch | 26 ++++++++++ ...-theme-does-not-exist-delete-all-old.patch | 51 +++++++++++++++++++ kdelibs.spec | 13 ++++- 4 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 0002-Fix-detection-of-lzma-and-xz-tar-archives-downloaded.patch create mode 100644 0003-Support-xz-and-lzma-compressed-tars-in-PackageStruct.patch create mode 100644 0004-when-the-request-theme-does-not-exist-delete-all-old.patch diff --git a/0002-Fix-detection-of-lzma-and-xz-tar-archives-downloaded.patch b/0002-Fix-detection-of-lzma-and-xz-tar-archives-downloaded.patch new file mode 100644 index 0000000..a2d430b --- /dev/null +++ b/0002-Fix-detection-of-lzma-and-xz-tar-archives-downloaded.patch @@ -0,0 +1,27 @@ +From 76b25271b84cdb0caffbbe9a5f8a17f51c96af4d Mon Sep 17 00:00:00 2001 +From: Jeremy Whiting +Date: Tue, 13 Aug 2013 13:14:20 -0600 +Subject: [PATCH 2/4] Fix detection of lzma and xz tar archives downloaded from + kdelook.org Review: 111952 + +(cherry picked from commit 60bfd6a58a6ad890ed3fada1d4c8f34ec1ded198) +--- + plasma/package.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plasma/package.cpp b/plasma/package.cpp +index cd3702c..6df4e4e 100644 +--- a/plasma/package.cpp ++++ b/plasma/package.cpp +@@ -502,7 +502,7 @@ bool Package::installPackage(const QString &package, + archive = new KZip(package); + } else if (mimetype->is("application/x-compressed-tar") || + mimetype->is("application/x-tar")|| mimetype->is("application/x-bzip-compressed-tar") || +- mimetype->is("application/x-xz") || mimetype->is("application/x-lzma")) { ++ mimetype->is("application/x-xz-compressed-tar") || mimetype->is("application/x-lzma-compressed-tar")) { + archive = new KTar(package); + } else { + kWarning() << "Could not open package file, unsupported archive format:" << package << mimetype->name(); +-- +1.8.3.1 + diff --git a/0003-Support-xz-and-lzma-compressed-tars-in-PackageStruct.patch b/0003-Support-xz-and-lzma-compressed-tars-in-PackageStruct.patch new file mode 100644 index 0000000..9393507 --- /dev/null +++ b/0003-Support-xz-and-lzma-compressed-tars-in-PackageStruct.patch @@ -0,0 +1,26 @@ +From 87366731b96fd8cef3895b7d570d2b2b392566aa Mon Sep 17 00:00:00 2001 +From: Jeremy Whiting +Date: Tue, 13 Aug 2013 13:19:49 -0600 +Subject: [PATCH 3/4] Support xz and lzma compressed tars in PackageStructure + class + +(cherry picked from commit eb2cb854a164205fdbf58094a9b3bbcdff03258e) +--- + plasma/packagestructure.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/plasma/packagestructure.cpp b/plasma/packagestructure.cpp +index 2ba6525..71148e1 100644 +--- a/plasma/packagestructure.cpp ++++ b/plasma/packagestructure.cpp +@@ -627,6 +627,7 @@ PackageMetadata PackageStructure::metadata() + if (mimetype->is("application/zip")) { + archive = new KZip(d->path); + } else if (mimetype->is("application/x-compressed-tar") || mimetype->is("application/x-gzip") || ++ mimetype->is("application/x-xz-compressed-tar") || mimetype->is("application/x-lzma-compressed-tar") || + mimetype->is("application/x-tar")|| mimetype->is("application/x-bzip-compressed-tar")) { + archive = new KTar(d->path); + } else { +-- +1.8.3.1 + diff --git a/0004-when-the-request-theme-does-not-exist-delete-all-old.patch b/0004-when-the-request-theme-does-not-exist-delete-all-old.patch new file mode 100644 index 0000000..d601419 --- /dev/null +++ b/0004-when-the-request-theme-does-not-exist-delete-all-old.patch @@ -0,0 +1,51 @@ +From 59e88c777b92935cc95f28e52f84fe97563dec9d Mon Sep 17 00:00:00 2001 +From: Aaron Seigo +Date: Wed, 14 Aug 2013 12:52:52 +0200 +Subject: [PATCH 4/4] when the request theme does not exist, delete all old + caches for it and don't crash + +BUG:320855 +--- + plasma/theme.cpp | 21 ++++++++++++++------- + 1 file changed, 14 insertions(+), 7 deletions(-) + +diff --git a/plasma/theme.cpp b/plasma/theme.cpp +index 4554de7..cb44878 100644 +--- a/plasma/theme.cpp ++++ b/plasma/theme.cpp +@@ -222,18 +222,25 @@ bool ThemePrivate::useCache() + { + if (cacheTheme && !pixmapCache) { + const bool isRegularTheme = themeName != systemColorsTheme; +- QString cacheFile = "plasma_theme_" + themeName; ++ const QString cacheFile = "plasma_theme_" + themeName; + + if (isRegularTheme) { ++ const QString cacheFileBase = cacheFile + "*.kcache"; ++ + const QString path = KStandardDirs::locate("data", "desktoptheme/" + themeName + "/metadata.desktop"); +- const KPluginInfo pluginInfo(path); ++ // if the path is empty, then we haven't found the theme and so ++ // we will leave currentCacheFileName empty, resulting in the deletion of ++ // *all* matching cache files ++ QString currentCacheFileName; ++ if (!path.isEmpty()) { ++ const KPluginInfo pluginInfo(path); ++ currentCacheFileName = cacheFile + "_v" + pluginInfo.version() + ".kcache"; ++ } + +- // now we check for, and remove if necessary, old caches +- const QString cacheFileBase = cacheFile + "*.kcache"; +- cacheFile += "_v" + pluginInfo.version(); +- const QString currentCacheFileName = cacheFile + ".kcache"; ++ // now we check for (and remove) old caches + foreach (const QString &file, KGlobal::dirs()->findAllResources("cache", cacheFileBase)) { +- if (!file.endsWith(currentCacheFileName)) { ++ if (currentCacheFileName.isEmpty() || ++ !file.endsWith(currentCacheFileName)) { + QFile::remove(file); + } + } +-- +1.8.3.1 + diff --git a/kdelibs.spec b/kdelibs.spec index e3990bc..3c94fa1 100644 --- a/kdelibs.spec +++ b/kdelibs.spec @@ -37,7 +37,7 @@ Summary: KDE Libraries Version: 4.11.0 -Release: 1%{?dist} +Release: 2%{?dist} Name: kdelibs Epoch: 6 @@ -167,6 +167,10 @@ Patch092: return-application-icons-properly.patch # revert disabling of packagekit Patch093: turn-the-packagekit-support-feature-off-by-default.patch +Patch102: 0002-Fix-detection-of-lzma-and-xz-tar-archives-downloaded.patch +Patch103: 0003-Support-xz-and-lzma-compressed-tars-in-PackageStruct.patch +Patch104: 0004-when-the-request-theme-does-not-exist-delete-all-old.patch + ## security fix # rhel patches @@ -360,6 +364,10 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage %patch092 -p1 -R -b .return-application-icons-properly %patch093 -p1 -R -b .turn-the-packagekit-support-feature-off-by-default +%patch102 -p1 -b .0002 +%patch103 -p1 -b .0003 +%patch104 -p1 -b .0004 + # security fixes # rhel patches @@ -601,6 +609,9 @@ gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null || : %changelog +* Wed Aug 14 2013 Rex Dieter 4.11.0-2 +- upstream patches, including plasma crasher fix (kde#320855) + * Thu Aug 08 2013 Than Ngo - 4.11.0-1 - 4.11.0