[packages/kde4-kdepimlibs] - rel 8; fix build
arekm
arekm at pld-linux.org
Thu Oct 17 21:52:22 CEST 2019
commit 862a93e759a9a47f393b4d49db63375eea4389ed
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Oct 17 21:52:15 2019 +0200
- rel 8; fix build
debian.patch | 367 +++++++++++++++++++++++++++++++++++++++++++++++++++
kde4-kdepimlibs.spec | 4 +-
2 files changed, 370 insertions(+), 1 deletion(-)
---
diff --git a/kde4-kdepimlibs.spec b/kde4-kdepimlibs.spec
index b941c4c..ce4ebfc 100644
--- a/kde4-kdepimlibs.spec
+++ b/kde4-kdepimlibs.spec
@@ -12,7 +12,7 @@ Summary: Personal Information Management (PIM) libraries for KDE
Summary(pl.UTF-8): Biblioteki zarządzania informacjami osobistymi (PIM) dla KDE
Name: kde4-kdepimlibs
Version: 4.14.10
-Release: 7
+Release: 8
License: GPL
Group: X11/Applications
Source0: http://download.kde.org/Attic/applications/15.04.3/src/%{orgname}-%{version}.tar.xz
@@ -20,6 +20,7 @@ Source0: http://download.kde.org/Attic/applications/15.04.3/src/%{orgname}-%{ver
Patch0: %{name}-build.patch
Patch100: %{name}-branch.diff
Patch101: kdepimlibs-strict-parsing.patch
+Patch102: debian.patch
BuildRequires: Qt3Support-devel >= %{qtver}
BuildRequires: QtCore-devel >= %{qtver}
BuildRequires: QtDBus-devel >= %{qtver}
@@ -90,6 +91,7 @@ opartych na kdepimlibs.
%if %{with kdepim44}
%patch101 -p1 -R
%endif
+%patch102 -p1
%build
install -d build
diff --git a/debian.patch b/debian.patch
new file mode 100644
index 0000000..0db1691
--- /dev/null
+++ b/debian.patch
@@ -0,0 +1,367 @@
+From: Montel Laurent <montel at kde.org>
+Date: Fri, 30 Sep 2016 13:55:35 +0000
+Subject: Backport avoid to transform as a url when we have a quote
+X-Git-Url: http://quickgit.kde.org/?p=kdepimlibs.git&a=commitdiff&h=176fee25ca79145ab5c8e2275d248f1a46a8d8cf
+---
+Backport avoid to transform as a url when we have a quote
+---
+
+
+--- a/kpimutils/linklocator.cpp
++++ b/kpimutils/linklocator.cpp
+@@ -94,6 +94,12 @@
+ }
+
+ QString LinkLocator::getUrl()
++{
++ return getUrlAndCheckValidHref();
++}
++
++
++QString LinkLocator::getUrlAndCheckValidHref(bool *badurl)
+ {
+ QString url;
+ if ( atUrl() ) {
+@@ -129,13 +135,26 @@
+
+ url.reserve( maxUrlLen() ); // avoid allocs
+ int start = mPos;
++ bool previousCharIsADoubleQuote = false;
+ while ( ( mPos < (int)mText.length() ) &&
+ ( mText[mPos].isPrint() || mText[mPos].isSpace() ) &&
+ ( ( afterUrl.isNull() && !mText[mPos].isSpace() ) ||
+ ( !afterUrl.isNull() && mText[mPos] != afterUrl ) ) ) {
+ if ( !mText[mPos].isSpace() ) { // skip whitespace
+- url.append( mText[mPos] );
+- if ( url.length() > maxUrlLen() ) {
++ if (mText[mPos] == QLatin1Char('>') && previousCharIsADoubleQuote) {
++ //it's an invalid url
++ if (badurl) {
++ *badurl = true;
++ }
++ return QString();
++ }
++ if (mText[mPos] == QLatin1Char('"')) {
++ previousCharIsADoubleQuote = true;
++ } else {
++ previousCharIsADoubleQuote = false;
++ }
++ url.append( mText[mPos] );
++ if ( url.length() > maxUrlLen() ) {
+ break;
+ }
+ }
+@@ -367,7 +386,12 @@
+ } else {
+ const int start = locator.mPos;
+ if ( !( flags & IgnoreUrls ) ) {
+- str = locator.getUrl();
++ bool badUrl = false;
++ str = locator.getUrlAndCheckValidHref(&badUrl);
++ if (badUrl) {
++ return locator.mText;
++ }
++
+ if ( !str.isEmpty() ) {
+ QString hyperlink;
+ if ( str.left( 4 ) == QLatin1String("www.") ) {
+
+--- a/kpimutils/linklocator.h
++++ b/kpimutils/linklocator.h
+@@ -107,6 +107,7 @@
+ @return The URL at the current scan position, or an empty string.
+ */
+ QString getUrl();
++ QString getUrlAndCheckValidHref(bool *badurl = 0);
+
+ /**
+ Attempts to grab an email address. If there is an @ symbol at the
+@@ -155,7 +156,7 @@
+ */
+ static QString pngToDataUrl( const QString & iconPath );
+
+- protected:
++protected:
+ /**
+ The plaintext string being scanned for URLs and email addresses.
+ */
+
+
+--- a/kpimutils/linklocator.cpp
++++ b/kpimutils/linklocator.cpp
+@@ -389,7 +389,23 @@ QString LinkLocator::convertToHtml( cons
+ bool badUrl = false;
+ str = locator.getUrlAndCheckValidHref(&badUrl);
+ if (badUrl) {
+- return locator.mText;
++ QString resultBadUrl;
++ const int helperTextSize(locator.mText.count());
++ for (int i = 0; i < helperTextSize; ++i) {
++ const QChar chBadUrl = locator.mText[i];
++ if (chBadUrl == QLatin1Char('&')) {
++ resultBadUrl += QLatin1String("&");
++ } else if (chBadUrl == QLatin1Char('"')) {
++ resultBadUrl += QLatin1String(""");
++ } else if (chBadUrl == QLatin1Char('<')) {
++ resultBadUrl += QLatin1String("<");
++ } else if (chBadUrl == QLatin1Char('>')) {
++ resultBadUrl += QLatin1String(">");
++ } else {
++ resultBadUrl += chBadUrl;
++ }
++ }
++ return resultBadUrl;
+ }
+
+ if ( !str.isEmpty() ) {
+Description: Compile with libical3
+From: Giovanni Mascellani <gio at debian.org>
+Bug-Debian: https://bugs.debian.org/905697
+
+Index: kdepimlibs-4.14.10/kcalcore/icalformat_p.cpp
+===================================================================
+--- kdepimlibs-4.14.10.orig/kcalcore/icalformat_p.cpp
++++ kdepimlibs-4.14.10/kcalcore/icalformat_p.cpp
+@@ -2301,7 +2301,6 @@ icaltimetype ICalFormatImpl::writeICalDa
+ t.second = 0;
+
+ t.is_date = 1;
+- t.is_utc = 0;
+ t.zone = 0;
+
+ return t;
+@@ -2323,7 +2322,9 @@ icaltimetype ICalFormatImpl::writeICalDa
+ t.second = datetime.time().second();
+ }
+ t.zone = 0; // zone is NOT set
+- t.is_utc = datetime.isUtc() ? 1 : 0;
++ if (datetime.isUtc()) {
++ t = icaltime_convert_to_zone(t, icaltimezone_get_utc_timezone());
++ }
+
+ // _dumpIcaltime( t );
+
+@@ -2398,7 +2399,7 @@ icalproperty *ICalFormatImpl::writeICalD
+ }
+
+ KTimeZone ktz;
+- if (!t.is_utc) {
++ if (!icaltime_is_utc(t)) {
+ ktz = dt.timeZone();
+ }
+
+@@ -2431,7 +2432,7 @@ KDateTime ICalFormatImpl::readICalDateTi
+ // _dumpIcaltime( t );
+
+ KDateTime::Spec timeSpec;
+- if (t.is_utc || t.zone == icaltimezone_get_utc_timezone()) {
++ if (icaltime_is_utc(t) || t.zone == icaltimezone_get_utc_timezone()) {
+ timeSpec = KDateTime::UTC; // the time zone is UTC
+ utc = false; // no need to convert to UTC
+ } else {
+Index: kdepimlibs-4.14.10/kcalcore/icaltimezones.cpp
+===================================================================
+--- kdepimlibs-4.14.10.orig/kcalcore/icaltimezones.cpp
++++ kdepimlibs-4.14.10/kcalcore/icaltimezones.cpp
+@@ -54,7 +54,7 @@ static QDateTime toQDateTime(const icalt
+ {
+ return QDateTime(QDate(t.year, t.month, t.day),
+ QTime(t.hour, t.minute, t.second),
+- (t.is_utc ? Qt::UTC : Qt::LocalTime));
++ (icaltime_is_utc(t) ? Qt::UTC : Qt::LocalTime));
+ }
+
+ // Maximum date for time zone data.
+@@ -81,7 +81,6 @@ static icaltimetype writeLocalICalDateTi
+ t.second = local.time().second();
+ t.is_date = 0;
+ t.zone = 0;
+- t.is_utc = 0;
+ return t;
+ }
+
+@@ -886,7 +885,7 @@ ICalTimeZone ICalTimeZoneSource::parse(i
+ case ICAL_LASTMODIFIED_PROPERTY:
+ {
+ const icaltimetype t = icalproperty_get_lastmodified(p);
+- if (t.is_utc) {
++ if (icaltime_is_utc(t)) {
+ data->d->lastModified = toQDateTime(t);
+ } else {
+ kDebug() << "LAST-MODIFIED not UTC";
+@@ -1259,7 +1258,7 @@ QList<QDateTime> ICalTimeZoneSourcePriva
+ // Convert DTSTART to QDateTime, and from local time to UTC
+ const QDateTime localStart = toQDateTime(dtstart); // local time
+ dtstart.second -= prevOffset;
+- dtstart.is_utc = 1;
++ dtstart = icaltime_convert_to_zone(dtstart, icaltimezone_get_utc_timezone());
+ const QDateTime utcStart = toQDateTime(icaltime_normalize(dtstart)); // UTC
+
+ transitions += utcStart;
+@@ -1286,13 +1285,12 @@ QList<QDateTime> ICalTimeZoneSourcePriva
+ t.minute = dtstart.minute;
+ t.second = dtstart.second;
+ t.is_date = 0;
+- t.is_utc = 0; // dtstart is in local time
+ }
+ // RFC2445 states that RDATE must be in local time,
+ // but we support UTC as well to be safe.
+- if (!t.is_utc) {
++ if (!icaltime_is_utc(t)) {
+ t.second -= prevOffset; // convert to UTC
+- t.is_utc = 1;
++ t = icaltime_convert_to_zone(t, icaltimezone_get_utc_timezone());
+ t = icaltime_normalize(t);
+ }
+ transitions += toQDateTime(t);
+Index: kdepimlibs-4.14.10/kcal/icalformat_p.cpp
+===================================================================
+--- kdepimlibs-4.14.10.orig/kcal/icalformat_p.cpp
++++ kdepimlibs-4.14.10/kcal/icalformat_p.cpp
+@@ -2087,7 +2087,6 @@ icaltimetype ICalFormatImpl::writeICalDa
+ t.second = 0;
+
+ t.is_date = 1;
+- t.is_utc = 0;
+ t.zone = 0;
+
+ return t;
+@@ -2107,7 +2106,9 @@ icaltimetype ICalFormatImpl::writeICalDa
+
+ t.is_date = 0;
+ t.zone = 0; // zone is NOT set
+- t.is_utc = datetime.isUtc() ? 1 : 0;
++ if (datetime.isUtc()) {
++ t = icaltime_convert_to_zone(t, icaltimezone_get_utc_timezone());
++ }
+
+ // _dumpIcaltime( t );
+
+@@ -2174,7 +2175,7 @@ icalproperty *ICalFormatImpl::writeICalD
+ }
+
+ KTimeZone ktz;
+- if ( !t.is_utc ) {
++ if ( !icaltime_is_utc(t) ) {
+ ktz = dt.timeZone();
+ }
+
+@@ -2207,7 +2208,7 @@ KDateTime ICalFormatImpl::readICalDateTi
+ // _dumpIcaltime( t );
+
+ KDateTime::Spec timeSpec;
+- if ( t.is_utc || t.zone == icaltimezone_get_utc_timezone() ) {
++ if ( icaltime_is_utc(t) || t.zone == icaltimezone_get_utc_timezone() ) {
+ timeSpec = KDateTime::UTC; // the time zone is UTC
+ utc = false; // no need to convert to UTC
+ } else {
+Index: kdepimlibs-4.14.10/kcal/icaltimezones.cpp
+===================================================================
+--- kdepimlibs-4.14.10.orig/kcal/icaltimezones.cpp
++++ kdepimlibs-4.14.10/kcal/icaltimezones.cpp
+@@ -50,7 +50,7 @@ static QDateTime toQDateTime( const ical
+ {
+ return QDateTime( QDate( t.year, t.month, t.day ),
+ QTime( t.hour, t.minute, t.second ),
+- ( t.is_utc ? Qt::UTC : Qt::LocalTime ) );
++ ( icaltime_is_utc(t) ? Qt::UTC : Qt::LocalTime ) );
+ }
+
+ // Maximum date for time zone data.
+@@ -77,7 +77,6 @@ static icaltimetype writeLocalICalDateTi
+ t.second = local.time().second();
+ t.is_date = 0;
+ t.zone = 0;
+- t.is_utc = 0;
+ return t;
+ }
+
+@@ -787,7 +786,7 @@ ICalTimeZone ICalTimeZoneSource::parse(
+ case ICAL_LASTMODIFIED_PROPERTY:
+ {
+ icaltimetype t = icalproperty_get_lastmodified(p);
+- if ( t.is_utc ) {
++ if ( icaltime_is_utc(t) ) {
+ data->d->lastModified = toQDateTime( t );
+ } else {
+ kDebug() << "LAST-MODIFIED not UTC";
+@@ -972,7 +971,7 @@ QList<QDateTime> ICalTimeZoneSourcePriva
+ // Convert DTSTART to QDateTime, and from local time to UTC
+ QDateTime localStart = toQDateTime( dtstart ); // local time
+ dtstart.second -= prevOffset;
+- dtstart.is_utc = 1;
++ dtstart = icaltime_convert_to_zone(dtstart, icaltimezone_get_utc_timezone());
+ QDateTime utcStart = toQDateTime( icaltime_normalize( dtstart ) ); // UTC
+
+ transitions += utcStart;
+@@ -999,13 +998,12 @@ QList<QDateTime> ICalTimeZoneSourcePriva
+ t.minute = dtstart.minute;
+ t.second = dtstart.second;
+ t.is_date = 0;
+- t.is_utc = 0; // dtstart is in local time
+ }
+ // RFC2445 states that RDATE must be in local time,
+ // but we support UTC as well to be safe.
+- if ( !t.is_utc ) {
++ if ( !icaltime_is_utc(t) ) {
+ t.second -= prevOffset; // convert to UTC
+- t.is_utc = 1;
++ t = icaltime_convert_to_zone(t, icaltimezone_get_utc_timezone());
+ t = icaltime_normalize( t );
+ }
+ transitions += toQDateTime( t );
+Index: kdepimlibs/kimap/tests/loginjobtest.cpp
+===================================================================
+--- kdepimlibs.orig/kimap/tests/loginjobtest.cpp 2014-05-18 00:31:24.641426654 +0200
++++ kdepimlibs/kimap/tests/loginjobtest.cpp 2014-05-18 00:31:58.984090428 +0200
+@@ -226,7 +226,7 @@
+ << "S: A000002 OK";
+
+ QTest::newRow( "sslv3" ) << scenario << static_cast<int>(QSsl::SslV3) << static_cast<int>(KIMAP::LoginJob::SslV3);
+- QTest::newRow( "sslv2" ) << scenario << static_cast<int>(QSsl::SslV2) << static_cast<int>(KIMAP::LoginJob::SslV2);
++ // QTest::newRow( "sslv2" ) << scenario << static_cast<int>(QSsl::SslV2) << static_cast<int>(KIMAP::LoginJob::SslV2);
+ //AnySslVersion doesn't mean the server can force a specific version (e.g. openssl always starts with a sslv2 hello)
+ QTest::newRow( "any protocol with anyssl version" ) << scenario << static_cast<int>(QSsl::AnyProtocol) << static_cast<int>(KIMAP::LoginJob::AnySslVersion);
+ //KIMAP and KTcpSocket use SslV3_1 but really mean tls without starttls
+Description: Add SSL specific error type on SSL error
+ Add debian/patches/tlscancelled.patch to fix issue with inability to
+ cancel connections using unknown SSL certificates (Closes: #769852)
+Origin: vendor
+Author: Jim Scadden <jims at silentasylum.co.uk>
+Bug-Debian: http://bugs.debian.org/769852
+Bug: https://bugs.kde.org/show_bug.cgi?id=335994
+Forwarded: https://bugs.kde.org/show_bug.cgi?id=335994
+Reviewed-By: Scott Kitterman <scott at kitterman.com>
+Last-Update: 2014-11-16
+
+--- kdepimlibs-4.14.2.orig/kimap/loginjob.cpp
++++ kdepimlibs-4.14.2/kimap/loginjob.cpp
+@@ -535,7 +535,7 @@ void LoginJobPrivate::sslResponse(bool r
+ authState = LoginJobPrivate::Capability;
+ tags << sessionInternal()->sendCommand( "CAPABILITY" );
+ } else {
+- q->setError( LoginJob::UserDefinedError );
++ q->setError( LoginJob::ERR_SSL_FAILED );
+ q->setErrorText( i18n( "Login failed, TLS negotiation failed." ) );
+ encryptionMode = LoginJob::Unencrypted;
+ q->emitResult();
+@@ -597,7 +597,6 @@ void LoginJob::connectionLost()
+ emitResult();
+ }
+ }
+-
+ }
+
+ void LoginJobPrivate::saveServerGreeting(const Message &response)
+--- kdepimlibs-4.14.2.orig/kimap/loginjob.h
++++ kdepimlibs-4.14.2/kimap/loginjob.h
+@@ -61,7 +61,8 @@ class KIMAP_EXPORT LoginJob : public Job
+ };
+
+ enum ErrorCode {
+- ERR_COULD_NOT_CONNECT = KJob::UserDefinedError + 23 // same as in kio
++ ERR_COULD_NOT_CONNECT = KJob::UserDefinedError + 23, // same as in kio
++ ERR_SSL_FAILED = KJob::UserDefinedError + 128, // outside of values used by kio
+ };
+
+ explicit LoginJob( Session *session );
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/kde4-kdepimlibs.git/commitdiff/862a93e759a9a47f393b4d49db63375eea4389ed
More information about the pld-cvs-commit
mailing list