Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package qt6-opcua for openSUSE:Factory checked in at 2021-12-08 22:09:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qt6-opcua (Old) and /work/SRC/openSUSE:Factory/.qt6-opcua.new.31177 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qt6-opcua" Wed Dec 8 22:09:05 2021 rev:8 rq:936312 version:6.2.2 Changes: -------- --- /work/SRC/openSUSE:Factory/qt6-opcua/qt6-opcua.changes 2021-11-04 16:09:32.125045635 +0100 +++ /work/SRC/openSUSE:Factory/.qt6-opcua.new.31177/qt6-opcua.changes 2021-12-08 22:10:00.738892323 +0100 @@ -1,0 +2,8 @@ +Wed Dec 1 10:06:14 UTC 2021 - Christophe Giboudeaux <[email protected]> + +- Update to 6.2.2 + * https://www.qt.io/blog/qt-6.2.2-released +- Make sure all dependencies are present when installing devel + packages. Qt >= 6.2.2 is much less permissive. + +------------------------------------------------------------------- Old: ---- qtopcua-everywhere-src-6.2.1.tar.xz New: ---- qtopcua-everywhere-src-6.2.2.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qt6-opcua.spec ++++++ --- /var/tmp/diff_new_pack.RWQMJJ/_old 2021-12-08 22:10:01.286892580 +0100 +++ /var/tmp/diff_new_pack.RWQMJJ/_new 2021-12-08 22:10:01.290892582 +0100 @@ -16,7 +16,7 @@ # -%define real_version 6.2.1 +%define real_version 6.2.2 %define short_version 6.2 %define tar_name qtopcua-everywhere-src %define tar_suffix %{nil} @@ -27,7 +27,7 @@ %endif # Name: qt6-opcua%{?pkg_suffix} -Version: 6.2.1 +Version: 6.2.2 Release: 0 Summary: Qt wrapper for existing OPC UA stacks # src/plugins/opcua is GPL-3.0-or-later, rest is dual licensed @@ -68,6 +68,7 @@ %package devel Summary: Qt 6 OpcUa library - Development files Requires: libQt6OpcUa6 = %{version} +Requires: cmake(Qt6Network) %description devel Development files for the Qt 6 OpcUa library. @@ -111,7 +112,8 @@ %postun -n libQt6OpcUa6 -p /sbin/ldconfig %files -%{_qt6_pluginsdir}/opcua/ +%dir %{_qt6_pluginsdir}/opcua +%{_qt6_pluginsdir}/opcua/libopen62541_backend.so %files -n libQt6OpcUa6 %license LICENSE.* ++++++ _service ++++++ --- /var/tmp/diff_new_pack.RWQMJJ/_old 2021-12-08 22:10:01.330892601 +0100 +++ /var/tmp/diff_new_pack.RWQMJJ/_new 2021-12-08 22:10:01.338892604 +0100 @@ -1,9 +1,9 @@ <services> <service name="tar_scm" mode="disabled"> <param name="changesgenerate">disable</param> - <param name="version">6.2.1</param> + <param name="version">6.2.2</param> <param name="url">git://code.qt.io/qt/qtopcua.git</param> - <param name="revision">v6.2.1</param> + <param name="revision">v6.2.2</param> <param name="scm">git</param> <param name="filename">qtopcua-everywhere-src</param> </service> ++++++ qtopcua-everywhere-src-6.2.1.tar.xz -> qtopcua-everywhere-src-6.2.2.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.2.1/.cmake.conf new/qtopcua-everywhere-src-6.2.2/.cmake.conf --- old/qtopcua-everywhere-src-6.2.1/.cmake.conf 2021-10-21 11:07:45.000000000 +0200 +++ new/qtopcua-everywhere-src-6.2.2/.cmake.conf 2021-11-24 22:47:53.000000000 +0100 @@ -1,2 +1,2 @@ -set(QT_REPO_MODULE_VERSION "6.2.1") +set(QT_REPO_MODULE_VERSION "6.2.2") set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.2.1/.qmake.conf new/qtopcua-everywhere-src-6.2.2/.qmake.conf --- old/qtopcua-everywhere-src-6.2.1/.qmake.conf 2021-10-21 11:07:45.000000000 +0200 +++ new/qtopcua-everywhere-src-6.2.2/.qmake.conf 2021-11-24 22:47:53.000000000 +0100 @@ -3,4 +3,4 @@ ROOT_SOURCE_DIR=$$PWD ROOT_BUILD_DIR=$$shadowed($$PWD) -MODULE_VERSION = 6.2.1 +MODULE_VERSION = 6.2.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.2.1/dependencies.yaml new/qtopcua-everywhere-src-6.2.2/dependencies.yaml --- old/qtopcua-everywhere-src-6.2.1/dependencies.yaml 2021-10-21 11:07:45.000000000 +0200 +++ new/qtopcua-everywhere-src-6.2.2/dependencies.yaml 2021-11-24 22:47:53.000000000 +0100 @@ -1,7 +1,7 @@ dependencies: ../qtbase: - ref: 9fa805f7f8dfe96d561e9ed3170770ad768baf93 + ref: eae95814a46386f8930eeae5486513a78a7a4ddc required: true ../qtdeclarative: - ref: 973399d8e67c264a55ff0f394865a1b721bd8b5a + ref: 00c352c4d4b61f8c7a6243768bc5375c3dca3e76 required: true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.2.1/src/plugins/opcua/open62541/qopen62541backend.cpp new/qtopcua-everywhere-src-6.2.2/src/plugins/opcua/open62541/qopen62541backend.cpp --- old/qtopcua-everywhere-src-6.2.1/src/plugins/opcua/open62541/qopen62541backend.cpp 2021-10-21 11:07:45.000000000 +0200 +++ new/qtopcua-everywhere-src-6.2.2/src/plugins/opcua/open62541/qopen62541backend.cpp 2021-11-24 22:47:53.000000000 +0100 @@ -64,10 +64,19 @@ , m_clientIterateInterval(50) , m_asyncRequestTimeout(15000) , m_clientIterateTimer(this) + , m_disconnectAfterStateChangeTimer(this) , m_minPublishingInterval(0) { QObject::connect(&m_clientIterateTimer, &QTimer::timeout, this, &Open62541AsyncBackend::iterateClient); + + m_disconnectAfterStateChangeTimer.setSingleShot(true); + m_disconnectAfterStateChangeTimer.setInterval(0); + + QObject::connect(&m_disconnectAfterStateChangeTimer, &QTimer::timeout, + this, [this]() { + disconnectInternal(QOpcUaClient::ConnectionError); + }); } Open62541AsyncBackend::~Open62541AsyncBackend() @@ -784,9 +793,8 @@ backend->m_useStateCallback = false; backend->m_clientIterateTimer.stop(); - emit backend->stateAndOrErrorChanged(QOpcUaClient::Disconnected, QOpcUaClient::ConnectionError); - - UA_Client_disconnect(client); + // UA_Client_disconnect() must be called from outside this callback or open62541 will crash + backend->m_disconnectAfterStateChangeTimer.start(); // Use a queued connection to make sure the subscription is not deleted if the callback was triggered // inside of one of its methods. @@ -802,10 +810,7 @@ void Open62541AsyncBackend::connectToEndpoint(const QOpcUaEndpointDescription &endpoint) { - cleanupSubscriptions(); - - if (m_uaclient) - UA_Client_delete(m_uaclient); + disconnectInternal(); QString errorMessage; if (!verifyEndpointDescription(endpoint, &errorMessage)) { @@ -825,8 +830,6 @@ emit stateAndOrErrorChanged(QOpcUaClient::Connecting, QOpcUaClient::NoError); - m_useStateCallback = false; - m_uaclient = UA_Client_new(); auto conf = UA_Client_getConfig(m_uaclient); @@ -852,6 +855,8 @@ if (!success) { qCWarning(QT_OPCUA_PLUGINS_OPEN62541) << "Failed to load client certificate"; emit stateAndOrErrorChanged(QOpcUaClient::Disconnected, QOpcUaClient::AccessDenied); + UA_Client_delete(m_uaclient); + m_uaclient = nullptr; return; } @@ -862,6 +867,8 @@ if (!success) { qCWarning(QT_OPCUA_PLUGINS_OPEN62541) << "Failed to load private key"; emit stateAndOrErrorChanged(QOpcUaClient::Disconnected, QOpcUaClient::AccessDenied); + UA_Client_delete(m_uaclient); + m_uaclient = nullptr; return; } @@ -872,6 +879,8 @@ if (!success) { qCWarning(QT_OPCUA_PLUGINS_OPEN62541) << "Failed to load trust list"; emit stateAndOrErrorChanged(QOpcUaClient::Disconnected, QOpcUaClient::AccessDenied); + UA_Client_delete(m_uaclient); + m_uaclient = nullptr; return; } @@ -882,6 +891,8 @@ if (!success) { qCWarning(QT_OPCUA_PLUGINS_OPEN62541) << "Failed to load revocation list"; emit stateAndOrErrorChanged(QOpcUaClient::Disconnected, QOpcUaClient::AccessDenied); + UA_Client_delete(m_uaclient); + m_uaclient = nullptr; return; } @@ -893,6 +904,8 @@ if (result != UA_STATUSCODE_GOOD) { qCWarning(QT_OPCUA_PLUGINS_OPEN62541) << "Failed to initialize PKI:" << static_cast<QOpcUa::UaStatusCode>(result); emit stateAndOrErrorChanged(QOpcUaClient::Disconnected, QOpcUaClient::AccessDenied); + UA_Client_delete(m_uaclient); + m_uaclient = nullptr; return; } } else { @@ -939,6 +952,8 @@ if (!suitableTokenFound) { qCWarning(QT_OPCUA_PLUGINS_OPEN62541) << "No suitable user token policy found"; emit stateAndOrErrorChanged(QOpcUaClient::Disconnected, QOpcUaClient::ClientError::NoError); + UA_Client_delete(m_uaclient); + m_uaclient = nullptr; return; } @@ -949,6 +964,8 @@ emit stateAndOrErrorChanged(QOpcUaClient::Disconnected, QOpcUaClient::UnsupportedAuthenticationInformation); qCWarning(QT_OPCUA_PLUGINS_OPEN62541) << "Failed to connect: Selected authentication type" << authInfo.authenticationType() << "is not supported."; + UA_Client_delete(m_uaclient); + m_uaclient = nullptr; return; } @@ -979,22 +996,7 @@ void Open62541AsyncBackend::disconnectFromEndpoint() { - m_clientIterateTimer.stop(); - cleanupSubscriptions(); - - m_useStateCallback = false; - - if (m_uaclient) { - UA_StatusCode ret = UA_Client_disconnect(m_uaclient); - if (ret != UA_STATUSCODE_GOOD) { - qCWarning(QT_OPCUA_PLUGINS_OPEN62541) << "Open62541: Failed to disconnect"; - // Fall through intentionally - } - UA_Client_delete(m_uaclient); - m_uaclient = nullptr; - } - - emit stateAndOrErrorChanged(QOpcUaClient::Disconnected, QOpcUaClient::NoError); + disconnectInternal(); } void Open62541AsyncBackend::requestEndpoints(const QUrl &url) @@ -1516,6 +1518,20 @@ return true; } +void Open62541AsyncBackend::disconnectInternal(QOpcUaClient::ClientError error) +{ + m_useStateCallback = false; + m_clientIterateTimer.stop(); + cleanupSubscriptions(); + + if (m_uaclient) { + UA_Client_disconnect(m_uaclient); + UA_Client_delete(m_uaclient); + m_uaclient = nullptr; + emit stateAndOrErrorChanged(QOpcUaClient::Disconnected, error); + } +} + UA_ExtensionObject Open62541AsyncBackend::assembleNodeAttributes(const QOpcUaNodeCreationAttributes &nodeAttributes, QOpcUa::NodeClass nodeClass) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.2.1/src/plugins/opcua/open62541/qopen62541backend.h new/qtopcua-everywhere-src-6.2.2/src/plugins/opcua/open62541/qopen62541backend.h --- old/qtopcua-everywhere-src-6.2.1/src/plugins/opcua/open62541/qopen62541backend.h 2021-10-21 11:07:45.000000000 +0200 +++ new/qtopcua-everywhere-src-6.2.2/src/plugins/opcua/open62541/qopen62541backend.h 2021-11-24 22:47:53.000000000 +0100 @@ -126,7 +126,10 @@ bool loadFileToByteString(const QString &location, UA_ByteString *target) const; bool loadAllFilesInDirectory(const QString &location, UA_ByteString **target, int *size) const; + void disconnectInternal(QOpcUaClient::ClientError error = QOpcUaClient::ClientError::NoError); + QTimer m_clientIterateTimer; + QTimer m_disconnectAfterStateChangeTimer; QHash<quint32, QOpen62541Subscription *> m_subscriptions;
