[konsole] do not store history in /tmp (#990197)

Rex Dieter rdieter at fedoraproject.org
Tue Sep 23 16:49:06 UTC 2014


commit 90b14d0cebee8b79c44ca34dda02d0f5dd226b25
Author: Rex Dieter <rdieter at math.unl.edu>
Date:   Tue Sep 23 11:49:12 2014 -0500

    do not store history in /tmp (#990197)

 konsole-4.14.1-history_cache_instead_of_tmp.patch |   12 ++++++++++++
 konsole.spec                                      |   15 ++++++++++++---
 2 files changed, 24 insertions(+), 3 deletions(-)
---
diff --git a/konsole-4.14.1-history_cache_instead_of_tmp.patch b/konsole-4.14.1-history_cache_instead_of_tmp.patch
new file mode 100644
index 0000000..c950592
--- /dev/null
+++ b/konsole-4.14.1-history_cache_instead_of_tmp.patch
@@ -0,0 +1,12 @@
+diff -up konsole-4.14.1/src/History.cpp.tmp konsole-4.14.1/src/History.cpp
+--- konsole-4.14.1/src/History.cpp.tmp	2014-09-09 07:47:03.000000000 -0500
++++ konsole-4.14.1/src/History.cpp	2014-09-23 11:42:48.891387252 -0500
+@@ -61,7 +61,7 @@ HistoryFile::HistoryFile()
+       _fileMap(0),
+       _readWriteBalance(0)
+ {
+-    const QString tmpFormat = KStandardDirs::locateLocal("tmp", QString())
++    const QString tmpFormat = KStandardDirs::locateLocal("cache", QString())
+                               + "konsole-XXXXXX.history";
+     _tmpFile.setFileTemplate(tmpFormat);
+     if (_tmpFile.open()) {
diff --git a/konsole.spec b/konsole.spec
index 6cc3729..6c54dcd 100644
--- a/konsole.spec
+++ b/konsole.spec
@@ -1,7 +1,7 @@
 Name:    konsole
 Summary: KDE Terminal emulator
 Version: 4.14.1
-Release: 1%{?dist}
+Release: 2%{?dist}
 
 # sources: MIT and LGPLv2 and LGPLv2+ and GPLv2+
 License: GPLv2 and GFDL
@@ -11,8 +11,12 @@ URL:     http://konsole.kde.org/
 %global stable unstable
 %else
 %global stable stable
-%endif 
-Source0: ftp://ftp.kde.org/pub/kde/%{stable}/%{version}/src/%{name}-%{version}.tar.xz
+%endif
+Source0: http://download.kde.org/%{stable}/%{version}/src/%{name}-%{version}.tar.xz
+
+# do not store history in /tmp
+# http://bugzilla.redhat.com/990197
+Patch1: konsole-4.14.1-history_cache_instead_of_tmp.patch
 
 BuildRequires: desktop-file-utils
 BuildRequires: kdelibs4-devel >= %{version}
@@ -39,6 +43,8 @@ Requires: kdelibs4%{?_isa}%{?_kde4_version: >= %{_kde4_version}}
 %prep
 %setup -q
 
+%patch1 -p1 -b .history_cache_instead_of_tmp
+
 
 %build
 mkdir -p %{_target_platform}
@@ -81,6 +87,9 @@ desktop-file-validate %{buildroot}%{_kde4_datadir}/applications/kde4/konsole.des
 
 
 %changelog
+* Tue Sep 23 2014 Rex Dieter <rdieter at fedoraproject.org> 4.14.1-2
+- do not store history in /tmp (#990197)
+
 * Tue Sep 16 2014 Rex Dieter <rdieter at fedoraproject.org> - 4.14.1-1
 - 4.14.1
 


More information about the scm-commits mailing list