Compare commits

...

58 Commits
master ... f14

Author SHA1 Message Date
Rex Dieter 97bd6d867e CVE-2010-0046, security issue in khtml 2011-11-18 12:49:27 -06:00
Rex Dieter 96df630504 restore halectomy patch (sans fstab-removing pieces) 2011-11-16 17:30:29 -06:00
Rex Dieter 504faef7f5 solid hardware does not detect NFS drives, related to halectomy (#751879)
Fix fd leak in KLockFile (#753709)
2011-11-14 09:29:23 -06:00
Rex Dieter b7de02afc2 KConfig fails to sync on VFAT, CIFS, and EncFS (#730721,kde#203554) 2011-10-11 12:24:24 -05:00
Rex Dieter cd4a7e3edc add f16+ goodies 2011-10-11 12:23:57 -05:00
Rex Dieter 23f8a38cad Merge branch 'f15' into f14 2011-10-11 10:51:43 -05:00
Rex Dieter 6ab5508030 CVE-2011-3365 kdelibs: input validation failure in KSSL (#743056) 2011-10-11 10:50:46 -05:00
Rex Dieter b847bb7dcc Provides: kate-part 2011-10-08 19:49:26 -05:00
Than Ngo 1979fdc467 clean fedora conditional 2011-08-30 11:05:18 +02:00
Than Ngo b4b6073c3d fix typo 2011-08-26 22:19:38 +02:00
Than Ngo 340421a010 drop kdelibs-4.3.1-drkonq.patch which is merged in upstream 2011-08-26 21:43:42 +02:00
Kevin Kofler 2722e31130 Merge branch 'f14' of ssh://pkgs.fedoraproject.org/kdelibs into f14 2011-07-26 01:06:38 +02:00
Kevin Kofler 951e5a7edf * Mon Jul 25 2011 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.6.5-2
- fix KHTML form completion regression (kde#277457, patch by Andrea Iacovitti)
2011-07-26 00:22:59 +02:00
Rex Dieter f581a88870 Merge remote-tracking branch 'origin/f15' into f14 2011-07-01 08:31:52 -05:00
Rex Dieter c8584603d2 drop reference to old/removed patch 2011-07-01 08:30:53 -05:00
Rex Dieter 52d1fc7371 Merge remote-tracking branch 'origin/f15' into f14 2011-07-01 08:07:47 -05:00
Rex Dieter 41f7295110 4.6.5 2011-07-01 08:06:54 -05:00
Rex Dieter c4b64c1996 Merge remote-tracking branch 'origin/f15' into f14 2011-06-30 14:50:14 -05:00
Rex Dieter 263237884b drop old/deprecated pieces 2011-06-30 14:49:26 -05:00
Rex Dieter e37471e21f better (upstream) fix for kstatusnotifieritemdbus leak (#667787, kde#261180) 2011-06-30 14:48:32 -05:00
Rex Dieter 90065575e4 Merge remote-tracking branch 'origin/f15' into f14 2011-06-27 14:12:34 -05:00
Rex Dieter 770c3232b2 (Build)Requires: docbook-style-xsl >= 1.76 2011-06-27 14:12:07 -05:00
Rex Dieter 371323bc2d Merge remote-tracking branch 'origin/f15' into f14 2011-06-27 10:03:13 -05:00
Rex Dieter 82ae0f29cc upstream kdoctools/docbook patch (#690124) 2011-06-27 10:00:44 -05:00
Rex Dieter be5dcaf69c Merge remote-tracking branch 'origin/f15' into f14 2011-06-16 13:53:30 -05:00
Rex Dieter a726ab796a fix KConfigXT KComboBox for Qt 4.8 TP1 (upstream patch) 2011-06-16 13:52:44 -05:00
Rex Dieter de4fc62e6b Merge remote-tracking branch 'origin/f15' into f14 2011-06-14 09:21:14 -05:00
Rex Dieter 3ba22ac8f4 KStatusNotifierItem leaks D-Bus connections (#667787, kde#261180) 2011-06-14 09:20:27 -05:00
Than Ngo 0771d135b6 Merge branch 'f15' into f14 2011-06-09 16:07:23 +02:00
Than Ngo 5bb5ea39af 4.6.4 2011-06-06 22:42:32 +02:00
Kevin Kofler b0eac17e1b Merge branch 'master' of ssh://pkgs.fedoraproject.org/kdelibs into f14 2011-05-24 15:57:42 +02:00
Rex Dieter df5a037f90 Merge remote-tracking branch 'origin/master' into f14 2011-05-16 11:04:46 -05:00
Rex Dieter c58c5869de Merge remote-tracking branch 'origin/master' into f14/master 2011-05-08 18:59:34 -05:00
Rex Dieter af05a4cbcd Merge remote-tracking branch 'origin/master' into f14/master 2011-04-30 09:38:05 -05:00
Rex Dieter 30f682b3df Merge remote-tracking branch 'origin/master' into f14/master 2011-04-20 08:50:27 -05:00
Rex Dieter 0ebeb92f7c Merge remote-tracking branch 'origin/master' into f14/master
Conflicts:
	.gitignore
2011-04-08 13:00:42 -05:00
Rex Dieter ab9704dcd7 Merge remote-tracking branch 'origin/master' into f14/master 2011-03-24 10:41:14 -05:00
Rex Dieter a3c1583f31 Merge remote-tracking branch 'origin/master' into f14/master 2011-03-14 07:32:34 -05:00
Rex Dieter cd262aa261 Merge remote-tracking branch 'origin/f15/master' into f14/master
Conflicts:
	.gitignore
	kdelibs.spec
	sources
2011-03-11 10:37:52 -06:00
Rex Dieter 32f314c4c0 - Unowned /usr/lib*/kde4/plugins/{gui_platform,styles} dirs (#645059) 2011-01-18 14:18:22 -06:00
Rex Dieter eeb746fc9c - 4.5.5 2011-01-05 15:19:06 -06:00
Rex Dieter c998371b69 - update kdoctools/el from branch (kde-l10n entities) 2010-12-04 15:03:48 -06:00
Than Ngo 739924aa3b 4.5.4 2010-12-03 15:44:55 +01:00
Than Ngo 5a87919bad respin 2010-12-02 16:14:20 +01:00
Than Ngo 5be376ce49 4.5.4 2010-11-29 21:42:48 +01:00
Rex Dieter 6d90360b60 Merge remote branch 'origin/master' into f14/master 2010-11-15 19:22:22 -06:00
Rex Dieter df47543174 Merge commit 'ebdb7525fa7f9095e6eb3e7c9369ca1b49de392a' into f14/master
Conflicts:
	kdelibs.spec
2010-11-06 13:24:00 -05:00
Rex Dieter d2a8823cf6 - kshareddatacache fix for zime shifts, just in time for DST (kde#253795) 2010-11-02 11:44:21 -05:00
Rex Dieter 612c898d8c Merge remote branch 'origin/master' into f14/master 2010-10-17 12:30:43 -05:00
Rex Dieter 8eb9c8a719 Merge remote branch 'origin/master' into f14/master 2010-10-08 08:17:01 -05:00
Lukas Tinkl 9847fe98f8 Merge remote branch 'origin/master' into f14/master 2010-10-07 13:53:32 +02:00
Lukas Tinkl 315c746d04 Merge remote branch 'origin/master' into f14/master 2010-10-05 14:29:41 +02:00
Rex Dieter 8493938a76 Merge remote branch 'origin/master' into f14/master 2010-10-02 15:29:52 -05:00
Rex Dieter d0913d6ff7 Merge branch 'master' into f14 2010-09-11 11:40:06 -05:00
Rex Dieter 8baa4ab87d Merge branch 'master' into f14
Conflicts:
	kdelibs.spec
2010-08-28 23:55:59 -05:00
Rex Dieter c41ca60d1e - -apidocs: exclude installdox 2010-08-23 11:53:30 -05:00
Rex Dieter 66831870e8 Merge branch 'master' into f14
Conflicts:
	kdelibs.spec
2010-08-11 15:45:55 -05:00
Rex Dieter 0b5ef7cb1c - 4.5.0 2010-08-07 22:07:57 -05:00
17 changed files with 1513 additions and 230 deletions

4
.gitignore vendored
View File

@ -1,2 +1,2 @@
/kdelibs-4.6.2.tar.bz2
/kdelibs-4.6.3.tar.bz2
/kdelibs-4.6.5.tar.bz2
/kdelibs-4.7.2.tar.bz2

View File

@ -1,12 +0,0 @@
diff -up kdelibs-4.3.1/kdeui/util/kcrash.cpp.orig kdelibs-4.3.1/kdeui/util/kcrash.cpp
--- kdelibs-4.3.1/kdeui/util/kcrash.cpp.orig 2009-09-21 17:42:19.000000000 +0200
+++ kdelibs-4.3.1/kdeui/util/kcrash.cpp 2009-09-21 17:43:44.000000000 +0200
@@ -67,7 +67,7 @@ static char *s_autoRestartCommand = 0;
static char *s_appPath = 0;
static char *s_drkonqiPath = 0;
static KCrash::CrashFlags s_flags = 0;
-static bool s_launchDrKonqi = true;
+static bool s_launchDrKonqi = false;
namespace KCrash
{

View File

@ -1,114 +0,0 @@
commit a8d16682c31ef523ffebba6e19283a19cd5f5627
Author: Aaron Seigo <aseigo@kde.org>
Date: Fri May 6 15:19:09 2011 +0200
use a QWeakPointer on the KIconLoader passed in as there are no lifetime guarantees
usually KGlobal::iconLoader() is used, so this isn't an issue seen very often.
however, when a local KIconLoader is created, it is easy to get QIcons with a
KIconEngine that has a bad KIconLoader pointer in them. particularly as QIcon
is implicitly shared and easily passed around. the StatusNotifier Plasma DataEngine
was triggering this, though it would be trivial to run into this problem again
anytime a KIconLoader is created locally
thankfully, QWeakPointer does the job and is very fast and light. (confirmed
both with my own testing and confirmation from Thiago).
massive thanks to Michael Pyne for detecting the cause of the problem via Valgrind.
BUG:258706
diff --git a/kdeui/icons/kiconengine.cpp b/kdeui/icons/kiconengine.cpp
index 087ba1b..73e092c 100644
--- a/kdeui/icons/kiconengine.cpp
+++ b/kdeui/icons/kiconengine.cpp
@@ -27,16 +27,16 @@
KIconEngine::KIconEngine(const QString& iconName, KIconLoader* iconLoader, const QStringList& overlays)
+ : mIconName(iconName),
+ mIconLoader(iconLoader),
+ mOverlays(overlays)
{
- mIconName = iconName;
- mIconLoader = iconLoader;
- mOverlays = overlays;
}
KIconEngine::KIconEngine(const QString& iconName, KIconLoader* iconLoader)
+ : mIconName(iconName),
+ mIconLoader(iconLoader)
{
- mIconName = iconName;
- mIconLoader = iconLoader;
}
static inline int qIconModeToKIconState( QIcon::Mode mode )
@@ -65,8 +65,12 @@ QSize KIconEngine::actualSize( const QSize & size, QIcon::Mode mode, QIcon::Stat
return QSize(iconSize, iconSize);
}
-void KIconEngine::paint( QPainter * painter, const QRect & rect, QIcon::Mode mode, QIcon::State state )
+void KIconEngine::paint(QPainter * painter, const QRect & rect, QIcon::Mode mode, QIcon::State state)
{
+ if (!mIconLoader) {
+ return;
+ }
+
Q_UNUSED(state)
const int kstate = qIconModeToKIconState(mode);
@@ -80,20 +84,27 @@ void KIconEngine::paint( QPainter * painter, const QRect & rect, QIcon::Mode mod
}
const int iconSize = qMin(rect.width(), rect.height());
- const QPixmap pix = mIconLoader->loadIcon(mIconName, group, iconSize, kstate, mOverlays);
+ const QPixmap pix = mIconLoader.data()->loadIcon(mIconName, group, iconSize, kstate, mOverlays);
painter->drawPixmap(rect, pix);
}
-QPixmap KIconEngine::pixmap( const QSize & size, QIcon::Mode mode, QIcon::State state )
+QPixmap KIconEngine::pixmap(const QSize & size, QIcon::Mode mode, QIcon::State state)
{
Q_UNUSED(state)
+ if (!mIconLoader) {
+ QPixmap pm(size);
+ pm.fill(Qt::transparent);
+ return pm;
+ }
+
const int kstate = qIconModeToKIconState(mode);
const int iconSize = qMin(size.width(), size.height());
- QPixmap pix = mIconLoader->loadIcon(mIconName, KIconLoader::Desktop, iconSize, kstate, mOverlays);
+ QPixmap pix = mIconLoader.data()->loadIcon(mIconName, KIconLoader::Desktop, iconSize, kstate, mOverlays);
- if(pix.size() == size)
+ if (pix.size() == size) {
return pix;
+ }
QPixmap pix2(size);
pix2.fill(QColor(0,0,0,0));
@@ -111,7 +122,7 @@ QString KIconEngine::key() const
QIconEngineV2 *KIconEngine::clone() const
{
- return new KIconEngine(mIconName, mIconLoader, mOverlays);
+ return new KIconEngine(mIconName, mIconLoader.data(), mOverlays);
}
bool KIconEngine::read(QDataStream &in)
diff --git a/kdeui/icons/kiconengine_p.h b/kdeui/icons/kiconengine_p.h
index 8095d2a..9fba63c 100644
--- a/kdeui/icons/kiconengine_p.h
+++ b/kdeui/icons/kiconengine_p.h
@@ -75,7 +75,7 @@ class KIconEngine : public QIconEngineV2
private:
QString mIconName;
QStringList mOverlays;
- KIconLoader* mIconLoader;
+ QWeakPointer<KIconLoader> mIconLoader;
};
inline KIconEngine::~KIconEngine()

View File

@ -1,27 +0,0 @@
commit 92db24adfa941003db1d885df01157056617f30b
Author: Maks Orlovich <maksim@kde.org>
Date: Sun May 8 14:39:03 2011 -0400
Fix the job-on-hold reuse logic, which caused the double-POST problem)
adawit, could you please at least READ what you're backporting if you are
going to be this aggressive? Or better yet, please don't backport anything
that's not fixing a critical bug or is trivial, as per:
http://techbase.kde.org/Policies/Minor_Point_Release_Policy
CCMAIL: adawit@kde.org
BUG: 272466
diff --git a/kio/kio/scheduler.cpp b/kio/kio/scheduler.cpp
index 55da053..9f5607e 100644
--- a/kio/kio/scheduler.cpp
+++ b/kio/kio/scheduler.cpp
@@ -1151,7 +1151,7 @@ Slave *SchedulerPrivate::heldSlaveForJob(SimpleJob *job)
bool canJobReuse = (cmd == CMD_GET || cmd == CMD_MULTI_GET);
if (KIO::TransferJob *tJob = qobject_cast<KIO::TransferJob *>(job)) {
- canJobReuse = cmd == (canJobReuse || cmd == CMD_SPECIAL);
+ canJobReuse = (canJobReuse || cmd == CMD_SPECIAL);
if (canJobReuse) {
KIO::MetaData outgoing = tJob->outgoingMetaData();
const QString resume = outgoing.value("resume");

View File

@ -0,0 +1,395 @@
diff -up kdelibs-4.6.4/kdoctools/CMakeLists.txt.kdoctools_docbook kdelibs-4.6.4/kdoctools/CMakeLists.txt
--- kdelibs-4.6.4/kdoctools/CMakeLists.txt.kdoctools_docbook 2011-04-01 08:55:50.000000000 -0500
+++ kdelibs-4.6.4/kdoctools/CMakeLists.txt 2011-06-27 09:36:41.976238333 -0500
@@ -217,9 +217,7 @@ add_custom_command( TARGET docbookl10nhe
${DOCBOOKXSL_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/customization/xsl
${CMAKE_CURRENT_BINARY_DIR}/customization/xsl
)
-# all-l10n.xml and kde-custom-l10n.xml are generated by docbookl10nhelper
+# all-l10n.xml is generated by docbookl10nhelper
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/customization/xsl/all-l10n.xml
DESTINATION ${DATA_INSTALL_DIR}/ksgmltools2/customization/xsl/ )
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/customization/xsl/kde-custom-l10n.xml
- DESTINATION ${DATA_INSTALL_DIR}/ksgmltools2/customization/xsl/ )
diff -up kdelibs-4.6.4/kdoctools/customization/kde-include-common.xsl.cmake.kdoctools_docbook kdelibs-4.6.4/kdoctools/customization/kde-include-common.xsl.cmake
--- kdelibs-4.6.4/kdoctools/customization/kde-include-common.xsl.cmake.kdoctools_docbook 2011-04-01 08:55:50.000000000 -0500
+++ kdelibs-4.6.4/kdoctools/customization/kde-include-common.xsl.cmake 2011-06-27 09:36:41.977238320 -0500
@@ -5,6 +5,5 @@
<xsl:import href="@DOCBOOKXSL_DIR@/html/chunk.xsl"/>
<xsl:param name="l10n.xml" select="document('xsl/all-l10n.xml')"/>
- <xsl:param name="local.l10n.xml" select="document('xsl/kde-custom-l10n.xml')"/>
-
+ <xsl:param name="local.l10n.xml" select="document(concat('xsl/',/*/@lang,'.xml'))"/>
</xsl:stylesheet>
diff -up kdelibs-4.6.4/kdoctools/customization/kde-include-man.xsl.cmake.kdoctools_docbook kdelibs-4.6.4/kdoctools/customization/kde-include-man.xsl.cmake
--- kdelibs-4.6.4/kdoctools/customization/kde-include-man.xsl.cmake.kdoctools_docbook 2011-04-01 08:55:50.000000000 -0500
+++ kdelibs-4.6.4/kdoctools/customization/kde-include-man.xsl.cmake 2011-06-27 09:36:41.977238320 -0500
@@ -7,6 +7,5 @@
<xsl:output method="text" encoding="UTF-8" indent="no"/>
<xsl:param name="l10n.xml" select="document('xsl/all-l10n.xml')"/>
- <xsl:param name="local.l10n.xml" select="document('xsl/kde-custom-l10n.xml')"/>
</xsl:stylesheet>
diff -up kdelibs-4.6.4/kdoctools/customization/xsl/ca.xml.kdoctools_docbook kdelibs-4.6.4/kdoctools/customization/xsl/ca.xml
--- kdelibs-4.6.4/kdoctools/customization/xsl/ca.xml.kdoctools_docbook 2011-04-01 08:55:50.000000000 -0500
+++ kdelibs-4.6.4/kdoctools/customization/xsl/ca.xml 2011-06-27 09:36:41.977238320 -0500
@@ -1,6 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="ca" english-language-name="Catalan">
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+<l:l10n language="ca" english-language-name="Catalan">
<l:gentext key="footer-doc-comment" text="Voleu fer un comentari o col&#183;laborar amb una actualitzaci&#243; d'aquesta p&#224;gina?"/>
<l:gentext key="footer-doc-feedback" text="Envieu els comentaris a "/>
<l:gentext key="footer-doc-teamname" text="l'equip de Documentaci&#243; del KDE"/>
</l:l10n>
+</l:i18n>
diff -up kdelibs-4.6.4/kdoctools/customization/xsl/de.xml.kdoctools_docbook kdelibs-4.6.4/kdoctools/customization/xsl/de.xml
--- kdelibs-4.6.4/kdoctools/customization/xsl/de.xml.kdoctools_docbook 2011-04-01 08:55:50.000000000 -0500
+++ kdelibs-4.6.4/kdoctools/customization/xsl/de.xml 2011-06-27 09:36:41.978238308 -0500
@@ -1,6 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="de" english-language-name="German">
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+<l:l10n language="de" english-language-name="German">
<l:gentext key="footer-doc-comment" text="M&#246;chten Sie Kommentare und Verbesserungen zu dieser Seite beitragen?"/>
<l:gentext key="footer-doc-feedback" text="Senden Sie Ihre Vorschl&#228;ge an das "/>
<l:gentext key="footer-doc-teamname" text="KDE Dokumentationsteam"/>
</l:l10n>
+</l:i18n>
diff -up kdelibs-4.6.4/kdoctools/customization/xsl/el.xml.kdoctools_docbook kdelibs-4.6.4/kdoctools/customization/xsl/el.xml
--- kdelibs-4.6.4/kdoctools/customization/xsl/el.xml.kdoctools_docbook 2011-04-01 08:56:18.000000000 -0500
+++ kdelibs-4.6.4/kdoctools/customization/xsl/el.xml 2011-06-27 09:36:41.978238308 -0500
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="el" english-language-name="Greek">
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+<l:l10n language="el" english-language-name="Greek">
<l:gentext key="footer-doc-comment" text="&#917;&#960;&#953;&#952;&#965;&#956;&#949;&#943;&#964;&#949; &#957;&#945; &#954;&#940;&#957;&#949;&#964;&#949; &#941;&#957;&#945; &#963;&#967;&#972;&#955;&#953;&#959; &#942; &#957;&#945; &#963;&#965;&#957;&#949;&#953;&#963;&#966;&#941;&#961;&#949;&#964;&#949; &#963;&#964;&#959; &#960;&#949;&#961;&#953;&#949;&#967;&#972;&#956;&#949;&#957;&#959; &#945;&#965;&#964;&#942;&#962; &#964;&#951;&#962; &#963;&#949;&#955;&#943;&#948;&#945;&#962;;"/>
<l:gentext key="footer-doc-feedback" text="&#931;&#964;&#949;&#943;&#955;&#964;&#949; &#964;&#953;&#962; &#963;&#965;&#957;&#949;&#953;&#963;&#966;&#959;&#961;&#941;&#962; &#963;&#945;&#962; &#963;&#964;&#951;&#957; "/>
@@ -53,3 +53,4 @@
<l:template name="Sun" text="&#922;&#965;&#961;"/>
</l:context>
</l:l10n>
+</l:i18n>
diff -up kdelibs-4.6.4/kdoctools/customization/xsl/en.xml.kdoctools_docbook kdelibs-4.6.4/kdoctools/customization/xsl/en.xml
--- kdelibs-4.6.4/kdoctools/customization/xsl/en.xml.kdoctools_docbook 2011-04-01 08:55:50.000000000 -0500
+++ kdelibs-4.6.4/kdoctools/customization/xsl/en.xml 2011-06-27 09:36:41.978238308 -0500
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="en" english-language-name="English">
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+<l:l10n language="en" english-language-name="English">
<l:gentext key="nav-home" text="Contents"/>
@@ -7,3 +7,4 @@
<l:gentext key="footer-doc-feedback" text="Send feedback to the "/>
<l:gentext key="footer-doc-teamname" text="KDE Docs Team"/>
</l:l10n>
+</l:i18n>
diff -up kdelibs-4.6.4/kdoctools/customization/xsl/es.xml.kdoctools_docbook kdelibs-4.6.4/kdoctools/customization/xsl/es.xml
--- kdelibs-4.6.4/kdoctools/customization/xsl/es.xml.kdoctools_docbook 2011-04-01 08:55:50.000000000 -0500
+++ kdelibs-4.6.4/kdoctools/customization/xsl/es.xml 2011-06-27 09:36:41.978238308 -0500
@@ -1,6 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="es" english-language-name="Spanish">
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+<l:l10n language="es" english-language-name="Spanish">
<l:gentext key="footer-doc-comment" text="&#191;Le gustar&#237;a hacer alg&#250;n comentario o aportar una actualizaci&#243;n a esta p&#225;gina?"/>
<l:gentext key="footer-doc-feedback" text="Env&#237;e sus comentarios al "/>
<l:gentext key="footer-doc-teamname" text="equipo de documentaci&#243;n de KDE"/>
</l:l10n>
+</l:i18n>
diff -up kdelibs-4.6.4/kdoctools/customization/xsl/et.xml.kdoctools_docbook kdelibs-4.6.4/kdoctools/customization/xsl/et.xml
--- kdelibs-4.6.4/kdoctools/customization/xsl/et.xml.kdoctools_docbook 2011-04-01 08:55:50.000000000 -0500
+++ kdelibs-4.6.4/kdoctools/customization/xsl/et.xml 2011-06-27 09:36:41.978238308 -0500
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="et" english-language-name="Estonian">
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+<l:l10n language="et" english-language-name="Estonian">
<l:gentext key="RevHistory" text="Versioonide ajalugu"/>
<l:gentext key="revhistory" text="Versioonide ajalugu"/>
<l:gentext key="revision" text="Versioon"/>
@@ -9,3 +9,4 @@
<l:gentext key="footer-doc-feedback" text="Saada oma tagasiside "/>
<l:gentext key="footer-doc-teamname" text="KDE dokumentatsiooni meeskonnale"/>
</l:l10n>
+</l:i18n>
diff -up kdelibs-4.6.4/kdoctools/customization/xsl/fr.xml.kdoctools_docbook kdelibs-4.6.4/kdoctools/customization/xsl/fr.xml
--- kdelibs-4.6.4/kdoctools/customization/xsl/fr.xml.kdoctools_docbook 2011-04-01 08:55:50.000000000 -0500
+++ kdelibs-4.6.4/kdoctools/customization/xsl/fr.xml 2011-06-27 09:36:41.979238296 -0500
@@ -1,6 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="fr" english-language-name="French">
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+<l:l10n language="fr" english-language-name="French">
<l:gentext key="footer-doc-comment" text="Vous souhaitez faire un commentaire ou participer au contenu de cette page&#160;?"/>
<l:gentext key="footer-doc-feedback" text="Envoyez vos contributions &#224; l'"/>
<l:gentext key="footer-doc-teamname" text="&#233;quipe de documentation de KDE"/>
</l:l10n>
+</l:i18n>
diff -up kdelibs-4.6.4/kdoctools/customization/xsl/gl.xml.kdoctools_docbook kdelibs-4.6.4/kdoctools/customization/xsl/gl.xml
--- kdelibs-4.6.4/kdoctools/customization/xsl/gl.xml.kdoctools_docbook 2011-04-01 08:55:50.000000000 -0500
+++ kdelibs-4.6.4/kdoctools/customization/xsl/gl.xml 2011-06-27 09:36:41.979238296 -0500
@@ -1,6 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="gl" english-language-name="Galician">
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+<l:l10n language="gl" english-language-name="Galician">
<l:gentext key="footer-doc-comment" text="Desexa facer un comentario ou actualizar esta páxina?"/>
<l:gentext key="footer-doc-feedback" text="Envíe as súas aportacións á "/>
<l:gentext key="footer-doc-teamname" text="Equipa de documentación de KDE"/>
</l:l10n>
+</l:i18n>
diff -up kdelibs-4.6.4/kdoctools/customization/xsl/it.xml.kdoctools_docbook kdelibs-4.6.4/kdoctools/customization/xsl/it.xml
--- kdelibs-4.6.4/kdoctools/customization/xsl/it.xml.kdoctools_docbook 2011-04-01 08:55:50.000000000 -0500
+++ kdelibs-4.6.4/kdoctools/customization/xsl/it.xml 2011-06-27 09:36:41.979238296 -0500
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="it" english-language-name="Italian">
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+<l:l10n language="it" english-language-name="Italian">
<l:dingbat key="startquote" text="&#171;"/>
<l:dingbat key="endquote" text="&#187;"/>
<l:dingbat key="nestedstartquote" text="&#8220;"/>
@@ -46,3 +46,4 @@
<l:template name="table" text="Tabella&#160;%n, &#171;%t&#187;"/>
</l:context>
</l:l10n>
+</l:i18n>
diff -up kdelibs-4.6.4/kdoctools/customization/xsl/lt.xml.kdoctools_docbook kdelibs-4.6.4/kdoctools/customization/xsl/lt.xml
--- kdelibs-4.6.4/kdoctools/customization/xsl/lt.xml.kdoctools_docbook 2011-04-01 08:55:50.000000000 -0500
+++ kdelibs-4.6.4/kdoctools/customization/xsl/lt.xml 2011-06-27 09:36:41.979238296 -0500
@@ -1,6 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="lt" english-language-name="Lithuanian">
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+<l:l10n language="lt" english-language-name="Lithuanian">
<l:gentext key="footer-doc-comment" text="Ar nor&#279;tum&#279;te pakomentuoti ar atnaujinti &#353;&#303; puslap&#303;?"/>
<l:gentext key="footer-doc-feedback" text="Atsiliepimus si&#371;skite "/>
<l:gentext key="footer-doc-teamname" text="KDE dokumentacijos komanda"/>
</l:l10n>
+</l:i18n>
diff -up kdelibs-4.6.4/kdoctools/customization/xsl/nl.xml.kdoctools_docbook kdelibs-4.6.4/kdoctools/customization/xsl/nl.xml
--- kdelibs-4.6.4/kdoctools/customization/xsl/nl.xml.kdoctools_docbook 2011-04-01 08:56:18.000000000 -0500
+++ kdelibs-4.6.4/kdoctools/customization/xsl/nl.xml 2011-06-27 09:37:46.817427707 -0500
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="nl" english-language-name="Dutch">
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+<l:l10n language="nl" english-language-name="Dutch">
<l:gentext key="footer-doc-comment" text="Wilt u een opmerking maken of een bijdragen leveren aan deze pagina?"/>
<l:gentext key="footer-doc-feedback" text="Stuur uw bericht aan het "/>
<l:gentext key="footer-doc-teamname" text="KDE Documentatieteam"/>
diff -up kdelibs-4.6.4/kdoctools/customization/xsl/nn.xml.kdoctools_docbook kdelibs-4.6.4/kdoctools/customization/xsl/nn.xml
--- kdelibs-4.6.4/kdoctools/customization/xsl/nn.xml.kdoctools_docbook 2011-04-01 08:55:50.000000000 -0500
+++ kdelibs-4.6.4/kdoctools/customization/xsl/nn.xml 2011-06-27 09:36:41.980238284 -0500
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="nn" english-language-name="Norwegian Nynorsk">
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+<l:l10n language="nn" english-language-name="Norwegian Nynorsk">
<l:gentext key="abstract" text="samandrag"/>
<l:gentext key="Bibliography" text="Litteratur"/>
@@ -200,3 +200,4 @@
</l:context>
</l:l10n>
+</l:i18n>
diff -up kdelibs-4.6.4/kdoctools/customization/xsl/pl.xml.kdoctools_docbook kdelibs-4.6.4/kdoctools/customization/xsl/pl.xml
--- kdelibs-4.6.4/kdoctools/customization/xsl/pl.xml.kdoctools_docbook 2011-04-01 08:55:50.000000000 -0500
+++ kdelibs-4.6.4/kdoctools/customization/xsl/pl.xml 2011-06-27 09:36:41.980238284 -0500
@@ -1,6 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="pl" english-language-name="Polish">
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+<l:l10n language="pl" english-language-name="Polish">
<l:gentext key="footer-doc-comment" text="Je&#347;li chcesz skomentowa&#263; t&#261; stron&#281; lub j&#261; uaktualni&#263; "/>
<l:gentext key="footer-doc-feedback" text="Wy&#347;lij swoje uwagi (po angielsku) do "/>
<l:gentext key="footer-doc-teamname" text="Zespo&#322;u dokumentacji KDE"/>
</l:l10n>
+</l:i18n>
diff -up kdelibs-4.6.4/kdoctools/customization/xsl/pt_br.xml.kdoctools_docbook kdelibs-4.6.4/kdoctools/customization/xsl/pt_br.xml
--- kdelibs-4.6.4/kdoctools/customization/xsl/pt_br.xml.kdoctools_docbook 2011-04-01 08:55:50.000000000 -0500
+++ kdelibs-4.6.4/kdoctools/customization/xsl/pt_br.xml 2011-06-27 09:36:41.981238272 -0500
@@ -1,6 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="pt_br" english-language-name="Portuguese (Brazil)">
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+<l:l10n language="pt_br" english-language-name="Portuguese (Brazil)">
<l:gentext key="footer-doc-comment" text="Gostaria de fazer um coment&#225;rio ou contribuir com uma atualiza&#231;&#227;o para esta p&#225;gina?"/>
<l:gentext key="footer-doc-feedback" text="Envie uma mensagem para a "/>
<l:gentext key="footer-doc-teamname" text="Equipe de Documenta&#231;&#227;o do KDE"/>
</l:l10n>
+</l:i18n>
diff -up kdelibs-4.6.4/kdoctools/customization/xsl/pt.xml.kdoctools_docbook kdelibs-4.6.4/kdoctools/customization/xsl/pt.xml
--- kdelibs-4.6.4/kdoctools/customization/xsl/pt.xml.kdoctools_docbook 2011-04-01 08:55:50.000000000 -0500
+++ kdelibs-4.6.4/kdoctools/customization/xsl/pt.xml 2011-06-27 09:36:41.980238284 -0500
@@ -1,6 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="pt" english-language-name="Portuguese">
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+<l:l10n language="pt" english-language-name="Portuguese">
<l:gentext key="footer-doc-comment" text="Would you like to make a comment or contribute an update to this page?"/>
<l:gentext key="footer-doc-feedback" text="Send feedback to the "/>
<l:gentext key="footer-doc-teamname" text="KDE Docs Team"/>
</l:l10n>
+</l:i18n>
diff -up kdelibs-4.6.4/kdoctools/customization/xsl/ru.xml.kdoctools_docbook kdelibs-4.6.4/kdoctools/customization/xsl/ru.xml
--- kdelibs-4.6.4/kdoctools/customization/xsl/ru.xml.kdoctools_docbook 2011-04-01 08:55:50.000000000 -0500
+++ kdelibs-4.6.4/kdoctools/customization/xsl/ru.xml 2011-06-27 09:36:41.981238272 -0500
@@ -1,6 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="ru" english-language-name="Russian">
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+<l:l10n language="ru" english-language-name="Russian">
<l:gentext key="footer-doc-comment" text="Вам есть что добавить на эту страницу?"/>
<l:gentext key="footer-doc-feedback" text="Напишите "/>
<l:gentext key="footer-doc-teamname" text="команде документации KDE"/>
</l:l10n>
+</l:i18n>
diff -up kdelibs-4.6.4/kdoctools/customization/xsl/sl.xml.kdoctools_docbook kdelibs-4.6.4/kdoctools/customization/xsl/sl.xml
--- kdelibs-4.6.4/kdoctools/customization/xsl/sl.xml.kdoctools_docbook 2011-04-01 08:55:50.000000000 -0500
+++ kdelibs-4.6.4/kdoctools/customization/xsl/sl.xml 2011-06-27 09:36:41.981238272 -0500
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="sl" english-language-name="Slovenian">
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+<l:l10n language="sl" english-language-name="Slovenian">
<l:gentext key="PubDate" text="Datum objave"/>
<l:gentext key="pubdate" text="Datum objave"/>
@@ -119,3 +119,4 @@
</l:context>
</l:l10n>
+</l:i18n>
diff -up kdelibs-4.6.4/kdoctools/customization/xsl/sr.xml.kdoctools_docbook kdelibs-4.6.4/kdoctools/customization/xsl/sr.xml
--- kdelibs-4.6.4/kdoctools/customization/xsl/sr.xml.kdoctools_docbook 2011-04-01 08:55:50.000000000 -0500
+++ kdelibs-4.6.4/kdoctools/customization/xsl/sr.xml 2011-06-27 09:36:41.982238259 -0500
@@ -1,6 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
- language="sr"
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+<l:l10n language="sr"
english-language-name="Serbian">
<l:gentext key="Abstract" text="Сажетак"/>
@@ -692,3 +691,4 @@
<l:l i="56">z</l:l>
</l:letters>
</l:l10n>
+</l:i18n>
diff -up kdelibs-4.6.4/kdoctools/customization/xsl/sv.xml.kdoctools_docbook kdelibs-4.6.4/kdoctools/customization/xsl/sv.xml
--- kdelibs-4.6.4/kdoctools/customization/xsl/sv.xml.kdoctools_docbook 2011-04-01 08:55:50.000000000 -0500
+++ kdelibs-4.6.4/kdoctools/customization/xsl/sv.xml 2011-06-27 09:36:41.982238259 -0500
@@ -1,6 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="sv" english-language-name="Swedish">
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+<l:l10n language="sv" english-language-name="Swedish">
<l:gentext key="footer-doc-comment" text="Vill du ge en kommentar eller bidra med en uppdatering av den h&#228;r sidan?"/>
<l:gentext key="footer-doc-feedback" text="Skicka dina f&#246;rslag till "/>
<l:gentext key="footer-doc-teamname" text="KDE:s dokumentationsgrupp"/>
</l:l10n>
+</l:i18n>
diff -up kdelibs-4.6.4/kdoctools/customization/xsl/tr.xml.kdoctools_docbook kdelibs-4.6.4/kdoctools/customization/xsl/tr.xml
--- kdelibs-4.6.4/kdoctools/customization/xsl/tr.xml.kdoctools_docbook 2011-04-01 08:55:50.000000000 -0500
+++ kdelibs-4.6.4/kdoctools/customization/xsl/tr.xml 2011-06-27 09:36:41.982238259 -0500
@@ -1,6 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="tr" english-language-name="Turkish">
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+<l:l10n language="tr" english-language-name="Turkish">
<l:gentext key="footer-doc-comment" text="Bu sayfa hakk&#305;nda bir yorum yapmak ya da katk&#305;da bulunmak ister misniz?"/>
<l:gentext key="footer-doc-feedback" text="Geribildirimlerinizi g&#246;nderin "/>
<l:gentext key="footer-doc-teamname" text="KDE Belgelendirme Ekibi"/>
</l:l10n>
+</l:i18n>
diff -up kdelibs-4.6.4/kdoctools/customization/xsl/uk.xml.kdoctools_docbook kdelibs-4.6.4/kdoctools/customization/xsl/uk.xml
--- kdelibs-4.6.4/kdoctools/customization/xsl/uk.xml.kdoctools_docbook 2011-04-01 08:55:50.000000000 -0500
+++ kdelibs-4.6.4/kdoctools/customization/xsl/uk.xml 2011-06-27 09:36:41.982238259 -0500
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?>
-<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="uk" english-language-name="Ukranian">
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+<l:l10n language="uk" english-language-name="Ukranian">
<l:gentext key="Bibliography" text="&#1051;&#1110;&#1090;&#1077;&#1088;&#1072;&#1090;&#1091;&#1088;&#1072;"/>
<l:gentext key="bibliography" text="&#1083;&#1110;&#1090;&#1077;&#1088;&#1072;&#1090;&#1091;&#1088;&#1072;"/>
@@ -33,3 +33,4 @@
<l:gentext key="footer-doc-teamname" text="&#1050;&#1086;&#1084;&#1072;&#1085;&#1076;&#1080; &#1079; &#1076;&#1086;&#1082;&#1091;&#1084;&#1077;&#1085;&#1090;&#1091;&#1074;&#1072;&#1085;&#1085;&#1103; KDE"/>
</l:l10n>
+</l:i18n>
diff -up kdelibs-4.6.4/kdoctools/docbookl10nhelper.cpp.kdoctools_docbook kdelibs-4.6.4/kdoctools/docbookl10nhelper.cpp
--- kdelibs-4.6.4/kdoctools/docbookl10nhelper.cpp.kdoctools_docbook 2011-04-01 08:55:50.000000000 -0500
+++ kdelibs-4.6.4/kdoctools/docbookl10nhelper.cpp 2011-06-27 09:36:41.983238246 -0500
@@ -85,6 +85,39 @@ int writeLangFile( const QString &fname,
return( 0 );
}
+int writeLangFileNew( const QString &fname, const QString &dtdPath,
+ const LangListType &langMap ) {
+
+ QFile outFile( fname );
+ if ( ! outFile.open( QIODevice::WriteOnly ) ) {
+ qCritical() << QString( "Could not write %1" )
+ .arg( outFile.fileName() );
+ return( 1 );
+ }
+
+ QTextStream outStream( &outFile );
+ outStream << "<?xml version='1.0'?>" << endl;
+ outStream << QString( "<!DOCTYPE l:i18n SYSTEM \"%1\">" )
+ .arg( dtdPath ) << endl;
+
+ if ( langMap.size() > 0 ) {
+ outStream
+ << "<l:i18n xmlns:l=\"http://docbook.sourceforge.net/xmlns/l10n/1.0\">"
+ << endl;
+ LangListType::const_iterator i = langMap.constBegin();
+ while ( i != langMap.constEnd() ) {
+ outStream << QString( "<l:l10n language=\"%1\" href=\"%2\"/>" )
+ .arg( (*i).first ).arg( (*i).second ) << endl;
+ ++i;
+ }
+ outStream << "</l:i18n>" << endl;
+ }
+
+ outFile.close();
+
+ return( 0 );
+}
+
inline const QString addTrailingSlash( const QString &p ) {
return p.endsWith( "/" ) ? p : p + "/";
}
@@ -199,11 +232,16 @@ int main( int argc, char **argv ) {
++i;
}
+ int res = 0;
- int res = writeLangFile( all10nFName, l10nDir + "common/l10n.dtd",
- allLangs );
- res += writeLangFile( customl10nFName, l10nDir + "common/l10n.dtd",
- customLangs );
+ if ( foundRxEntity ) {
+ /* old style (docbook-xsl<=1.75) */
+ res = writeLangFile( all10nFName, l10nDir + "common/l10n.dtd",
+ allLangs );
+ } else {
+ res = writeLangFileNew( all10nFName, l10nDir + "common/l10n.dtd",
+ allLangs );
+ }
return( res );
}

View File

@ -0,0 +1,13 @@
diff -up kdelibs-4.6.4/kdeui/notifications/kstatusnotifieritemdbus_p.cpp.kstatusnotifieritemdbus_leak kdelibs-4.6.4/kdeui/notifications/kstatusnotifieritemdbus_p.cpp
--- kdelibs-4.6.4/kdeui/notifications/kstatusnotifieritemdbus_p.cpp.kstatusnotifieritemdbus_leak 2011-04-01 08:55:50.000000000 -0500
+++ kdelibs-4.6.4/kdeui/notifications/kstatusnotifieritemdbus_p.cpp 2011-06-30 14:45:28.256526029 -0500
@@ -174,7 +174,9 @@ KStatusNotifierItemDBus::KStatusNotifier
KStatusNotifierItemDBus::~KStatusNotifierItemDBus()
{
+ m_dbus.unregisterObject("/StatusNotifierItem");
m_dbus.unregisterService(m_service);
+ m_dbus.disconnectFromBus(m_service);
}
QDBusConnection KStatusNotifierItemDBus::dbusConnection() const

View File

@ -0,0 +1,16 @@
diff -up kdelibs-4.7.3/khtml/css/cssparser.cpp.orig kdelibs-4.7.3/khtml/css/cssparser.cpp
--- kdelibs-4.7.3/khtml/css/cssparser.cpp.orig 2011-11-07 19:14:53.000000000 +0100
+++ kdelibs-4.7.3/khtml/css/cssparser.cpp 2011-11-09 16:02:11.000000000 +0100
@@ -2275,8 +2275,11 @@ bool CSSParser::parseFontFaceSrc()
expectComma = true;
} else if (val->unit == Value::Function) {
// There are two allowed functions: local() and format().
+ // For both we expect a string argument
ValueList *args = val->function->args;
- if (args && args->size() == 1) {
+ if (args && args->size() == 1 &&
+ (args->current()->unit == CSSPrimitiveValue::CSS_STRING ||
+ args->current()->unit == CSSPrimitiveValue::CSS_IDENT)) {
if (!strcasecmp(domString(val->function->name), "local(") && !expectComma) {
expectComma = true;
allowFormat = false;

View File

@ -0,0 +1,61 @@
t 90607b28d21fefc43657ca08b889bdb174c31fab
Author: David Faure <faure@kde.org>
Date: Wed Sep 28 17:26:47 2011 +0200
Use HTML escaping on texts that come from the website
Interestingly enough, this is yet another use case for moving Qt::escape
to QtCore, which I made a merge request for.
(cherry picked from commit 86622e4db182f4b914169f72ebd1e66d708e9f87)
diff --git a/kioslave/http/http.cpp b/kioslave/http/http.cpp
index 33f4cb1..6447a02 100644
--- a/kioslave/http/http.cpp
+++ b/kioslave/http/http.cpp
@@ -99,6 +99,27 @@
//authentication handlers
#include "httpauthentication.cpp"
+// KDE5 TODO (QT5) : use QString::htmlEscape or whatever https://qt.gitorious.org/qt/qtbase/merge_requests/56
+// ends up with.
+static QString htmlEscape(const QString &plain)
+{
+ QString rich;
+ rich.reserve(int(plain.length() * 1.1));
+ for (int i = 0; i < plain.length(); ++i) {
+ if (plain.at(i) == QLatin1Char('<'))
+ rich += QLatin1String("&lt;");
+ else if (plain.at(i) == QLatin1Char('>'))
+ rich += QLatin1String("&gt;");
+ else if (plain.at(i) == QLatin1Char('&'))
+ rich += QLatin1String("&amp;");
+ else if (plain.at(i) == QLatin1Char('"'))
+ rich += QLatin1String("&quot;");
+ else
+ rich += plain.at(i);
+ }
+ rich.squeeze();
+ return rich;
+}
// see filenameFromUrl(): a sha1 hash is 160 bits
static const int s_hashedUrlBits = 160; // this number should always be divisible by eight
@@ -3410,7 +3431,7 @@ endParsing:
authinfo.url = reqUrl;
authinfo.keepPassword = true;
authinfo.comment = i18n("<b>%1</b> at <b>%2</b>",
- authinfo.realmValue, authinfo.url.host());
+ htmlEscape(authinfo.realmValue), authinfo.url.host());
if (!openPasswordDialog(authinfo, errorMsg)) {
if (sendErrorPageNotification()) {
@@ -5122,7 +5143,7 @@ void HTTPProtocol::proxyAuthenticationForSocket(const QNetworkProxy &proxy, QAut
"to access any sites.");
info.keepPassword = true;
info.commentLabel = i18n("Proxy:");
- info.comment = i18n("<b>%1</b> at <b>%2</b>", info.realmValue, m_request.proxyUrl.host());
+ info.comment = i18n("<b>%1</b> at <b>%2</b>", htmlEscape(info.realmValue), m_request.proxyUrl.host());
const bool dataEntered = openPasswordDialog(info, i18n("Proxy Authentication Failed."));
if (!dataEntered) {
kDebug(7103) << "looks like the user canceled proxy authentication.";

View File

@ -0,0 +1,25 @@
commit 9ca2b26fc67c3f921e1943c1725fca623e395854
Author: David Faure <faure@kde.org>
Date: Thu Jun 30 23:43:45 2011 +0200
Security fix: don't interpret html tags
Credits to Tim Brown for the find.
(cherry picked from commit bd70d4e589711fda9ab07738c46e37eee8376214)
diff --git a/kio/kssl/ksslcertificatebox.cpp b/kio/kssl/ksslcertificatebox.cpp
index 4ffc613..094787a 100644
--- a/kio/kssl/ksslcertificatebox.cpp
+++ b/kio/kssl/ksslcertificatebox.cpp
@@ -36,6 +36,10 @@ KSslCertificateBox::KSslCertificateBox(QWidget *parent)
d(new KSslCertificateBoxPrivate())
{
d->ui.setupUi(this);
+ // No fooling us with html tags
+ Q_FOREACH(QLabel* label, qFindChildren<QLabel *>(this)) {
+ label->setTextFormat(Qt::PlainText);
+ }
}

View File

@ -1,8 +1,7 @@
Index: solid/solid/CMakeLists.txt
===================================================================
--- solid/solid/CMakeLists.txt (revision 1211253)
+++ solid/solid/CMakeLists.txt (working copy)
@@ -39,7 +39,6 @@
diff -up kdelibs-4.6.5/solid/solid/CMakeLists.txt.halectomy kdelibs-4.6.5/solid/solid/CMakeLists.txt
--- kdelibs-4.6.5/solid/solid/CMakeLists.txt.halectomy 2011-04-01 08:56:18.000000000 -0500
+++ kdelibs-4.6.5/solid/solid/CMakeLists.txt 2011-11-16 17:29:09.585793260 -0600
@@ -39,7 +39,6 @@ configure_file(config-processor.h.cmake
file(MAKE_DIRECTORY
${CMAKE_CURRENT_BINARY_DIR}/backends/fakehw
@ -10,7 +9,7 @@ Index: solid/solid/CMakeLists.txt
${CMAKE_CURRENT_BINARY_DIR}/backends/udev
${CMAKE_CURRENT_BINARY_DIR}/backends/wmi
)
@@ -195,33 +194,6 @@
@@ -195,33 +194,6 @@ if(NOT WIN32 AND NOT APPLE)
endif( UDEV_FOUND )
@ -44,26 +43,9 @@ Index: solid/solid/CMakeLists.txt
message(STATUS "Building Solid UPower backend." )
set(solid_LIB_SRCS ${solid_LIB_SRCS}
backends/upower/upowermanager.cpp
@@ -249,15 +221,6 @@
)
endif (CMAKE_SYSTEM_NAME MATCHES Linux)
- message(STATUS "Building Solid fstab backend." )
- set(solid_LIB_SRCS ${solid_LIB_SRCS}
- backends/fstab/fstabmanager.cpp
- backends/fstab/fstabdevice.cpp
- backends/fstab/fstabstorageaccess.cpp
- backends/fstab/fstabhandling.cpp
- backends/fstab/fstabwatcher.cpp
- )
-
endif(NOT WIN32 AND NOT APPLE)
if(APPLE)
Index: solid/solid/managerbase.cpp
===================================================================
--- solid/solid/managerbase.cpp (revision 1211253)
+++ solid/solid/managerbase.cpp (working copy)
diff -up kdelibs-4.6.5/solid/solid/managerbase.cpp.halectomy kdelibs-4.6.5/solid/solid/managerbase.cpp
--- kdelibs-4.6.5/solid/solid/managerbase.cpp.halectomy 2011-04-01 08:55:51.000000000 -0500
+++ kdelibs-4.6.5/solid/solid/managerbase.cpp 2011-11-16 17:29:31.521519022 -0600
@@ -30,7 +30,6 @@
#if defined (Q_OS_MAC)
#include "backends/iokit/iokitmanager.h"
@ -72,16 +54,7 @@ Index: solid/solid/managerbase.cpp
#include "backends/udisks/udisksmanager.h"
#include "backends/upower/upowermanager.h"
@@ -42,8 +41,6 @@
#include "backends/udev/udevmanager.h"
#endif
-#include "backends/fstab/fstabmanager.h"
-
#elif defined (Q_WS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
#include "backends/wmi/wmimanager.h"
#endif
@@ -71,22 +68,12 @@
@@ -71,22 +70,13 @@ void Solid::ManagerBasePrivate::loadBack
# elif defined(Q_WS_WIN) && defined(HAVE_WBEM) && !defined(_WIN32_WCE)
m_backends << new Solid::Backends::Wmi::WmiManager(0);
@ -98,10 +71,9 @@ Index: solid/solid/managerbase.cpp
m_backends << new Solid::Backends::UDev::UDevManager(0);
# endif
m_backends << new Solid::Backends::UDisks::UDisksManager(0)
- << new Solid::Backends::UPower::UPowerManager(0)
- << new Solid::Backends::Fstab::FstabManager(0);
<< new Solid::Backends::UPower::UPowerManager(0)
<< new Solid::Backends::Fstab::FstabManager(0);
- }
+ << new Solid::Backends::UPower::UPowerManager(0);
# endif
# if defined (HUPNP_FOUND)

View File

@ -0,0 +1,212 @@
diff -up kdelibs-4.6.5/kdecore/CMakeLists.txt.kconfig_sync-1 kdelibs-4.6.5/kdecore/CMakeLists.txt
--- kdelibs-4.6.5/kdecore/CMakeLists.txt.kconfig_sync-1 2011-04-01 08:55:50.000000000 -0500
+++ kdelibs-4.6.5/kdecore/CMakeLists.txt 2011-10-11 11:04:00.141866936 -0500
@@ -208,6 +208,7 @@ set(kdecore_LIB_SRCS
io/kdebug.cpp
io/kdebugdbusiface.cpp
io/kdirwatch.cpp
+ io/kfilesystemtype_p.cpp
io/klimitediodevice.cpp
io/kmessage.cpp
io/kmountpoint.cpp
diff -up kdelibs-4.6.5/kdecore/io/kdirwatch.cpp.kconfig_sync-1 kdelibs-4.6.5/kdecore/io/kdirwatch.cpp
--- kdelibs-4.6.5/kdecore/io/kdirwatch.cpp.kconfig_sync-1 2011-04-01 08:56:18.000000000 -0500
+++ kdelibs-4.6.5/kdecore/io/kdirwatch.cpp 2011-10-11 11:16:03.054895138 -0500
@@ -43,6 +43,7 @@
#include "kdirwatch.h"
#include "kdirwatch_p.h"
+#include "kfilesystemtype_p.h"
#include "io/config-kdirwatch.h"
#include <config.h>
@@ -62,7 +63,6 @@
#include <kglobal.h>
#include <kde_file.h>
#include <kconfiggroup.h>
-#include "kmountpoint.h"
#include <stdlib.h>
#include <string.h>
@@ -709,9 +709,7 @@ bool KDirWatchPrivate::useQFSWatch(Entry
bool KDirWatchPrivate::useStat(Entry* e)
{
- KMountPoint::Ptr mp = KMountPoint::currentMountPoints().findByPath(e->path);
- const bool slow = mp ? mp->probablySlow() : false;
- if (slow)
+ if (KFileSystemType::fileSystemType(e->path) == KFileSystemType::Nfs) // TODO: or Smbfs?
useFreq(e, m_nfsPollInterval);
else
useFreq(e, m_PollInterval);
@@ -904,8 +902,7 @@ void KDirWatchPrivate::addWatch(Entry* e
// are made locally. #177892.
KDirWatch::Method preferredMethod = m_preferredMethod;
if (m_nfsPreferredMethod != m_preferredMethod) {
- KMountPoint::Ptr mountPoint = KMountPoint::currentMountPoints().findByPath(e->path);
- if (mountPoint && mountPoint->probablySlow()) {
+ if (KFileSystemType::fileSystemType(e->path) == KFileSystemType::Nfs) {
preferredMethod = m_nfsPreferredMethod;
}
}
diff -up kdelibs-4.6.5/kdecore/io/kfilesystemtype_p.cpp.kconfig_sync-1 kdelibs-4.6.5/kdecore/io/kfilesystemtype_p.cpp
--- kdelibs-4.6.5/kdecore/io/kfilesystemtype_p.cpp.kconfig_sync-1 2011-10-11 11:04:00.142866875 -0500
+++ kdelibs-4.6.5/kdecore/io/kfilesystemtype_p.cpp 2011-10-11 11:04:00.142866875 -0500
@@ -0,0 +1,115 @@
+/*
+ This file is part of the KDE libraries
+ Copyright (c) 2011 David Faure <faure@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2.1 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "kfilesystemtype_p.h"
+#include <QFile>
+//#include <errno.h>
+
+#ifndef Q_OS_WIN
+inline KFileSystemType::Type kde_typeFromName(const char *name)
+{
+ if (qstrncmp(name, "nfs", 3) == 0
+ || qstrncmp(name, "autofs", 6) == 0
+ || qstrncmp(name, "cachefs", 7) == 0)
+ return KFileSystemType::Nfs;
+ if (qstrncmp(name, "fat", 3) == 0
+ || qstrncmp(name, "vfat", 4) == 0
+ || qstrncmp(name, "msdos", 5) == 0)
+ return KFileSystemType::Fat;
+ return KFileSystemType::Other;
+}
+
+#if defined(Q_OS_BSD4) && !defined(Q_OS_NETBSD)
+# include <sys/param.h>
+# include <sys/mount.h>
+
+KFileSystemType::Type determineFileSystemTypeImpl(const QByteArray& path)
+{
+ struct statfs buf;
+ if (statfs(path.constData(), &buf) != 0)
+ return Unknown;
+ return kde_typeFromName(buf.f_fstypename);
+}
+
+#elif defined(Q_OS_LINUX) || defined(Q_OS_HURD)
+# include <sys/vfs.h>
+# ifdef QT_LINUXBASE
+ // LSB 3.2 has statfs in sys/statfs.h, sys/vfs.h is just an empty dummy header
+# include <sys/statfs.h>
+# endif
+# ifndef NFS_SUPER_MAGIC
+# define NFS_SUPER_MAGIC 0x00006969
+# endif
+# ifndef AUTOFS_SUPER_MAGIC
+# define AUTOFS_SUPER_MAGIC 0x00000187
+# endif
+# ifndef AUTOFSNG_SUPER_MAGIC
+# define AUTOFSNG_SUPER_MAGIC 0x7d92b1a0
+# endif
+# ifndef MSDOS_SUPER_MAGIC
+# define MSDOS_SUPER_MAGIC 0x00004d44
+# endif
+
+KFileSystemType::Type determineFileSystemTypeImpl(const QByteArray& path)
+{
+ struct statfs buf;
+ if (statfs(path.constData(), &buf) != 0) {
+ //kDebug() << path << errno << strerror(errno);
+ return KFileSystemType::Unknown;
+ }
+ switch (buf.f_type) {
+ case NFS_SUPER_MAGIC:
+ case AUTOFS_SUPER_MAGIC:
+ case AUTOFSNG_SUPER_MAGIC:
+ return KFileSystemType::Nfs;
+ case MSDOS_SUPER_MAGIC:
+ return KFileSystemType::Fat;
+ default:
+ return KFileSystemType::Other;
+ }
+}
+
+#elif defined(Q_OS_SOLARIS) || defined(Q_OS_IRIX) || defined(Q_OS_AIX) || defined(Q_OS_HPUX) \
+ || defined(Q_OS_OSF) || defined(Q_OS_QNX) || defined(Q_OS_SCO) \
+ || defined(Q_OS_UNIXWARE) || defined(Q_OS_RELIANT) || defined(Q_OS_NETBSD)
+# include <sys/statvfs.h>
+
+KFileSystemType::Type determineFileSystemTypeImpl(const QByteArray& path)
+{
+ struct statvfs buf;
+ if (statvfs(path.constData(), &buf) != 0)
+ return KFileSystemType::Unknown;
+#if defined(Q_OS_NETBSD)
+ return kde_typeFromName(buf.f_fstypename);
+#else
+ return kde_typeFromName(buf.f_basetype);
+#endif
+}
+#else
+KFileSystemType::Type determineFileSystemTypeImpl(const QByteArray& path)
+{
+ return KFileSystemType::Unknown;
+}
+#endif
+#endif
+
+KFileSystemType::Type KFileSystemType::fileSystemType(const QString& path)
+{
+ return determineFileSystemTypeImpl(QFile::encodeName(path));
+}
diff -up kdelibs-4.6.5/kdecore/io/kfilesystemtype_p.h.kconfig_sync-1 kdelibs-4.6.5/kdecore/io/kfilesystemtype_p.h
--- kdelibs-4.6.5/kdecore/io/kfilesystemtype_p.h.kconfig_sync-1 2011-10-11 11:04:00.142866875 -0500
+++ kdelibs-4.6.5/kdecore/io/kfilesystemtype_p.h 2011-10-11 11:04:00.142866875 -0500
@@ -0,0 +1,38 @@
+/*
+ This file is part of the KDE libraries
+ Copyright (c) 2011 David Faure <faure@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2.1 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef KFILESYSTEMTYPE_P_H
+#define KFILESYSTEMTYPE_P_H
+
+#include <QtCore/QString>
+
+namespace KFileSystemType
+{
+ enum Type {
+ Unknown,
+ Nfs, // NFS or similar (autofs, subfs, cachefs)
+ Fat, // FAT or similar (msdos, fat, vfat)
+ Other // ext, reiser, and so on. "Normal" filesystems.
+ };
+
+ Type fileSystemType(const QString& path);
+
+};
+
+#endif

View File

@ -0,0 +1,498 @@
commit 63b8ad8b7c6cc9845f11e5fbacf1a8cc9c977859
Author: David Faure <faure@kde.org>
Date: Sat Aug 6 14:53:36 2011 +0200
Implement locking on non-NFS systems using O_EXCL
Fixes locking on VFAT and CIFS etc.
The unit-test only tests local files automatically, but explains
how to set up test environments to test it on a FAT filesystem and on a NFS mount.
BUG: 203554
(cherry picked from commit 10ca4ddc8cca49103c2d605a64468788605f3010)
diff --git a/kdecore/io/klockfile_unix.cpp b/kdecore/io/klockfile_unix.cpp
index cd909cf..fa2eda4 100644
--- a/kdecore/io/klockfile_unix.cpp
+++ b/kdecore/io/klockfile_unix.cpp
@@ -1,6 +1,7 @@
/*
This file is part of the KDE libraries
Copyright (c) 2004 Waldo Bastian <bastian@kde.org>
+ Copyright (c) 2011 David Faure <faure@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -35,48 +36,85 @@
#include <QtCore/QDate>
#include <QtCore/QFile>
-#include <QtCore/QTextIStream>
+#include <QTextStream>
#include "krandom.h"
#include "kglobal.h"
#include "kcomponentdata.h"
#include "ktemporaryfile.h"
#include "kde_file.h"
+#include "kfilesystemtype_p.h"
-// TODO: http://www.spinnaker.de/linux/nfs-locking.html
+#include <unistd.h>
+#include <fcntl.h>
+
+// Related reading:
+// http://www.spinnaker.de/linux/nfs-locking.html
+// http://en.wikipedia.org/wiki/File_locking
+// http://apenwarr.ca/log/?m=201012
+
+// Related source code:
+// * lockfile-create, from the lockfile-progs package, uses the link() trick from lockFileWithLink
+// below, so it works over NFS but fails on FAT32 too.
+// * the flock program, which uses flock(LOCK_EX), works on local filesystems (including FAT32),
+// but not NFS.
+// Note about flock: don't unlink, it creates a race. http://world.std.com/~swmcd/steven/tech/flock.html
+
+// fcntl(F_SETLK) is not a good solution.
+// It locks other processes but locking out other threads must be done by hand,
+// and worse, it unlocks when just reading the file in the same process (!).
+// See the apenwarr.ca article above.
+
+// open(O_EXCL) seems to be the best solution for local files (on all filesystems),
+// it only fails over NFS (at least with old NFS servers).
+// See http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=144
+
+// Conclusion: we use O_EXCL by default, and the link() trick over NFS.
class KLockFile::Private
{
public:
Private(const KComponentData &c)
- : componentData(c)
+ : staleTime(30), // 30 seconds
+ isLocked(false),
+ linkCountSupport(true),
+ m_pid(-1),
+ m_componentData(c)
{
}
- QString file;
+ // The main method
+ KLockFile::LockResult lockFile(KDE_struct_stat &st_buf);
+
+ // Two different implementations
+ KLockFile::LockResult lockFileOExcl(KDE_struct_stat &st_buf);
+ KLockFile::LockResult lockFileWithLink(KDE_struct_stat &st_buf);
+
+ KLockFile::LockResult deleteStaleLock();
+ KLockFile::LockResult deleteStaleLockWithLink();
+
+ void writeIntoLockFile(QFile& file, const KComponentData& componentData);
+ void readLockFile();
+ bool isNfs() const;
+
+ QFile m_file;
+ QString m_fileName;
int staleTime;
bool isLocked;
- bool recoverLock;
bool linkCountSupport;
QTime staleTimer;
KDE_struct_stat statBuf;
- int pid;
- QString hostname;
- QString instance;
- QString lockRecoverFile;
- KComponentData componentData;
+ int m_pid;
+ QString m_hostname;
+ QString m_componentName;
+ KComponentData m_componentData;
};
-// 30 seconds
KLockFile::KLockFile(const QString &file, const KComponentData &componentData)
: d(new Private(componentData))
{
- d->file = file;
- d->staleTime = 30;
- d->isLocked = false;
- d->recoverLock = false;
- d->linkCountSupport = true;
+ d->m_fileName = file;
}
KLockFile::~KLockFile()
@@ -125,31 +163,59 @@ static bool testLinkCountSupport(const QByteArray &fileName)
return (result < 0 || ((result == 0) && (st_buf.st_nlink == 2)));
}
-static KLockFile::LockResult lockFile(const QString &lockFile, KDE_struct_stat &st_buf,
- bool &linkCountSupport, const KComponentData &componentData)
+void KLockFile::Private::writeIntoLockFile(QFile& file, const KComponentData& componentData)
{
- QByteArray lockFileName = QFile::encodeName( lockFile );
- int result = KDE_lstat( lockFileName, &st_buf );
- if (result == 0)
- return KLockFile::LockFail;
-
- KTemporaryFile uniqueFile(componentData);
- uniqueFile.setFileTemplate(lockFile);
- if (!uniqueFile.open())
- return KLockFile::LockError;
- uniqueFile.setPermissions(QFile::ReadUser|QFile::WriteUser|QFile::ReadGroup|QFile::ReadOther);
+ file.setPermissions(QFile::ReadUser|QFile::WriteUser|QFile::ReadGroup|QFile::ReadOther);
char hostname[256];
hostname[0] = 0;
gethostname(hostname, 255);
hostname[255] = 0;
- QString componentName = componentData.componentName();
+ m_hostname = QString::fromLocal8Bit(hostname);
+ m_componentName = componentData.componentName();
+
+ QTextStream stream(&file);
+ m_pid = getpid();
- QTextStream stream(&uniqueFile);
- stream << QString::number(getpid()) << endl
- << componentName << endl
- << hostname << endl;
+ stream << QString::number(m_pid) << endl
+ << m_componentName << endl
+ << m_hostname << endl;
stream.flush();
+}
+
+void KLockFile::Private::readLockFile()
+{
+ m_pid = -1;
+ m_hostname.clear();
+ m_componentName.clear();
+
+ QFile file(m_fileName);
+ if (file.open(QIODevice::ReadOnly))
+ {
+ QTextStream ts(&file);
+ if (!ts.atEnd())
+ m_pid = ts.readLine().toInt();
+ if (!ts.atEnd())
+ m_componentName = ts.readLine();
+ if (!ts.atEnd())
+ m_hostname = ts.readLine();
+ }
+}
+
+KLockFile::LockResult KLockFile::Private::lockFileWithLink(KDE_struct_stat &st_buf)
+{
+ const QByteArray lockFileName = QFile::encodeName( m_fileName );
+ int result = KDE_lstat( lockFileName, &st_buf );
+ if (result == 0) {
+ return KLockFile::LockFail;
+ }
+
+ KTemporaryFile uniqueFile(m_componentData);
+ uniqueFile.setFileTemplate(m_fileName);
+ if (!uniqueFile.open())
+ return KLockFile::LockError;
+
+ writeIntoLockFile(uniqueFile, m_componentData);
QByteArray uniqueName = QFile::encodeName( uniqueFile.fileName() );
@@ -187,20 +253,74 @@ static KLockFile::LockResult lockFile(const QString &lockFile, KDE_struct_stat &
return KLockFile::LockOK;
}
-static KLockFile::LockResult deleteStaleLock(const QString &lockFile, KDE_struct_stat &st_buf, bool &linkCountSupport, const KComponentData &componentData)
+bool KLockFile::Private::isNfs() const
+{
+ const KFileSystemType::Type fsType = KFileSystemType::fileSystemType(m_fileName);
+ return fsType == KFileSystemType::Nfs;
+}
+
+KLockFile::LockResult KLockFile::Private::lockFile(KDE_struct_stat &st_buf)
+{
+ if (isNfs()) {
+ return lockFileWithLink(st_buf);
+ }
+
+ return lockFileOExcl(st_buf);
+}
+
+KLockFile::LockResult KLockFile::Private::lockFileOExcl(KDE_struct_stat &st_buf)
{
- // This is dangerous, we could be deleting a new lock instead of
- // the old stale one, let's be very careful
+ const QByteArray lockFileName = QFile::encodeName( m_fileName );
+
+ int fd = KDE_open(lockFileName.constData(), O_WRONLY | O_CREAT | O_EXCL, 0644);
+ if (fd < 0) {
+ if (errno == EEXIST) {
+ // File already exists
+ return LockFail;
+ } else {
+ return LockError;
+ }
+ }
+ // We hold the lock, continue.
+ if (!m_file.open(fd, QIODevice::WriteOnly)) {
+ return LockError;
+ }
+ writeIntoLockFile(m_file, m_componentData);
+ const int result = KDE_lstat(QFile::encodeName(m_fileName), &st_buf);
+ if (result != 0)
+ return KLockFile::LockError;
+ return KLockFile::LockOK;
+}
- // Create temp file
- KTemporaryFile *ktmpFile = new KTemporaryFile(componentData);
- ktmpFile->setFileTemplate(lockFile);
- if (!ktmpFile->open())
- return KLockFile::LockError;
+KLockFile::LockResult KLockFile::Private::deleteStaleLock()
+{
+ if (isNfs())
+ return deleteStaleLockWithLink();
+
+ // I see no way to prevent the race condition here, where we could
+ // delete a new lock file that another process just got after we
+ // decided the old one was too stale for us too.
+ qWarning("WARNING: deleting stale lockfile %s", qPrintable(m_fileName));
+ QFile::remove(m_fileName);
+ return LockOK;
+}
- QByteArray lckFile = QFile::encodeName(lockFile);
- QByteArray tmpFile = QFile::encodeName(ktmpFile->fileName());
- delete ktmpFile;
+KLockFile::LockResult KLockFile::Private::deleteStaleLockWithLink()
+{
+ // This is dangerous, we could be deleting a new lock instead of
+ // the old stale one, let's be very careful
+
+ // Create temp file
+ KTemporaryFile *ktmpFile = new KTemporaryFile(m_componentData);
+ ktmpFile->setFileTemplate(m_fileName);
+ if (!ktmpFile->open()) {
+ delete ktmpFile;
+ return KLockFile::LockError;
+ }
+
+ const QByteArray lckFile = QFile::encodeName(m_fileName);
+ const QByteArray tmpFile = QFile::encodeName(ktmpFile->fileName());
+ delete ktmpFile;
// link to lock file
if (::link(lckFile, tmpFile) != 0)
@@ -210,7 +330,7 @@ static KLockFile::LockResult deleteStaleLock(const QString &lockFile, KDE_struct
// and if the lock file still matches
KDE_struct_stat st_buf1;
KDE_struct_stat st_buf2;
- memcpy(&st_buf1, &st_buf, sizeof(KDE_struct_stat));
+ memcpy(&st_buf1, &statBuf, sizeof(KDE_struct_stat));
st_buf1.st_nlink++;
if ((KDE_lstat(tmpFile, &st_buf2) == 0) && st_buf1 == st_buf2)
{
@@ -260,8 +380,10 @@ KLockFile::LockResult KLockFile::lock(LockFlags options)
int n = 5;
while(true)
{
- KDE_struct_stat st_buf;
- result = lockFile(d->file, st_buf, d->linkCountSupport, d->componentData);
+ KDE_struct_stat st_buf;
+ // Try to create the lock file
+ result = d->lockFile(st_buf);
+
if (result == KLockFile::LockOK)
{
d->staleTimer = QTime();
@@ -285,25 +407,11 @@ KLockFile::LockResult KLockFile::lock(LockFlags options)
memcpy(&(d->statBuf), &st_buf, sizeof(KDE_struct_stat));
d->staleTimer.start();
- d->pid = -1;
- d->hostname.clear();
- d->instance.clear();
-
- QFile file(d->file);
- if (file.open(QIODevice::ReadOnly))
- {
- QTextStream ts(&file);
- if (!ts.atEnd())
- d->pid = ts.readLine().toInt();
- if (!ts.atEnd())
- d->instance = ts.readLine();
- if (!ts.atEnd())
- d->hostname = ts.readLine();
- }
+ d->readLockFile();
}
bool isStale = false;
- if ((d->pid > 0) && !d->hostname.isEmpty())
+ if ((d->m_pid > 0) && !d->m_hostname.isEmpty())
{
// Check if hostname is us
char hostname[256];
@@ -311,12 +419,12 @@ KLockFile::LockResult KLockFile::lock(LockFlags options)
gethostname(hostname, 255);
hostname[255] = 0;
- if (d->hostname == QLatin1String(hostname))
+ if (d->m_hostname == QLatin1String(hostname))
{
// Check if pid still exists
- int res = ::kill(d->pid, 0);
+ int res = ::kill(d->m_pid, 0);
if ((res == -1) && (errno == ESRCH))
- isStale = true;
+ isStale = true; // pid does not exist
}
}
if (d->staleTimer.elapsed() > (d->staleTime*1000))
@@ -327,7 +435,7 @@ KLockFile::LockResult KLockFile::lock(LockFlags options)
if ((options & ForceFlag) == 0)
return KLockFile::LockStale;
- result = deleteStaleLock(d->file, d->statBuf, d->linkCountSupport, d->componentData);
+ result = d->deleteStaleLock();
if (result == KLockFile::LockOK)
{
@@ -367,17 +475,19 @@ void KLockFile::unlock()
{
if (d->isLocked)
{
- ::unlink(QFile::encodeName(d->file));
+ ::unlink(QFile::encodeName(d->m_fileName));
+ d->m_file.close();
+ d->m_pid = -1;
d->isLocked = false;
}
}
bool KLockFile::getLockInfo(int &pid, QString &hostname, QString &appname)
{
- if (d->pid == -1)
+ if (d->m_pid == -1)
return false;
- pid = d->pid;
- hostname = d->hostname;
- appname = d->instance;
+ pid = d->m_pid;
+ hostname = d->m_hostname;
+ appname = d->m_componentName;
return true;
}
diff --git a/kdecore/tests/CMakeLists.txt b/kdecore/tests/CMakeLists.txt
index 7c3db77..9173746 100644
--- a/kdecore/tests/CMakeLists.txt
+++ b/kdecore/tests/CMakeLists.txt
@@ -97,6 +97,7 @@ KDECORE_EXECUTABLE_TESTS(
dbuscalltest
kmdcodectest
startserviceby
+ klockfile_testlock # helper for klockfiletest
)
########### klocaletest ###############
diff --git a/kdecore/tests/klockfiletest.cpp b/kdecore/tests/klockfiletest.cpp
index 32cdec9..f2c6f91 100644
--- a/kdecore/tests/klockfiletest.cpp
+++ b/kdecore/tests/klockfiletest.cpp
@@ -19,8 +19,12 @@
#include "klockfiletest.h"
#include "klockfiletest.moc"
+#include <kdebug.h>
#include <unistd.h>
+// TODO test locking from two different threads
+//#include <qtconcurrentrun.h>
+
namespace QTest {
template<>
char* toString(const KLockFile::LockResult& result)
@@ -32,6 +36,26 @@ char* toString(const KLockFile::LockResult& result)
}
}
+// Here's how to test file locking on a FAT filesystem, on linux:
+// cd /tmp
+// dd if=/dev/zero of=fatfile count=180000
+// mkfs.vfat -F32 fatfile
+// mkdir -p fatsystem
+// sudo mount -o loop -o uid=$UID fatfile fatsystem
+//
+// static const char *const lockName = "/tmp/fatsystem/klockfiletest.lock";
+//
+// =====================================================================
+//
+// And here's how to test file locking over NFS, on linux:
+// In /etc/exports: /tmp/nfs localhost(rw,sync,no_subtree_check)
+// sudo mount -t nfs localhost:/tmp/nfs /tmp/nfs-mount
+//
+// static const char *const lockName = "/tmp/nfs-mount/klockfiletest.lock";
+//
+// =====================================================================
+//
+
static const char *const lockName = "klockfiletest.lock";
void
@@ -41,19 +65,28 @@ Test_KLockFile::initTestCase()
lockFile = new KLockFile(QLatin1String(lockName));
}
+static KLockFile::LockResult testLockFromProcess(const QString& lockName)
+{
+ const int ret = QProcess::execute("./klockfile_testlock", QStringList() << lockName);
+ return KLockFile::LockResult(ret);
+}
+
void
Test_KLockFile::testLock()
{
QVERIFY(!lockFile->isLocked());
QCOMPARE(lockFile->lock(), KLockFile::LockOK);
QVERIFY(lockFile->isLocked());
-#ifdef Q_WS_WIN
+
+ // Try to lock it again, should fail
KLockFile *lockFile2 = new KLockFile(QLatin1String(lockName));
QVERIFY(!lockFile2->isLocked());
- QCOMPARE(lockFile2->lock(), KLockFile::LockFail);
+ QCOMPARE(lockFile2->lock(KLockFile::NoBlockFlag), KLockFile::LockFail);
QVERIFY(!lockFile2->isLocked());
delete lockFile2;
-#endif
+
+ // Also try from a different process.
+ QCOMPARE(testLockFromProcess(QLatin1String(lockName)), KLockFile::LockFail);
}
void
@@ -102,7 +135,7 @@ Test_KLockFile::testStaleNoBlockFlag()
#else
char hostname[256];
::gethostname(hostname, sizeof(hostname));
-
+
QFile f(lockName);
f.open(QIODevice::WriteOnly);
QTextStream stream(&f);
@@ -113,7 +146,8 @@ Test_KLockFile::testStaleNoBlockFlag()
lockFile = new KLockFile(QLatin1String(lockName));
QVERIFY(!lockFile->isLocked());
QCOMPARE(lockFile->lock(KLockFile::NoBlockFlag), KLockFile::LockStale);
- QTest::ignoreMessage(QtWarningMsg, "WARNING: deleting stale lockfile klockfiletest.lock");
+ QByteArray expectedMsg = QByteArray("WARNING: deleting stale lockfile ") + lockName;
+ QTest::ignoreMessage(QtWarningMsg, expectedMsg);
QCOMPARE(lockFile->lock(KLockFile::NoBlockFlag|KLockFile::ForceFlag), KLockFile::LockOK);
QVERIFY(lockFile->isLocked());

View File

@ -0,0 +1,54 @@
commit f529824eae4f44bef19913bc0f2c19077f1d3935
Author: David Faure <faure@kde.org>
Date: Sun Aug 7 09:52:39 2011 +0200
Add missing file, sorry.
diff --git a/kdecore/tests/klockfile_testlock.cpp b/kdecore/tests/klockfile_testlock.cpp
new file mode 100644
index 0000000..525228f
--- /dev/null
+++ b/kdecore/tests/klockfile_testlock.cpp
@@ -0,0 +1,42 @@
+/* This file is part of the KDE libraries
+ Copyright (c) 2011 David Faure <faure@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kcomponentdata.h>
+#include <kcmdlineargs.h>
+#include <kaboutdata.h>
+#include <klockfile.h>
+#include <kdebug.h>
+
+int main(int argc, char *argv[])
+{
+ KAboutData about("klockfile_testlock", 0, ki18n("klockfile_testlock"), "version");
+ KComponentData cData(&about);
+
+ if (argc <= 1) {
+ return KLockFile::LockError;
+ }
+
+ const QString lockName = QString::fromLocal8Bit(argv[1]);
+
+ KLockFile lockFile(lockName);
+ if (lockFile.isLocked()) {
+ return KLockFile::LockError;
+ }
+ return lockFile.lock(KLockFile::NoBlockFlag);
+}

View File

@ -0,0 +1,56 @@
--- kdelibs/khtml/rendering/render_form.cpp
+++ kdelibs/khtml/rendering/render_form.cpp
@@ -1012,11 +1012,11 @@
// -----------------------------------------------------------------------------
RenderLineEdit::RenderLineEdit(HTMLInputElementImpl *element)
- : RenderFormElement(element)
+ : RenderFormElement(element), m_blockElementUpdates(false)
{
LineEditWidget *edit = new LineEditWidget(element, view(), view()->widget());
connect(edit,SIGNAL(returnPressed()), this, SLOT(slotReturnPressed()));
- connect(edit,SIGNAL(textEdited(QString)),this,SLOT(slotTextEdited(QString)));
+ connect(edit,SIGNAL(textChanged(QString)),this,SLOT(slotTextChanged(QString)));
if(element->inputType() == HTMLInputElementImpl::PASSWORD)
edit->setEchoMode( QLineEdit::Password );
@@ -1142,17 +1142,21 @@
}
if (element()->value().string() != widget()->text()) {
+ m_blockElementUpdates = true;
int pos = widget()->cursorPosition();
widget()->setText(element()->value().string());
widget()->setCursorPosition(pos);
+ m_blockElementUpdates = false;
}
widget()->setReadOnly(element()->readOnly());
RenderFormElement::updateFromElement();
}
-void RenderLineEdit::slotTextEdited(const QString &string)
+void RenderLineEdit::slotTextChanged(const QString &string)
{
+ if (m_blockElementUpdates) return;
+
// don't use setValue here!
element()->m_value = string;
element()->m_unsubmittedFormChange = true;
--- kdelibs/khtml/rendering/render_form.h
+++ kdelibs/khtml/rendering/render_form.h
@@ -282,12 +282,13 @@
void setSelectionRange(long start, long end);
public Q_SLOTS:
void slotReturnPressed();
- void slotTextEdited(const QString &string);
+ void slotTextChanged(const QString &string);
protected:
private:
virtual bool isEditable() const { return true; }
virtual bool canHaveBorder() const { return true; }
+ bool m_blockElementUpdates;
};
// -------------------------------------------------------------------------

View File

@ -0,0 +1,50 @@
commit 865e5fa4108bb3f470b9424ec34dc573d97e2473
Author: David Faure <faure@kde.org>
Date: Wed Aug 24 10:29:09 2011 +0200
Fix fd leak in KLockFile
Didn't expect that after open(fd), QFile::close doesn't close the fd :)
diff --git a/kdecore/io/klockfile_unix.cpp b/kdecore/io/klockfile_unix.cpp
index fa2eda4..93e92e2 100644
--- a/kdecore/io/klockfile_unix.cpp
+++ b/kdecore/io/klockfile_unix.cpp
@@ -78,6 +78,7 @@ public:
: staleTime(30), // 30 seconds
isLocked(false),
linkCountSupport(true),
+ mustCloseFd(false),
m_pid(-1),
m_componentData(c)
{
@@ -102,6 +103,7 @@ public:
int staleTime;
bool isLocked;
bool linkCountSupport;
+ bool mustCloseFd;
QTime staleTimer;
KDE_struct_stat statBuf;
int m_pid;
@@ -285,7 +287,10 @@ KLockFile::LockResult KLockFile::Private::lockFileOExcl(KDE_struct_stat &st_buf)
if (!m_file.open(fd, QIODevice::WriteOnly)) {
return LockError;
}
+ mustCloseFd = true;
writeIntoLockFile(m_file, m_componentData);
+
+ // stat to get the modification time
const int result = KDE_lstat(QFile::encodeName(m_fileName), &st_buf);
if (result != 0)
return KLockFile::LockError;
@@ -476,6 +481,10 @@ void KLockFile::unlock()
if (d->isLocked)
{
::unlink(QFile::encodeName(d->m_fileName));
+ if (d->mustCloseFd) {
+ close(d->m_file.handle());
+ d->mustCloseFd = false;
+ }
d->m_file.close();
d->m_pid = -1;
d->isLocked = false;

View File

@ -1,22 +1,26 @@
%define attica_ver 0.2.0
%define dbusmenu_qt_ver 0.5.2
# need either >= 1.76 or <= 1.75 , mixing means broken kdoctools
%define docbook_style_xsl_ver 1.76
%define phonon_ver 4.4.4
%define qt4_ver 4.7.0
%define soprano_ver 2.6.0
%define strigi_ver 0.7.2
# to build/include apidocs or not
%define apidocs 1
# to build/include QCH apidocs or not (currently broken)
#define apidocs_qch 1
%if 0%{?fedora} > 13
%define halectomy 1
%endif
%global dbusmenu_qt_version %(pkg-config --modversion dbusmenu-qt 2>/dev/null || echo %{dbusmenu_qt_ver})
%global phonon_version %(pkg-config --modversion phonon 2>/dev/null || echo %{phonon_ver})
%global soprano_version %(pkg-config --modversion soprano 2>/dev/null || echo %{soprano_ver})
%global strigi_version %(pkg-config --modversion libstreams 2>/dev/null || echo %{strigi_ver})
Summary: KDE Libraries
Version: 4.6.3
Release: 5%{?dist}
Version: 4.6.5
Release: 10%{?dist}
Name: kdelibs
Epoch: 6
@ -33,11 +37,12 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: kde4-macros(api) >= 2
BuildRequires: kde-filesystem >= 4-23
BuildRequires: docbook-dtds docbook-style-xsl
BuildRequires: docbook-dtds
BuildRequires: docbook-style-xsl >= %{docbook_style_xsl_ver}
Requires: ca-certificates
%global dbusmenu_qt_version %(pkg-config --modversion dbusmenu-qt 2>/dev/null || echo %{dbusmenu_qt_ver})
Requires: dbusmenu-qt%{?_isa} >= %{dbusmenu_qt_version}
Requires: docbook-dtds docbook-style-xsl
Requires: docbook-dtds
Requires: docbook-style-xsl >= %{docbook_style_xsl_ver}
Requires: hicolor-icon-theme
Requires: kde-filesystem >= 4-23
Requires: kde-settings
@ -48,38 +53,42 @@ Requires: hunspell
# beware of possible bootstrapping problems -- Rex
# reverted %%{version} => 4.6.2 due to some (hopefully temporary) regressions seen in 4.6.3 -- Rex
Requires: oxygen-icon-theme >= 4.6.2
%global phonon_version %(pkg-config --modversion phonon 2>/dev/null || echo %{phonon_ver})
Requires: phonon%{?_isa} >= %{phonon_version}
Requires: shared-desktop-ontologies >= 0.4
Requires: shared-mime-info
%global soprano_version %(pkg-config --modversion soprano 2>/dev/null || echo %{soprano_ver})
Requires: soprano%{?_isa} >= %{soprano_version}
%global strigi_version %(pkg-config --modversion libstreams 2>/dev/null || echo %{strigi_ver})
Requires: strigi-libs%{?_isa} >= %{strigi_version}
# make kdelibs-devel parallel-installable with kdelibs3-devel
Patch0: kdelibs-4.5.80-parallel_devel.patch
# fix kde#149705
Patch2: kdelibs-4.2.85-kde149705.patch
# install all .css files and Doxyfile.global in kdelibs-common to build
# kdepimlibs-apidocs against
Patch8: kdelibs-4.3.90-install_all_css.patch
# add Fedora/V-R to KHTML UA string
Patch9: kdelibs-4.5.80-branding.patch
# don't cache kdeglobals paths because they change after profile directories
# are loaded from kde4rc
Patch10: kdelibs-4.1.72-no-cache-kdeglobals-paths.patch
# adds the Administration menu from redhat-menus which equals System + Settings
# This prevents the stuff getting listed twice, under both System and Settings.
Patch12: kdelibs-4.1.0-xdg-menu.patch
# patch KStandardDirs to use %{_libexecdir}/kde4 instead of %{_libdir}/kde4/libexec
Patch14: kdelibs-4.5.80-libexecdir.patch
# kstandarddirs changes: search /etc/kde, find %{_kde4_libexecdir}
Patch18: kdelibs-4.5.80-kstandarddirs.patch
# COMMENT ME PLEASE
# set build type
Patch20: kdelibs-4.1.70-cmake.patch
# disable drkonqi by default, RHEL prefers/wants abrt
Patch24: kdelibs-4.3.1-drkonq.patch
# die rpath die, since we're using standard paths, we can avoid
# this extra hassle (even though cmake is *supposed* to not add standard
# paths (like /usr/lib64) already! With this, we can drop
@ -91,28 +100,47 @@ Patch27: kdelibs-4.5.80-no_rpath.patch
# reverting to our past gnupg2-only setup.
# TODO: try to use either gpg or gpg2, whichever is available
Patch50: kdelibs-4.5.1-knewstuff_gpg2.patch
# https://bugs.kde.org/show_bug.cgi?id=269045
# https://git.reviewboard.kde.org/r/101231/
Patch51: kdelibs-4.6.2-uri_mimetypes.patch
## upstream
# https://projects.kde.org/projects/kde/kdelibs/repository/revisions/a8d16682c31ef523ffebba6e19283a19cd5f5627/diff
Patch100: kdelibs-4.6.3-kde258706.patch
# https://projects.kde.org/projects/kde/kdelibs/repository/revisions/92db24adfa941003db1d885df01157056617f30b/diff
Patch101: kdelibs-4.6.3-kio-double-requests-kde#272466.patch
# Fix for KHTML form completion regression (kde#277457) from bugs.kde.org
# attachment (patch by Andrea Iacovitti)
# https://bugs.kde.org/show_bug.cgi?id=277457#c2
Patch52: kdelibs-4.6.5-khtml-kde#277457.patch
## 4.6 upstream
# fix docbook-style-xsl borkage
Patch101: kdelibs-4.6.4-kdoctools_docbook.patch
# http://bugzilla.redhat.com/667787
# http://bugs.kde.org/261180
Patch102: kdelibs-4.6.4-kstatusnotifieritemdbus_leak.patch
# KConfig fails to sync on VFAT, CIFS, and EncFS (on top of Ext4) file systems
# bugs.kde.org/203554
Patch103: kdelibs-4.6.5-kconfig_sync-1.patch
Patch104: kdelibs-4.6.5-kconfig_sync-2.patch
Patch105: kdelibs-4.6.5-kconfig_sync-3.patch
## 4.7 upstream
# https://projects.kde.org/projects/kde/kdelibs/repository/revisions/865e5fa4108bb3f470b9424ec34dc573d97e2473
Patch150: kdelibs-fix_fd_leak_in_klockfile.patch
## security fix
# Not Upstreamed? why not ? -- Rex
Patch200: kdelibs-4.3.1-CVE-2009-2702.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=743056
Patch201: kdelibs-4.6.5-CVE-2011-3365-kio.patch
Patch202: kdelibs-4.6.5-CVE-2011-3365-kssl.patch
# CVE-2010-0046, The Cascading Style Sheets (CSS) implementation in khtml/WebKit
# allows remote attackers to execute arbitrary code or cause a denial of service
# (memory corruption and application crash) via crafted format arguments.
Patch203: kdelibs-4.6.5-CVE-2010-0046.patch
## Fedora specific patches
# make forcefully hal-free build
Patch300: kdelibs-4.5.90-halectomy.patch
%if 0%{?fedora} && 0%{?fedora} < 13
Conflicts: kdebase-workspace-libs < 4.3.80
%endif
Patch300: kdelibs-4.6.5-halectomy.patch
# force upgrade of apps using the discontinued KatePart Smart* interfaces to
# versions using the new Moving* interfaces instead
@ -184,6 +212,8 @@ BuildRequires: graphviz
BuildRequires: qt4-doc
%endif
Provides: kate-part = %{version}-%{release}
%{?_isa:Provides: kate-part%{?_isa} = %{version}-%{release}}
Provides: kross(javascript) = %{version}-%{release}
Provides: kross(qtscript) = %{version}-%{release}
@ -276,26 +306,31 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage
%patch14 -p1 -b .libexecdir
%patch18 -p1 -b .kstandarddirs
%patch20 -p1 -b .xxcmake
%if 0%{?rhel} > 5
%patch24 -p1 -b .drkonq
%endif
%patch27 -p1 -b .no_rpath
# upstreamable patches
%patch50 -p1 -b .knewstuff_gpg2
%patch51 -p1 -b .uri_mimetypes
%patch52 -p1 -b .khtml-kde#277457
# upstream patches
%patch100 -p1 -b .kde258706
%patch101 -p1 -b .kde272466
# 4.6 upstream patches
%patch101 -p1 -b .kdoctools_docbook
%patch102 -p1 -b .kstatusnotifieritemdbus_leak
%patch103 -p1 -b .kconfig_sync-1
%patch104 -p1 -b .kconfig_sync-2
%patch105 -p1 -b .kconfig_sync-3
# 4.7 backported patches
%patch150 -p1 -b .fix_leak_in_klockfile
# security fix
%patch200 -p1 -b .CVE-2009-2702
%patch201 -p1 -b .CVE-2011-3365-kio
%patch202 -p1 -b .CVE-2011-3365-kssl
%patch203 -p1 -b .CVE-2010-0046
# Fedora patches
%if 0%{?halectomy}
%patch300 -p0 -b .halectomy
%endif
%patch300 -p1 -b .halectomy
%build
@ -332,7 +367,7 @@ mv %{buildroot}%{_kde4_sysconfdir}/xdg/menus/applications.menu \
# create/own stuff
# see http://bugzilla.redhat.com/483318
mkdir -p %{buildroot}%{_kde4_libdir}/kconf_update_bin
%if 0%{?fedora} < 15
%if 0%{?fedora} && 0%{?fedora} < 15
# moved to kde-filesystem f15+
mkdir -p %{buildroot}%{_kde4_libdir}/kde4/plugins/{gui_platform,styles}
%endif
@ -543,6 +578,55 @@ rm -rf %{buildroot}
%changelog
* Fri Nov 18 2011 Rex Dieter <rdieter@fedoraproject.org> 4.6.5-10
- CVE-2010-0046, security issue in khtml
* Wed Nov 16 2011 Rex Dieter <rdieter@fedoraproject.org> 4.6.5-9
- restore halectomy patch (sans fstab-removing pieces)
* Mon Nov 14 2011 Rex Dieter <rdieter@fedoraproject.org> 4.6.5-8
- solid hardware does not detect NFS drives, related to halectomy (#751879)
- Fix fd leak in KLockFile (#753709)
* Tue Oct 11 2011 Rex Dieter <rdieter@fedoraproject.org> 4.6.5-7
- KConfig fails to sync on VFAT, CIFS, and EncFS (#730721,kde#203554)
* Tue Oct 11 2011 Rex Dieter <rdieter@fedoraproject.org> 4.6.5-6
- CVE-2011-3365 kdelibs: input validation failure in KSSL (#743056)
* Sat Oct 08 2011 Rex Dieter <rdieter@fedoraproject.org> 4.6.5-5
- Provides: kate-part
* Tue Aug 30 2011 Than Ngo <than@redhat.com> - 4.6.5-4
- clean fedora conditional
* Fri Aug 26 2011 Than Ngo <than@redhat.com> - 4.6.5-3
- drop kdelibs-4.3.1-drkonq.patch which is merged in upstream
* Mon Jul 25 2011 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.6.5-2
- fix KHTML form completion regression (kde#277457, patch by Andrea Iacovitti)
* Fri Jul 01 2011 Rex Dieter <rdieter@fedoraproject.org> 4.6.5-1
- 4.6.5
* Thu Jun 30 2011 Rex Dieter <rdieter@fedoraproject.org> 4.6.4-6
- better (upstream) fix for kstatusnotifieritemdbus leak (#667787, kde#261180)
* Mon Jun 27 2011 Rex Dieter <rdieter@fedoraproject.org> 4.6.4-5
- (Build)Requires: docbook-style-xsl >= 1.76
* Mon Jun 27 2011 Rex Dieter <rdieter@fedoraproject.org> 4.6.4-4
- upstream kdoctools/docbook patch (#690124)
* Thu Jun 16 2011 Rex Dieter <rdieter@fedoraproject.org> 4.6.4-3
- fix KConfigXT KComboBox for Qt 4.8 TP1 (upstream patch)
* Tue Jun 14 2011 Rex Dieter <rdieter@fedoraproject.org> 4.6.4-2
- KStatusNotifierItem leaks D-Bus connections (#667787, kde#261180)
* Mon Jun 06 2011 Than Ngo <than@redhat.com> - 4.6.4-1
- 4.6.4
* Tue May 24 2011 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.6.3-5
- fix kio regression causing requests submitted twice (#707146, kde#272466)

View File

@ -1 +1 @@
923a7e8f89aa504647e14472b24b8c0a kdelibs-4.6.3.tar.bz2
8ca933c00bb5089e0793756e69bd1275 kdelibs-4.6.5.tar.bz2