Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package qt6-mqtt for openSUSE:Factory checked in at 2026-11-30 14:24:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qt6-mqtt (Old) and /work/SRC/openSUSE:Factory/.qt6-mqtt.new.1340718 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qt6-mqtt" Mon Nov 30 14:24:59 2026 rev:45 rq:1400910 version:6.12.1 Changes: -------- --- /work/SRC/openSUSE:Factory/qt6-mqtt/qt6-mqtt.changes 2026-10-18 19:23:04.426136644 +0200 +++ /work/SRC/openSUSE:Factory/.qt6-mqtt.new.1340718/qt6-mqtt.changes 2026-11-30 14:26:46.277865377 +0100 @@ -1,0 +2,6 @@ +Tue Nov 24 13:37:22 UTC 2026 - Christophe Marin <[email protected]> + +- Update to 6.12.1 + https://www.qt.io/blog/qt-6.12.1-released + +------------------------------------------------------------------- Old: ---- qtmqtt-everywhere-src-6.12.0.tar.xz New: ---- qtmqtt-everywhere-src-6.12.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qt6-mqtt.spec ++++++ --- /var/tmp/diff_new_pack.wuJP2G/_old 2026-11-30 14:26:49.747011878 +0100 +++ /var/tmp/diff_new_pack.wuJP2G/_new 2026-11-30 14:26:49.749011963 +0100 @@ -16,7 +16,7 @@ # -%define real_version 6.12.0 +%define real_version 6.12.1 %define short_version 6.12 %define tar_name qtmqtt-everywhere-src %define tar_suffix %{nil} @@ -27,7 +27,7 @@ %endif # Name: qt6-mqtt%{?pkg_suffix} -Version: 6.12.0 +Version: 6.12.1 Release: 0 Summary: Qt 6 Module to implement MQTT protocol version 3.1 and 3.1.1 License: GPL-3.0-only WITH Qt-GPL-exception-1.0 @@ -65,12 +65,14 @@ Summary: Qt 6 Mqtt library - Development files Requires: libQt6Mqtt6 = %{version} Requires: cmake(Qt6Network) = %{real_version} +Requires: cmake(Qt6WebSockets) = %{real_version} %description devel Development files for the Qt 6 Mqtt library. %package private-devel Summary: Non-ABI stable API for the Qt 6 Mqtt library +Requires: cmake(Qt6CorePrivate) = %{real_version} Requires: cmake(Qt6Mqtt) = %{real_version} %description private-devel ++++++ _service ++++++ --- /var/tmp/diff_new_pack.wuJP2G/_old 2026-11-30 14:26:49.826015225 +0100 +++ /var/tmp/diff_new_pack.wuJP2G/_new 2026-11-30 14:26:49.832015479 +0100 @@ -1,9 +1,9 @@ <services> <service name="tar_scm" mode="disabled"> <param name="changesgenerate">disable</param> - <param name="version">6.12.0</param> + <param name="version">6.12.1</param> <param name="url">git://code.qt.io/qt/qtmqtt.git</param> - <param name="revision">v6.12.0</param> + <param name="revision">v6.12.1</param> <param name="scm">git</param> <param name="filename">qtmqtt-everywhere-src</param> </service> ++++++ qtmqtt-everywhere-src-6.12.0.tar.xz -> qtmqtt-everywhere-src-6.12.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.12.0/.cmake.conf new/qtmqtt-everywhere-src-6.12.1/.cmake.conf --- old/qtmqtt-everywhere-src-6.12.0/.cmake.conf 2026-09-27 12:11:48.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.12.1/.cmake.conf 2026-11-16 23:08:58.000000000 +0100 @@ -1,4 +1,4 @@ -set(QT_REPO_MODULE_VERSION "6.12.0") +set(QT_REPO_MODULE_VERSION "6.12.1") set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1") set(QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_QASCONST=1") list(APPEND QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_FOREACH=1") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.12.0/dependencies.yaml new/qtmqtt-everywhere-src-6.12.1/dependencies.yaml --- old/qtmqtt-everywhere-src-6.12.0/dependencies.yaml 2026-09-27 12:11:48.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.12.1/dependencies.yaml 2026-11-16 23:08:58.000000000 +0100 @@ -1,10 +1,10 @@ dependencies: ../qtbase: - ref: 025bdad181de241e81bf853c8a2d7bf3d19261a9 + ref: 5af1a37e31a869cd6eb8a73d82e2c71a450e6634 required: true ../qtdeclarative: - ref: 4332fbbb4c340463dc8cee36dda0c85d932122d8 + ref: 935c3c01bc74fee3b8725ae502cd67bb99e3b7e2 required: true ../qtwebsockets: - ref: 6aedb199b5d8ee4afa4cfc956ded22bc0a2632e9 + ref: 130f50637124ac4c490185bbc44ebed358cb36c0 required: false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.12.0/src/mqtt/doc/qtmqtt.qdocconf new/qtmqtt-everywhere-src-6.12.1/src/mqtt/doc/qtmqtt.qdocconf --- old/qtmqtt-everywhere-src-6.12.0/src/mqtt/doc/qtmqtt.qdocconf 2026-09-27 12:11:48.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.12.1/src/mqtt/doc/qtmqtt.qdocconf 2026-11-16 23:08:58.000000000 +0100 @@ -22,7 +22,7 @@ qhp.QtMqtt.subprojects.classes.title = C++ Classes qhp.QtMqtt.subprojects.classes.indexTitle = Qt MQTT C++ Classes -qhp.QtMqtt.subprojects.classes.selectors = class fake:headerfile +qhp.QtMqtt.subprojects.classes.selectors = class namespace headerfile qhp.QtMqtt.subprojects.classes.sortPages = true qhp.QtMqtt.subprojects.examples.title = Examples diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.12.0/src/mqtt/doc/src/overview.qdoc new/qtmqtt-everywhere-src-6.12.1/src/mqtt/doc/src/overview.qdoc --- old/qtmqtt-everywhere-src-6.12.0/src/mqtt/doc/src/overview.qdoc 2026-09-27 12:11:48.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.12.1/src/mqtt/doc/src/overview.qdoc 2026-11-16 23:08:58.000000000 +0100 @@ -179,4 +179,18 @@ discarded. The broker \e{should} store the last message, but \e{may} also discard it. This depends on the implementation of the broker. + \section1 Threading and Blocking Operations + + Consider running \l QMqttClient and its related classes in a thread + separate from the UI thread.\l QMqttClient uses a \l QIODevice as + its transport, and some transport operations may block. For example, + QMqttClient::disconnectFromHost() may wait synchronously for pending + data to be written, with a timeout of up to 30 seconds. Calling it from + the UI thread can therefore block the UI event loop and make the + application unresponsive. Keeping the MQTT client and its transport in + a dedicated thread helps prevent potentially blocking I/O from affecting + UI responsiveness. Use signals and slots or other mechanisms that queue + work to the target thread to communicate between the MQTT thread and + the UI thread. + */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.12.0/src/mqtt/qmqttclient.cpp new/qtmqtt-everywhere-src-6.12.1/src/mqtt/qmqttclient.cpp --- old/qtmqtt-everywhere-src-6.12.0/src/mqtt/qmqttclient.cpp 2026-09-27 12:11:48.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.12.1/src/mqtt/qmqttclient.cpp 2026-11-16 23:08:58.000000000 +0100 @@ -637,6 +637,11 @@ /*! Disconnects from the MQTT broker. + + \note This function may block while waiting for pending data + to be written to the transport. + See \l {Threading and Blocking Operations} for recommended approaches + on handling it. */ void QMqttClient::disconnectFromHost() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.12.0/src/mqtt/qmqttconnection.cpp new/qtmqtt-everywhere-src-6.12.1/src/mqtt/qmqttconnection.cpp --- old/qtmqtt-everywhere-src-6.12.0/src/mqtt/qmqttconnection.cpp 2026-09-27 12:11:48.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.12.1/src/mqtt/qmqttconnection.cpp 2026-11-16 23:08:58.000000000 +0100 @@ -32,10 +32,16 @@ T result = 0; if (Q_UNLIKELY(dataSize != nullptr && *dataSize < qint64(sizeof(result)))) { qCWarning(lcMqttConnection) << "Attempt to read past the data"; + *dataSize = 0; return result; } - if (readBuffer(reinterpret_cast<char *>(&result), sizeof(result)) && dataSize != nullptr) - *dataSize -= sizeof(result); + const bool isOk = readBuffer(reinterpret_cast<char *>(&result), sizeof(result)); + if (dataSize != nullptr) { + if (isOk) + *dataSize -= sizeof(result); + else + *dataSize = 0; + } return qFromBigEndian(result); } @@ -45,10 +51,17 @@ const quint16 size = readBufferTyped<quint16>(dataSize); if (Q_UNLIKELY(dataSize != nullptr && *dataSize < qint64(size))) { qCWarning(lcMqttConnection) << "Attempt to read past the data"; + *dataSize = 0; return QByteArray(); } QByteArray ba(int(size), Qt::Uninitialized); - if (readBuffer(ba.data(), size) && dataSize != nullptr) + const bool isOk = readBuffer(ba.data(), size); + if (!isOk) { + if (dataSize != nullptr) + *dataSize = 0; + return QByteArray(); + } + if (dataSize != nullptr) *dataSize -= size; return ba; } @@ -713,7 +726,7 @@ return true; } -bool QMqttConnection::sendControlDisconnect() +bool QMqttConnection::sendControlDisconnect(std::optional<QMqtt::ReasonCode> reasonCode) { qCDebug(lcMqttConnection) << Q_FUNC_INFO; @@ -725,7 +738,13 @@ m_receiveAliases.clear(); m_publishAliases.clear(); - const QMqttControlPacket packet(QMqttControlPacket::DISCONNECT); + QMqttControlPacket packet(QMqttControlPacket::DISCONNECT); + if (m_clientPrivate->m_protocolVersion == QMqttClient::MQTT_5_0 && reasonCode) { + // MQTT-3.14.2 The Disconnect Reason Code is a part of the variable header. + // Reason codes exist in MQTT 5.0 only, so this is never used for an older version. + packet.append(char(quint8(*reasonCode))); + packet.append(char(0)); // MQTT-3.14.2.2 property length, we send no properties + } if (!writePacketToTransport(packet)) { qCDebug(lcMqttConnection) << "Failed to write DISCONNECT to transport."; return false; @@ -1922,11 +1941,26 @@ bool QMqttConnection::processDataHelper() { if (m_missingData > 0) { - if ((m_readBuffer.size() - m_readPosition) < m_missingData) - return false; - // MQTT-2.1.4 The remaining length in the fixed header says where the message ends. const qint64 packetEnd = qint64(m_readPosition) + m_missingData; + // 3.1.2.11.4 Maximum Packet Size + // If client receives a packet whose size exceeds this limit, + // this is a Protocol Error, the Client uses DISCONNECT with + // Reason Code 0x95 (Packet too large), + if (m_clientPrivate->m_protocolVersion == QMqttClient::MQTT_5_0 + && (m_internalState == BrokerConnected + || m_internalState == BrokerWaitForConnectAck)) { + const quint32 maxSize = m_clientPrivate->m_connectionProperties.maximumPacketSize(); + if (maxSize > 0 && packetEnd > maxSize) { + qCDebug(lcMqttConnection) << "Packet size exceeds the announced maximum."; + m_clientPrivate->m_client->setError(QMqttClient::ProtocolViolation); + sendControlDisconnect(QMqtt::ReasonCode::PacketTooLarge); + return false; + } + } + + if ((m_readBuffer.size() - m_readPosition) < m_missingData) + return false; switch (m_currentPacket & 0xF0) { case QMqttControlPacket::AUTH: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.12.0/src/mqtt/qmqttconnection_p.h new/qtmqtt-everywhere-src-6.12.1/src/mqtt/qmqttconnection_p.h --- old/qtmqtt-everywhere-src-6.12.0/src/mqtt/qmqttconnection_p.h 2026-09-27 12:11:48.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.12.1/src/mqtt/qmqttconnection_p.h 2026-11-16 23:08:58.000000000 +0100 @@ -28,6 +28,7 @@ #include <QtCore/QtEndian> #include <memory> +#include <optional> QT_BEGIN_NAMESPACE @@ -67,7 +68,7 @@ QMqttSubscription *sendControlSubscribe(const QMqttTopicFilter &topic, quint8 qos, const QMqttSubscriptionProperties &properties); bool sendControlUnsubscribe(const QMqttTopicFilter &topic, const QMqttUnsubscriptionProperties &properties); bool sendControlPingRequest(bool isAuto = true); - bool sendControlDisconnect(); + bool sendControlDisconnect(std::optional<QMqtt::ReasonCode> reasonCode = std::nullopt); void setClientPrivate(QMqttClientPrivate *clientPrivate);
