user debian-release@lists.debian.org usertags 905697 + bsp-2019-03-fr-paris thank you Hi, On Thu, 14 Feb 2019 10:07:42 +0100 Emilio Pozuelo Monfort <pochu@debian.org> wrote: > kde-runtime has dozens of rdeps, so unless its dep on kdepimlibs can be broken > somehow, this would be much harder to solve for buster. Hoping it might be helpful, I ported kdepimlibs to libical3. This should finally make us able to remove libical2, I believe. With the attached patch kdepimlibs compiles, but I did not try to use it (I am not a KDE user, and much less a KDE PIM user). Could KDE maintainers test it? My patch was mostly adapted from [1]. I am also attaching another patch that explicitly sets QT_SELECT to version 4, so that build does not fail even if Qt 5 is available. [1] https://github.com/KDE/kcalcore/commit/27eaa211b23a6bb0bcba5a91cf7cadfc1e888e21?diff=unified HTH, Giovanni. -- Giovanni Mascellani <g.mascellani@gmail.com> Postdoc researcher - Université Libre de Bruxelles
From 7ef777b77083500d06f9117096239c2e929858c1 Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani <gio@debian.org> Date: Sun, 31 Mar 2019 17:48:14 +0200 Subject: [PATCH 1/2] Select QT version 4. --- debian/rules | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/rules b/debian/rules index 57ddfa6..7230a24 100755 --- a/debian/rules +++ b/debian/rules @@ -5,6 +5,8 @@ libpkgs_addsubst_allLibraries = kdepimlibs5-dev libpkgs_gen_strict_local_shlibs = $(libpkgs_all_packages) include /usr/share/pkg-kde-tools/qt-kde-team/2/library-packages.mk +export QT_SELECT=4 + override_dh_auto_configure: $(overridden_command) -- -DKDE4_BUILD_TESTS=false -- 2.20.1
From 909fa74d0c745f9beda474d3affecaa7f2d2e2ca Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani <gio@debian.org> Date: Sun, 31 Mar 2019 17:07:13 +0200 Subject: [PATCH 2/2] Port to libical3. --- debian/changelog | 7 ++ debian/control | 2 +- debian/patches/libical3.patch | 196 ++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 4 files changed, 205 insertions(+), 1 deletion(-) create mode 100644 debian/patches/libical3.patch diff --git a/debian/changelog b/debian/changelog index edd8c2b..ccfa2d4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +kdepimlibs (4:4.14.10-10.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Port to libical3. + + -- Giovanni Mascellani <gio@debian.org> Sun, 31 Mar 2019 17:06:59 +0200 + kdepimlibs (4:4.14.10-10) unstable; urgency=medium * Team upload. diff --git a/debian/control b/debian/control index 5809d2a..5f67151 100644 --- a/debian/control +++ b/debian/control @@ -16,7 +16,7 @@ Build-Depends: cmake, libboost-dev (>= 1.34), libboost-graph-dev (>= 1.34.0~), libgpgme11-dev, - libical2-dev (>= 0.42), + libical-dev, libldap2-dev, libqjson-dev, libqt4-dev (>= 4:4.8), diff --git a/debian/patches/libical3.patch b/debian/patches/libical3.patch new file mode 100644 index 0000000..6b12024 --- /dev/null +++ b/debian/patches/libical3.patch @@ -0,0 +1,196 @@ +Description: Compile with libical3 +From: Giovanni Mascellani <gio@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 ); diff --git a/debian/patches/series b/debian/patches/series index 9cd444a..4082342 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ tlscancelled.patch cmake-policy.diff CVE-2016-7966.diff CVE-2016-7966_part2.diff +libical3.patch -- 2.20.1
Attachment:
signature.asc
Description: OpenPGP digital signature