From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 970CE13835A for ; Fri, 11 Dec 2020 08:36:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B2967E0968; Fri, 11 Dec 2020 08:36:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 86171E0968 for ; Fri, 11 Dec 2020 08:36:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C77D1340F69 for ; Fri, 11 Dec 2020 08:36:51 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7A3B6489 for ; Fri, 11 Dec 2020 08:36:50 +0000 (UTC) From: "Andrew Ammerlaan" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andrew Ammerlaan" Message-ID: <1607619669.a167e05c21b10361a0376dfe95a12911752d9951.andrewammerlaan@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: dev-libs/open62541/files/, dev-libs/open62541/ X-VCS-Repository: repo/proj/guru X-VCS-Files: dev-libs/open62541/Manifest dev-libs/open62541/files/open62541-1.1.3-etf.patch dev-libs/open62541/files/open62541-1.1.3-headers.patch dev-libs/open62541/files/open62541-1.1.3-tests.patch dev-libs/open62541/open62541-1.1.3.ebuild X-VCS-Directories: dev-libs/open62541/files/ dev-libs/open62541/ X-VCS-Committer: andrewammerlaan X-VCS-Committer-Name: Andrew Ammerlaan X-VCS-Revision: a167e05c21b10361a0376dfe95a12911752d9951 X-VCS-Branch: master Date: Fri, 11 Dec 2020 08:36:50 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 6c63a2f5-aa7a-46df-9b18-ce8606634f52 X-Archives-Hash: 4a7a895683f9a72422c8bd6e9beee23a commit: a167e05c21b10361a0376dfe95a12911752d9951 Author: Kurt Kanzenbach kmk-computers de> AuthorDate: Thu Dec 10 17:01:09 2020 +0000 Commit: Andrew Ammerlaan riseup net> CommitDate: Thu Dec 10 17:01:09 2020 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a167e05c dev-libs/open62541: Bump version to v1.1.3 Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Kurt Kanzenbach kmk-computers.de> dev-libs/open62541/Manifest | 1 + dev-libs/open62541/files/open62541-1.1.3-etf.patch | 43 +++++++++ .../open62541/files/open62541-1.1.3-headers.patch | 36 +++++++ .../open62541/files/open62541-1.1.3-tests.patch | 104 +++++++++++++++++++++ dev-libs/open62541/open62541-1.1.3.ebuild | 98 +++++++++++++++++++ 5 files changed, 282 insertions(+) diff --git a/dev-libs/open62541/Manifest b/dev-libs/open62541/Manifest index 5e4ac33e..4091fb20 100644 --- a/dev-libs/open62541/Manifest +++ b/dev-libs/open62541/Manifest @@ -1,2 +1,3 @@ DIST open62541-1.0.3.tar.gz 2691597 BLAKE2B 0ad9f71f97dfe550068d239cc97f59afd1f528a1b912d44734103a962fd3407ac9b3d753cc1499dbf5b7ad0f56a93378b5c833ac24262b1f9eb26916de296904 SHA512 5dfff3d784b1659a5c819b7666101e60af186e7604ca73e6c3ec15d20e8ceff26f1c9139bb78bf0c0fbc9ab10a1a3cd031252e1e6bf1f56c5403797257a318cf DIST open62541-1.1.2.tar.gz 2916517 BLAKE2B 60ee78630ee74fbe9d2dee894f3b5f6b5209b823f8e24236e2f6ceb13ddc68df9c0065d57fe14096cdf822755979053201b6901540082aac3d69135c3dc54b67 SHA512 090f24b77211ef8e0a45c7b74de948db6ea64290fc591ae0131871119d826c8b385769ab4c1dad0f8ba663acafd7df3b4b288759623eb6f4a3fbd00ab65abedc +DIST open62541-1.1.3.tar.gz 2925631 BLAKE2B 1314d51c1153a2e2785e8eccf363ef8285142b0e2af1890047eae079bd6d36583c0fa91661da4bf68c1dfa980c6b708fa7c6f7192bea06b234b98428074fd1c8 SHA512 e0574b9273002b22c042534dc8e177800bee87f8b48d3de4a627dc255211e67489531905cac41a8a15d337e2a958815b59be23c96163d3305cd43a8da18c390f diff --git a/dev-libs/open62541/files/open62541-1.1.3-etf.patch b/dev-libs/open62541/files/open62541-1.1.3-etf.patch new file mode 100644 index 00000000..cce618e6 --- /dev/null +++ b/dev-libs/open62541/files/open62541-1.1.3-etf.patch @@ -0,0 +1,43 @@ +From 8cac173827297e936a24b4bdfe73f2498dfe483a Mon Sep 17 00:00:00 2001 +From: Kurt Kanzenbach +Date: Sun, 12 Jul 2020 10:57:08 +0200 +Subject: [PATCH 3/3] etf: Fix compiler warning/build error in etf plugin +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fix the following warning/error: + +|In function ‘snprintf’, +| inlined from ‘UA_PubSubChannelEthernetETF_open’ at /var/tmp/portage/dev-libs/open62541-1.1/work/open62541-1.1/plugins/ua_pubsub_ethernet_etf.c:189:5, +| inlined from ‘TransportLayerEthernetETF_addChannel’ at /var/tmp/portage/dev-libs/open62541-1.1/work/open62541-1.1/plugins/ua_pubsub_ethernet_etf.c:563:40: +|/usr/include/bits/stdio2.h:67:10: error: ‘__builtin___snprintf_chk’ specified bound 40 exceeds destination size 16 [-Werror=stringop-overflow=] +| 67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, +| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +| 68 | __bos (__s), __fmt, __va_arg_pack ()); +| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +| + +By using the correct size. + +Signed-off-by: Kurt Kanzenbach +--- + plugins/ua_pubsub_ethernet_etf.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/ua_pubsub_ethernet_etf.c b/plugins/ua_pubsub_ethernet_etf.c +index 416b5857945a..d55eb363e3b5 100644 +--- a/plugins/ua_pubsub_ethernet_etf.c ++++ b/plugins/ua_pubsub_ethernet_etf.c +@@ -186,7 +186,7 @@ UA_PubSubChannelEthernetETF_open(const UA_PubSubConnectionConfig *connectionConf + struct ifreq ifreq; + memset(&ifreq, 0, sizeof(struct ifreq)); + UA_UInt64 len = UA_MIN(address->networkInterface.length, sizeof(ifreq.ifr_name)-1); +- UA_snprintf(ifreq.ifr_name, sizeof(struct ifreq), ++ UA_snprintf(ifreq.ifr_name, sizeof(ifreq.ifr_name), + "%.*s", (int)len, + (char*)address->networkInterface.data); + +-- +2.26.2 + diff --git a/dev-libs/open62541/files/open62541-1.1.3-headers.patch b/dev-libs/open62541/files/open62541-1.1.3-headers.patch new file mode 100644 index 00000000..97e225b0 --- /dev/null +++ b/dev-libs/open62541/files/open62541-1.1.3-headers.patch @@ -0,0 +1,36 @@ +From a5697f1eb69822e172bc31d1549222c8ca718844 Mon Sep 17 00:00:00 2001 +From: Kurt Kanzenbach +Date: Sun, 12 Jul 2020 10:39:31 +0200 +Subject: [PATCH 2/3] cmake: Install ETF and XDP plugin headers + +When the corresponding features are enabled, the headers should be installed as +well. + +Signed-off-by: Kurt Kanzenbach +--- + CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d7417c88088b..8f87c5d998c6 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -861,6 +861,7 @@ if(UA_ENABLE_PUBSUB) + list(APPEND default_plugin_headers ${PROJECT_SOURCE_DIR}/plugins/include/open62541/plugin/pubsub_udp.h) + list(APPEND default_plugin_sources ${PROJECT_SOURCE_DIR}/plugins/ua_pubsub_udp.c) + if(UA_ENABLE_PUBSUB_ETH_UADP_ETF) ++ list(APPEND default_plugin_headers ${PROJECT_SOURCE_DIR}/plugins/include/open62541/plugin/pubsub_ethernet_etf.h) + list(APPEND default_plugin_sources ${PROJECT_SOURCE_DIR}/plugins/ua_pubsub_ethernet_etf.c) + endif() + if(UA_ENABLE_PUBSUB_ETH_UADP) +@@ -870,6 +871,7 @@ if(UA_ENABLE_PUBSUB) + if(UA_ENABLE_PUBSUB_ETH_UADP_XDP) + if(EXISTS "${XDP_LIBRARY}") + list(APPEND open62541_LIBRARIES ${XDP_LIBRARY}) ++ list(APPEND default_plugin_headers ${PROJECT_SOURCE_DIR}/plugins/include/open62541/plugin/pubsub_ethernet_xdp.h) + list(APPEND default_plugin_sources ${PROJECT_SOURCE_DIR}/plugins/ua_pubsub_ethernet_xdp.c) + else() + MESSAGE(WARNING "samples in bpf-next directory were not built. Build the bpf-next to use XDP") +-- +2.26.2 + diff --git a/dev-libs/open62541/files/open62541-1.1.3-tests.patch b/dev-libs/open62541/files/open62541-1.1.3-tests.patch new file mode 100644 index 00000000..ad96717f --- /dev/null +++ b/dev-libs/open62541/files/open62541-1.1.3-tests.patch @@ -0,0 +1,104 @@ +From ab9a4a1c826bb662816f71020054ba2558afefc7 Mon Sep 17 00:00:00 2001 +From: Kurt Kanzenbach +Date: Sat, 20 Jun 2020 14:28:57 +0200 +Subject: [PATCH 1/3] cmake: pubsub: Disable failing tests within portage + +The Pub/Sub tests won't work within portage. Disable them. + +Signed-off-by: Kurt Kanzenbach +--- + tests/CMakeLists.txt | 78 -------------------------------------------- + 1 file changed, 78 deletions(-) + +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index c73b2b04520b..fb21fb856ba4 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -331,84 +331,6 @@ if(UA_ENABLE_DISCOVERY) + add_test_valgrind(discovery ${TESTS_BINARY_DIR}/check_discovery) + endif() + +-if(UA_ENABLE_PUBSUB) +- add_executable(check_pubsub_encoding pubsub/check_pubsub_encoding.c $ $) +- target_link_libraries(check_pubsub_encoding ${LIBS}) +- add_test_valgrind(pubsub_encoding ${TESTS_BINARY_DIR}/check_pubsub_encoding) +- add_executable(check_pubsub_pds pubsub/check_pubsub_pds.c $ $) +- target_link_libraries(check_pubsub_pds ${LIBS}) +- add_test_valgrind(pubsub_pds ${TESTS_BINARY_DIR}/check_pubsub_pds) +- add_executable(check_pubsub_connection_udp pubsub/check_pubsub_connection_udp.c $ $) +- target_link_libraries(check_pubsub_connection_udp ${LIBS}) +- add_test_valgrind(pubsub_connection_udp ${TESTS_BINARY_DIR}/check_pubsub_connection_udp) +- add_executable(check_pubsub_publish pubsub/check_pubsub_publish.c $ $) +- target_link_libraries(check_pubsub_publish ${LIBS}) +- add_test_valgrind(pubsub_publish ${TESTS_BINARY_DIR}/check_pubsub_publish) +- add_executable(check_pubsub_publish_uadp pubsub/check_pubsub_publish_uadp.c $ $) +- target_link_libraries(check_pubsub_publish_uadp ${LIBS}) +- add_test_valgrind(pubsub_publish ${TESTS_BINARY_DIR}/check_pubsub_publish_uadp) +- +- #Link libraries for executing subscriber unit test +- add_executable(check_pubsub_subscribe pubsub/check_pubsub_subscribe.c $ $) +- target_link_libraries(check_pubsub_subscribe ${LIBS}) +- add_executable(check_pubsub_publishspeed pubsub/check_pubsub_publishspeed.c $ $) +- target_link_libraries(check_pubsub_publishspeed ${LIBS}) +- add_test_valgrind(pubsub_publishspeed ${TESTS_BINARY_DIR}/check_pubsub_publish) +- add_executable(check_pubsub_config_freeze pubsub/check_pubsub_config_freeze.c $ $) +- target_link_libraries(check_pubsub_config_freeze ${LIBS}) +- add_test_valgrind(check_pubsub_config_freeze ${TESTS_BINARY_DIR}/check_pubsub_config_freeze) +- add_executable(check_pubsub_publish_rt_levels pubsub/check_pubsub_publish_rt_levels.c $ $) +- target_link_libraries(check_pubsub_publish_rt_levels ${LIBS}) +- add_test_valgrind(check_pubsub_publish_rt_levels ${TESTS_BINARY_DIR}/check_pubsub_publish_rt_levels) +- +- add_executable(check_pubsub_multiple_layer pubsub/check_pubsub_multiple_layer.c $ $) +- target_link_libraries(check_pubsub_multiple_layer ${LIBS}) +- add_test_valgrind(pubsub_multiple_layer ${TESTS_BINARY_DIR}/check_pubsub_multiple_layer) +- +- if(UA_ENABLE_PUBSUB_ETH_UADP) +- if(NOT UA_ENABLE_PUBSUB_ETH_UADP_ETF) +- add_executable(check_pubsub_connection_ethernet pubsub/check_pubsub_connection_ethernet.c $ $) +- target_link_libraries(check_pubsub_connection_ethernet ${LIBS}) +- add_test_valgrind(pubsub_connection_ethernet ${TESTS_BINARY_DIR}/check_pubsub_connection_ethernet) +- add_executable(check_pubsub_publish_ethernet pubsub/check_pubsub_publish_ethernet.c $ $) +- target_link_libraries(check_pubsub_publish_ethernet ${LIBS}) +- add_test_valgrind(pubsub_publish_ethernet ${TESTS_BINARY_DIR}/check_pubsub_publish_ethernet) +- endif() +- if(UA_ENABLE_PUBSUB_ETH_UADP_XDP) +- add_executable(check_pubsub_connection_xdp pubsub/check_pubsub_connection_xdp.c $ $) +- target_link_libraries(check_pubsub_connection_xdp ${LIBS}) +- add_test_valgrind(pubsub_connection_xdp ${TESTS_BINARY_DIR}/check_pubsub_connection_xdp) +- endif() +- endif() +- if(UA_ENABLE_PUBSUB_ETH_UADP_ETF) +- add_executable(check_pubsub_connection_ethernet_etf pubsub/check_pubsub_connection_ethernet_etf.c $ $) +- target_link_libraries(check_pubsub_connection_ethernet_etf ${LIBS}) +- add_test_valgrind(pubsub_connection_ethernet_etf ${TESTS_BINARY_DIR}/check_pubsub_connection_ethernet_etf) +- add_executable(check_pubsub_publish_ethernet_etf pubsub/check_pubsub_publish_ethernet_etf.c $ $) +- target_link_libraries(check_pubsub_publish_ethernet_etf ${LIBS}) +- add_test_valgrind(pubsub_publish_ethernet_etf ${TESTS_BINARY_DIR}/check_pubsub_publish_ethernet_etf) +- endif() +- +- if(UA_ENABLE_PUBSUB_INFORMATIONMODEL) +- add_executable(check_pubsub_informationmodel pubsub/check_pubsub_informationmodel.c $ $) +- target_link_libraries(check_pubsub_informationmodel ${LIBS}) +- add_test_valgrind(check_pubsub_informationmodel ${TESTS_BINARY_DIR}/check_pubsub_informationmodel) +- if(UA_ENABLE_PUBSUB_INFORMATIONMODEL_METHODS) +- add_executable(check_pubsub_informationmodel_methods pubsub/check_pubsub_informationmodel_methods.c $ $) +- target_link_libraries(check_pubsub_informationmodel_methods ${LIBS}) +- add_test_valgrind(check_pubsub_informationmodel_methods ${TESTS_BINARY_DIR}/check_pubsub_informationmodel_methods) +- +- endif() +- endif() +- if(UA_ENABLE_PUBSUB_MQTT) +- if(NOT WIN32) +- add_executable(check_pubsub_connection_mqtt pubsub/check_pubsub_connection_mqtt.c $ $) +- target_link_libraries(check_pubsub_connection_mqtt ${LIBS}) +- add_test_valgrind(pubsub_connection_mqtt ${TESTS_BINARY_DIR}/check_pubsub_connection_mqtt) +- endif() +- endif() +-endif() +- + add_executable(check_server_readspeed server/check_server_readspeed.c $ $) + target_link_libraries(check_server_readspeed ${LIBS}) + add_test_no_valgrind(server_readspeed ${TESTS_BINARY_DIR}/check_server_readspeed) +-- +2.26.2 + diff --git a/dev-libs/open62541/open62541-1.1.3.ebuild b/dev-libs/open62541/open62541-1.1.3.ebuild new file mode 100644 index 00000000..87a8634f --- /dev/null +++ b/dev-libs/open62541/open62541-1.1.3.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6..9} ) + +inherit cmake python-single-r1 + +DESCRIPTION="Open source C implementation of OPC UA" +HOMEPAGE="https://open62541.org/" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MPL-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="doc encryption examples etf mbedtls pubsub openssl test tools xdp" +RESTRICT="!test? ( test )" + +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + encryption? ( || ( mbedtls openssl ) ) + etf? ( pubsub ) + xdp? ( pubsub ) +" + +BDEPEND=" + ${PYTHON_DEPS} + virtual/pkgconfig + doc? ( + media-gfx/graphviz + $(python_gen_cond_dep ' + dev-python/sphinx[${PYTHON_MULTI_USEDEP}] + dev-python/sphinx_rtd_theme[${PYTHON_MULTI_USEDEP}] + ') + ) + test? ( + dev-libs/check + dev-util/valgrind + $(python_gen_cond_dep ' + dev-python/subunit[${PYTHON_MULTI_USEDEP}] + ') + ) +" +DEPEND=" + mbedtls? ( net-libs/mbedtls:= ) + openssl? ( dev-libs/openssl:0= ) +" +RDEPEND=" + ${PYTHON_DEPS} + ${DEPEND} +" + +PATCHES=( + "${FILESDIR}/${P}-etf.patch" + "${FILESDIR}/${P}-headers.patch" + "${FILESDIR}/${P}-tests.patch" +) + +src_configure() { + local mycmakeargs=( + -DBUILD_SHARED_LIBS=ON + -DOPEN62541_VERSION=v${PV} + -DUA_BUILD_EXAMPLES=OFF + -DUA_BUILD_TOOLS=$(usex tools) + -DUA_BUILD_UNIT_TESTS=$(usex test) + -DUA_ENABLE_ENCRYPTION=$(usex encryption) + -DUA_ENABLE_ENCRYPTION_MBEDTLS=$(usex mbedtls) + -DUA_ENABLE_ENCRYPTION_OPENSSL=$(usex openssl) + -DUA_ENABLE_PUBSUB=$(usex pubsub) + -DUA_ENABLE_PUBSUB_ETH_UADP=$(usex pubsub) + -DUA_ENABLE_PUBSUB_ETH_UADP_ETF=$(usex etf) + -DUA_ENABLE_PUBSUB_ETH_UADP_XDP=$(usex xdp) + ) + + cmake_src_configure +} + +src_compile() { + cmake_src_compile + use doc && cmake_build doc +} + +src_install() { + use doc && local HTML_DOCS=( "${WORKDIR}"/${P}_build/doc/. ) + cmake_src_install + + if use examples; then + docompress -x /usr/share/doc/${PF}/examples + dodoc -r examples/ + fi + + python_fix_shebang "${ED}" +} + +src_test() { + cmake_src_test -j1 +}