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

Johannes Pointner h4nn35.work at gmail.com
Thu Oct 17 05:51:31 UTC 2019


Hello Urs,

On Wed, Oct 16, 2019 at 3:17 AM Khem Raj <raj.khem at gmail.com> wrote:
>
> On Mon, Oct 14, 2019 at 5:56 PM 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                | 32 +++++++++++++++++++
> >  2 files changed, 49 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..c34e70660
> > --- /dev/null
> > +++ b/meta-networking/recipes-connectivity/open62541/open62541_1.0.bb
> > @@ -0,0 +1,32 @@
> > +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 \
> > +       mbedtls \
> > +"
> > +
> > +EXTRA_OECMAKE = " \
> > +       -DCMAKE_BUILD_TYPE=Debug \
>
>
> If we used Release build type would be nicer from release point of view
> unless only difference is debug info if there are more differences then
> maybe add a packageconfig to control this setting and enable it when doing
> DEBUG_ENABLED = “1” builds only
>
> >
> > +       -DBUILD_SHARED_LIBS=ON \
> > +       -DUA_NAMESPACE_ZERO=REDUCED \
> > +       -DUA_ENABLE_ENCRYPTION=ON \
> > +       -DUA_BUILD_EXAMPLES=OFF \
> > +"
It would maybe make sense to use PACKAGECONFIG for these settings so
it would much easier to customize the library e.g. enable examples,
use a different UA_NAMESPACE,...
> > +
> > +FILES_${PN}-dev += "${libdir}/cmake/*"
> > +
> > +BBCLASSEXTEND = "native nativesdk"
> > +
> > --
> > 2.20.1
> >
> > --
> > _______________________________________________
> > Openembedded-devel mailing list
> > Openembedded-devel at lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-devel
> >
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


More information about the Openembedded-devel mailing list