From cf0d753ed0842ce472454b4c7c2cbff8db341612 Mon Sep 17 00:00:00 2001 From: Jon Oster Date: Thu, 7 Jun 2018 11:10:07 +0200 Subject: Bugfix: strip whitespace and newlines from tuf URL in credentials.zip --- recipes-sota/aktualizr/garage-sign-version.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-sota/aktualizr/garage-sign-version.inc b/recipes-sota/aktualizr/garage-sign-version.inc index 66e3ffd..f2d04e8 100644 --- a/recipes-sota/aktualizr/garage-sign-version.inc +++ b/recipes-sota/aktualizr/garage-sign-version.inc @@ -8,7 +8,7 @@ python () { with zipfile.ZipFile(d.getVar("SOTA_PACKED_CREDENTIALS", True), 'r') as zip_ref: try: with zip_ref.open('tufrepo.url', mode='r') as url_file: - url = url_file.read().decode() + '/health/version' + url = url_file.read().decode().strip(' \t\n') + '/health/version' except (KeyError, ValueError, RuntimeError): return r = urllib.request.urlopen(url) -- cgit v1.2.3-54-g00ecf From d8673ecacbfb6e3b7576a7aeb520222ac3ddc488 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Wed, 6 Jun 2018 15:38:55 +0200 Subject: aktualizr-auto-prov: Remove redundant '.toml'. --- recipes-sota/aktualizr/aktualizr-auto-prov.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-sota/aktualizr/aktualizr-auto-prov.bb b/recipes-sota/aktualizr/aktualizr-auto-prov.bb index 7f4f2e4..77f8f22 100644 --- a/recipes-sota/aktualizr/aktualizr-auto-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-auto-prov.bb @@ -36,7 +36,7 @@ do_install() { aktualizr_toml=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'secondary-network', 'sota_autoprov_primary.toml', 'sota_autoprov.toml', d)} install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/${aktualizr_toml} \ - ${D}${libdir}/sota/conf.d/20-${aktualizr_toml}.toml + ${D}${libdir}/sota/conf.d/20-${aktualizr_toml} # deploy SOTA credentials if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then @@ -49,7 +49,7 @@ do_install() { FILES_${PN} = " \ ${libdir}/sota/conf.d \ - ${libdir}/sota/conf.d/20-${aktualizr_toml}.toml \ + ${libdir}/sota/conf.d/20-${aktualizr_toml} \ ${localstatedir}/sota \ ${localstatedir}/sota/sota_provisioning_credentials.zip \ " -- cgit v1.2.3-54-g00ecf From 9e9daab4cecdc69ee0d0020d130811f1608549d0 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Tue, 12 Jun 2018 09:16:19 +0200 Subject: sota.bbclass: remove obsolete/incorrect comment. --- classes/sota.bbclass | 1 - 1 file changed, 1 deletion(-) diff --git a/classes/sota.bbclass b/classes/sota.bbclass index 38d4ce5..e1c5ecd 100644 --- a/classes/sota.bbclass +++ b/classes/sota.bbclass @@ -24,7 +24,6 @@ OSTREE_INITRAMFS_FSTYPES ??= "${@oe.utils.ifelse(d.getVar('OSTREE_BOOTLOADER', T # Please redefine OSTREE_REPO in order to have a persistent OSTree repo OSTREE_REPO ?= "${DEPLOY_DIR_IMAGE}/ostree_repo" -# For UPTANE operation, OSTREE_BRANCHNAME must start with "${MACHINE}-" OSTREE_BRANCHNAME ?= "${MACHINE}" OSTREE_OSNAME ?= "poky" OSTREE_INITRAMFS_IMAGE ?= "initramfs-ostree-image" -- cgit v1.2.3-54-g00ecf From 8cf40b82f9e7eb6850290700f9f011d77f3a99c8 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Tue, 12 Jun 2018 09:57:37 +0200 Subject: aktualizr-*-prov: read config files from STAGING_DIR_HOST. STAGING_DIR_NATIVE does not get populated as I had previously believed. Native recipes do not get packaged, so although we want to use a native executable, we need to get the config files from the aktualizr-host-tools package built by the aktualizr (target) recipe. Thanks to Andre McCurdy and Khem Raj for insight on how to get this right. --- lib/oeqa/selftest/cases/updater.py | 12 ++++++------ recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb | 7 +++---- recipes-sota/aktualizr/aktualizr-hsm-prov.bb | 7 +++---- recipes-sota/aktualizr/aktualizr-implicit-prov.bb | 7 +++---- 4 files changed, 15 insertions(+), 18 deletions(-) diff --git a/lib/oeqa/selftest/cases/updater.py b/lib/oeqa/selftest/cases/updater.py index 0253a84..83a45fb 100644 --- a/lib/oeqa/selftest/cases/updater.py +++ b/lib/oeqa/selftest/cases/updater.py @@ -115,8 +115,8 @@ class AktualizrToolsTests(OESelftestTestCase): bb_vars = get_bb_vars(['SOTA_PACKED_CREDENTIALS', 'T'], 'aktualizr-native') creds = bb_vars['SOTA_PACKED_CREDENTIALS'] temp_dir = bb_vars['T'] - bb_vars_prov = get_bb_vars(['STAGING_DIR_NATIVE', 'libdir'], 'aktualizr-implicit-prov') - config = bb_vars_prov['STAGING_DIR_NATIVE'] + bb_vars_prov['libdir'] + '/sota/sota_implicit_prov.toml' + bb_vars_prov = get_bb_vars(['STAGING_DIR_HOST', 'libdir'], 'aktualizr-implicit-prov') + config = bb_vars_prov['STAGING_DIR_HOST'] + bb_vars_prov['libdir'] + '/sota/sota_implicit_prov.toml' akt_native_run(self, 'aktualizr_cert_provider -c {creds} -r -l {temp} -g {config}' .format(creds=creds, temp=temp_dir, config=config)) @@ -392,8 +392,8 @@ class ImplProvTests(OESelftestTestCase): # Run cert_provider. bb_vars = get_bb_vars(['SOTA_PACKED_CREDENTIALS'], 'aktualizr-native') creds = bb_vars['SOTA_PACKED_CREDENTIALS'] - bb_vars_prov = get_bb_vars(['STAGING_DIR_NATIVE', 'libdir'], 'aktualizr-implicit-prov') - config = bb_vars_prov['STAGING_DIR_NATIVE'] + bb_vars_prov['libdir'] + '/sota/sota_implicit_prov.toml' + bb_vars_prov = get_bb_vars(['STAGING_DIR_HOST', 'libdir'], 'aktualizr-implicit-prov') + config = bb_vars_prov['STAGING_DIR_HOST'] + bb_vars_prov['libdir'] + '/sota/sota_implicit_prov.toml' akt_native_run(self, 'aktualizr_cert_provider -c {creds} -t root@localhost -p {port} -s -g {config}' .format(creds=creds, port=self.qemu.ssh_port, config=config)) @@ -473,8 +473,8 @@ class HsmTests(OESelftestTestCase): # Run cert_provider. bb_vars = get_bb_vars(['SOTA_PACKED_CREDENTIALS'], 'aktualizr-native') creds = bb_vars['SOTA_PACKED_CREDENTIALS'] - bb_vars_prov = get_bb_vars(['STAGING_DIR_NATIVE', 'libdir'], 'aktualizr-hsm-prov') - config = bb_vars_prov['STAGING_DIR_NATIVE'] + bb_vars_prov['libdir'] + '/sota/sota_hsm_prov.toml' + bb_vars_prov = get_bb_vars(['STAGING_DIR_HOST', 'libdir'], 'aktualizr-hsm-prov') + config = bb_vars_prov['STAGING_DIR_HOST'] + bb_vars_prov['libdir'] + '/sota/sota_hsm_prov.toml' akt_native_run(self, 'aktualizr_cert_provider -c {creds} -t root@localhost -p {port} -r -s -g {config}' .format(creds=creds, port=self.qemu.ssh_port, config=config)) diff --git a/recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb b/recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb index 4d5ff79..e00d41a 100644 --- a/recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb @@ -9,8 +9,7 @@ SECTION = "base" LICENSE = "MPL-2.0" LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" -DEPENDS = "aktualizr-native openssl-native" -RDEPENDS_${PN} = "aktualizr" +DEPENDS = "aktualizr aktualizr-native openssl-native" SRC_URI = " \ file://LICENSE \ @@ -52,7 +51,7 @@ do_install() { fi install -m 0700 -d ${D}${localstatedir}/sota - install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/sota_implicit_prov_ca.toml \ + install -m 0644 ${STAGING_DIR_HOST}${libdir}/sota/sota_implicit_prov_ca.toml \ ${D}${libdir}/sota/conf.d/20-sota_implicit_prov_ca.toml aktualizr_cert_provider --credentials ${SOTA_PACKED_CREDENTIALS} \ --device-ca ${SOTA_CACERT_PATH} \ @@ -60,7 +59,7 @@ do_install() { --root-ca \ --server-url \ --local ${D}${localstatedir}/sota \ - --config ${STAGING_DIR_NATIVE}${libdir}/sota/sota_implicit_prov_ca.toml + --config ${STAGING_DIR_HOST}${libdir}/sota/sota_implicit_prov_ca.toml } FILES_${PN} = " \ diff --git a/recipes-sota/aktualizr/aktualizr-hsm-prov.bb b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb index d526cd2..98bed94 100644 --- a/recipes-sota/aktualizr/aktualizr-hsm-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb @@ -5,8 +5,7 @@ SECTION = "base" LICENSE = "MPL-2.0" LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" -DEPENDS = "aktualizr-native" -RDEPENDS_${PN} = "aktualizr" +DEPENDS = "aktualizr aktualizr-native" SRC_URI = " \ file://LICENSE \ @@ -19,11 +18,11 @@ require credentials.inc do_install() { install -m 0700 -d ${D}${libdir}/sota/conf.d - install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/sota_hsm_prov.toml \ + install -m 0644 ${STAGING_DIR_HOST}${libdir}/sota/sota_hsm_prov.toml \ ${D}${libdir}/sota/conf.d/20-sota_hsm_prov.toml if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} --no-root-ca \ - -i ${STAGING_DIR_NATIVE}${libdir}/sota/sota_hsm_prov.toml \ + -i ${STAGING_DIR_HOST}${libdir}/sota/sota_hsm_prov.toml \ -o ${D}${libdir}/sota/conf.d/30-implicit_server.toml -p ${D} fi } diff --git a/recipes-sota/aktualizr/aktualizr-implicit-prov.bb b/recipes-sota/aktualizr/aktualizr-implicit-prov.bb index e08eeef..85212de 100644 --- a/recipes-sota/aktualizr/aktualizr-implicit-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-implicit-prov.bb @@ -5,8 +5,7 @@ SECTION = "base" LICENSE = "MPL-2.0" LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" -DEPENDS = "aktualizr-native" -RDEPENDS_${PN} = "aktualizr" +DEPENDS = "aktualizr aktualizr-native" SRC_URI = " \ file://LICENSE \ @@ -19,11 +18,11 @@ require credentials.inc do_install() { install -m 0700 -d ${D}${libdir}/sota/conf.d - install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/sota_implicit_prov.toml \ + install -m 0644 ${STAGING_DIR_HOST}${libdir}/sota/sota_implicit_prov.toml \ ${D}${libdir}/sota/conf.d/20-sota_implicit_prov.toml if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} \ - -i ${STAGING_DIR_NATIVE}${libdir}/sota/sota_implicit_prov.toml \ + -i ${STAGING_DIR_HOST}${libdir}/sota/sota_implicit_prov.toml \ -o ${D}${libdir}/sota/conf.d/30-implicit_server.toml -p ${D} fi } -- cgit v1.2.3-54-g00ecf From e0ccde55fbc92ba10ab273fd8a01aac1d49339df Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Tue, 12 Jun 2018 10:05:00 +0200 Subject: CONTRIBUTING.adoc: clarify which branches have what status. --- CONTRIBUTING.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index df7a717..93a0815 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -1,4 +1,5 @@ = Contributing -We welcome pull requests from everyone. It may be helpful to read the README and other documentation for link:README.adoc[this repo], https://github.com/advancedtelematic/aktualizr[aktualizr], and the https://github.com/advancedtelematic/updater-repo/[updater-repo], particularly the sections and development and debugging. +We welcome pull requests from anyone. The master branch is the primary branch for development, and if you wish to add new functionality, it probably belongs there. We attempt to maintain recent previous branches and welcome bug fixes and backports for those. Currently, the actively maintained branches are sumo, rocko, and pyro. Previously, morty was also a stable branch, but it has not been updated or actively maintained for a while. +If you are developing with meta-updater, it may be helpful to read the README and other documentation for link:README.adoc[this repo], https://github.com/advancedtelematic/aktualizr[aktualizr], and the https://github.com/advancedtelematic/updater-repo/[updater-repo], particularly the sections about development and debugging. -- cgit v1.2.3-54-g00ecf From b771628e56ba95f426ff084ecf97fe0ce7c65316 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Wed, 13 Jun 2018 10:23:46 +0200 Subject: aktualizr: Bump to latest. No longer provide input config to implicit_writer. --- recipes-sota/aktualizr/aktualizr-hsm-prov.bb | 1 - recipes-sota/aktualizr/aktualizr-implicit-prov.bb | 1 - recipes-sota/aktualizr/aktualizr_git.bb | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/recipes-sota/aktualizr/aktualizr-hsm-prov.bb b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb index 98bed94..ce92e9c 100644 --- a/recipes-sota/aktualizr/aktualizr-hsm-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb @@ -22,7 +22,6 @@ do_install() { ${D}${libdir}/sota/conf.d/20-sota_hsm_prov.toml if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} --no-root-ca \ - -i ${STAGING_DIR_HOST}${libdir}/sota/sota_hsm_prov.toml \ -o ${D}${libdir}/sota/conf.d/30-implicit_server.toml -p ${D} fi } diff --git a/recipes-sota/aktualizr/aktualizr-implicit-prov.bb b/recipes-sota/aktualizr/aktualizr-implicit-prov.bb index 85212de..6e5f338 100644 --- a/recipes-sota/aktualizr/aktualizr-implicit-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-implicit-prov.bb @@ -22,7 +22,6 @@ do_install() { ${D}${libdir}/sota/conf.d/20-sota_implicit_prov.toml if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} \ - -i ${STAGING_DIR_HOST}${libdir}/sota/sota_implicit_prov.toml \ -o ${D}${libdir}/sota/conf.d/30-implicit_server.toml -p ${D} fi } diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 8dc4b31..f2c01d4 100755 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -23,7 +23,7 @@ SRC_URI = " \ file://aktualizr-secondary.socket \ file://aktualizr-serialcan.service \ " -SRCREV = "114dc6c519ca9a605d73ad292821348607d0fa12" +SRCREV = "17c2eea66ebddbf47a37d66df7a0441225bd0db6" BRANCH ?= "master" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From beaeb28262257da11d2d9a198656e606f82922a6 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Thu, 14 Jun 2018 12:25:17 +0200 Subject: updater.py: Fix longstanding typo. --- lib/oeqa/selftest/cases/updater.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/oeqa/selftest/cases/updater.py b/lib/oeqa/selftest/cases/updater.py index 83a45fb..1017d53 100644 --- a/lib/oeqa/selftest/cases/updater.py +++ b/lib/oeqa/selftest/cases/updater.py @@ -141,7 +141,7 @@ class AutoProvTests(OESelftestTestCase): if re.search(layer, result.output) is None: # Assume the directory layout for finding other layers. We could also # make assumptions by using 'show-layers', but either way, if the - # layers we need aren't where we expect them, we are out of like. + # layers we need aren't where we expect them, we are out of luck. path = os.path.abspath(os.path.dirname(__file__)) metadir = path + "/../../../../../" self.meta_qemu = metadir + layer @@ -204,7 +204,7 @@ class RpiTests(OESelftestTestCase): result = runCmd('bitbake-layers show-layers') # Assume the directory layout for finding other layers. We could also # make assumptions by using 'show-layers', but either way, if the - # layers we need aren't where we expect them, we are out of like. + # layers we need aren't where we expect them, we are out of luck. path = os.path.abspath(os.path.dirname(__file__)) metadir = path + "/../../../../../" if re.search(layer_python, result.output) is None: @@ -277,7 +277,7 @@ class GrubTests(OESelftestTestCase): result = runCmd('bitbake-layers show-layers') # Assume the directory layout for finding other layers. We could also # make assumptions by using 'show-layers', but either way, if the - # layers we need aren't where we expect them, we are out of like. + # layers we need aren't where we expect them, we are out of luck. path = os.path.abspath(os.path.dirname(__file__)) metadir = path + "/../../../../../" if re.search(layer_intel, result.output) is None: @@ -339,7 +339,7 @@ class ImplProvTests(OESelftestTestCase): if re.search(layer, result.output) is None: # Assume the directory layout for finding other layers. We could also # make assumptions by using 'show-layers', but either way, if the - # layers we need aren't where we expect them, we are out of like. + # layers we need aren't where we expect them, we are out of luck. path = os.path.abspath(os.path.dirname(__file__)) metadir = path + "/../../../../../" self.meta_qemu = metadir + layer @@ -409,7 +409,7 @@ class HsmTests(OESelftestTestCase): if re.search(layer, result.output) is None: # Assume the directory layout for finding other layers. We could also # make assumptions by using 'show-layers', but either way, if the - # layers we need aren't where we expect them, we are out of like. + # layers we need aren't where we expect them, we are out of luck. path = os.path.abspath(os.path.dirname(__file__)) metadir = path + "/../../../../../" self.meta_qemu = metadir + layer @@ -527,7 +527,7 @@ class SecondaryTests(OESelftestTestCase): if re.search(layer, result.output) is None: # Assume the directory layout for finding other layers. We could also # make assumptions by using 'show-layers', but either way, if the - # layers we need aren't where we expect them, we are out of like. + # layers we need aren't where we expect them, we are out of luck. path = os.path.abspath(os.path.dirname(__file__)) metadir = path + "/../../../../../" self.meta_qemu = metadir + layer @@ -572,7 +572,7 @@ class PrimaryTests(OESelftestTestCase): if re.search(layer, result.output) is None: # Assume the directory layout for finding other layers. We could also # make assumptions by using 'show-layers', but either way, if the - # layers we need aren't where we expect them, we are out of like. + # layers we need aren't where we expect them, we are out of luck. path = os.path.abspath(os.path.dirname(__file__)) metadir = path + "/../../../../../" self.meta_qemu = metadir + layer -- cgit v1.2.3-54-g00ecf From 095c6c3efca58eff071868a9d1a8b65ac98d8063 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Tue, 19 Jun 2018 10:44:50 +0200 Subject: updater.py: Add hack to clean recipes before building. This should not be necessary, but after building for the grub test, the sysroot does not get repopulated as expected for the implicit/HSM tests. --- lib/oeqa/selftest/cases/updater.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/oeqa/selftest/cases/updater.py b/lib/oeqa/selftest/cases/updater.py index 1017d53..a5533a5 100644 --- a/lib/oeqa/selftest/cases/updater.py +++ b/lib/oeqa/selftest/cases/updater.py @@ -348,6 +348,7 @@ class ImplProvTests(OESelftestTestCase): self.meta_qemu = None self.append_config('MACHINE = "qemux86-64"') self.append_config('SOTA_CLIENT_PROV = " aktualizr-implicit-prov "') + runCmd('bitbake -c cleanall aktualizr aktualizr-implicit-prov') self.qemu, self.s = qemu_launch(machine='qemux86-64') def tearDownLocal(self): @@ -419,6 +420,7 @@ class HsmTests(OESelftestTestCase): self.append_config('MACHINE = "qemux86-64"') self.append_config('SOTA_CLIENT_PROV = "aktualizr-hsm-prov"') self.append_config('SOTA_CLIENT_FEATURES = "hsm"') + runCmd('bitbake -c cleanall aktualizr aktualizr-hsm-prov') self.qemu, self.s = qemu_launch(machine='qemux86-64') def tearDownLocal(self): -- cgit v1.2.3-54-g00ecf From 4a909cd7d21800f9514fe0c399b671fbf075dd3c Mon Sep 17 00:00:00 2001 From: Phil Wise Date: Fri, 15 Jun 2018 09:48:32 +0200 Subject: aktualizr: support check-discovery and fix secondary tests. Cherry-pick of 78422f6ca6e5cca90e33ad49aa1b39bb25c527b3 from master. Original commit message follows: Compatibility with latest aktualizr Note that the HsmTests still sometimes fail --- lib/oeqa/selftest/cases/updater.py | 2 +- recipes-sota/aktualizr/aktualizr_git.bb | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/oeqa/selftest/cases/updater.py b/lib/oeqa/selftest/cases/updater.py index a5533a5..96058e7 100644 --- a/lib/oeqa/selftest/cases/updater.py +++ b/lib/oeqa/selftest/cases/updater.py @@ -556,7 +556,7 @@ class SecondaryTests(OESelftestTestCase): def test_secondary_listening(self): print('Checking aktualizr-secondary service is listening') - stdout, stderr, retcode = self.qemu_command('echo test | nc localhost 9030') + stdout, stderr, retcode = self.qemu_command('aktualizr-check-discovery') self.assertEqual(retcode, 0, "Unable to connect to secondary") diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index f2c01d4..f1540b2 100755 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -13,6 +13,9 @@ RDEPENDS_${PN}_class-target = "lshw " RDEPENDS_${PN}_append_class-target = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', ' slcand-start', '', d)} " RDEPENDS_${PN}_append_class-target = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', ' softhsm softhsm-testtoken', '', d)}" +RDEPENDS_${PN}_append_class-target = " ${PN}-tools " +RDEPENDS_${PN}-secondary_append_class-target = " ${PN}-tools " + PV = "1.0+git${SRCPV}" PR = "7" @@ -23,7 +26,7 @@ SRC_URI = " \ file://aktualizr-secondary.socket \ file://aktualizr-serialcan.service \ " -SRCREV = "17c2eea66ebddbf47a37d66df7a0441225bd0db6" +SRCREV = "9f538a8a411ca917184fe11a6cf92e5ebf9efc61" BRANCH ?= "master" S = "${WORKDIR}/git" @@ -81,7 +84,7 @@ do_install_append_class-native () { install -m 0644 ${B}/src/sota_tools/garage-sign/lib/* ${D}${libdir} } -PACKAGES =+ " ${PN}-examples ${PN}-host-tools ${PN}-secondary " +PACKAGES =+ " ${PN}-examples ${PN}-host-tools ${PN}-tools ${PN}-secondary " FILES_${PN} = " \ ${bindir}/aktualizr \ @@ -111,6 +114,10 @@ FILES_${PN}-host-tools = " \ ${libdir}/sota/sota_implicit_prov_ca.toml \ " +FILES_${PN}-tools = " \ + ${bindir}/aktualizr-check-discovery \ + " + FILES_${PN}-secondary = " \ ${bindir}/aktualizr-secondary \ ${libdir}/sota/sota_secondary.toml \ -- cgit v1.2.3-54-g00ecf