[oe] [meta-networking][PATCH v2] open62541: add new recipe

Khem Raj raj.khem at gmail.com
Thu Oct 17 12:52:11 UTC 2019


Fails to compile

https://errors.yoctoproject.org/Errors/Details/273943/

On Thu, Oct 17, 2019 at 4:19 AM Urs Fässler <urs.fassler at bbv.ch> wrote:
>
> It provides a open source implementation for OPC UA.
> ---
>  .../files/0001-fix_ignored_return_value.patch | 17 ++++++++++
>  .../open62541/open62541_1.0.bb                | 31 +++++++++++++++++++
>  2 files changed, 48 insertions(+)
>  create mode 100644 meta-networking/recipes-connectivity/open62541/files/0001-fix_ignored_return_value.patch
>  create mode 100644 meta-networking/recipes-connectivity/open62541/open62541_1.0.bb
>
> diff --git a/meta-networking/recipes-connectivity/open62541/files/0001-fix_ignored_return_value.patch b/meta-networking/recipes-connectivity/open62541/files/0001-fix_ignored_return_value.patch
> new file mode 100644
> index 000000000..3a8377ec5
> --- /dev/null
> +++ b/meta-networking/recipes-connectivity/open62541/files/0001-fix_ignored_return_value.patch
> @@ -0,0 +1,17 @@
> +diff --git a/plugins/ua_pki_default.c b/plugins/ua_pki_default.c
> +index 79331bc9..b20ad95c 100644
> +--- a/plugins/ua_pki_default.c
> ++++ b/plugins/ua_pki_default.c
> +@@ -89,7 +89,11 @@ fileNamesFromFolder(const UA_String *folder, size_t *pathsSize, UA_String **path
> +
> +     struct dirent *ent;
> +     char buf2[PATH_MAX + 1];
> +-    realpath(buf, buf2);
> ++    char *res = realpath(buf, buf2);
> ++    if(res == NULL) {
> ++        closedir(dir);
> ++        return UA_STATUSCODE_BADINTERNALERROR;
> ++    }
> +     size_t pathlen = strlen(buf2);
> +     *pathsSize = 0;
> +     while((ent = readdir (dir)) != NULL && *pathsSize < 256) {
> diff --git a/meta-networking/recipes-connectivity/open62541/open62541_1.0.bb b/meta-networking/recipes-connectivity/open62541/open62541_1.0.bb
> new file mode 100644
> index 000000000..b7a4f14b9
> --- /dev/null
> +++ b/meta-networking/recipes-connectivity/open62541/open62541_1.0.bb
> @@ -0,0 +1,31 @@
> +HOMEPAGE = "http://open62541.org/"
> +SUMMARY = "Open source implementation of OPC UA - library"
> +LICENSE = "MPL-2.0"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=815ca599c9df247a0c7f619bab123dad"
> +
> +SRCREV = "ce5209d78d3821504d31b3bbdb03f53d6e3f93a7"
> +SRC_URI = " \
> +       gitsm://github.com/open62541/open62541.git \
> +       file://0001-fix_ignored_return_value.patch \
> +"
> +
> +S = "${WORKDIR}/git"
> +
> +inherit cmake python3native
> +
> +DEPENDS += " \
> +       python3-six-native \
> +"
> +
> +PACKAGECONFIG[sharedlibs] = "-DBUILD_SHARED_LIBS=ON,-DBUILD_SHARED_LIBS=OFF,,"
> +PACKAGECONFIG[encryption] = "-DUA_ENABLE_ENCRYPTION=ON,-DUA_ENABLE_ENCRYPTION=OFF,mbedtls,"
> +PACKAGECONFIG[fullnszero] = "-DUA_NAMESPACE_ZERO=FULL,-DUA_NAMESPACE_ZERO=REDUCED,,"
> +
> +EXTRA_OECMAKE = " \
> +       -DCMAKE_BUILD_TYPE=RelWithDebInfo \
> +"
> +
> +FILES_${PN}-dev += "${libdir}/cmake/*"
> +
> +BBCLASSEXTEND = "native nativesdk"
> +
> --
> 2.20.1
>


More information about the Openembedded-devel mailing list