Hello community, here is the log from the commit of package ksmtp for openSUSE:Factory checked in at 2018-01-17 21:52:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ksmtp (Old) and /work/SRC/openSUSE:Factory/.ksmtp.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ksmtp" Wed Jan 17 21:52:17 2018 rev:4 rq:564370 version:17.12.1 Changes: -------- --- /work/SRC/openSUSE:Factory/ksmtp/ksmtp.changes 2018-01-09 14:46:30.258618861 +0100 +++ /work/SRC/openSUSE:Factory/.ksmtp.new/ksmtp.changes 2018-01-17 21:52:18.276079850 +0100 @@ -1,0 +2,17 @@ +Thu Jan 11 23:41:18 CET 2018 - [email protected] + +- Update to 17.12.1 + * New bugfix release + * For more details please see: + * https://www.kde.org/announcements/announce-applications-17.12.1.php +- Changes since 17.12.0: + * Send the correct hostname with the HELO/EHLO command (kde#387926) + * Fix duplicate authentication (kde#387926, kde#388068) + * Add .arcconfig + * show error string instead error number + * do not cancel send job after 10s timeout (kde#387613) +- Dropped patches, now upstream: + * 0001-Fix-duplicate-authentication.patch + * 0002-Send-the-correct-hostname-with-the-HELO-EHLO-command.patch + +------------------------------------------------------------------- Old: ---- 0001-Fix-duplicate-authentication.patch 0002-Send-the-correct-hostname-with-the-HELO-EHLO-command.patch ksmtp-17.12.0.tar.xz New: ---- ksmtp-17.12.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ksmtp.spec ++++++ --- /var/tmp/diff_new_pack.1mky7w/_old 2018-01-17 21:52:18.828054033 +0100 +++ /var/tmp/diff_new_pack.1mky7w/_new 2018-01-17 21:52:18.828054033 +0100 @@ -1,7 +1,7 @@ # # spec file for package ksmtp # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,17 +19,13 @@ %bcond_without lang Name: ksmtp -Version: 17.12.0 +Version: 17.12.1 Release: 0 Summary: Job-based library to send email through an SMTP server License: LGPL-2.1+ Group: System/GUI/KDE Url: http://www.kde.org Source0: %{name}-%{version}.tar.xz -# PATCH-FIX-UPSTREAM -Patch1: 0001-Fix-duplicate-authentication.patch -# PATCH-FIX-UPSTREAM -Patch2: 0002-Send-the-correct-hostname-with-the-HELO-EHLO-command.patch BuildRequires: cyrus-sasl-devel BuildRequires: extra-cmake-modules >= 1.0.0 BuildRequires: kcoreaddons-devel @@ -78,8 +74,6 @@ %prep %setup -q -%patch1 -p1 -%patch2 -p1 %build %cmake_kf5 -d build -- -DBUILD_TESTING=ON ++++++ ksmtp-17.12.0.tar.xz -> ksmtp-17.12.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ksmtp-17.12.0/.arcconfig new/ksmtp-17.12.1/.arcconfig --- old/ksmtp-17.12.0/.arcconfig 1970-01-01 01:00:00.000000000 +0100 +++ new/ksmtp-17.12.1/.arcconfig 2017-12-31 12:38:47.000000000 +0100 @@ -0,0 +1,3 @@ +{ + "phabricator.uri" : "https://phabricator.kde.org/" +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ksmtp-17.12.0/CMakeLists.txt new/ksmtp-17.12.1/CMakeLists.txt --- old/ksmtp-17.12.0/CMakeLists.txt 2017-12-08 02:04:49.000000000 +0100 +++ new/ksmtp-17.12.1/CMakeLists.txt 2018-01-09 02:20:54.000000000 +0100 @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.0) -set(PIM_VERSION "5.7.0") +set(PIM_VERSION "5.7.1") project(KSMTP VERSION ${PIM_VERSION}) option(RUN_UNINSTALL "test run uninstalled apps (experimental)" FALSE) @@ -24,8 +24,8 @@ set(KSMTP_LIB_VERSION ${PIM_VERSION}) -set(QT5_REQUIRED_VERSION "5.7.0") -set(KMIME_LIB_VERSION "5.7.0") +set(QT5_REQUIRED_VERSION "5.7.1") +set(KMIME_LIB_VERSION "5.7.1") ecm_setup_version(PROJECT VARIABLE_PREFIX KSMTP VERSION_HEADER ${KSMTP_BINARY_DIR}/ksmtp_version.h PACKAGE_VERSION_FILE ${KSMTP_BINARY_DIR}/KPimSMTPConfigVersion.cmake diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ksmtp-17.12.0/po/zh_CN/libksmtp5.po new/ksmtp-17.12.1/po/zh_CN/libksmtp5.po --- old/ksmtp-17.12.0/po/zh_CN/libksmtp5.po 2017-12-08 02:04:49.000000000 +0100 +++ new/ksmtp-17.12.1/po/zh_CN/libksmtp5.po 2018-01-09 02:20:54.000000000 +0100 @@ -3,7 +3,7 @@ "Project-Id-Version: kdeorg\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2017-08-02 07:05+0200\n" -"PO-Revision-Date: 2017-11-09 08:22-0500\n" +"PO-Revision-Date: 2018-01-08 18:07-0500\n" "Last-Translator: guoyunhebrave <[email protected]>\n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" @@ -14,7 +14,7 @@ "X-Generator: crowdin.com\n" "X-Crowdin-Project: kdeorg\n" "X-Crowdin-Language: zh-CN\n" -"X-Crowdin-File: /kf5-trunk/messages/pim/libksmtp5.pot\n" +"X-Crowdin-File: /kf5-stable/messages/pim/libksmtp5.pot\n" #: job.cpp:68 #, kde-format diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ksmtp-17.12.0/src/session.cpp new/ksmtp-17.12.1/src/session.cpp --- old/ksmtp-17.12.0/src/session.cpp 2017-12-04 11:20:53.000000000 +0100 +++ new/ksmtp-17.12.1/src/session.cpp 2017-12-31 12:38:47.000000000 +0100 @@ -23,9 +23,11 @@ #include "job.h" #include "serverresponse_p.h" #include "loginjob.h" +#include "sendjob.h" #include "ksmtp_debug.h" #include <QHostAddress> +#include <QHostInfo> #include <QUrl> #include <QEventLoop> #include <QPointer> @@ -79,6 +81,30 @@ } } +void SessionPrivate::startHandshake() +{ + QString hostname = m_customHostname; + + if (hostname.isEmpty()) { + // FIXME: QHostInfo::fromName can get a FQDN, but does a DNS lookup + hostname = QHostInfo::localHostName(); + if (hostname.isEmpty()) { + hostname = QStringLiteral("localhost.invalid"); + } else if (!hostname.contains(QLatin1Char('.'))) { + hostname += QStringLiteral(".localnet"); + } + } + + QByteArray cmd; + if (!m_ehloRejected) { + cmd = "EHLO "; + } else { + cmd = "HELO "; + } + setState(Session::Handshake); + sendData(cmd + QUrl::toAce(hostname)); +} + Session::Session(const QString &hostName, quint16 port, QObject *parent) @@ -276,15 +302,7 @@ if (m_state == Session::Ready) { if (r.isCode(22) || m_ehloRejected) { - QByteArray cmd; - if (!m_ehloRejected) { - cmd = "EHLO "; - } else { - cmd = "HELO "; - } - setState(Session::Handshake); - const auto hostname = m_customHostname.isEmpty() ? m_thread->hostName() : m_customHostname; - sendData(cmd + QUrl::toAce(hostname)); + startHandshake(); return; } } @@ -345,7 +363,11 @@ void SessionPrivate::encryptionNegotiationResult(bool encrypted, KTcpSocket::SslVersion version) { - Q_UNUSED(encrypted); + if (encrypted) { + // Get the updated auth methods + startHandshake(); + } + m_sslVersion = version; } @@ -380,6 +402,12 @@ m_currentJob = m_queue.dequeue(); m_currentJob->doStart(); + + // sending can take a while depending on bandwidth - don't fail with timeout + // if it takes longer + if (qobject_cast<const KSmtp::SendJob *>(m_currentJob)) { + stopSocketTimer(); + } } void SessionPrivate::jobDone(KJob *job) @@ -391,7 +419,9 @@ // here because the inactivity timer triggered, so no need to // stop it (it is single shot) if (m_state != Session::Disconnected) { - stopSocketTimer(); + if (!qobject_cast<const KSmtp::SendJob *>(m_currentJob)) { + stopSocketTimer(); + } } m_jobRunning = false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ksmtp-17.12.0/src/session_p.h new/ksmtp-17.12.1/src/session_p.h --- old/ksmtp-17.12.0/src/session_p.h 2017-12-04 11:20:53.000000000 +0100 +++ new/ksmtp-17.12.1/src/session_p.h 2017-12-31 12:38:47.000000000 +0100 @@ -73,6 +73,7 @@ private: + void startHandshake(); void startNext(); void startSocketTimer(); void stopSocketTimer(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ksmtp-17.12.0/src/sessionthread.cpp new/ksmtp-17.12.1/src/sessionthread.cpp --- old/ksmtp-17.12.0/src/sessionthread.cpp 2017-12-04 11:20:53.000000000 +0100 +++ new/ksmtp-17.12.1/src/sessionthread.cpp 2017-12-31 12:38:47.000000000 +0100 @@ -149,8 +149,8 @@ m_parentSession->d, &SessionPrivate::socketConnected); connect(m_socket, static_cast<void(KTcpSocket::*)(KTcpSocket::Error)>(&KTcpSocket::error), this, [this](KTcpSocket::Error err) { - qCWarning(KSMTP_LOG) << "Socket error:" << err; - Q_EMIT m_parentSession->connectionError(QString::number(err)); + qCWarning(KSMTP_LOG) << "Socket error:" << err << m_socket->errorString(); + Q_EMIT m_parentSession->connectionError(m_socket->errorString()); }); connect(this, &SessionThread::encryptionNegotiationResult, m_parentSession->d, &SessionPrivate::encryptionNegotiationResult); @@ -223,7 +223,6 @@ } else { qCDebug(KSMTP_LOG) << "TLS negotiation done."; - QMetaObject::invokeMethod(this, "sendData", Qt::QueuedConnection, Q_ARG(QByteArray, "EHLO " + QUrl::toAce(hostName()))); Q_EMIT encryptionNegotiationResult(true, m_socket->negotiatedSslVersion()); } }
