diff options
author | Scott Murray <scott.murray@konsulko.com> | 2023-08-15 17:35:59 -0400 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2023-09-11 12:50:27 +0000 |
commit | 7dcdecf5b01f48a8fbd16fe05ebede08bf5b76a8 (patch) | |
tree | d65ebd51edf1da848c87b1e1367c910510b09439 /recipes-connectivity/kuksa-val/kuksa-dbc-feeder | |
parent | 93500637270f0d2e5f4a4185c09e65661e101a82 (diff) |
Upgrade KUKSA.val components to 0.4.0 releasespike_16.0.2pike_16.0.1pike/16.0.2pike/16.0.116.0.216.0.1
Move kuksa.val and kuksa.val.feeders repos to a commit that includes
the recent 0.4.0 release plus a few post-release fixes, and update
our local patches for the new version. A new patch is required for
the databroker to disable the upstream addition of a vendored build
of protobuf tooling for the host platform, as that does not work
in the OE build enviroment, and is effectively not required since
known versions of protoc and libprotobuf are already present.
The major change coming in is a rework of TLS support, which requires
a minor change to the DBC feeder configuration file that has also
been included.
Bug-AGL: SPEC-4762
Change-Id: I1a43248f15c9946d9d9dc1e8aacf1c3a96ab45a0
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
(cherry picked from commit a620f3a712bab0dd80c8ecaa49e1ebb062fabbb6)
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl-demo/+/29202
Tested-by: Jenkins Job builder account
ci-image-build: Jenkins Job builder account
ci-image-boot-test: Jenkins Job builder account
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'recipes-connectivity/kuksa-val/kuksa-dbc-feeder')
4 files changed, 48 insertions, 62 deletions
diff --git a/recipes-connectivity/kuksa-val/kuksa-dbc-feeder/0001-dbc2val-add-installation-mechanism.patch b/recipes-connectivity/kuksa-val/kuksa-dbc-feeder/0001-dbc2val-add-installation-mechanism.patch index 527266f27..1e1ff5ddc 100644 --- a/recipes-connectivity/kuksa-val/kuksa-dbc-feeder/0001-dbc2val-add-installation-mechanism.patch +++ b/recipes-connectivity/kuksa-val/kuksa-dbc-feeder/0001-dbc2val-add-installation-mechanism.patch @@ -1,7 +1,7 @@ -From c3774fed42d58f227a4ecb501c6ef1dd3a9cfcf3 Mon Sep 17 00:00:00 2001 +From d23ce9baabaabff17a4bf6050462edd11feb7cef Mon Sep 17 00:00:00 2001 From: Scott Murray <scott.murray@konsulko.com> Date: Wed, 19 Apr 2023 15:55:01 -0400 -Subject: [PATCH 1/2] dbc2val: add installation mechanism +Subject: [PATCH] dbc2val: add installation mechanism Add setup.py and setup.cfg to allow installing the dbcfeederlib module and dbcfeeder.py in a way suitable for packaging. @@ -10,7 +10,7 @@ Upstream-Status: pending Signed-off-by: Scott Murray <scott.murray@konsulko.com> -%% original patch: 0001-dbc2val-add-installation-mechanism.patch + --- dbc2val/setup.cfg | 30 ++++++++++++++++++++++++++++++ dbc2val/setup.py | 14 ++++++++++++++ @@ -74,6 +74,3 @@ index 0000000..65f9157 + }, + setup_requires=['setuptools-git-versioning'], +) --- -2.39.2 - diff --git a/recipes-connectivity/kuksa-val/kuksa-dbc-feeder/0002-dbc2val-usability-improvements.patch b/recipes-connectivity/kuksa-val/kuksa-dbc-feeder/0002-dbc2val-usability-improvements.patch index a3dd31be4..31051b18c 100644 --- a/recipes-connectivity/kuksa-val/kuksa-dbc-feeder/0002-dbc2val-usability-improvements.patch +++ b/recipes-connectivity/kuksa-val/kuksa-dbc-feeder/0002-dbc2val-usability-improvements.patch @@ -1,7 +1,7 @@ -From 91fb1f5a92e8784446c4e354fe5a8c465d6b3cb8 Mon Sep 17 00:00:00 2001 +From b217a746ef7b92291320e4c1a66b52df0318495f Mon Sep 17 00:00:00 2001 From: Scott Murray <scott.murray@konsulko.com> -Date: Tue, 2 May 2023 16:27:04 -0400 -Subject: [PATCH 2/2] dbc2val: usability improvements +Date: Sat, 5 Aug 2023 13:58:16 -0400 +Subject: [PATCH 2/3] dbc2val: usability improvements Changes: - Tweaked default configuration file search path to better match @@ -17,29 +17,40 @@ Changes: Upstream-Status: pending Signed-off-by: Scott Murray <scott.murray@konsulko.com> + --- - dbc2val/dbcfeeder.py | 10 ++++++++-- - dbc2val/dbcfeederlib/dbcreader.py | 11 ++++++++--- - 2 files changed, 16 insertions(+), 5 deletions(-) + dbc2val/dbcfeeder.py | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/dbc2val/dbcfeeder.py b/dbc2val/dbcfeeder.py -index d32bb04..b73b96e 100755 +index 966dba7..e7fd319 100755 --- a/dbc2val/dbcfeeder.py +++ b/dbc2val/dbcfeeder.py -@@ -170,7 +170,11 @@ class Feeder: +@@ -188,7 +188,11 @@ class Feeder: - # use socketCAN - log.info("Using socket CAN device '%s'", canport) -- self._reader.start_listening(bustype="socketcan", channel=canport) + # use socketCAN + log.info("Using socket CAN device '%s'", canport) + try: -+ self._reader.start_listening(bustype="socketcan", channel=canport) + self._reader.start_listening(bustype="socketcan", channel=canport) + except: + log.error("Could not open {}, exiting".format(canport)) + sys.exit(-1) - self._run() - -@@ -278,8 +282,10 @@ def parse_config(filename): + receiver = threading.Thread(target=self._run_receiver) + receiver.start() +@@ -212,6 +216,11 @@ class Feeder: + threads.append(transmitter) + else: + log.info("No val2dbc mappings found or val2dbc disabled!!") ++ ++ # Spin so signal handlers will work ++ while not self._shutdown: ++ time.sleep(0.1) ++ + # Wait for all of them to finish + for thread in threads: + thread.join() +@@ -363,8 +372,10 @@ def parse_config(filename): configfile = filename else: config_candidates = [ @@ -51,39 +62,15 @@ index d32bb04..b73b96e 100755 "config/dbc_feeder.ini", ] for candidate in config_candidates: -diff --git a/dbc2val/dbcfeederlib/dbcreader.py b/dbc2val/dbcfeederlib/dbcreader.py -index 5dad41f..c2f5b55 100644 ---- a/dbc2val/dbcfeederlib/dbcreader.py -+++ b/dbc2val/dbcfeederlib/dbcreader.py -@@ -56,8 +56,8 @@ class DBCReader: - Bitrate in bit/s. - """ - self.bus = can.interface.Bus(*args, **kwargs) # pylint: disable=abstract-class-instantiated -- rxThread = threading.Thread(target=self.rxWorker) -- rxThread.start() -+ self.rxThread = threading.Thread(target=self.rxWorker) -+ self.rxThread.start() - - def get_whitelist(self): - log.info("Collecting signals, generating CAN ID whitelist") -@@ -86,7 +86,10 @@ class DBCReader: - def rxWorker(self): - log.info("Starting Rx thread") - while self.run: -- msg = self.bus.recv(timeout=1) -+ try: -+ msg = self.bus.recv(timeout=1) -+ except Exception: -+ break - log.debug("processing message from CAN bus") - if msg and msg.arbitration_id in self.canidwl: - try: -@@ -113,3 +116,5 @@ class DBCReader: +@@ -577,7 +588,7 @@ def main(argv): + elif "can" in config and "dbc_default_file" in config["can"]: + dbc_default = config["can"]["dbc_default_file"] + else: +- dbc_default = "dbc_default_values.json" ++ dbc_default = "" - def stop(self): - self.run = False -+ self.bus.shutdown() -+ self.rxThread.join() + if args.dbc2val: + use_dbc2val = True -- -2.39.2 +2.41.0 diff --git a/recipes-connectivity/kuksa-val/kuksa-dbc-feeder/0003-dbc2val-fix-token-file-configuration-option.patch b/recipes-connectivity/kuksa-val/kuksa-dbc-feeder/0003-dbc2val-fix-token-file-configuration-option.patch index e3f3de655..aae8b3dc0 100644 --- a/recipes-connectivity/kuksa-val/kuksa-dbc-feeder/0003-dbc2val-fix-token-file-configuration-option.patch +++ b/recipes-connectivity/kuksa-val/kuksa-dbc-feeder/0003-dbc2val-fix-token-file-configuration-option.patch @@ -1,4 +1,4 @@ -From e2b5305a48a8c5ce5c149437e44d1b82f4b94432 Mon Sep 17 00:00:00 2001 +From dc20da27a73141b04cc6b0ce5d74e547d6fc7256 Mon Sep 17 00:00:00 2001 From: Scott Murray <scott.murray@konsulko.com> Date: Mon, 8 May 2023 14:58:06 -0400 Subject: [PATCH] dbc2val: fix token file configuration option @@ -10,23 +10,21 @@ location can be configured again for dbcfeeder.py. Upstream-Status: pending Signed-off-by: Scott Murray <scott.murray@konsulko.com> + --- dbc2val/dbcfeederlib/serverclientwrapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbc2val/dbcfeederlib/serverclientwrapper.py b/dbc2val/dbcfeederlib/serverclientwrapper.py -index 851516b..4f44913 100644 +index 1219a76..63bc12e 100644 --- a/dbc2val/dbcfeederlib/serverclientwrapper.py +++ b/dbc2val/dbcfeederlib/serverclientwrapper.py -@@ -60,7 +60,7 @@ class ServerClientWrapper(clientwrapper.ClientWrapper): +@@ -59,7 +59,7 @@ class ServerClientWrapper(clientwrapper.ClientWrapper): self._client_config["insecure"] = not self._tls # Do not set token if it is empty to allow default client lib info to be used if self._token_path != "": - self._client_config["token"] = self._token_path + self._client_config["token_or_tokenfile"] = self._token_path - # TODO add data for root cert if using TLS and if given - --- -2.39.2 - + if self._root_ca_path: + self._client_config['cacertificate'] = self._root_ca_path diff --git a/recipes-connectivity/kuksa-val/kuksa-dbc-feeder/config.ini b/recipes-connectivity/kuksa-val/kuksa-dbc-feeder/config.ini index 411c7bc47..580d02d67 100644 --- a/recipes-connectivity/kuksa-val/kuksa-dbc-feeder/config.ini +++ b/recipes-connectivity/kuksa-val/kuksa-dbc-feeder/config.ini @@ -14,6 +14,10 @@ port = 8090 # Shall TLS be used (default False for Databroker, True for KUKSA.val Server) tls = True +# TLS-related settings +# Path to root CA, needed if using TLS +root_ca_path=/etc/kuksa-val/CA.pem + # Token file for authorization. token = /etc/kuksa-dbc-feeder/dbc_feeder.json.token |