rpms/kdelibs/F-12 kdelibs-4.3.3-adFilteredBy.patch, NONE, 1.1 kdelibs-4.3.3-fix-kdefakes-build.patch, NONE, 1.1 .cvsignore, 1.80, 1.81 kdelibs.spec, 1.524, 1.525 sources, 1.96, 1.97 kdelibs-4.3.2-kde#1033984.patch, 1.1, NONE kdelibs-4.3.2-kde#207173.patch, 1.1, NONE kdelibs-4.3.2-kde#209712.patch, 1.1, NONE

Lukas Tinkl ltinkl at fedoraproject.org
Tue Nov 10 15:10:12 UTC 2009


Author: ltinkl

Update of /cvs/extras/rpms/kdelibs/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27124

Modified Files:
	.cvsignore kdelibs.spec sources 
Added Files:
	kdelibs-4.3.3-adFilteredBy.patch 
	kdelibs-4.3.3-fix-kdefakes-build.patch 
Removed Files:
	kdelibs-4.3.2-kde#1033984.patch kdelibs-4.3.2-kde#207173.patch 
	kdelibs-4.3.2-kde#209712.patch 
Log Message:
KDE 4.3.3


kdelibs-4.3.3-adFilteredBy.patch:
 khtml_filter.cpp   |   30 +++++++++++++++++++++++++++++-
 khtml_filter_p.h   |   10 ++++++----
 khtml_settings.cpp |   21 +++++++++++++++++++++
 khtml_settings.h   |   16 ++++++++++++++++
 4 files changed, 72 insertions(+), 5 deletions(-)

--- NEW FILE kdelibs-4.3.3-adFilteredBy.patch ---
Index: khtml/khtml_settings.h
===================================================================
--- khtml/khtml_settings.h	(revision 1027233)
+++ khtml/khtml_settings.h	(revision 1027234)
@@ -186,7 +186,23 @@
     bool isPluginsEnabled( const QString& hostname = QString() ) const;
 
     // AdBlocK Filtering
+
+    /** tests whether @p url is filtered.
+     * @param url the URL to test.
+     * @return @c true if the URL is blacklisted and is not whitelisted.
+     */
     bool isAdFiltered( const QString &url ) const;
+
+    /** identify the filter which matches @p url.
+     * @param url the URL to test.
+     * @param isWhiteListed if not @c NULL, set to @c true if the URL matched
+     * a whitelist filter; set to @c false if it matched a blacklist filter.
+     * @return the filter string that matched,
+     * or @c QString() if no filter matched.
+     * @since 4.4
+    */
+    QString adFilteredBy( const QString &url, bool *isWhiteListed = 0 ) const;
+
     bool isAdFilterEnabled() const;
     bool isHideAdsEnabled() const;
     void addAdFilter( const QString &url );
Index: khtml/khtml_filter_p.h
===================================================================
--- khtml/khtml_filter_p.h	(revision 1027233)
+++ khtml/khtml_filter_p.h	(revision 1027234)
@@ -35,8 +35,9 @@
     // add filter to matching set
     void addString(const QString& pattern);
 
-    // check if string match at least one string from matching set
-    bool isMatched(const QString& str) const;
+    // check if string matches at least one string from matching set,
+    // optionally return the matching string or filter
+    bool isMatched(const QString& str, QString *by = 0) const;
 
     // add filter to matching set with wildcards (*,?) in it
     void addWildedString(const QString& prefix, const QRegExp& rx);
@@ -60,9 +61,10 @@
     // Parses and registers a filter. This will also strip @@ for exclusion rules, skip comments, etc.
     // The user does have to split black and white lists into separate sets, however
     void addFilter(const QString& filter);
-    
+
     bool isUrlMatched(const QString& url);
-    
+    QString urlMatchedBy(const QString& url);
+
     void clear();
 
 private:
Index: khtml/khtml_settings.cpp
===================================================================
--- khtml/khtml_settings.cpp	(revision 1027233)
+++ khtml/khtml_settings.cpp	(revision 1027234)
@@ -743,6 +743,27 @@
     return false;
 }
 
+QString KHTMLSettings::adFilteredBy( const QString &url, bool *isWhiteListed ) const
+{
+    QString m = d->adWhiteList.urlMatchedBy(url);
+    if (!m.isEmpty())
+    {
+        if (isWhiteListed != 0)
+            *isWhiteListed = true;
+        return (m);
+    }
+
+    m = d->adBlackList.urlMatchedBy(url);
+    if (!m.isEmpty())
+    {
+        if (isWhiteListed != 0)
+            *isWhiteListed = false;
+        return (m);
+    }
+
+    return (QString());
+}
+
 void KHTMLSettings::addAdFilter( const QString &url )
 {
     KConfigGroup config = KSharedConfig::openConfig( "khtmlrc", KConfig::NoGlobals )->group( "Filter Settings" );
Index: khtml/khtml_filter.cpp
===================================================================
--- khtml/khtml_filter.cpp	(revision 1027233)
+++ khtml/khtml_filter.cpp	(revision 1027234)
@@ -133,6 +133,25 @@
     return false;
 }
 
+QString FilterSet::urlMatchedBy(const QString& url)
+{
+    QString by;
+
+    if (stringFiltersMatcher.isMatched(url, &by))
+        return by;
+
+    for (int c = 0; c < reFilters.size(); ++c)
+    {
+        if (url.contains(reFilters[c]))
+        {
+            by = reFilters[c].pattern();
+            break;
+        }
+    }
+
+    return by;
+}
+
 void FilterSet::clear()
 {
     reFilters.clear();
@@ -196,12 +215,15 @@
     }
 }
 
-bool StringsMatcher::isMatched(const QString& str) const
+bool StringsMatcher::isMatched(const QString& str, QString *by) const
 {
     // check short strings first
     for (int i = 0; i < shortStringFilters.size(); ++i) {
         if (str.contains(shortStringFilters[i]))
+        {
+            if (by != 0) *by = shortStringFilters[i];
             return true;
+        }
     }
 
     int len = str.length();
@@ -235,13 +257,19 @@
                 if (index >= 0) {
                     int flen = stringFilters[index].length();
                     if (k - flen + 1 >= 0 && stringFilters[index] == str.midRef(k - flen + 1 , flen))
+                    {
+                        if (by != 0) *by = stringFilters[index];
                         return true;
+                    }
                 } else {
                     index = -index - 1;
                     int flen = rePrefixes[index].length();
                     if (k - 8 + flen < len && rePrefixes[index] == str.midRef(k - 7, flen) &&
                             str.indexOf(reFilters[index], k - 7 + flen) == k - 7 + flen)
+                    {
+                        if (by != 0) *by = rePrefixes[index]+reFilters[index].pattern();
                         return true;
+                    }
                 }
             }
         }

kdelibs-4.3.3-fix-kdefakes-build.patch:
 fakes.c |    4 ++++
 1 file changed, 4 insertions(+)

--- NEW FILE kdelibs-4.3.3-fix-kdefakes-build.patch ---
diff -ur kdelibs-4.3.3/kdecore/fakes.c kdelibs-4.3.3-fix-kdefakes-build/kdecore/fakes.c
--- kdelibs-4.3.3/kdecore/fakes.c	2008-05-21 13:09:15.000000000 +0200
+++ kdelibs-4.3.3-fix-kdefakes-build/kdecore/fakes.c	2009-11-06 01:47:27.000000000 +0100
@@ -313,6 +313,8 @@
 #endif /* !HAVE_MKDTEMP */
 
 #ifndef HAVE_STRLCPY
+#include <string.h>
+
 KDECORE_EXPORT unsigned long strlcpy(char* d, const char* s, unsigned long bufsize)
 {
     unsigned long len, ret = strlen(s);
@@ -331,6 +333,8 @@
 #endif
 
 #ifndef HAVE_STRLCAT
+#include <string.h>
+
 KDECORE_EXPORT unsigned long strlcat(char* d, const char* s, unsigned long bufsize)
 {
     char *cp;


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/kdelibs/F-12/.cvsignore,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -p -r1.80 -r1.81
--- .cvsignore	7 Oct 2009 10:49:19 -0000	1.80
+++ .cvsignore	10 Nov 2009 15:10:12 -0000	1.81
@@ -1 +1 @@
-kdelibs-4.3.2.tar.bz2
+kdelibs-4.3.3.tar.bz2


Index: kdelibs.spec
===================================================================
RCS file: /cvs/extras/rpms/kdelibs/F-12/kdelibs.spec,v
retrieving revision 1.524
retrieving revision 1.525
diff -u -p -r1.524 -r1.525
--- kdelibs.spec	2 Nov 2009 16:18:05 -0000	1.524
+++ kdelibs.spec	10 Nov 2009 15:10:12 -0000	1.525
@@ -3,8 +3,8 @@
 %define strigi_ver 0.7
 
 Summary: K Desktop Environment 4 - Libraries
-Version: 4.3.2
-Release: 5%{?dist}
+Version: 4.3.3
+Release: 2%{?dist}
 
 Name: kdelibs
 Epoch: 6
@@ -76,22 +76,20 @@ Patch21: kdelibs-4.3.1-ossl-1.x.patch
 # patch to fix keditbookmarks crash (kde#160679)
 Patch22: kdelibs-4.3.0-bookmarks.patch
 Patch24: kdelibs-4.3.1-drkonq.patch
+# fix build of fakes.c due to missing #include <string.h>
+Patch25: kdelibs-4.3.3-fix-kdefakes-build.patch
 
 # upstream
-# 4.3 branch
-Patch100: kdelibs-4.3.2-kde#209712.patch
-Patch101: kdelibs-4.3.2-kde#207173.patch
-Patch102: kdelibs-4.3.2-kde#1033984.patch
+# 4.4 trunk
+# http://websvn.kde.org/?view=revision&revision=1027234
+# add adFilteredBy API required for konq-plugins-4.3.3 to build
+Patch100: kdelibs-4.3.3-adFilteredBy.patch
 
 # security fix
 Patch200: kdelibs-4.3.1-CVE-2009-2702.patch
-# fix oCERT-2009-015 - unrestricted XMLHttpRequest access to local URLs
-Patch201: kdelibs-4.3.3-oCERT-2009-015-xmlhttprequest.patch
 
 BuildRequires: qt4-devel >= 4.5.0
-# qt4%{_?_isa} isn't provided yet -- Rex
-#Requires: qt4%{?_isa} >= %{_qt4_version}
-Requires: qt4 >= %{_qt4_version}
+Requires: qt4%{?_isa} >= %{_qt4_version}
 Requires: xdg-utils
 Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
@@ -99,6 +97,7 @@ Requires(postun): /sbin/ldconfig
 BuildRequires: alsa-lib-devel
 BuildRequires: automoc4 >= 0.9.88
 BuildRequires: avahi-devel
+BuildRequires: bison flex
 BuildRequires: bzip2-devel
 BuildRequires: cmake >= 2.6.2-3
 BuildRequires: cups-devel cups
@@ -203,16 +202,14 @@ format for easy browsing.
 %if 0%{?rhel} > 5
 %patch24 -p1 -b .drkonq
 %endif
+%patch25 -p1 -b .fix-kdefakes-build
 
 # upstream patches
-# 4.3
-%patch100 -p0 -b .kde#209712
-%patch101 -p4 -b .kde#207173.patch
-%patch102 -p0 -b .kde#1033984
+# 4.4
+%patch100 -p0 -b .adFilteredBy
 
 # security fix
 %patch200 -p1 -b .CVE-2009-2702
-%patch201 -p0 -b .oCERT-2009-015-xmlhttprequest
 
 %build
 
@@ -402,8 +399,13 @@ rm -rf %{buildroot}
 
 
 %changelog
-* Mon Nov  2 2009 Lukáš Tinkl <ltinkl at redhat.com> - 4.3.2-5
-- fix unrestricted XMLHttpRequest access to local URLs (oCERT-2009-015), #532428
+* Fri Nov 06 2009 Kevin Kofler <Kevin at tigcc.ticalc.org> - 4.3.3-2
+- backport adFilteredBy API from trunk, required to build konq-plugins-4.3.3
+- BR flex and bison for the Solid predicate parser
+- fix build of fakes.c due to missing #include <string.h>
+
+* Fri Oct 30 2009 Rex Dieter <rdieter at fedoraproject.org> - 4.3.3-1
+- 4.3.3
 
 * Mon Oct 12 2009 Lukáš Tinkl <ltinkl at redhat.com> - 4.3.2-4
 - khtml kpart crasher nr. 2 (rev.1033984)


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/kdelibs/F-12/sources,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -p -r1.96 -r1.97
--- sources	7 Oct 2009 10:49:20 -0000	1.96
+++ sources	10 Nov 2009 15:10:12 -0000	1.97
@@ -1 +1 @@
-0564ed8ba804a0f3f1cee9732a3d2d72  kdelibs-4.3.2.tar.bz2
+20fd3793d9d23088ecb1d5aed0254216  kdelibs-4.3.3.tar.bz2


--- kdelibs-4.3.2-kde#1033984.patch DELETED ---


--- kdelibs-4.3.2-kde#207173.patch DELETED ---


--- kdelibs-4.3.2-kde#209712.patch DELETED ---




More information about the fedora-extras-commits mailing list