Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kmime for openSUSE:Factory checked in at 2023-10-12 23:40:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kmime (Old) and /work/SRC/openSUSE:Factory/.kmime.new.1807 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kmime" Thu Oct 12 23:40:15 2023 rev:99 rq:1117326 version:23.08.2 Changes: -------- --- /work/SRC/openSUSE:Factory/kmime/kmime.changes 2023-09-15 22:03:25.660742882 +0200 +++ /work/SRC/openSUSE:Factory/.kmime.new.1807/kmime.changes 2023-10-12 23:41:17.095107440 +0200 @@ -1,0 +2,10 @@ +Tue Oct 10 18:27:40 UTC 2023 - Christophe Marin <[email protected]> + +- Update to 23.08.2 + * New bugfix release + * For more details please see: + * https://kde.org/announcements/gear/23.08.2/ +- Changes since 23.08.1: + * Allow to parse specific Date. So we reduce the number of + +------------------------------------------------------------------- Old: ---- kmime-23.08.1.tar.xz kmime-23.08.1.tar.xz.sig New: ---- kmime-23.08.2.tar.xz kmime-23.08.2.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kmime.spec ++++++ --- /var/tmp/diff_new_pack.73UXbh/_old 2023-10-12 23:41:17.643127277 +0200 +++ /var/tmp/diff_new_pack.73UXbh/_new 2023-10-12 23:41:17.643127277 +0200 @@ -20,7 +20,7 @@ %bcond_without released %define libname libKPim5Mime5 Name: kmime -Version: 23.08.1 +Version: 23.08.2 Release: 0 Summary: KDE PIM libraries MIME support License: LGPL-2.1-or-later ++++++ kmime-23.08.1.tar.xz -> kmime-23.08.2.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-23.08.1/CMakeLists.txt new/kmime-23.08.2/CMakeLists.txt --- old/kmime-23.08.1/CMakeLists.txt 2023-09-03 06:08:32.000000000 +0200 +++ new/kmime-23.08.2/CMakeLists.txt 2023-10-03 06:56:08.000000000 +0200 @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.16 FATAL_ERROR) -set(PIM_VERSION "5.24.1") +set(PIM_VERSION "5.24.2") project(KMime VERSION ${PIM_VERSION}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-23.08.1/autotests/headertest.cpp new/kmime-23.08.2/autotests/headertest.cpp --- old/kmime-23.08.1/autotests/headertest.cpp 2023-09-03 06:08:32.000000000 +0200 +++ new/kmime-23.08.2/autotests/headertest.cpp 2023-10-03 06:56:08.000000000 +0200 @@ -886,6 +886,30 @@ QCOMPARE(h->dateTime().time(), QTime(2, 29, 44)); QCOMPARE(h->dateTime().offsetFromUtc(), -18000); delete h; + + // Bug Date: 13/10/20 12:51:47 + h = new Date; + h->from7BitString("13/10/20 12:51:47"); + QVERIFY(!h->isEmpty()); + QCOMPARE(h->dateTime().date(), QDate(2020, 10, 13)); + QCOMPARE(h->dateTime().time(), QTime(12, 51, 47)); + delete h; + + //28/09/23 16:05:54 + h = new Date; + h->from7BitString("28/09/23 16:05:54"); + QVERIFY(!h->isEmpty()); + QCOMPARE(h->dateTime().date(), QDate(2023, 9, 28)); + QCOMPARE(h->dateTime().time(), QTime(16, 05, 54)); + delete h; + + // Wed, 12 Apr 2030 + h = new Date; + h->from7BitString("Wed, 12 Apr 2030"); + QVERIFY(!h->isEmpty()); + QCOMPARE(h->dateTime().date(), QDate(2030, 4, 12)); + QCOMPARE(h->dateTime().time(), QTime(0, 0, 0)); + delete h; } void HeaderTest::testLinesHeader() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-23.08.1/po/zh_CN/libkmime5.po new/kmime-23.08.2/po/zh_CN/libkmime5.po --- old/kmime-23.08.1/po/zh_CN/libkmime5.po 2023-09-03 06:08:32.000000000 +0200 +++ new/kmime-23.08.2/po/zh_CN/libkmime5.po 2023-10-03 06:56:08.000000000 +0200 @@ -3,7 +3,7 @@ "Project-Id-Version: kdeorg\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2021-12-14 00:45+0000\n" -"PO-Revision-Date: 2023-09-02 02:59\n" +"PO-Revision-Date: 2023-09-16 10:11\n" "Last-Translator: \n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-23.08.1/src/kmime_header_parsing.cpp new/kmime-23.08.2/src/kmime_header_parsing.cpp --- old/kmime-23.08.1/src/kmime_header_parsing.cpp 2023-09-03 06:08:32.000000000 +0200 +++ new/kmime-23.08.2/src/kmime_header_parsing.cpp 2023-10-03 06:56:08.000000000 +0200 @@ -1882,6 +1882,21 @@ return true; } +bool parseQDateTime(const char *&scursor, const char *const send, + QDateTime &result, bool isCRLF) +{ + eatCFWS(scursor, send, isCRLF); + if (scursor == send) { + return false; + } + // In qt6 yy == 1900 ! => for sure we use 2000 here. + result = QDateTime::fromString(QString::fromLatin1(scursor, 17), QStringLiteral("dd/MM/yy HH:mm:ss")); + QDate resultDate = result.date(); + resultDate.setDate(resultDate.year() + 100, resultDate.month(), resultDate.day()); + result.setDate(resultDate); + return result.isValid(); +} + bool parseDateTime(const char *&scursor, const char *const send, QDateTime &result, bool isCRLF) { @@ -1977,53 +1992,56 @@ } eatCFWS(scursor, send, isCRLF); - if (scursor == send) { - return false; - } - - // - // time - // int maybeHour; int maybeMinute; int maybeSecond; - long int secsEastOfGMT; - bool timeZoneKnown = true; - - if (!parseTime(scursor, send, - maybeHour, maybeMinute, maybeSecond, - secsEastOfGMT, timeZoneKnown, isCRLF)) { - return false; - } - - // in asctime() the year follows the time - if (!timeAfterYear) { - eatCFWS(scursor, send, isCRLF); - if (scursor == send) { + long int secsEastOfGMT = 0; + QDate maybeDate; + QTime maybeTime; + if (scursor != send) { + // + // time + // + bool timeZoneKnown = true; + + if (!parseTime(scursor, send, + maybeHour, maybeMinute, maybeSecond, + secsEastOfGMT, timeZoneKnown, isCRLF)) { return false; } - if (!parseDigits(scursor, send, maybeYear)) { - return false; + // in asctime() the year follows the time + if (!timeAfterYear) { + eatCFWS(scursor, send, isCRLF); + if (scursor == send) { + return false; + } + + if (!parseDigits(scursor, send, maybeYear)) { + return false; + } } - } - // RFC 2822 4.3 processing: - if (maybeYear < 50) { - maybeYear += 2000; - } else if (maybeYear < 1000) { - maybeYear += 1900; - } - // else keep as is - if (maybeYear < 1900) { - return false; // rfc2822, 3.3 - } + // RFC 2822 4.3 processing: + if (maybeYear < 50) { + maybeYear += 2000; + } else if (maybeYear < 1000) { + maybeYear += 1900; + } + // else keep as is + if (maybeYear < 1900) { + return false; // rfc2822, 3.3 + } - const QDate maybeDate = QDate(maybeYear, maybeMonth, maybeDay); - const QTime maybeTime = QTime(maybeHour, maybeMinute, maybeSecond); + maybeDate = QDate(maybeYear, maybeMonth, maybeDay); + maybeTime = QTime(maybeHour, maybeMinute, maybeSecond); - if (!maybeDate.isValid() || !maybeTime.isValid()) { - return false; + if (!maybeDate.isValid() || !maybeTime.isValid()) { + return false; + } + } else { + maybeDate = QDate(maybeYear, maybeMonth, maybeDay); + maybeTime = QTime(0, 0, 0); } result = QDateTime(maybeDate, maybeTime, Qt::OffsetFromUTC, secsEastOfGMT); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-23.08.1/src/kmime_header_parsing.h new/kmime-23.08.2/src/kmime_header_parsing.h --- old/kmime-23.08.1/src/kmime_header_parsing.h 2023-09-03 06:08:32.000000000 +0200 +++ new/kmime-23.08.2/src/kmime_header_parsing.h 2023-10-03 06:56:08.000000000 +0200 @@ -226,6 +226,8 @@ Q_REQUIRED_RESULT KMIME_EXPORT bool parseDateTime(const char *&scursor, const char *const send, QDateTime &result, bool isCRLF = false); +Q_REQUIRED_RESULT KMIME_EXPORT bool parseQDateTime(const char *&scursor, const char *const send, + QDateTime &result, bool isCRLF = false); /** * Extracts and returns the first header that is contained in the given byte array. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmime-23.08.1/src/kmime_headers.cpp new/kmime-23.08.2/src/kmime_headers.cpp --- old/kmime-23.08.1/src/kmime_headers.cpp 2023-09-03 06:08:32.000000000 +0200 +++ new/kmime-23.08.2/src/kmime_headers.cpp 2023-10-03 06:56:08.000000000 +0200 @@ -1467,13 +1467,18 @@ } int Date::ageInDays() const { - QDate today = QDate::currentDate(); + const QDate today = QDate::currentDate(); return dateTime().date().daysTo(today); } bool Date::parse(const char *&scursor, const char *const send, bool isCRLF) { Q_D(Date); - return parseDateTime(scursor, send, d->dateTime, isCRLF); + const char *start = scursor; + bool result = parseDateTime(scursor, send, d->dateTime, isCRLF); + if (!result) { + result = parseQDateTime(start, send, d->dateTime, isCRLF); + } + return result; } //-----</Date>---------------------------------
