All of lore.kernel.org
 help / color / mirror / Atom feed
* [master/thud/rocko][PATCH 0/4] Update open62541 to 0.4-dev
@ 2019-03-11 15:39 Jacob Stiffler
  2019-03-11 15:39 ` [rocko][PATCH 1/4] mbedtls: upgrade to 2.13.0 Jacob Stiffler
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Jacob Stiffler @ 2019-03-11 15:39 UTC (permalink / raw)
  To: meta-arago

The update to 0.4-dev adds pubsub support. This set also backports
mbedtls from meta-openembedded so that encryption can be enabled.

NOTE: The first patch in this set is only applicable to "rocko".

Jacob Stiffler (4):
  mbedtls: upgrade to 2.13.0
  mbedtls: extend to native/nativesdk
  open62541: update to 0.4-dev
  arago.conf: open62541: enable encryption

 meta-arago-distro/conf/distro/arago.conf           |  3 +
 .../recipes-connectivity/mbedtls/mbedtls_2.13.0.bb | 42 ++++++++++++++
 .../mbedtls/mbedtls_2.13.0.bbappend                |  1 +
 ...examples-client-allow-configurable-server.patch | 15 ++---
 ...0001-tests-fix-typing-of-size_t-in-printf.patch | 64 ++++++++++++++++++++++
 .../open62541/open62541_git.bb                     | 37 +++++++++----
 6 files changed, 144 insertions(+), 18 deletions(-)
 create mode 100644 meta-arago-distro/recipes-connectivity/mbedtls/mbedtls_2.13.0.bb
 create mode 100644 meta-arago-distro/recipes-connectivity/mbedtls/mbedtls_2.13.0.bbappend
 create mode 100644 meta-arago-extras/recipes-connectivity/open62541/open62541/0001-tests-fix-typing-of-size_t-in-printf.patch

-- 
2.7.4



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [rocko][PATCH 1/4] mbedtls: upgrade to 2.13.0
  2019-03-11 15:39 [master/thud/rocko][PATCH 0/4] Update open62541 to 0.4-dev Jacob Stiffler
@ 2019-03-11 15:39 ` Jacob Stiffler
  2019-03-11 15:39 ` [master/thud/rocko][PATCH 2/4] mbedtls: extend to native/nativesdk Jacob Stiffler
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Jacob Stiffler @ 2019-03-11 15:39 UTC (permalink / raw)
  To: meta-arago

* Back-port from meta-oe/thud (bce1210d2ebeb0ae92464352ec4a8216e11d9615)
* This version is needed to enable encryption in open62541

Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
---
 .../recipes-connectivity/mbedtls/mbedtls_2.13.0.bb | 42 ++++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 meta-arago-distro/recipes-connectivity/mbedtls/mbedtls_2.13.0.bb

diff --git a/meta-arago-distro/recipes-connectivity/mbedtls/mbedtls_2.13.0.bb b/meta-arago-distro/recipes-connectivity/mbedtls/mbedtls_2.13.0.bb
new file mode 100644
index 0000000..ff3f7f0
--- /dev/null
+++ b/meta-arago-distro/recipes-connectivity/mbedtls/mbedtls_2.13.0.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Lightweight crypto and SSL/TLS library"
+DESCRIPTION = "mbedtls is a lean open source crypto library          \
+for providing SSL and TLS support in your programs. It offers        \
+an intuitive API and documented header files, so you can actually    \
+understand what the code does. It features:                          \
+                                                                     \
+ - Symmetric algorithms, like AES, Blowfish, Triple-DES, DES, ARC4,  \
+   Camellia and XTEA                                                 \
+ - Hash algorithms, like SHA-1, SHA-2, RIPEMD-160 and MD5            \
+ - Entropy pool and random generators, like CTR-DRBG and HMAC-DRBG   \
+ - Public key algorithms, like RSA, Elliptic Curves, Diffie-Hellman, \
+   ECDSA and ECDH                                                    \
+ - SSL v3 and TLS 1.0, 1.1 and 1.2                                   \
+ - Abstraction layers for ciphers, hashes, public key operations,    \
+   platform abstraction and threading                                \
+"
+
+HOMEPAGE = "https://tls.mbed.org/"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=302d50a6369f5f22efdb674db908167a"
+
+SECTION = "libs"
+
+SRC_URI = "https://tls.mbed.org/download/mbedtls-${PV}-apache.tgz"
+
+SRC_URI[md5sum] = "659d96bb03012ca6db414a9137fcdbd6"
+SRC_URI[sha256sum] = "593b4e4d2e1629fc407ab4750d69fa309a0ddb66565dc3deb5b60eddbdeb06da"
+
+inherit cmake
+
+PACKAGECONFIG ??= "shared-libs programs"
+PACKAGECONFIG[shared-libs] = "-DUSE_SHARED_MBEDTLS_LIBRARY=ON,-USE_SHARED_MBEDTLS_LIBRARY=OFF"
+PACKAGECONFIG[programs] = "-DENABLE_PROGRAMS=ON,-DENABLE_PROGRAMS=OFF"
+
+EXTRA_OECMAKE = "-DENABLE_TESTING=OFF -DLIB_INSTALL_DIR:STRING=${libdir}"
+
+PROVIDES += "polarssl"
+RPROVIDES_${PN} = "polarssl"
+
+PACKAGES =+ "${PN}-programs"
+FILES_${PN}-programs = "${bindir}/"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [master/thud/rocko][PATCH 2/4] mbedtls: extend to native/nativesdk
  2019-03-11 15:39 [master/thud/rocko][PATCH 0/4] Update open62541 to 0.4-dev Jacob Stiffler
  2019-03-11 15:39 ` [rocko][PATCH 1/4] mbedtls: upgrade to 2.13.0 Jacob Stiffler
@ 2019-03-11 15:39 ` Jacob Stiffler
  2019-03-11 15:39 ` [master/thud/rocko][PATCH 3/4] open62541: update to 0.4-dev Jacob Stiffler
  2019-03-11 15:39 ` [master/thud/rocko][PATCH 4/4] arago.conf: open62541: enable encryption Jacob Stiffler
  3 siblings, 0 replies; 6+ messages in thread
From: Jacob Stiffler @ 2019-03-11 15:39 UTC (permalink / raw)
  To: meta-arago

Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
---
 meta-arago-distro/recipes-connectivity/mbedtls/mbedtls_2.13.0.bbappend | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 meta-arago-distro/recipes-connectivity/mbedtls/mbedtls_2.13.0.bbappend

diff --git a/meta-arago-distro/recipes-connectivity/mbedtls/mbedtls_2.13.0.bbappend b/meta-arago-distro/recipes-connectivity/mbedtls/mbedtls_2.13.0.bbappend
new file mode 100644
index 0000000..608377e
--- /dev/null
+++ b/meta-arago-distro/recipes-connectivity/mbedtls/mbedtls_2.13.0.bbappend
@@ -0,0 +1 @@
+BBCLASSEXTEND = "native nativesdk"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [master/thud/rocko][PATCH 3/4] open62541: update to 0.4-dev
  2019-03-11 15:39 [master/thud/rocko][PATCH 0/4] Update open62541 to 0.4-dev Jacob Stiffler
  2019-03-11 15:39 ` [rocko][PATCH 1/4] mbedtls: upgrade to 2.13.0 Jacob Stiffler
  2019-03-11 15:39 ` [master/thud/rocko][PATCH 2/4] mbedtls: extend to native/nativesdk Jacob Stiffler
@ 2019-03-11 15:39 ` Jacob Stiffler
  2019-03-13  0:36   ` Denys Dmytriyenko
  2019-03-11 15:39 ` [master/thud/rocko][PATCH 4/4] arago.conf: open62541: enable encryption Jacob Stiffler
  3 siblings, 1 reply; 6+ messages in thread
From: Jacob Stiffler @ 2019-03-11 15:39 UTC (permalink / raw)
  To: meta-arago

* Switch to master branch (0.4-dev) for PUBSUB support.
* git-submodules are now required to build.
* Add and enable packageconfig for pubsub.
* Disable build optimizations to work around "strict-overflow" error
  in unit tests.
* Patch typing of size_t vars to fix armv7 builds.

Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
---
 ...examples-client-allow-configurable-server.patch | 15 ++---
 ...0001-tests-fix-typing-of-size_t-in-printf.patch | 64 ++++++++++++++++++++++
 .../open62541/open62541_git.bb                     | 37 +++++++++----
 3 files changed, 98 insertions(+), 18 deletions(-)
 create mode 100644 meta-arago-extras/recipes-connectivity/open62541/open62541/0001-tests-fix-typing-of-size_t-in-printf.patch

diff --git a/meta-arago-extras/recipes-connectivity/open62541/open62541/0001-examples-client-allow-configurable-server.patch b/meta-arago-extras/recipes-connectivity/open62541/open62541/0001-examples-client-allow-configurable-server.patch
index 1cf89a9..97d241e 100644
--- a/meta-arago-extras/recipes-connectivity/open62541/open62541/0001-examples-client-allow-configurable-server.patch
+++ b/meta-arago-extras/recipes-connectivity/open62541/open62541/0001-examples-client-allow-configurable-server.patch
@@ -1,6 +1,6 @@
-From da2b9a741c3116a7774989f6338976c00a4c0496 Mon Sep 17 00:00:00 2001
+From 69a658e534ff484faebe72fa7d1b6d484e49e7cd Mon Sep 17 00:00:00 2001
 From: Jacob Stiffler <j-stiffler@ti.com>
-Date: Wed, 28 Nov 2018 14:31:22 -0500
+Date: Wed, 27 Feb 2019 11:08:32 -0500
 Subject: [PATCH] examples: client: allow configurable server
 
 * Enable a remote server URL to be provided as an argument.
@@ -14,10 +14,10 @@ Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
  1 file changed, 8 insertions(+), 3 deletions(-)
 
 diff --git a/examples/client.c b/examples/client.c
-index c3147b7..90ab1c7 100644
+index f04bed9..dfc56f5 100644
 --- a/examples/client.c
 +++ b/examples/client.c
-@@ -25,12 +25,17 @@ nodeIter(UA_NodeId childId, UA_Boolean isInverse, UA_NodeId referenceTypeId, voi
+@@ -29,13 +29,18 @@ nodeIter(UA_NodeId childId, UA_Boolean isInverse, UA_NodeId referenceTypeId, voi
  }
  
  int main(int argc, char *argv[]) {
@@ -26,7 +26,8 @@ index c3147b7..90ab1c7 100644
 +        ua_server = argv[1];
 +    }
 +
-     UA_Client *client = UA_Client_new(UA_ClientConfig_default);
+     UA_Client *client = UA_Client_new();
+     UA_ClientConfig_setDefault(UA_Client_getConfig(client));
  
      /* Listing endpoints */
      UA_EndpointDescription* endpointArray = NULL;
@@ -36,7 +37,7 @@ index c3147b7..90ab1c7 100644
                                                    &endpointArraySize, &endpointArray);
      if(retval != UA_STATUSCODE_GOOD) {
          UA_Array_delete(endpointArray, endpointArraySize, &UA_TYPES[UA_TYPES_ENDPOINTDESCRIPTION]);
-@@ -46,8 +51,8 @@ int main(int argc, char *argv[]) {
+@@ -51,8 +56,8 @@ int main(int argc, char *argv[]) {
      UA_Array_delete(endpointArray,endpointArraySize, &UA_TYPES[UA_TYPES_ENDPOINTDESCRIPTION]);
  
      /* Connect to a server */
@@ -46,7 +47,7 @@ index c3147b7..90ab1c7 100644
 +    retval = UA_Client_connect_username(client, ua_server, "user1", "password");
      if(retval != UA_STATUSCODE_GOOD) {
          UA_Client_delete(client);
-         return (int)retval;
+         return EXIT_FAILURE;
 -- 
 2.7.4
 
diff --git a/meta-arago-extras/recipes-connectivity/open62541/open62541/0001-tests-fix-typing-of-size_t-in-printf.patch b/meta-arago-extras/recipes-connectivity/open62541/open62541/0001-tests-fix-typing-of-size_t-in-printf.patch
new file mode 100644
index 0000000..21f7a16
--- /dev/null
+++ b/meta-arago-extras/recipes-connectivity/open62541/open62541/0001-tests-fix-typing-of-size_t-in-printf.patch
@@ -0,0 +1,64 @@
+From c04171fb423c16f1aa9ad31d6f95e95b54b6f26f Mon Sep 17 00:00:00 2001
+From: Jacob Stiffler <j-stiffler@ti.com>
+Date: Wed, 9 Jan 2019 08:31:27 -0500
+Subject: [PATCH] tests: fix typing of size_t in printf
+
+Upstream-Status: Pending
+
+Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
+---
+ tests/check_timer.c                         | 2 +-
+ tests/server/check_server_historical_data.c | 8 ++++----
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/tests/check_timer.c b/tests/check_timer.c
+index 051f1bc..1021cf4 100644
+--- a/tests/check_timer.c
++++ b/tests/check_timer.c
+@@ -52,7 +52,7 @@ START_TEST(benchmarkTimer) {
+     clock_t finish = clock();
+     double time_spent = (double)(finish - begin) / CLOCKS_PER_SEC;
+     printf("duration was %f s\n", time_spent);
+-    printf("%lu callbacks\n", count);
++    printf("%lu callbacks\n", (long unsigned)count);
+ 
+     UA_Timer_deleteMembers(&timer);
+ } END_TEST
+diff --git a/tests/server/check_server_historical_data.c b/tests/server/check_server_historical_data.c
+index 8f16089..0dfcba0 100644
+--- a/tests/server/check_server_historical_data.c
++++ b/tests/server/check_server_historical_data.c
+@@ -325,7 +325,7 @@ testHistoricalDataBackend(size_t maxResponseSize)
+     UA_UInt32 retval = 0;
+     size_t i = 0;
+     testTuple *current = &testRequests[i];
+-    fprintf(stderr, "Testing with maxResponseSize of %lu\n", maxResponseSize);
++    fprintf(stderr, "Testing with maxResponseSize of %lu\n", (long unsigned)maxResponseSize);
+     fprintf(stderr, "Start | End  | numValuesPerNode | returnBounds |ContPoint| {Expected}{Result} Result\n");
+     fprintf(stderr, "------+------+------------------+--------------+---------+----------------\n");
+     size_t j;
+@@ -372,7 +372,7 @@ testHistoricalDataBackend(size_t maxResponseSize)
+             ++counter;
+ 
+             if(response.resultsSize != 1) {
+-                fprintf(stderr, "ResultError:Size %lu %s", response.resultsSize, UA_StatusCode_name(response.responseHeader.serviceResult));
++                fprintf(stderr, "ResultError:Size %lu %s", (long unsigned)response.resultsSize, UA_StatusCode_name(response.responseHeader.serviceResult));
+                 readOk = false;
+                 UA_HistoryReadResponse_deleteMembers(&response);
+                 break;
+@@ -465,10 +465,10 @@ testHistoricalDataBackend(size_t maxResponseSize)
+         }
+         UA_ByteString_deleteMembers(&continuous);
+         if (!readOk) {
+-            fprintf(stderr, "} Fail (%lu requests)\n", counter);
++            fprintf(stderr, "} Fail (%lu requests)\n", (long unsigned)counter);
+             ++retval;
+         } else {
+-            fprintf(stderr, "} OK (%lu requests)\n", counter);
++            fprintf(stderr, "} OK (%lu requests)\n", (long unsigned)counter);
+         }
+         current = &testRequests[++i];
+     }
+-- 
+2.7.4
+
diff --git a/meta-arago-extras/recipes-connectivity/open62541/open62541_git.bb b/meta-arago-extras/recipes-connectivity/open62541/open62541_git.bb
index 1166e26..9539d83 100644
--- a/meta-arago-extras/recipes-connectivity/open62541/open62541_git.bb
+++ b/meta-arago-extras/recipes-connectivity/open62541/open62541_git.bb
@@ -4,13 +4,14 @@ LICENSE = "MPL-2.0"
 
 LIC_FILES_CHKSUM = "file://LICENSE;md5=815ca599c9df247a0c7f619bab123dad"
 
-SRC_URI = "git://github.com/open62541/open62541.git;protocol=https;branch=${BRANCH} \
-           file://0001-examples-client-allow-configurable-server.patch"
+SRC_URI = "gitsm://github.com/open62541/open62541.git;protocol=https;branch=${BRANCH} \
+           file://0001-examples-client-allow-configurable-server.patch \
+           file://0001-tests-fix-typing-of-size_t-in-printf.patch"
 
-BRANCH = "0.3"
-SRCREV = "9f46963240854d9a65d1784a3d2d8440c70157e8"
+BRANCH = "master"
+SRCREV = "7ea5a142bac44d5de7554938360e431d34fe2f59"
 
-PV = "0.3-rc4+git${SRCPV}"
+PV = "0.4-dev+git${SRCPV}"
 
 inherit cmake python3native
 
@@ -20,17 +21,30 @@ S = "${WORKDIR}/git"
 
 EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DUA_BUILD_EXAMPLES=1 -DUA_BUILD_UNIT_TESTS=1"
 
+# Disable BUILD_OPTIMIZATION as unittests fail due to "strict-overflow"
+DEBUG_BUILD = "1"
+BUILD_OPTIMIZATION = ""
+EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=Debug"
+
+# Or disable unittests
+#EXTRA_OECMAKE += "-DUA_BUILD_UNIT_TESTS=0"
+
 PACKAGECONFIG[sharedlibs] = "-DBUILD_SHARED_LIBS=1,-DBUILD_SHARED_LIBS=0,,"
 PACKAGECONFIG[encrypt] = "-DUA_ENABLE_ENCRYPTION=1 -DMBEDTLS_FOLDER_LIBRARY=${STAGING_LIBDIR} -DMBEDTLS_FOLDER_INCLUDE=${STAGING_INCDIR},-DUA_ENABLE_ENCRYPTION=0,mbedtls,"
+PACKAGECONFIG[pubsub] = "-DUA_ENABLE_PUBSUB=1,-DUA_ENABLE_PUBSUB=0,,"
+PACKAGECONFIG[pubsub_uadp] = "-DUA_ENABLE_PUBSUB_ETH_UADP=1,-DUA_ENABLE_PUBSUB_ETH_UADP=0,,"
+PACKAGECONFIG[pubsub_delta_frames] = "-DUA_ENABLE_PUBSUB_DELTAFRAMES=1,-DUA_ENABLE_PUBSUB_DELTAFRAMES=0,,"
+PACKAGECONFIG[pubsub_informationmodel] = "-DUA_ENABLE_PUBSUB_INFORMATIONMODEL=1,-DUA_ENABLE_PUBSUB_INFORMATIONMODEL=0,,"
+PACKAGECONFIG[pubsub_informationmodel_methods] = "-DUA_ENABLE_PUBSUB_INFORMATIONMODEL_METHODS=1,-DUA_ENABLE_PUBSUB_INFORMATIONMODEL_METHODS=0,,"
+PACKAGECONFIG[subscription_events] = "-DUA_ENABLE_SUBSCRIPTIONS_EVENTS=1,-DUA_ENABLE_SUBSCRIPTIONS_EVENTS=0,,"
 
-# Current mbedtls is not sufficient.
-PACKAGECONFIG ?= ""
+PACKAGECONFIG[certificate] = "-DUA_BUILD_SELFSIGNED_CERTIFICATE=1,-DUA_BUILD_SELFSIGNED_CERTIFICATE=0,,"
 
-do_install_append() {
-    # header file is not installed by default
-    install -d ${D}${includedir}
-    install -m 644 ${B}/open62541.h ${D}${includedir}
+PACKAGECONFIG ?= "pubsub pubsub_delta_frames pubsub_informationmodel \
+                  pubsub_informationmodel_methods pubsub_uadp"
 
+# Install examples and unit tests
+do_install_append() {
     # Install examples
     install -d "${D}${datadir}/${BPN}/examples"
     for example in ${B}/bin/examples/*
@@ -53,5 +67,6 @@ FILES_${PN}-tests += "${datadir}/${BPN}/tests"
 
 # Allow staticdev package to be empty incase sharedlibs is switched on
 ALLOW_EMPTY_${PN}-staticdev = "1"
+ALLOW_EMPTY_${PN}-tests = "1"
 
 BBCLASSEXTEND = "native nativesdk"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [master/thud/rocko][PATCH 4/4] arago.conf: open62541: enable encryption
  2019-03-11 15:39 [master/thud/rocko][PATCH 0/4] Update open62541 to 0.4-dev Jacob Stiffler
                   ` (2 preceding siblings ...)
  2019-03-11 15:39 ` [master/thud/rocko][PATCH 3/4] open62541: update to 0.4-dev Jacob Stiffler
@ 2019-03-11 15:39 ` Jacob Stiffler
  3 siblings, 0 replies; 6+ messages in thread
From: Jacob Stiffler @ 2019-03-11 15:39 UTC (permalink / raw)
  To: meta-arago

Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
---
 meta-arago-distro/conf/distro/arago.conf | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta-arago-distro/conf/distro/arago.conf b/meta-arago-distro/conf/distro/arago.conf
index dcab870..2ad9f01 100644
--- a/meta-arago-distro/conf/distro/arago.conf
+++ b/meta-arago-distro/conf/distro/arago.conf
@@ -123,6 +123,9 @@ PACKAGECONFIG_pn-glmark2 = "drm-gles2 wayland-gles2"
 # Enable U-boot OPTEE config for K3
 PACKAGECONFIG_append_pn-u-boot-ti-staging_k3 = " optee"
 
+# Enable encryption support in open62541
+PACKAGECONFIG_append_pn-open62541 = " encrypt"
+
 EXTRA_IMAGEDEPENDS_append_k3 += " u-boot-k3-r5 ti-sci-fw"
 
 # Enable UI and scripting for perf
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [master/thud/rocko][PATCH 3/4] open62541: update to 0.4-dev
  2019-03-11 15:39 ` [master/thud/rocko][PATCH 3/4] open62541: update to 0.4-dev Jacob Stiffler
@ 2019-03-13  0:36   ` Denys Dmytriyenko
  0 siblings, 0 replies; 6+ messages in thread
From: Denys Dmytriyenko @ 2019-03-13  0:36 UTC (permalink / raw)
  To: Jacob Stiffler; +Cc: meta-arago

On Mon, Mar 11, 2019 at 11:39:49AM -0400, Jacob Stiffler wrote:
> * Switch to master branch (0.4-dev) for PUBSUB support.
> * git-submodules are now required to build.

git-submodules fetcher in bitbake is not very stable. There were discussions 
upstream about some breakage and corner cases, etc.

First of all - are there specific recipes for any of those submodules? If so, 
those should probably be proper dependencies.

If not, can they be listed in SRC_URI individually? I.e. multiple git:// 
entries instead of a single gitsm:// entry.

-- 
Denys

> * Add and enable packageconfig for pubsub.
> * Disable build optimizations to work around "strict-overflow" error
>   in unit tests.
> * Patch typing of size_t vars to fix armv7 builds.
> 
> Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
> ---
>  ...examples-client-allow-configurable-server.patch | 15 ++---
>  ...0001-tests-fix-typing-of-size_t-in-printf.patch | 64 ++++++++++++++++++++++
>  .../open62541/open62541_git.bb                     | 37 +++++++++----
>  3 files changed, 98 insertions(+), 18 deletions(-)
>  create mode 100644 meta-arago-extras/recipes-connectivity/open62541/open62541/0001-tests-fix-typing-of-size_t-in-printf.patch
> 
> diff --git a/meta-arago-extras/recipes-connectivity/open62541/open62541/0001-examples-client-allow-configurable-server.patch b/meta-arago-extras/recipes-connectivity/open62541/open62541/0001-examples-client-allow-configurable-server.patch
> index 1cf89a9..97d241e 100644
> --- a/meta-arago-extras/recipes-connectivity/open62541/open62541/0001-examples-client-allow-configurable-server.patch
> +++ b/meta-arago-extras/recipes-connectivity/open62541/open62541/0001-examples-client-allow-configurable-server.patch
> @@ -1,6 +1,6 @@
> -From da2b9a741c3116a7774989f6338976c00a4c0496 Mon Sep 17 00:00:00 2001
> +From 69a658e534ff484faebe72fa7d1b6d484e49e7cd Mon Sep 17 00:00:00 2001
>  From: Jacob Stiffler <j-stiffler@ti.com>
> -Date: Wed, 28 Nov 2018 14:31:22 -0500
> +Date: Wed, 27 Feb 2019 11:08:32 -0500
>  Subject: [PATCH] examples: client: allow configurable server
>  
>  * Enable a remote server URL to be provided as an argument.
> @@ -14,10 +14,10 @@ Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
>   1 file changed, 8 insertions(+), 3 deletions(-)
>  
>  diff --git a/examples/client.c b/examples/client.c
> -index c3147b7..90ab1c7 100644
> +index f04bed9..dfc56f5 100644
>  --- a/examples/client.c
>  +++ b/examples/client.c
> -@@ -25,12 +25,17 @@ nodeIter(UA_NodeId childId, UA_Boolean isInverse, UA_NodeId referenceTypeId, voi
> +@@ -29,13 +29,18 @@ nodeIter(UA_NodeId childId, UA_Boolean isInverse, UA_NodeId referenceTypeId, voi
>   }
>   
>   int main(int argc, char *argv[]) {
> @@ -26,7 +26,8 @@ index c3147b7..90ab1c7 100644
>  +        ua_server = argv[1];
>  +    }
>  +
> -     UA_Client *client = UA_Client_new(UA_ClientConfig_default);
> +     UA_Client *client = UA_Client_new();
> +     UA_ClientConfig_setDefault(UA_Client_getConfig(client));
>   
>       /* Listing endpoints */
>       UA_EndpointDescription* endpointArray = NULL;
> @@ -36,7 +37,7 @@ index c3147b7..90ab1c7 100644
>                                                     &endpointArraySize, &endpointArray);
>       if(retval != UA_STATUSCODE_GOOD) {
>           UA_Array_delete(endpointArray, endpointArraySize, &UA_TYPES[UA_TYPES_ENDPOINTDESCRIPTION]);
> -@@ -46,8 +51,8 @@ int main(int argc, char *argv[]) {
> +@@ -51,8 +56,8 @@ int main(int argc, char *argv[]) {
>       UA_Array_delete(endpointArray,endpointArraySize, &UA_TYPES[UA_TYPES_ENDPOINTDESCRIPTION]);
>   
>       /* Connect to a server */
> @@ -46,7 +47,7 @@ index c3147b7..90ab1c7 100644
>  +    retval = UA_Client_connect_username(client, ua_server, "user1", "password");
>       if(retval != UA_STATUSCODE_GOOD) {
>           UA_Client_delete(client);
> -         return (int)retval;
> +         return EXIT_FAILURE;
>  -- 
>  2.7.4
>  
> diff --git a/meta-arago-extras/recipes-connectivity/open62541/open62541/0001-tests-fix-typing-of-size_t-in-printf.patch b/meta-arago-extras/recipes-connectivity/open62541/open62541/0001-tests-fix-typing-of-size_t-in-printf.patch
> new file mode 100644
> index 0000000..21f7a16
> --- /dev/null
> +++ b/meta-arago-extras/recipes-connectivity/open62541/open62541/0001-tests-fix-typing-of-size_t-in-printf.patch
> @@ -0,0 +1,64 @@
> +From c04171fb423c16f1aa9ad31d6f95e95b54b6f26f Mon Sep 17 00:00:00 2001
> +From: Jacob Stiffler <j-stiffler@ti.com>
> +Date: Wed, 9 Jan 2019 08:31:27 -0500
> +Subject: [PATCH] tests: fix typing of size_t in printf
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
> +---
> + tests/check_timer.c                         | 2 +-
> + tests/server/check_server_historical_data.c | 8 ++++----
> + 2 files changed, 5 insertions(+), 5 deletions(-)
> +
> +diff --git a/tests/check_timer.c b/tests/check_timer.c
> +index 051f1bc..1021cf4 100644
> +--- a/tests/check_timer.c
> ++++ b/tests/check_timer.c
> +@@ -52,7 +52,7 @@ START_TEST(benchmarkTimer) {
> +     clock_t finish = clock();
> +     double time_spent = (double)(finish - begin) / CLOCKS_PER_SEC;
> +     printf("duration was %f s\n", time_spent);
> +-    printf("%lu callbacks\n", count);
> ++    printf("%lu callbacks\n", (long unsigned)count);
> + 
> +     UA_Timer_deleteMembers(&timer);
> + } END_TEST
> +diff --git a/tests/server/check_server_historical_data.c b/tests/server/check_server_historical_data.c
> +index 8f16089..0dfcba0 100644
> +--- a/tests/server/check_server_historical_data.c
> ++++ b/tests/server/check_server_historical_data.c
> +@@ -325,7 +325,7 @@ testHistoricalDataBackend(size_t maxResponseSize)
> +     UA_UInt32 retval = 0;
> +     size_t i = 0;
> +     testTuple *current = &testRequests[i];
> +-    fprintf(stderr, "Testing with maxResponseSize of %lu\n", maxResponseSize);
> ++    fprintf(stderr, "Testing with maxResponseSize of %lu\n", (long unsigned)maxResponseSize);
> +     fprintf(stderr, "Start | End  | numValuesPerNode | returnBounds |ContPoint| {Expected}{Result} Result\n");
> +     fprintf(stderr, "------+------+------------------+--------------+---------+----------------\n");
> +     size_t j;
> +@@ -372,7 +372,7 @@ testHistoricalDataBackend(size_t maxResponseSize)
> +             ++counter;
> + 
> +             if(response.resultsSize != 1) {
> +-                fprintf(stderr, "ResultError:Size %lu %s", response.resultsSize, UA_StatusCode_name(response.responseHeader.serviceResult));
> ++                fprintf(stderr, "ResultError:Size %lu %s", (long unsigned)response.resultsSize, UA_StatusCode_name(response.responseHeader.serviceResult));
> +                 readOk = false;
> +                 UA_HistoryReadResponse_deleteMembers(&response);
> +                 break;
> +@@ -465,10 +465,10 @@ testHistoricalDataBackend(size_t maxResponseSize)
> +         }
> +         UA_ByteString_deleteMembers(&continuous);
> +         if (!readOk) {
> +-            fprintf(stderr, "} Fail (%lu requests)\n", counter);
> ++            fprintf(stderr, "} Fail (%lu requests)\n", (long unsigned)counter);
> +             ++retval;
> +         } else {
> +-            fprintf(stderr, "} OK (%lu requests)\n", counter);
> ++            fprintf(stderr, "} OK (%lu requests)\n", (long unsigned)counter);
> +         }
> +         current = &testRequests[++i];
> +     }
> +-- 
> +2.7.4
> +
> diff --git a/meta-arago-extras/recipes-connectivity/open62541/open62541_git.bb b/meta-arago-extras/recipes-connectivity/open62541/open62541_git.bb
> index 1166e26..9539d83 100644
> --- a/meta-arago-extras/recipes-connectivity/open62541/open62541_git.bb
> +++ b/meta-arago-extras/recipes-connectivity/open62541/open62541_git.bb
> @@ -4,13 +4,14 @@ LICENSE = "MPL-2.0"
>  
>  LIC_FILES_CHKSUM = "file://LICENSE;md5=815ca599c9df247a0c7f619bab123dad"
>  
> -SRC_URI = "git://github.com/open62541/open62541.git;protocol=https;branch=${BRANCH} \
> -           file://0001-examples-client-allow-configurable-server.patch"
> +SRC_URI = "gitsm://github.com/open62541/open62541.git;protocol=https;branch=${BRANCH} \
> +           file://0001-examples-client-allow-configurable-server.patch \
> +           file://0001-tests-fix-typing-of-size_t-in-printf.patch"
>  
> -BRANCH = "0.3"
> -SRCREV = "9f46963240854d9a65d1784a3d2d8440c70157e8"
> +BRANCH = "master"
> +SRCREV = "7ea5a142bac44d5de7554938360e431d34fe2f59"
>  
> -PV = "0.3-rc4+git${SRCPV}"
> +PV = "0.4-dev+git${SRCPV}"
>  
>  inherit cmake python3native
>  
> @@ -20,17 +21,30 @@ S = "${WORKDIR}/git"
>  
>  EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DUA_BUILD_EXAMPLES=1 -DUA_BUILD_UNIT_TESTS=1"
>  
> +# Disable BUILD_OPTIMIZATION as unittests fail due to "strict-overflow"
> +DEBUG_BUILD = "1"
> +BUILD_OPTIMIZATION = ""
> +EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=Debug"
> +
> +# Or disable unittests
> +#EXTRA_OECMAKE += "-DUA_BUILD_UNIT_TESTS=0"
> +
>  PACKAGECONFIG[sharedlibs] = "-DBUILD_SHARED_LIBS=1,-DBUILD_SHARED_LIBS=0,,"
>  PACKAGECONFIG[encrypt] = "-DUA_ENABLE_ENCRYPTION=1 -DMBEDTLS_FOLDER_LIBRARY=${STAGING_LIBDIR} -DMBEDTLS_FOLDER_INCLUDE=${STAGING_INCDIR},-DUA_ENABLE_ENCRYPTION=0,mbedtls,"
> +PACKAGECONFIG[pubsub] = "-DUA_ENABLE_PUBSUB=1,-DUA_ENABLE_PUBSUB=0,,"
> +PACKAGECONFIG[pubsub_uadp] = "-DUA_ENABLE_PUBSUB_ETH_UADP=1,-DUA_ENABLE_PUBSUB_ETH_UADP=0,,"
> +PACKAGECONFIG[pubsub_delta_frames] = "-DUA_ENABLE_PUBSUB_DELTAFRAMES=1,-DUA_ENABLE_PUBSUB_DELTAFRAMES=0,,"
> +PACKAGECONFIG[pubsub_informationmodel] = "-DUA_ENABLE_PUBSUB_INFORMATIONMODEL=1,-DUA_ENABLE_PUBSUB_INFORMATIONMODEL=0,,"
> +PACKAGECONFIG[pubsub_informationmodel_methods] = "-DUA_ENABLE_PUBSUB_INFORMATIONMODEL_METHODS=1,-DUA_ENABLE_PUBSUB_INFORMATIONMODEL_METHODS=0,,"
> +PACKAGECONFIG[subscription_events] = "-DUA_ENABLE_SUBSCRIPTIONS_EVENTS=1,-DUA_ENABLE_SUBSCRIPTIONS_EVENTS=0,,"
>  
> -# Current mbedtls is not sufficient.
> -PACKAGECONFIG ?= ""
> +PACKAGECONFIG[certificate] = "-DUA_BUILD_SELFSIGNED_CERTIFICATE=1,-DUA_BUILD_SELFSIGNED_CERTIFICATE=0,,"
>  
> -do_install_append() {
> -    # header file is not installed by default
> -    install -d ${D}${includedir}
> -    install -m 644 ${B}/open62541.h ${D}${includedir}
> +PACKAGECONFIG ?= "pubsub pubsub_delta_frames pubsub_informationmodel \
> +                  pubsub_informationmodel_methods pubsub_uadp"
>  
> +# Install examples and unit tests
> +do_install_append() {
>      # Install examples
>      install -d "${D}${datadir}/${BPN}/examples"
>      for example in ${B}/bin/examples/*
> @@ -53,5 +67,6 @@ FILES_${PN}-tests += "${datadir}/${BPN}/tests"
>  
>  # Allow staticdev package to be empty incase sharedlibs is switched on
>  ALLOW_EMPTY_${PN}-staticdev = "1"
> +ALLOW_EMPTY_${PN}-tests = "1"
>  
>  BBCLASSEXTEND = "native nativesdk"
> -- 
> 2.7.4
> 
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-03-13  0:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-11 15:39 [master/thud/rocko][PATCH 0/4] Update open62541 to 0.4-dev Jacob Stiffler
2019-03-11 15:39 ` [rocko][PATCH 1/4] mbedtls: upgrade to 2.13.0 Jacob Stiffler
2019-03-11 15:39 ` [master/thud/rocko][PATCH 2/4] mbedtls: extend to native/nativesdk Jacob Stiffler
2019-03-11 15:39 ` [master/thud/rocko][PATCH 3/4] open62541: update to 0.4-dev Jacob Stiffler
2019-03-13  0:36   ` Denys Dmytriyenko
2019-03-11 15:39 ` [master/thud/rocko][PATCH 4/4] arago.conf: open62541: enable encryption Jacob Stiffler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.