Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libqt5-qtserialbus for openSUSE:Factory checked in at 2022-06-29 16:01:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libqt5-qtserialbus (Old) and /work/SRC/openSUSE:Factory/.libqt5-qtserialbus.new.1548 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libqt5-qtserialbus" Wed Jun 29 16:01:14 2022 rev:22 rq:985491 version:5.15.5+kde0 Changes: -------- --- /work/SRC/openSUSE:Factory/libqt5-qtserialbus/libqt5-qtserialbus.changes 2021-06-26 21:25:26.115341100 +0200 +++ /work/SRC/openSUSE:Factory/.libqt5-qtserialbus.new.1548/libqt5-qtserialbus.changes 2022-06-29 16:02:30.512714573 +0200 @@ -1,0 +2,12 @@ +Mon Jun 27 13:10:23 UTC 2022 - Fabian Vogt <fab...@ritter-vogt.de> + +- Update to version 5.15.5+kde0, rebased upstream: + * Revert "Update commercial license headers" + * Fix 5.15 compile error + * Fix Modbus custom command response processing + * Fix Modbus custom command size calculation + * SocketCAN: Fix returning bitrate setting result + * Update commercial license headers +- Drop 0001-Revert-Bump-version.patch, it's versioned correctly now + +------------------------------------------------------------------- Old: ---- 0001-Revert-Bump-version.patch qtserialbus-everywhere-src-5.15.2+kde2.obscpio New: ---- qtserialbus-everywhere-src-5.15.5+kde0.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libqt5-qtserialbus.spec ++++++ --- /var/tmp/diff_new_pack.CQWbB1/_old 2022-06-29 16:02:31.196715483 +0200 +++ /var/tmp/diff_new_pack.CQWbB1/_new 2022-06-29 16:02:31.204715494 +0200 @@ -19,20 +19,18 @@ %define qt5_snapshot 1 Name: libqt5-qtserialbus -Version: 5.15.2+kde2 +Version: 5.15.5+kde0 Release: 0 Summary: Qt 5 Serial Bus Addon License: LGPL-3.0-only OR GPL-2.0-or-later Group: Development/Libraries/X11 Url: https://www.qt.io %define base_name libqt5 -%define real_version 5.15.2 -%define so_version 5.15.2 +%define real_version 5.15.5 +%define so_version 5.15.5 %define tar_version qtserialbus-everywhere-src-%{version} Source: %{tar_version}.tar.xz Source1: baselibs.conf -# PATCH-FIX-OPENSUSE -Patch1: 0001-Revert-Bump-version.patch BuildRequires: fdupes BuildRequires: libQt5Core-private-headers-devel >= %{real_version} BuildRequires: libQt5DBus-devel >= %{real_version} ++++++ _service ++++++ --- /var/tmp/diff_new_pack.CQWbB1/_old 2022-06-29 16:02:31.244715547 +0200 +++ /var/tmp/diff_new_pack.CQWbB1/_new 2022-06-29 16:02:31.248715553 +0200 @@ -1,12 +1,12 @@ <services> <service name="obs_scm" mode="disabled"> <param name="changesgenerate">enable</param> - <param name="versionformat">5.15.2+kde@TAG_OFFSET@</param> + <param name="versionformat">5.15.5+kde@TAG_OFFSET@</param> <param name="url">https://invent.kde.org/qt/qt/qtserialbus.git</param> <param name="scm">git</param> <param name="filename">qtserialbus-everywhere-src</param> <param name="revision">kde/5.15</param> - <param name="parent-tag">v5.15.2</param> + <param name="parent-tag">v5.15.5-lts-lgpl</param> <param name="changesgenerate">enable</param> </service> <service name="set_version" mode="disabled"/> ++++++ qtserialbus-everywhere-src-5.15.2+kde2.obscpio -> qtserialbus-everywhere-src-5.15.5+kde0.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialbus-everywhere-src-5.15.2+kde2/.gitignore new/qtserialbus-everywhere-src-5.15.5+kde0/.gitignore --- old/qtserialbus-everywhere-src-5.15.2+kde2/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/qtserialbus-everywhere-src-5.15.5+kde0/.gitignore 2022-06-02 22:27:49.000000000 +0200 @@ -0,0 +1,53 @@ +config.log +Makefile* +*.pro.user +.qmake.cache +*.obj +config.tests/language/language +config.tests/socketcan/socketcan +config.tests/socketcan_fd/socketcan_fd +examples/serialbus/modbus/adueditor/adueditor +examples/serialbus/modbus/master/modbusmaster +examples/serialbus/modbus/slave/modbusslave +*.moc +*.uic +*.pch +.rcc +src/serialbus/doc/snippets/serialbus_cppsnippet +src/serialbus/QtSerialBus.version* +examples/serialbus/can/can +tests/auto/qcanbus/tst_qcanbus +tests/auto/qcanbusdevice/tst_qcanbusdevice +tests/auto/qcanbusframe/tst_qcanbusframe +tests/auto/qmodbusadu/tst_qmodbusadu +tests/auto/qmodbusclient/tst_qmodbusclient +tests/auto/qmodbuscommevent/tst_qmodbuscommevent +tests/auto/qmodbusdataunit/tst_qmodbusdataunit +tests/auto/qmodbusdevice/tst_qmodbusdevice +tests/auto/qmodbusdeviceidentification/tst_qmodbusdeviceidentification +tests/auto/qmodbuspdu/tst_qmodbuspdu +tests/auto/qmodbusreply/tst_qmodbusreply +tests/auto/qmodbusrtuserialmaster/tst_qmodbusrtuserialmaster +tests/auto/qmodbusserver/tst_qmodbusserver +*_resource.rc +*.exe +*.ipch +*_wrapper.bat +*_wrapper.sh +qtserialbus-config.pri + +# Visual Studio generated files +*.ib_pdb_index +*.idb +*.ilk +*.pdb +*.sln +*.suo +*.vcproj +*vcproj.*.*.user +*.ncb +*.vcxproj +*.vcxproj.filters +*.vcxproj.user +*.sdf +*.opensdf diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialbus-everywhere-src-5.15.2+kde2/.qmake.conf new/qtserialbus-everywhere-src-5.15.5+kde0/.qmake.conf --- old/qtserialbus-everywhere-src-5.15.2+kde2/.qmake.conf 2020-10-28 08:43:31.000000000 +0100 +++ new/qtserialbus-everywhere-src-5.15.5+kde0/.qmake.conf 2022-06-02 22:27:49.000000000 +0200 @@ -2,4 +2,4 @@ CONFIG += warning_clean DEFINES += QT_NO_FOREACH -MODULE_VERSION = 5.15.3 +MODULE_VERSION = 5.15.5 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialbus-everywhere-src-5.15.2+kde2/0001-Revert-Bump-version.patch new/qtserialbus-everywhere-src-5.15.5+kde0/0001-Revert-Bump-version.patch --- old/qtserialbus-everywhere-src-5.15.2+kde2/0001-Revert-Bump-version.patch 2020-10-28 08:43:31.000000000 +0100 +++ new/qtserialbus-everywhere-src-5.15.5+kde0/0001-Revert-Bump-version.patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,23 +0,0 @@ -From f3e916c2c910b10571c6d5ea926e5de11cda2ca5 Mon Sep 17 00:00:00 2001 -From: Fabian Vogt <fv...@suse.de> -Date: Tue, 22 Jun 2021 21:23:27 +0200 -Subject: [PATCH] Revert "Bump version" - -This reverts commit 8bc2ee81eb399a22cd2641aaab169c632dc94fe2. ---- - .qmake.conf | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/.qmake.conf b/.qmake.conf -index 3dea105..23f20e2 100644 ---- a/.qmake.conf -+++ b/.qmake.conf -@@ -2,4 +2,4 @@ load(qt_build_config) - CONFIG += warning_clean - DEFINES += QT_NO_FOREACH - --MODULE_VERSION = 5.15.3 -+MODULE_VERSION = 5.15.2 --- -2.20.1 - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialbus-everywhere-src-5.15.2+kde2/src/plugins/canbus/socketcan/socketcanbackend.cpp new/qtserialbus-everywhere-src-5.15.5+kde0/src/plugins/canbus/socketcan/socketcanbackend.cpp --- old/qtserialbus-everywhere-src-5.15.2+kde2/src/plugins/canbus/socketcan/socketcanbackend.cpp 2020-10-28 08:43:31.000000000 +0100 +++ new/qtserialbus-everywhere-src-5.15.5+kde0/src/plugins/canbus/socketcan/socketcanbackend.cpp 2022-06-02 22:27:49.000000000 +0200 @@ -349,7 +349,7 @@ case QCanBusDevice::BitRateKey: { const quint32 bitRate = value.toUInt(); - libSocketCan->setBitrate(canSocketName, bitRate); + success = libSocketCan->setBitrate(canSocketName, bitRate); break; } default: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialbus-everywhere-src-5.15.2+kde2/src/serialbus/qmodbusclient.cpp new/qtserialbus-everywhere-src-5.15.5+kde0/src/serialbus/qmodbusclient.cpp --- old/qtserialbus-everywhere-src-5.15.2+kde2/src/serialbus/qmodbusclient.cpp 2020-10-28 08:43:31.000000000 +0100 +++ new/qtserialbus-everywhere-src-5.15.5+kde0/src/serialbus/qmodbusclient.cpp 2022-06-02 22:27:49.000000000 +0200 @@ -361,7 +361,7 @@ return; } - if (element.reply->type() != QModbusReply::Common) { + if (element.reply->type() == QModbusReply::Broadcast) { element.reply->setFinished(true); return; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialbus-everywhere-src-5.15.2+kde2/src/serialbus/qmodbuspdu.cpp new/qtserialbus-everywhere-src-5.15.5+kde0/src/serialbus/qmodbuspdu.cpp --- old/qtserialbus-everywhere-src-5.15.2+kde2/src/serialbus/qmodbuspdu.cpp 2020-10-28 08:43:31.000000000 +0100 +++ new/qtserialbus-everywhere-src-5.15.5+kde0/src/serialbus/qmodbuspdu.cpp 2022-06-02 22:27:49.000000000 +0200 @@ -48,13 +48,23 @@ using ResSizeCalc = QHash<quint8, QModbusResponse::CalcFuncPtr>; Q_GLOBAL_STATIC(ResSizeCalc, responseSizeCalculators); -namespace Private { +struct QModbusPduPrivate +{ + QModbusPduPrivate() = delete; + Q_DISABLE_COPY_MOVE(QModbusPduPrivate) enum struct Type { Request, Response }; +/*! + \internal + + Returns the minimum data size in bytes for the given \a pdu and the + Modbus PDU \a type. If the PDU's function code is invalid, undefined + or unknown, the return value will be \c {-1}. +*/ static int minimumDataSize(const QModbusPdu &pdu, Type type) { if (pdu.isException()) @@ -103,44 +113,53 @@ return -1; } -static QDataStream &pduFromStream(QDataStream &stream, QModbusPdu &pdu, Type type) -{ - quint8 codeByte = 0; - if (stream.readRawData(reinterpret_cast<char *>(&codeByte), sizeof(quint8)) != sizeof(quint8)) - return stream; - QModbusPdu::FunctionCode code = QModbusPdu::FunctionCode(codeByte); - pdu.setFunctionCode(code); +/*! + \internal - auto needsAdditionalRead = [](QModbusPdu &pdu, int size) -> bool { - if (size < 0) - pdu.setFunctionCode(QModbusResponse::Invalid); - if (size <= 0) - return false; - return true; - }; + Extracts a Modbus PDU from a \a stream into the given \a pdu based on \a type. +*/ +static QDataStream &pduFromStream(QDataStream &stream, Type type, QModbusPdu *pdu) +{ + struct RAII { + RAII(QModbusPdu *ptr = nullptr) + : tmp(ptr) {} + QModbusPdu *tmp{ nullptr }; + ~RAII() { if (tmp) *tmp = {}; } + } raii = { pdu }; - const bool isResponse = (type == Type::Response); - int size = isResponse ? QModbusResponse::minimumDataSize(pdu) - : QModbusRequest::minimumDataSize(pdu); - if (!needsAdditionalRead(pdu, size)) + QModbusPdu::FunctionCode code = QModbusPdu::FunctionCode::Invalid; + if (stream.readRawData(reinterpret_cast<char *>(&code), sizeof(quint8)) != sizeof(quint8)) return stream; + pdu->setFunctionCode(code); - QByteArray data(size, Qt::Uninitialized); - if (stream.device()->peek(data.data(), data.size()) != size) + if (code == QModbusPdu::Invalid || code == QModbusPdu::UndefinedFunctionCode) // shortcut return stream; - pdu.setData(data); - size = isResponse ? QModbusResponse::calculateDataSize(pdu) - : QModbusRequest::calculateDataSize(pdu); - if (!needsAdditionalRead(pdu, size)) + constexpr const int MaxPduDataSize = 252; // in bytes + + // The calculateDataSize(...) function might need some data inside the + // given PDU argument to be able to figure out the right data size (e.g. + // WriteMultipleCoils contains some kind of "header"). So fake fill the PDU + // with the maximum available data but no more than the allowed max PDU + // data size. + QByteArray data(MaxPduDataSize, Qt::Uninitialized); + int read = stream.device()->peek(data.data(), MaxPduDataSize); + if (read < 0) return stream; + data.resize(read); + pdu->setData(data); + + const bool isResponse = (type == Type::Response); + int size = isResponse ? QModbusResponse::calculateDataSize(*pdu) + : QModbusRequest::calculateDataSize(*pdu); + if (isResponse && (code == QModbusPdu::EncapsulatedInterfaceTransport)) { quint8 meiType; - pdu.decodeData(&meiType); + pdu->decodeData(&meiType); if (meiType == EncapsulatedInterfaceTransport::ReadDeviceIdentification) { int left = size, offset = 0; - while ((left > 0) && (size <= 252)) { // The maximum PDU data size is 252 bytes. + while ((left > 0) && (size <= MaxPduDataSize)) { data.resize(size); const int read = stream.readRawData(data.data() + offset, size - offset); if ((read < 0) || (read != (size - offset))) { @@ -152,35 +171,31 @@ left = QModbusResponse::calculateDataSize(QModbusResponse(code, data)) - offset; size += left; } - if ((stream.status() == QDataStream::Ok) && (size <= 252)) { - pdu.setData(data); + if ((stream.status() == QDataStream::Ok) && (size <= MaxPduDataSize)) { + raii = {}; + pdu->setData(data); return stream; // early return to avoid second read } } else { data.resize(int(stream.device()->size() - 1)); // One byte for the function code. } - } else if (pdu.functionCode() == QModbusPdu::Diagnostics) { + } else if (pdu->functionCode() == QModbusPdu::Diagnostics) { quint16 subCode; - pdu.decodeData(&subCode); + pdu->decodeData(&subCode); if (subCode == Diagnostics::ReturnQueryData) data.resize(int(stream.device()->size() - 1)); // One byte for the function code. } - // reset what we have so far, next read might fail as well - pdu.setData(QByteArray()); - pdu.setFunctionCode(QModbusPdu::Invalid); - - if (data.size() <= 252) { // The maximum PDU data size is 252 bytes. + if (data.size() <= MaxPduDataSize) { data.resize(size); if (stream.readRawData(data.data(), data.size()) == size) { - pdu.setData(data); - pdu.setFunctionCode(code); + raii = {}; + pdu->setData(data); } } return stream; } - -} // namespace Private +}; /*! \class QModbusPdu @@ -533,7 +548,7 @@ */ int QModbusRequest::minimumDataSize(const QModbusRequest &request) { - return Private::minimumDataSize(request, Private::Type::Request); + return QModbusPduPrivate::minimumDataSize(request, QModbusPduPrivate::Type::Request); } /*! @@ -555,7 +570,7 @@ return 1; int size = -1; - int minimum = Private::minimumDataSize(request, Private::Type::Request); + int minimum = QModbusPduPrivate::minimumDataSize(request, QModbusPduPrivate::Type::Request); if (minimum < 0) return size; @@ -620,7 +635,7 @@ */ QDataStream &operator>>(QDataStream &stream, QModbusRequest &pdu) { - return Private::pduFromStream(stream, pdu, Private::Type::Request); + return QModbusPduPrivate::pduFromStream(stream, QModbusPduPrivate::Type::Request, &pdu); } /*! @@ -689,7 +704,7 @@ */ int QModbusResponse::minimumDataSize(const QModbusResponse &response) { - return Private::minimumDataSize(response, Private::Type::Response); + return QModbusPduPrivate::minimumDataSize(response, QModbusPduPrivate::Type::Response); } /*! @@ -711,7 +726,7 @@ return 1; int size = -1; - int minimum = Private::minimumDataSize(response, Private::Type::Response); + int minimum = QModbusPduPrivate::minimumDataSize(response, QModbusPduPrivate::Type::Response); if (minimum < 0) return size; @@ -806,7 +821,7 @@ */ QDataStream &operator>>(QDataStream &stream, QModbusResponse &pdu) { - return Private::pduFromStream(stream, pdu, Private::Type::Response); + return QModbusPduPrivate::pduFromStream(stream, QModbusPduPrivate::Type::Response, &pdu); } /*! diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialbus-everywhere-src-5.15.2+kde2/src/serialbus/qmodbuspdu.h new/qtserialbus-everywhere-src-5.15.5+kde0/src/serialbus/qmodbuspdu.h --- old/qtserialbus-everywhere-src-5.15.2+kde2/src/serialbus/qmodbuspdu.h 2020-10-28 08:43:31.000000000 +0100 +++ new/qtserialbus-everywhere-src-5.15.5+kde0/src/serialbus/qmodbuspdu.h 2022-06-02 22:27:49.000000000 +0200 @@ -183,6 +183,7 @@ FunctionCode m_code = Invalid; QByteArray m_data; friend class QModbusSerialAdu; + friend struct QModbusPduPrivate; }; Q_SERIALBUS_EXPORT QDebug operator<<(QDebug debug, const QModbusPdu &pdu); Q_SERIALBUS_EXPORT QDataStream &operator<<(QDataStream &stream, const QModbusPdu &pdu); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialbus-everywhere-src-5.15.2+kde2/src/serialbus/qmodbusreply.cpp new/qtserialbus-everywhere-src-5.15.5+kde0/src/serialbus/qmodbusreply.cpp --- old/qtserialbus-everywhere-src-5.15.2+kde2/src/serialbus/qmodbusreply.cpp 2020-10-28 08:43:31.000000000 +0100 +++ new/qtserialbus-everywhere-src-5.15.5+kde0/src/serialbus/qmodbusreply.cpp 2022-06-02 22:27:49.000000000 +0200 @@ -147,15 +147,17 @@ If the request has not finished, has failed with an error or was a write request then the returned \l QModbusDataUnit instance is invalid. - \note If the \l type() of the reply is \l QModbusReply::Raw, the return - value will always be invalid. + \note If the \l type() of the reply is \l QModbusReply::Broadcast, the + return value will always be invalid. If the l type() of the reply is + \l QModbusReply::Raw, the return value might be invalid depending on the + implementation of \l QModbusClient::processPrivateResponse(). - \sa type(), rawResult() + \sa type(), rawResult(), QModbusClient::processPrivateResponse() */ QModbusDataUnit QModbusReply::result() const { Q_D(const QModbusReply); - if (type() == QModbusReply::Common) + if (type() != QModbusReply::Broadcast) return d->m_unit; return QModbusDataUnit(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtserialbus-everywhere-src-5.15.2+kde2/tests/auto/qmodbusreply/tst_qmodbusreply.cpp new/qtserialbus-everywhere-src-5.15.5+kde0/tests/auto/qmodbusreply/tst_qmodbusreply.cpp --- old/qtserialbus-everywhere-src-5.15.2+kde2/tests/auto/qmodbusreply/tst_qmodbusreply.cpp 2020-10-28 08:43:31.000000000 +0100 +++ new/qtserialbus-everywhere-src-5.15.5+kde0/tests/auto/qmodbusreply/tst_qmodbusreply.cpp 2022-06-02 22:27:49.000000000 +0200 @@ -213,7 +213,7 @@ replyRawTest.setRawResult(response); QCOMPARE(finishedSpy.count(), 0); QCOMPARE(errorSpyRaw.count(), 0); - QCOMPARE(replyRawTest.result().isValid(), false); + QCOMPARE(replyRawTest.result().isValid(), true); QCOMPARE(replyRawTest.rawResult().isValid(), true); tmp = replyRawTest.rawResult(); ++++++ qtserialbus-everywhere-src.obsinfo ++++++ --- /var/tmp/diff_new_pack.CQWbB1/_old 2022-06-29 16:02:31.524715920 +0200 +++ /var/tmp/diff_new_pack.CQWbB1/_new 2022-06-29 16:02:31.524715920 +0200 @@ -1,6 +1,5 @@ name: qtserialbus-everywhere-src -version: 5.15.2+kde2 -mtime: 1603871011 -commit: 8884c5e43df846deac5a0c7c290eeb633d6bfe32 - +version: 5.15.5+kde0 +mtime: 1654201669 +commit: b6e22f07fb529736c9362d81de7f5c632bd1f439