diff options
| author | Johannes Kauffmann <johanneskauffmann@hotmail.com> | 2026-01-15 11:53:25 +0100 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2026-01-16 09:36:23 -0800 |
| commit | 3e3f0eac0f599e92442d8c6c0000eb961d8c4170 (patch) | |
| tree | 4b301a9d574dd115278c184ca0c408b1eed4acc5 | |
| parent | 121b5f89c870ba9f47fc21d4d4c46076d8e6e5df (diff) | |
| download | meta-openembedded-3e3f0eac0f599e92442d8c6c0000eb961d8c4170.tar.gz | |
open62541: update to v1.4
Use the latest commit from the 1.4 branch; the last 1.4 release was 3
months ago so it contains important fixes.
- The contents of /usr/share/ are slightly different, so change the path
slightly.
- The new patch fixes the .pc file generation (it also ensures that
there are no references to absolute paths in the .pc file which would
need to be removed again).
- PubSub information model is now enabled by default, add a new option
to disable it (disabling only pubsub isn't enough).
Signed-off-by: Johannes Kauffmann <johanneskauffmann@hotmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-networking/recipes-protocols/opcua/open62541/0001-fix-build-do-not-install-git-files.patch | 24 | ||||
| -rw-r--r-- | meta-networking/recipes-protocols/opcua/open62541/a725a263124ae8c87fe6af34a9b3a7981b7f116d.patch | 114 | ||||
| -rw-r--r-- | meta-networking/recipes-protocols/opcua/open62541_1.4.14.bb (renamed from meta-networking/recipes-protocols/opcua/open62541_1.3.15.bb) | 17 |
3 files changed, 123 insertions, 32 deletions
diff --git a/meta-networking/recipes-protocols/opcua/open62541/0001-fix-build-do-not-install-git-files.patch b/meta-networking/recipes-protocols/opcua/open62541/0001-fix-build-do-not-install-git-files.patch deleted file mode 100644 index b93e311054..0000000000 --- a/meta-networking/recipes-protocols/opcua/open62541/0001-fix-build-do-not-install-git-files.patch +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | From a490e82dca5a669b0af27a13d74759d8f77e2333 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Vyacheslav Yurkov <v.yurkov@precitec.de> | ||
| 3 | Date: Mon, 3 Oct 2022 18:25:15 +0200 | ||
| 4 | Subject: [PATCH] fix(build): do not install git files | ||
| 5 | |||
| 6 | Signed-off-by: Vyacheslav Yurkov <v.yurkov@precitec.de> | ||
| 7 | --- | ||
| 8 | Upstream-Status: Backport [https://github.com/open62541/open62541/commit/a0328d4cb527f9778a262fc4a6b42bfbdffc38e9] | ||
| 9 | |||
| 10 | CMakeLists.txt | 1 + | ||
| 11 | 1 file changed, 1 insertion(+) | ||
| 12 | |||
| 13 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| 14 | index 1934374e..bc5c8bad 100644 | ||
| 15 | --- a/CMakeLists.txt | ||
| 16 | +++ b/CMakeLists.txt | ||
| 17 | @@ -1703,6 +1703,7 @@ install(DIRECTORY ${UA_install_tools_dirs} | ||
| 18 | FILES_MATCHING | ||
| 19 | PATTERN "*" | ||
| 20 | PATTERN "*.pyc" EXCLUDE | ||
| 21 | + PATTERN ".git*" EXCLUDE | ||
| 22 | ) | ||
| 23 | |||
| 24 | install(FILES ${UA_install_tools_files} DESTINATION ${open62541_install_tools_dir}) | ||
diff --git a/meta-networking/recipes-protocols/opcua/open62541/a725a263124ae8c87fe6af34a9b3a7981b7f116d.patch b/meta-networking/recipes-protocols/opcua/open62541/a725a263124ae8c87fe6af34a9b3a7981b7f116d.patch new file mode 100644 index 0000000000..6d038d4cba --- /dev/null +++ b/meta-networking/recipes-protocols/opcua/open62541/a725a263124ae8c87fe6af34a9b3a7981b7f116d.patch | |||
| @@ -0,0 +1,114 @@ | |||
| 1 | From a725a263124ae8c87fe6af34a9b3a7981b7f116d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Johannes Kauffmann <johanneskauffmann@hotmail.com> | ||
| 3 | Date: Wed, 10 Dec 2025 09:36:55 +0100 | ||
| 4 | Subject: [PATCH] fix(build): List private dependencies in .pc file | ||
| 5 | |||
| 6 | In the "normal" case of linking to open62541.so, only -lopen62541 is | ||
| 7 | needed in `Libs` because open62541's dependencies are not exposed via | ||
| 8 | its public header files. | ||
| 9 | |||
| 10 | All the other dependencies (`Requires.private` and `Libs.private`) only | ||
| 11 | matter using open62541.a (linking statically via `pkg-config --static`). | ||
| 12 | The crypto libraries and TMP2 library provide .pc files themselves, so | ||
| 13 | we can list them in `Requires.private`. The other (direct) open62541 | ||
| 14 | dependencies are listed in `Libs.private`. | ||
| 15 | |||
| 16 | Also reorder the .pc file (`Libs` comes last and `Requires(.private) | ||
| 17 | comes` before `Cflags`). | ||
| 18 | |||
| 19 | Fixes: #7574 | ||
| 20 | |||
| 21 | Upstream-Status: Submitted [https://github.com/open62541/open62541/pull/7588] | ||
| 22 | --- | ||
| 23 | CMakeLists.txt | 22 +++++++++++----------- | ||
| 24 | tools/open62541.pc.in | 4 +++- | ||
| 25 | 2 files changed, 14 insertions(+), 12 deletions(-) | ||
| 26 | |||
| 27 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| 28 | index 91bf382fd71..6ef54a67847 100644 | ||
| 29 | --- a/CMakeLists.txt | ||
| 30 | +++ b/CMakeLists.txt | ||
| 31 | @@ -493,13 +493,18 @@ endif() | ||
| 32 | |||
| 33 | set(open62541_LIBRARIES "") | ||
| 34 | set(open62541_PUBLIC_LIBRARIES "") | ||
| 35 | +set(pkgcfg_libsprivate "") | ||
| 36 | +set(pkgcfg_requiresprivate "") | ||
| 37 | if("${UA_ARCHITECTURE}" STREQUAL "posix") | ||
| 38 | list(APPEND open62541_LIBRARIES "m") | ||
| 39 | + list(APPEND pkgcfg_libsprivate "-lm") | ||
| 40 | if(UA_MULTITHREADING GREATER_EQUAL 100 OR UA_BUILD_UNIT_TESTS) | ||
| 41 | list(APPEND open62541_PUBLIC_LIBRARIES "pthread") | ||
| 42 | + list(APPEND pkgcfg_libsprivate "-lpthread") | ||
| 43 | endif() | ||
| 44 | if(NOT APPLE AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")) | ||
| 45 | list(APPEND open62541_LIBRARIES "rt") | ||
| 46 | + list(APPEND pkgcfg_libsprivate "-lrt") | ||
| 47 | endif() | ||
| 48 | elseif("${UA_ARCHITECTURE}" STREQUAL "win32") | ||
| 49 | list(APPEND open62541_LIBRARIES "ws2_32") | ||
| 50 | @@ -511,6 +516,7 @@ if(UA_ENABLE_ENCRYPTION_OPENSSL) | ||
| 51 | # https://cmake.org/cmake/help/v3.13/module/FindOpenSSL.html | ||
| 52 | find_package(OpenSSL REQUIRED) | ||
| 53 | list(APPEND open62541_LIBRARIES "${OPENSSL_LIBRARIES}") | ||
| 54 | + list(APPEND pkgcfg_requiresprivate "openssl") | ||
| 55 | if(WIN32) | ||
| 56 | # Add bestcrypt for windows systems | ||
| 57 | list(APPEND open62541_LIBRARIES bcrypt) | ||
| 58 | @@ -521,6 +527,7 @@ if(UA_ENABLE_ENCRYPTION_LIBRESSL) | ||
| 59 | # See https://github.com/libressl-portable/portable/blob/master/FindLibreSSL.cmake | ||
| 60 | find_package(LibreSSL REQUIRED) | ||
| 61 | list(APPEND open62541_LIBRARIES ${LIBRESSL_LIBRARIES}) | ||
| 62 | + list(APPEND pkgcfg_requiresprivate "openssl") | ||
| 63 | if(WIN32) | ||
| 64 | # Add bestcrypt for random generator and ws2_32 for crypto | ||
| 65 | list(APPEND open62541_LIBRARIES ws2_32 bcrypt) | ||
| 66 | @@ -533,6 +540,7 @@ if(UA_ENABLE_ENCRYPTION_MBEDTLS OR UA_ENABLE_PUBSUB_ENCRYPTION) | ||
| 67 | # defined in /tools/cmake/FindMbedTLS.cmake. | ||
| 68 | find_package(MbedTLS REQUIRED) | ||
| 69 | list(APPEND open62541_LIBRARIES ${MBEDTLS_LIBRARIES}) | ||
| 70 | + list(APPEND pkgcfg_requiresprivate "mbedtls") | ||
| 71 | if(WIN32) | ||
| 72 | # Add bestcrypt for windows systems | ||
| 73 | list(APPEND open62541_LIBRARIES bcrypt) | ||
| 74 | @@ -541,6 +549,7 @@ endif() | ||
| 75 | |||
| 76 | if(UA_ENABLE_TPM2_SECURITY) | ||
| 77 | list(APPEND open62541_LIBRARIES ${TPM2_LIB}) | ||
| 78 | + list(APPEND pkgcfg_requiresprivate "tpm2-pkcs11") | ||
| 79 | endif() | ||
| 80 | |||
| 81 | if(MINGW) | ||
| 82 | @@ -1531,17 +1540,8 @@ if(UA_ENABLE_AMALGAMATION) | ||
| 83 | set(PC_EXTRA_CFLAGS "-DUA_ENABLE_AMALGAMATION") | ||
| 84 | endif() | ||
| 85 | |||
| 86 | -set(pkgcfgpubliclibs "") | ||
| 87 | -foreach(lib ${open62541_PUBLIC_LIBRARIES}) | ||
| 88 | - set(pkgcfgpubliclibs "${pkgcfgpubliclibs}-l${lib} ") | ||
| 89 | -endforeach() | ||
| 90 | - | ||
| 91 | -if(BUILD_SHARED_LIBS) | ||
| 92 | - foreach(lib ${open62541_LIBRARIES}) | ||
| 93 | - set(pkgcfgpubliclibs "${pkgcfgpubliclibs}-l${lib} ") | ||
| 94 | - endforeach() | ||
| 95 | -endif() | ||
| 96 | - | ||
| 97 | +string(REPLACE ";" " " pkgcfg_requiresprivate "${pkgcfg_requiresprivate}") | ||
| 98 | +string(REPLACE ";" " " pkgcfg_libsprivate "${pkgcfg_libsprivate}") | ||
| 99 | configure_file(tools/open62541.pc.in ${PROJECT_BINARY_DIR}/src_generated/open62541.pc @ONLY) | ||
| 100 | |||
| 101 | if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") | ||
| 102 | diff --git a/tools/open62541.pc.in b/tools/open62541.pc.in | ||
| 103 | index 50abf00af4e..a5986013c8e 100644 | ||
| 104 | --- a/tools/open62541.pc.in | ||
| 105 | +++ b/tools/open62541.pc.in | ||
| 106 | @@ -5,5 +5,7 @@ includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ | ||
| 107 | Name: open62541 | ||
| 108 | Description: open62541 is an open source C (C99) implementation of OPC UA | ||
| 109 | Version: @OPEN62541_VER_MAJOR@.@OPEN62541_VER_MINOR@.@OPEN62541_VER_PATCH@@OPEN62541_VER_LABEL@ | ||
| 110 | -Libs: -L${libdir} -lopen62541 @pkgcfgpubliclibs@ | ||
| 111 | +Requires.private: @pkgcfg_requiresprivate@ | ||
| 112 | Cflags: -I${includedir} @PC_EXTRA_CFLAGS@ | ||
| 113 | +Libs: -L${libdir} -lopen62541 | ||
| 114 | +Libs.private: @pkgcfg_libsprivate@ | ||
diff --git a/meta-networking/recipes-protocols/opcua/open62541_1.3.15.bb b/meta-networking/recipes-protocols/opcua/open62541_1.4.14.bb index b7f5112197..07efeac0ec 100644 --- a/meta-networking/recipes-protocols/opcua/open62541_1.3.15.bb +++ b/meta-networking/recipes-protocols/opcua/open62541_1.4.14.bb | |||
| @@ -8,17 +8,17 @@ LIC_FILES_CHKSUM = "\ | |||
| 8 | " | 8 | " |
| 9 | 9 | ||
| 10 | SRCREV_FORMAT = "opcua_mdnsd_ua-nodeset_mqtt-c" | 10 | SRCREV_FORMAT = "opcua_mdnsd_ua-nodeset_mqtt-c" |
| 11 | SRCREV_opcua = "3eed1a6d5c5b207c531b2d35ed88aa0a4a4541e5" | 11 | SRCREV_opcua = "95dc4c1e9c8c4d3619f90b9c3fc3af194acb8b30" |
| 12 | SRCREV_mdnsd = "488d24fb9d427aec77df180268f0291eeee7fb8b" | 12 | SRCREV_mdnsd = "488d24fb9d427aec77df180268f0291eeee7fb8b" |
| 13 | SRCREV_ua-nodeset = "f71b3f411d5cb16097c3ae0c744f67ad45535ffb" | 13 | SRCREV_ua-nodeset = "d1bb6a22125bd7cd986272b1ee98a18a91d76fff" |
| 14 | SRCREV_mqtt-c = "f69ce1e7fd54f3b1834c9c9137ce0ec5d703cb4d" | 14 | SRCREV_mqtt-c = "0f4c34c8cc00b16cfee094745d68b8cdbaecd8e0" |
| 15 | 15 | ||
| 16 | SRC_URI = " \ | 16 | SRC_URI = " \ |
| 17 | git://github.com/open62541/open62541.git;name=opcua;branch=1.3;protocol=https \ | 17 | git://github.com/open62541/open62541.git;name=opcua;branch=1.4;protocol=https \ |
| 18 | git://github.com/Pro/mdnsd.git;name=mdnsd;protocol=https;branch=master;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/deps/mdnsd \ | 18 | git://github.com/Pro/mdnsd.git;name=mdnsd;protocol=https;branch=master;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/deps/mdnsd \ |
| 19 | git://github.com/OPCFoundation/UA-Nodeset;name=ua-nodeset;protocol=https;branch=v1.04;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/deps/ua-nodeset \ | 19 | git://github.com/OPCFoundation/UA-Nodeset;name=ua-nodeset;protocol=https;branch=latest;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/deps/ua-nodeset \ |
| 20 | git://github.com/LiamBindle/MQTT-C.git;name=mqtt-c;protocol=https;branch=master;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/deps/mqtt-c \ | 20 | git://github.com/LiamBindle/MQTT-C.git;name=mqtt-c;protocol=https;branch=master;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/deps/mqtt-c \ |
| 21 | file://0001-fix-build-do-not-install-git-files.patch \ | 21 | file://a725a263124ae8c87fe6af34a9b3a7981b7f116d.patch \ |
| 22 | " | 22 | " |
| 23 | 23 | ||
| 24 | 24 | ||
| @@ -34,9 +34,9 @@ FILES:${PN} = "${libdir}/lib*${SOLIBS}" | |||
| 34 | 34 | ||
| 35 | # The tools package contains scripts to generate certificates and OPC UA schema definitions + nodeset descriptions. | 35 | # The tools package contains scripts to generate certificates and OPC UA schema definitions + nodeset descriptions. |
| 36 | PACKAGES += "${PN}-tools" | 36 | PACKAGES += "${PN}-tools" |
| 37 | FILES:${PN}-tools = "${datadir}/${BPN}/tools/*" | 37 | FILES:${PN}-tools = "${datadir}/${BPN}/*" |
| 38 | 38 | ||
| 39 | PACKAGECONFIG ?= "encryption-mbedtls pubsub pubsub-eth subscriptions subscriptions-events namespace-full" | 39 | PACKAGECONFIG ?= "encryption-mbedtls pubsub pubsub-eth pubsub-informationmodel subscriptions subscriptions-events namespace-full" |
| 40 | PACKAGECONFIG[encryption-mbedtls] = "-DUA_ENABLE_ENCRYPTION=MBEDTLS, , mbedtls, , , encryption-openssl" | 40 | PACKAGECONFIG[encryption-mbedtls] = "-DUA_ENABLE_ENCRYPTION=MBEDTLS, , mbedtls, , , encryption-openssl" |
| 41 | PACKAGECONFIG[encryption-openssl] = "-DUA_ENABLE_ENCRYPTION=OPENSSL, , openssl, , , encryption-mbedtls" | 41 | PACKAGECONFIG[encryption-openssl] = "-DUA_ENABLE_ENCRYPTION=OPENSSL, , openssl, , , encryption-mbedtls" |
| 42 | PACKAGECONFIG[multithreading] = "-DUA_MULTITHREADING=100, -DUA_MULTITHREADING=0" | 42 | PACKAGECONFIG[multithreading] = "-DUA_MULTITHREADING=100, -DUA_MULTITHREADING=0" |
| @@ -44,6 +44,7 @@ PACKAGECONFIG[namespace-full] = "-DUA_NAMESPACE_ZERO=FULL, , , , , namespace-red | |||
| 44 | PACKAGECONFIG[namespace-reduced] = "-DUA_NAMESPACE_ZERO=REDUCED, , , , , namespace-full" | 44 | PACKAGECONFIG[namespace-reduced] = "-DUA_NAMESPACE_ZERO=REDUCED, , , , , namespace-full" |
| 45 | PACKAGECONFIG[pubsub] = "-DUA_ENABLE_PUBSUB=ON, -DUA_ENABLE_PUBSUB=OFF" | 45 | PACKAGECONFIG[pubsub] = "-DUA_ENABLE_PUBSUB=ON, -DUA_ENABLE_PUBSUB=OFF" |
| 46 | PACKAGECONFIG[pubsub-eth] = "-DUA_ENABLE_PUBSUB_ETH_UADP=ON, -DUA_ENABLE_PUBSUB_ETH_UADP=OFF" | 46 | PACKAGECONFIG[pubsub-eth] = "-DUA_ENABLE_PUBSUB_ETH_UADP=ON, -DUA_ENABLE_PUBSUB_ETH_UADP=OFF" |
| 47 | PACKAGECONFIG[pubsub-informationmodel] = "-DUA_ENABLE_PUBSUB_INFORMATIONMODEL=ON, -DUA_ENABLE_PUBSUB_INFORMATIONMODEL=OFF" | ||
| 47 | PACKAGECONFIG[subscriptions] = "-DUA_ENABLE_SUBSCRIPTIONS=ON, -DUA_ENABLE_SUBSCRIPTIONS=OFF" | 48 | PACKAGECONFIG[subscriptions] = "-DUA_ENABLE_SUBSCRIPTIONS=ON, -DUA_ENABLE_SUBSCRIPTIONS=OFF" |
| 48 | PACKAGECONFIG[subscriptions-events] = "-DUA_ENABLE_SUBSCRIPTIONS_EVENTS=ON, -DUA_ENABLE_SUBSCRIPTIONS_EVENTS=OFF" | 49 | PACKAGECONFIG[subscriptions-events] = "-DUA_ENABLE_SUBSCRIPTIONS_EVENTS=ON, -DUA_ENABLE_SUBSCRIPTIONS_EVENTS=OFF" |
| 49 | PACKAGECONFIG[werror] = "-DUA_FORCE_WERROR=ON, -DUA_FORCE_WERROR=OFF" | 50 | PACKAGECONFIG[werror] = "-DUA_FORCE_WERROR=ON, -DUA_FORCE_WERROR=OFF" |
