[packages/open62541] - updated to 1.4.12 (new soname)

qboosh qboosh at pld-linux.org
Sun May 18 17:41:18 CEST 2025


commit 54508602bbba29be6cea5dfc478c51c07b041cfe
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun May 18 17:13:34 2025 +0200

    - updated to 1.4.12 (new soname)

 open62541-bpf.patch            | 94 ------------------------------------------
 open62541-libwebsockets4.patch | 13 ------
 open62541-rpath.patch          | 12 +++---
 open62541-visibility.patch     | 20 ++++-----
 open62541.spec                 | 87 +++++++++++++++++---------------------
 5 files changed, 52 insertions(+), 174 deletions(-)
---
diff --git a/open62541.spec b/open62541.spec
index 70afb44..0124215 100644
--- a/open62541.spec
+++ b/open62541.spec
@@ -6,26 +6,21 @@
 Summary:	Open source C implementation of OPC UA
 Summary(pl.UTF-8):	Mająca otwarte źródła, napisana w C implementacja OPC UA
 Name:		open62541
-Version:	1.3.5
+Version:	1.4.12
 Release:	1
 License:	MPL v2.0
 Group:		Libraries
 #Source0Download: https://github.com/open62541/open62541/releases
 Source0:	https://github.com/open62541/open62541/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5:	027a8d26b41cddd85a70105bc5069d7c
+# Source0-md5:	b19ab256f657ccd2e02dc1d1e0097aca
 Patch0:		%{name}-types.patch
-Patch1:		%{name}-bpf.patch
-Patch2:		%{name}-libwebsockets4.patch
 Patch3:		%{name}-visibility.patch
 Patch4:		%{name}-rpath.patch
-URL:		http://www.open62541.org/
-BuildRequires:	cmake >= 3.0
-BuildRequires:	libbpf-devel
-BuildRequires:	libwebsockets-devel
-BuildRequires:	libxdp-devel
-# required for ENCRYPTION=MBEDTLS and PUBSUB_ENCRYPTION
+URL:		https://www.open62541.org/
+BuildRequires:	cmake >= 3.13
+# required for UA_ENABLE_ENCRYPTION=MBEDTLS and UA_ENABLE_PUBSUB_ENCRYPTION
 BuildRequires:	mbedtls-devel
-# required for TPM2_KEYSTORE (cert_encrypt_tpm tool) - or with (non-default) ENCRYPTION=OPENSSL
+# required for TPM2_KEYSTORE (cert_encrypt_tpm tool) - or with (non-default) UA_ENABLE_ENCRYPTION=OPENSSL
 BuildRequires:	openssl-devel
 BuildRequires:	p11-kit-devel
 BuildRequires:	python3 >= 1:3
@@ -85,33 +80,24 @@ Dokumentacja API biblioteki open62541.
 %prep
 %setup -q
 %patch -P0 -p1
-%patch -P1 -p1
-%patch -P2 -p1
 %patch -P3 -p1
 %patch -P4 -p1
 
-# not for gcc
-%{__sed} -i -e '/check_add_.*-Wno-static-in-inline/d' CMakeLists.txt
-
-%{__sed} -i -e '1s,/usr/bin/env python,%{__python},' \
-	tools/*.py \
-	tools/nodeset_compiler/nodeset_testing.py
-
 %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' \
+	tools/*.py \
 	tools/certs/create_self-signed.py \
-	tools/nodeset_compiler/nodeset_compiler.py
+	tools/nodeset_compiler/nodeset_compiler.py \
+	tools/nodeset_compiler/nodeset_testing.py
 
 # not executable directly, drop shebangs
-%{__sed} -i -e '1s,.*/usr/bin/env python.*,,' \
+%{__sed} -i -e '1s,.*/usr/bin/env python3,,' \
 	tools/nodeset_compiler/{backend_open62541,backend_open62541_nodes,datatypes,nodes,nodeset}.py
 
 %build
-install -d build
-cd build
 # tpm2 support needs pkcs11.h from tpm2-pkcs11, which is in fast p11-kit include file
 CFLAGS="%{rpmcflags} -I/usr/include/p11-kit-1/p11-kit -Wno-error=maybe-uninitialized"
 LDFLAGS="%{rpmldflags} -L%{_libdir}/pkcs11"
-%cmake .. \
+%cmake -B build \
 	-DCMAKE_INSTALL_INCLUDEDIR=include \
 	-DCMAKE_INSTALL_LIBDIR=%{_lib} \
 	-DTPM2_LIB=%{_libdir}/pkcs11/libtpm2_pkcs11.so \
@@ -122,18 +108,16 @@ LDFLAGS="%{rpmldflags} -L%{_libdir}/pkcs11"
 	-DUA_ENABLE_JSON_ENCODING=ON \
 	-DUA_ENABLE_PUBSUB=ON \
 	-DUA_ENABLE_PUBSUB_ENCRYPTION=ON \
-	-DUA_ENABLE_PUBSUB_ETH_UADP=ON \
-	-DUA_ENABLE_WEBSOCKET_SERVER=ON \
 	-DUA_MULTITHREADING=100
 
 # -DUA_ENABLE_DISCOVERY_MULTICAST=ON requires deps/mdnsd
-# -DUA_ENABLE_PUBSUB_MQTT (and -DUA_ENABLE_MQTT_TLS) requires deps/mqtt-c
-# -DUA_NAMESPACE_ZERO=FULL requires deps/ua_nodeset
+# -DUA_ENABLE_MQTT requires deps/mqtt-c
+# -DUA_NAMESPACE_ZERO=FULL requires deps/ua-nodeset
 
-%{__make}
+%{__make} -C build
 
 %if %{with apidocs}
-%{__make} doc
+%{__make} -C build doc
 %endif
 
 %install
@@ -143,7 +127,10 @@ rm -rf $RPM_BUILD_ROOT
 	DESTDIR=$RPM_BUILD_ROOT
 
 # tests
-%{__rm} $RPM_BUILD_ROOT%{_datadir}/open62541/tools/nodeset_compiler/nodeset_testing.py
+%{__rm} $RPM_BUILD_ROOT%{_datadir}/open62541/nodeset_compiler/nodeset_testing.py
+
+%py3_comp $RPM_BUILD_ROOT%{_datadir}/open62541/nodeset_compiler
+%py3_ocomp $RPM_BUILD_ROOT%{_datadir}/open62541/nodeset_compiler
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -155,30 +142,30 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc AUTHORS CHANGELOG FEATURES.md README.md
 %attr(755,root,root) %{_libdir}/libopen62541.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libopen62541.so.1
+%attr(755,root,root) %ghost %{_libdir}/libopen62541.so.1.4
 %dir %{_datadir}/open62541
-%dir %{_datadir}/open62541/tools
-%attr(755,root,root) %{_datadir}/open62541/tools/generate_*.py
-%dir %{_datadir}/open62541/tools/certs
-%attr(755,root,root) %{_datadir}/open62541/tools/certs/create_self-signed.py
-%{_datadir}/open62541/tools/certs/localhost.cnf
-%dir %{_datadir}/open62541/tools/nodeset_compiler
-%attr(755,root,root) %{_datadir}/open62541/tools/nodeset_compiler/nodeset_compiler.py
-%{_datadir}/open62541/tools/nodeset_compiler/[!n]*.py
-%{_datadir}/open62541/tools/nodeset_compiler/nodes.py
-%{_datadir}/open62541/tools/nodeset_compiler/nodeset.py
-%{_datadir}/open62541/tools/nodeset_compiler/__pycache__
-%{_datadir}/open62541/tools/nodeset_compiler/NodeID_NS0_Base.txt
-%doc %{_datadir}/open62541/tools/nodeset_compiler/README.md
-%{_datadir}/open62541/tools/schema
+%attr(755,root,root) %{_datadir}/open62541/generate_*.py
+%dir %{_datadir}/open62541/certs
+%attr(755,root,root) %{_datadir}/open62541/certs/create_self-signed.py
+%{_datadir}/open62541/certs/localhost.cnf
+%dir %{_datadir}/open62541/nodeset_compiler
+%attr(755,root,root) %{_datadir}/open62541/nodeset_compiler/nodeset_compiler.py
+%{_datadir}/open62541/nodeset_compiler/__init__.py
+%{_datadir}/open62541/nodeset_compiler/backend_*.py
+%{_datadir}/open62541/nodeset_compiler/datatypes.py
+%{_datadir}/open62541/nodeset_compiler/nodes.py
+%{_datadir}/open62541/nodeset_compiler/nodeset.py
+%{_datadir}/open62541/nodeset_compiler/opaque_type_mapping.py
+%{_datadir}/open62541/nodeset_compiler/type_parser.py
+%{_datadir}/open62541/nodeset_compiler/__pycache__
+%{_datadir}/open62541/nodeset_compiler/NodeID_NS0_Base.txt
+%doc %{_datadir}/open62541/nodeset_compiler/README.md
+%{_datadir}/open62541/schema
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libopen62541.so
 %{_includedir}/open62541
-%{_includedir}/aa_tree.h
-%{_includedir}/ms_stdint.h
-%{_includedir}/ziptree.h
 %{_pkgconfigdir}/open62541.pc
 %{_libdir}/cmake/open62541
 
diff --git a/open62541-bpf.patch b/open62541-bpf.patch
deleted file mode 100644
index 9d592dd..0000000
--- a/open62541-bpf.patch
+++ /dev/null
@@ -1,94 +0,0 @@
---- open62541-1.3.3/plugins/ua_pubsub_ethernet.c.orig	2022-08-03 10:12:48.000000000 +0200
-+++ open62541-1.3.3/plugins/ua_pubsub_ethernet.c	2022-10-23 19:33:13.718556139 +0200
-@@ -43,7 +43,7 @@ static UA_THREAD_LOCAL UA_Byte ReceiveMs
- #include <linux/if_link.h>
- 
- #if defined __has_include
--#   if __has_include(<bpf/bpf.h>) && __has_include(<bpf/libbpf.h>) && __has_include(<bpf/xsk.h>)
-+#   if __has_include(<bpf/bpf.h>) && __has_include(<bpf/libbpf.h>) && __has_include(<xdp/xsk.h>)
- #       define LIBBPF_EBPF
-         /* Libbpf headers */
- #       include <bpf/bpf.h>
-@@ -51,7 +51,7 @@ static UA_THREAD_LOCAL UA_Byte ReceiveMs
- #       ifndef asm
- #           define asm __asm__
- #       endif
--#       include <bpf/xsk.h>
-+#       include <xdp/xsk.h>
- #   endif
- #endif
- #endif
-@@ -292,7 +292,7 @@ static xdpsock *xsk_configure(xdp_umem *
- 
-     if (!xdp_socket->umem) {
-         UA_close(xsk_socket__fd(xdp_socket->xskfd));
--        bpf_set_link_xdp_fd(ifindex, -1, xdp_flags);
-+        bpf_xdp_attach(ifindex, -1, xdp_flags, NULL);
-         UA_free(xskparam);
-         UA_free(xdp_socket);
-         return NULL;
-@@ -335,13 +335,13 @@ static xdpsock *xsk_configure(xdp_umem *
-         (void)xsk_umem__delete(xdp_socket->umem->umem);
-         UA_free(xdp_socket->umem);
-         UA_close(xsk_socket__fd(xdp_socket->xskfd));
--        bpf_set_link_xdp_fd(ifindex, -1, xdp_flags);
-+        bpf_xdp_attach(ifindex, -1, xdp_flags, NULL);
-         UA_free(xskparam);
-         UA_free(xdp_socket);
-         return NULL;
-     }
- 
--    ret = bpf_get_link_xdp_id(ifindex, &xdp_socket->bpf_prog_id, xdp_flags);
-+    ret = bpf_xdp_query_id(ifindex, (int)xdp_flags, &xdp_socket->bpf_prog_id);
-     if (ret) {
-         UA_LOG_ERROR (UA_Log_Stdout, UA_LOGCATEGORY_SERVER,
-             "PubSub Connection creation failed. Unable to retrieve XDP program.");
-@@ -349,7 +349,7 @@ static xdpsock *xsk_configure(xdp_umem *
-         (void)xsk_umem__delete(xdp_socket->umem->umem);
-         UA_free(xdp_socket->umem);
-         UA_close(xsk_socket__fd(xdp_socket->xskfd));
--        bpf_set_link_xdp_fd(ifindex, -1, xdp_flags);
-+        bpf_xdp_attach(ifindex, -1, xdp_flags, NULL);
-         UA_free(xskparam);
-         UA_free(xdp_socket);
-         return NULL;
-@@ -378,8 +378,8 @@ UA_PubSubChannelEthernetXDP_open(UA_PubS
-                                                    sockOptions->xdp_bind_flags);
-     if(!channelDataEthernet->xdpsocket) {
-         UA_LOG_ERROR(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, "XDP Socket configuration failed");
--        bpf_set_link_xdp_fd(channelDataEthernet->ifindex, -1,
--                            sockOptions->xdp_flags);
-+        bpf_xdp_attach(channelDataEthernet->ifindex, -1,
-+                       sockOptions->xdp_flags, NULL);
-         return UA_STATUSCODE_BADINTERNALERROR;
-     }
- 
-@@ -477,7 +477,7 @@ UA_PubSubChannelEthernetXDP_receive(UA_P
-     UA_UInt64 ret;
-     UA_UInt32 rcvd;
-     UA_Byte *pkt, *buf;
--    ssize_t len;
-+    size_t len;
- 
-     xdp_socket = channelDataEthernet->xdpsocket;
-     message->length = 0;
-@@ -1283,7 +1283,7 @@ UA_PubSubChannelEthernet_close(UA_PubSub
-         xsk_socket__delete(channelDataEthernet->xdpsocket->xskfd);
-         (void)xsk_umem__delete(channelDataEthernet->xdpsocket->umem->umem);
-         /* Detach XDP program from the interface */
--        bpf_set_link_xdp_fd(channelDataEthernet->ifindex, -1, channelDataEthernet->xdp_flags);
-+        bpf_xdp_attach(channelDataEthernet->ifindex, -1, channelDataEthernet->xdp_flags, NULL);
-         UA_free(channelDataEthernet->xdpsocket->umem->buffer);
-         UA_free(channelDataEthernet->xdpsocket->umem);
-         UA_free(channelDataEthernet->xdpsocket);
---- open62541-1.3.3/CMakeLists.txt.orig	2022-08-03 10:12:48.000000000 +0200
-+++ open62541-1.3.3/CMakeLists.txt	2022-10-24 21:15:11.600677093 +0200
-@@ -1088,7 +1088,7 @@ if(UA_ENABLE_PUBSUB)
-         list(APPEND default_plugin_sources ${PROJECT_SOURCE_DIR}/plugins/ua_pubsub_ethernet.c)
-         find_library(LIB_BPF bpf)
-         if(LIB_BPF)
--            list(APPEND open62541_LIBRARIES bpf)
-+            list(APPEND open62541_LIBRARIES xdp bpf)
-         else()
-             message("bpf library not found. XDP functionalities will not be available.")
-         endif()
diff --git a/open62541-libwebsockets4.patch b/open62541-libwebsockets4.patch
deleted file mode 100644
index d59ea89..0000000
--- a/open62541-libwebsockets4.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-ws_ping_pong_interval was added in libwebsockets 3 and removed in libwebsockets 4
---- open62541-1.3.2/arch/network_ws.c.orig	2022-06-24 11:05:00.000000000 +0200
-+++ open62541-1.3.2/arch/network_ws.c	2022-07-02 20:26:37.311814259 +0200
-@@ -292,7 +292,9 @@ ServerNetworkLayerWS_start(UA_ServerNetw
-     info.port = layer->port;
-     info.protocols = protocols;
-     info.vhost_name = (char *)nl->discoveryUrl.data;
-+#if LWS_LIBRARY_VERSION_MAJOR == 3
-     info.ws_ping_pong_interval = 10;
-+#endif
-     info.options = LWS_SERVER_OPTION_HTTP_HEADERS_SECURITY_BEST_PRACTICES_ENFORCE;
-     info.pvo = &pvo;
-     info.user = layer;
diff --git a/open62541-rpath.patch b/open62541-rpath.patch
index 5e79dbc..f96bdbb 100644
--- a/open62541-rpath.patch
+++ b/open62541-rpath.patch
@@ -1,11 +1,9 @@
---- open62541-1.3.2/CMakeLists.txt.orig	2022-07-03 20:43:12.521687098 +0200
-+++ open62541-1.3.2/CMakeLists.txt	2022-07-03 21:15:49.954416108 +0200
-@@ -1517,7 +1517,8 @@ list(APPEND open62541_LIBRARIES ${ua_arc
- target_compile_definitions(open62541 PUBLIC UA_ARCHITECTURE_${UA_ARCHITECTURE_UPPER})
- 
+--- open62541-1.4.12/CMakeLists.txt.orig	2025-05-15 16:27:26.000000000 +0200
++++ open62541-1.4.12/CMakeLists.txt	2025-05-18 16:43:30.597323594 +0200
+@@ -1420,6 +1420,7 @@ SET_TARGET_PROPERTIES(open62541 PROPERTI
  # DLL requires linking to dependencies
--target_link_libraries(open62541 ${open62541_LIBRARIES})
-+target_link_libraries(open62541 ${open62541_LIBRARIES})
+ target_link_libraries(open62541 PUBLIC ${open62541_PUBLIC_LIBRARIES})
+ target_link_libraries(open62541 PRIVATE ${open62541_LIBRARIES})
 +set_target_properties(open62541 PROPERTIES INSTALL_RPATH "/usr/lib${LIB_SUFFIX}/pkcs11")
  
  ##########################
diff --git a/open62541-visibility.patch b/open62541-visibility.patch
index 2ea9bef..34f8cfd 100644
--- a/open62541-visibility.patch
+++ b/open62541-visibility.patch
@@ -1,7 +1,7 @@
 ua2json tool requires UA_NetworkMessage_* visible from library
---- open62541-1.3.5/src/pubsub/ua_pubsub_networkmessage.h.orig	2023-02-20 10:17:48.000000000 +0100
-+++ open62541-1.3.5/src/pubsub/ua_pubsub_networkmessage.h	2023-04-07 22:02:06.485719292 +0200
-@@ -273,6 +273,7 @@ UA_NetworkMessage_updateBufferedNwMessag
+--- open62541-1.4.12/src/pubsub/ua_pubsub_networkmessage.h.orig	2025-05-15 16:27:26.000000000 +0200
++++ open62541-1.4.12/src/pubsub/ua_pubsub_networkmessage.h	2025-05-18 16:36:37.302895935 +0200
+@@ -268,6 +268,7 @@ void UA_DataSetMessage_clear(UA_DataSetM
  
  /* If dataToEncryptStart not-NULL, then it will be set to the start-position of
   * the payload in the buffer. */
@@ -9,18 +9,18 @@ ua2json tool requires UA_NetworkMessage_* visible from library
  UA_StatusCode
  UA_NetworkMessage_encodeBinary(const UA_NetworkMessage* src,
                                 UA_Byte **bufPos, const UA_Byte *bufEnd,
-@@ -303,6 +304,7 @@ UA_NetworkMessage_decodePayload(const UA
- UA_StatusCode
- UA_NetworkMessage_decodeFooters(const UA_ByteString *src, size_t *offset, UA_NetworkMessage *dst);
+@@ -302,6 +303,7 @@ UA_StatusCode
+ UA_NetworkMessage_decodeFooters(const UA_ByteString *src, size_t *offset,
+                                 UA_NetworkMessage *dst);
  
 +UA_EXPORT
  UA_StatusCode
  UA_NetworkMessage_decodeBinary(const UA_ByteString *src, size_t *offset,
-                                UA_NetworkMessage* dst);
-@@ -311,6 +313,7 @@ UA_NetworkMessage_decodeBinary(const UA_
- UA_StatusCode
- UA_NetworkMessageHeader_decodeBinary(const UA_ByteString *src, size_t *offset, UA_NetworkMessage *dst);
+                                UA_NetworkMessage* dst, const UA_DataTypeArray *customTypes);
+@@ -311,6 +313,7 @@ UA_NetworkMessageHeader_decodeBinary(con
+                                      UA_NetworkMessage *dst);
  
+ /* Also stores the offset if offsetBuffer != NULL */
 +UA_EXPORT
  size_t
  UA_NetworkMessage_calcSizeBinary(UA_NetworkMessage *p,
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/open62541.git/commitdiff/54508602bbba29be6cea5dfc478c51c07b041cfe



More information about the pld-cvs-commit mailing list