summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2018-06-21 14:45:12 +0200
committerGitHub <noreply@github.com>2018-06-21 14:45:12 +0200
commite0e081d47b2dae0be1369179bd9db6e0e5e31ff5 (patch)
tree0942ad96d80fb31bb65a0217fa681228036af9d8
parent515c54a370cfbe10b4fbc99d7861b8a6b892f6b6 (diff)
parent4a909cd7d21800f9514fe0c399b671fbf075dd3c (diff)
downloadmeta-updater-e0e081d47b2dae0be1369179bd9db6e0e5e31ff5.tar.gz
Merge pull request #345 from advancedtelematic/bugfix/staging_dir_host_sumo
Bugfix/staging dir host sumo
-rw-r--r--CONTRIBUTING.adoc3
-rw-r--r--classes/sota.bbclass1
-rw-r--r--lib/oeqa/selftest/cases/updater.py30
-rw-r--r--recipes-sota/aktualizr/aktualizr-auto-prov.bb4
-rw-r--r--recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb7
-rw-r--r--recipes-sota/aktualizr/aktualizr-hsm-prov.bb6
-rw-r--r--recipes-sota/aktualizr/aktualizr-implicit-prov.bb6
-rwxr-xr-xrecipes-sota/aktualizr/aktualizr_git.bb11
-rw-r--r--recipes-sota/aktualizr/garage-sign-version.inc2
9 files changed, 37 insertions, 33 deletions
diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc
index df7a717..93a0815 100644
--- a/CONTRIBUTING.adoc
+++ b/CONTRIBUTING.adoc
@@ -1,4 +1,5 @@
1= Contributing 1= Contributing
2 2
3We 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. 3We 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.
4 4
5If 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.
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
24 24
25# Please redefine OSTREE_REPO in order to have a persistent OSTree repo 25# Please redefine OSTREE_REPO in order to have a persistent OSTree repo
26OSTREE_REPO ?= "${DEPLOY_DIR_IMAGE}/ostree_repo" 26OSTREE_REPO ?= "${DEPLOY_DIR_IMAGE}/ostree_repo"
27# For UPTANE operation, OSTREE_BRANCHNAME must start with "${MACHINE}-"
28OSTREE_BRANCHNAME ?= "${MACHINE}" 27OSTREE_BRANCHNAME ?= "${MACHINE}"
29OSTREE_OSNAME ?= "poky" 28OSTREE_OSNAME ?= "poky"
30OSTREE_INITRAMFS_IMAGE ?= "initramfs-ostree-image" 29OSTREE_INITRAMFS_IMAGE ?= "initramfs-ostree-image"
diff --git a/lib/oeqa/selftest/cases/updater.py b/lib/oeqa/selftest/cases/updater.py
index 0253a84..96058e7 100644
--- a/lib/oeqa/selftest/cases/updater.py
+++ b/lib/oeqa/selftest/cases/updater.py
@@ -115,8 +115,8 @@ class AktualizrToolsTests(OESelftestTestCase):
115 bb_vars = get_bb_vars(['SOTA_PACKED_CREDENTIALS', 'T'], 'aktualizr-native') 115 bb_vars = get_bb_vars(['SOTA_PACKED_CREDENTIALS', 'T'], 'aktualizr-native')
116 creds = bb_vars['SOTA_PACKED_CREDENTIALS'] 116 creds = bb_vars['SOTA_PACKED_CREDENTIALS']
117 temp_dir = bb_vars['T'] 117 temp_dir = bb_vars['T']
118 bb_vars_prov = get_bb_vars(['STAGING_DIR_NATIVE', 'libdir'], 'aktualizr-implicit-prov') 118 bb_vars_prov = get_bb_vars(['STAGING_DIR_HOST', 'libdir'], 'aktualizr-implicit-prov')
119 config = bb_vars_prov['STAGING_DIR_NATIVE'] + bb_vars_prov['libdir'] + '/sota/sota_implicit_prov.toml' 119 config = bb_vars_prov['STAGING_DIR_HOST'] + bb_vars_prov['libdir'] + '/sota/sota_implicit_prov.toml'
120 120
121 akt_native_run(self, 'aktualizr_cert_provider -c {creds} -r -l {temp} -g {config}' 121 akt_native_run(self, 'aktualizr_cert_provider -c {creds} -r -l {temp} -g {config}'
122 .format(creds=creds, temp=temp_dir, config=config)) 122 .format(creds=creds, temp=temp_dir, config=config))
@@ -141,7 +141,7 @@ class AutoProvTests(OESelftestTestCase):
141 if re.search(layer, result.output) is None: 141 if re.search(layer, result.output) is None:
142 # Assume the directory layout for finding other layers. We could also 142 # Assume the directory layout for finding other layers. We could also
143 # make assumptions by using 'show-layers', but either way, if the 143 # make assumptions by using 'show-layers', but either way, if the
144 # layers we need aren't where we expect them, we are out of like. 144 # layers we need aren't where we expect them, we are out of luck.
145 path = os.path.abspath(os.path.dirname(__file__)) 145 path = os.path.abspath(os.path.dirname(__file__))
146 metadir = path + "/../../../../../" 146 metadir = path + "/../../../../../"
147 self.meta_qemu = metadir + layer 147 self.meta_qemu = metadir + layer
@@ -204,7 +204,7 @@ class RpiTests(OESelftestTestCase):
204 result = runCmd('bitbake-layers show-layers') 204 result = runCmd('bitbake-layers show-layers')
205 # Assume the directory layout for finding other layers. We could also 205 # Assume the directory layout for finding other layers. We could also
206 # make assumptions by using 'show-layers', but either way, if the 206 # make assumptions by using 'show-layers', but either way, if the
207 # layers we need aren't where we expect them, we are out of like. 207 # layers we need aren't where we expect them, we are out of luck.
208 path = os.path.abspath(os.path.dirname(__file__)) 208 path = os.path.abspath(os.path.dirname(__file__))
209 metadir = path + "/../../../../../" 209 metadir = path + "/../../../../../"
210 if re.search(layer_python, result.output) is None: 210 if re.search(layer_python, result.output) is None:
@@ -277,7 +277,7 @@ class GrubTests(OESelftestTestCase):
277 result = runCmd('bitbake-layers show-layers') 277 result = runCmd('bitbake-layers show-layers')
278 # Assume the directory layout for finding other layers. We could also 278 # Assume the directory layout for finding other layers. We could also
279 # make assumptions by using 'show-layers', but either way, if the 279 # make assumptions by using 'show-layers', but either way, if the
280 # layers we need aren't where we expect them, we are out of like. 280 # layers we need aren't where we expect them, we are out of luck.
281 path = os.path.abspath(os.path.dirname(__file__)) 281 path = os.path.abspath(os.path.dirname(__file__))
282 metadir = path + "/../../../../../" 282 metadir = path + "/../../../../../"
283 if re.search(layer_intel, result.output) is None: 283 if re.search(layer_intel, result.output) is None:
@@ -339,7 +339,7 @@ class ImplProvTests(OESelftestTestCase):
339 if re.search(layer, result.output) is None: 339 if re.search(layer, result.output) is None:
340 # Assume the directory layout for finding other layers. We could also 340 # Assume the directory layout for finding other layers. We could also
341 # make assumptions by using 'show-layers', but either way, if the 341 # make assumptions by using 'show-layers', but either way, if the
342 # layers we need aren't where we expect them, we are out of like. 342 # layers we need aren't where we expect them, we are out of luck.
343 path = os.path.abspath(os.path.dirname(__file__)) 343 path = os.path.abspath(os.path.dirname(__file__))
344 metadir = path + "/../../../../../" 344 metadir = path + "/../../../../../"
345 self.meta_qemu = metadir + layer 345 self.meta_qemu = metadir + layer
@@ -348,6 +348,7 @@ class ImplProvTests(OESelftestTestCase):
348 self.meta_qemu = None 348 self.meta_qemu = None
349 self.append_config('MACHINE = "qemux86-64"') 349 self.append_config('MACHINE = "qemux86-64"')
350 self.append_config('SOTA_CLIENT_PROV = " aktualizr-implicit-prov "') 350 self.append_config('SOTA_CLIENT_PROV = " aktualizr-implicit-prov "')
351 runCmd('bitbake -c cleanall aktualizr aktualizr-implicit-prov')
351 self.qemu, self.s = qemu_launch(machine='qemux86-64') 352 self.qemu, self.s = qemu_launch(machine='qemux86-64')
352 353
353 def tearDownLocal(self): 354 def tearDownLocal(self):
@@ -392,8 +393,8 @@ class ImplProvTests(OESelftestTestCase):
392 # Run cert_provider. 393 # Run cert_provider.
393 bb_vars = get_bb_vars(['SOTA_PACKED_CREDENTIALS'], 'aktualizr-native') 394 bb_vars = get_bb_vars(['SOTA_PACKED_CREDENTIALS'], 'aktualizr-native')
394 creds = bb_vars['SOTA_PACKED_CREDENTIALS'] 395 creds = bb_vars['SOTA_PACKED_CREDENTIALS']
395 bb_vars_prov = get_bb_vars(['STAGING_DIR_NATIVE', 'libdir'], 'aktualizr-implicit-prov') 396 bb_vars_prov = get_bb_vars(['STAGING_DIR_HOST', 'libdir'], 'aktualizr-implicit-prov')
396 config = bb_vars_prov['STAGING_DIR_NATIVE'] + bb_vars_prov['libdir'] + '/sota/sota_implicit_prov.toml' 397 config = bb_vars_prov['STAGING_DIR_HOST'] + bb_vars_prov['libdir'] + '/sota/sota_implicit_prov.toml'
397 398
398 akt_native_run(self, 'aktualizr_cert_provider -c {creds} -t root@localhost -p {port} -s -g {config}' 399 akt_native_run(self, 'aktualizr_cert_provider -c {creds} -t root@localhost -p {port} -s -g {config}'
399 .format(creds=creds, port=self.qemu.ssh_port, config=config)) 400 .format(creds=creds, port=self.qemu.ssh_port, config=config))
@@ -409,7 +410,7 @@ class HsmTests(OESelftestTestCase):
409 if re.search(layer, result.output) is None: 410 if re.search(layer, result.output) is None:
410 # Assume the directory layout for finding other layers. We could also 411 # Assume the directory layout for finding other layers. We could also
411 # make assumptions by using 'show-layers', but either way, if the 412 # make assumptions by using 'show-layers', but either way, if the
412 # layers we need aren't where we expect them, we are out of like. 413 # layers we need aren't where we expect them, we are out of luck.
413 path = os.path.abspath(os.path.dirname(__file__)) 414 path = os.path.abspath(os.path.dirname(__file__))
414 metadir = path + "/../../../../../" 415 metadir = path + "/../../../../../"
415 self.meta_qemu = metadir + layer 416 self.meta_qemu = metadir + layer
@@ -419,6 +420,7 @@ class HsmTests(OESelftestTestCase):
419 self.append_config('MACHINE = "qemux86-64"') 420 self.append_config('MACHINE = "qemux86-64"')
420 self.append_config('SOTA_CLIENT_PROV = "aktualizr-hsm-prov"') 421 self.append_config('SOTA_CLIENT_PROV = "aktualizr-hsm-prov"')
421 self.append_config('SOTA_CLIENT_FEATURES = "hsm"') 422 self.append_config('SOTA_CLIENT_FEATURES = "hsm"')
423 runCmd('bitbake -c cleanall aktualizr aktualizr-hsm-prov')
422 self.qemu, self.s = qemu_launch(machine='qemux86-64') 424 self.qemu, self.s = qemu_launch(machine='qemux86-64')
423 425
424 def tearDownLocal(self): 426 def tearDownLocal(self):
@@ -473,8 +475,8 @@ class HsmTests(OESelftestTestCase):
473 # Run cert_provider. 475 # Run cert_provider.
474 bb_vars = get_bb_vars(['SOTA_PACKED_CREDENTIALS'], 'aktualizr-native') 476 bb_vars = get_bb_vars(['SOTA_PACKED_CREDENTIALS'], 'aktualizr-native')
475 creds = bb_vars['SOTA_PACKED_CREDENTIALS'] 477 creds = bb_vars['SOTA_PACKED_CREDENTIALS']
476 bb_vars_prov = get_bb_vars(['STAGING_DIR_NATIVE', 'libdir'], 'aktualizr-hsm-prov') 478 bb_vars_prov = get_bb_vars(['STAGING_DIR_HOST', 'libdir'], 'aktualizr-hsm-prov')
477 config = bb_vars_prov['STAGING_DIR_NATIVE'] + bb_vars_prov['libdir'] + '/sota/sota_hsm_prov.toml' 479 config = bb_vars_prov['STAGING_DIR_HOST'] + bb_vars_prov['libdir'] + '/sota/sota_hsm_prov.toml'
478 480
479 akt_native_run(self, 'aktualizr_cert_provider -c {creds} -t root@localhost -p {port} -r -s -g {config}' 481 akt_native_run(self, 'aktualizr_cert_provider -c {creds} -t root@localhost -p {port} -r -s -g {config}'
480 .format(creds=creds, port=self.qemu.ssh_port, config=config)) 482 .format(creds=creds, port=self.qemu.ssh_port, config=config))
@@ -527,7 +529,7 @@ class SecondaryTests(OESelftestTestCase):
527 if re.search(layer, result.output) is None: 529 if re.search(layer, result.output) is None:
528 # Assume the directory layout for finding other layers. We could also 530 # Assume the directory layout for finding other layers. We could also
529 # make assumptions by using 'show-layers', but either way, if the 531 # make assumptions by using 'show-layers', but either way, if the
530 # layers we need aren't where we expect them, we are out of like. 532 # layers we need aren't where we expect them, we are out of luck.
531 path = os.path.abspath(os.path.dirname(__file__)) 533 path = os.path.abspath(os.path.dirname(__file__))
532 metadir = path + "/../../../../../" 534 metadir = path + "/../../../../../"
533 self.meta_qemu = metadir + layer 535 self.meta_qemu = metadir + layer
@@ -554,7 +556,7 @@ class SecondaryTests(OESelftestTestCase):
554 556
555 def test_secondary_listening(self): 557 def test_secondary_listening(self):
556 print('Checking aktualizr-secondary service is listening') 558 print('Checking aktualizr-secondary service is listening')
557 stdout, stderr, retcode = self.qemu_command('echo test | nc localhost 9030') 559 stdout, stderr, retcode = self.qemu_command('aktualizr-check-discovery')
558 self.assertEqual(retcode, 0, "Unable to connect to secondary") 560 self.assertEqual(retcode, 0, "Unable to connect to secondary")
559 561
560 562
@@ -572,7 +574,7 @@ class PrimaryTests(OESelftestTestCase):
572 if re.search(layer, result.output) is None: 574 if re.search(layer, result.output) is None:
573 # Assume the directory layout for finding other layers. We could also 575 # Assume the directory layout for finding other layers. We could also
574 # make assumptions by using 'show-layers', but either way, if the 576 # make assumptions by using 'show-layers', but either way, if the
575 # layers we need aren't where we expect them, we are out of like. 577 # layers we need aren't where we expect them, we are out of luck.
576 path = os.path.abspath(os.path.dirname(__file__)) 578 path = os.path.abspath(os.path.dirname(__file__))
577 metadir = path + "/../../../../../" 579 metadir = path + "/../../../../../"
578 self.meta_qemu = metadir + layer 580 self.meta_qemu = metadir + layer
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() {
36 aktualizr_toml=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'secondary-network', 'sota_autoprov_primary.toml', 'sota_autoprov.toml', d)} 36 aktualizr_toml=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'secondary-network', 'sota_autoprov_primary.toml', 'sota_autoprov.toml', d)}
37 37
38 install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/${aktualizr_toml} \ 38 install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/${aktualizr_toml} \
39 ${D}${libdir}/sota/conf.d/20-${aktualizr_toml}.toml 39 ${D}${libdir}/sota/conf.d/20-${aktualizr_toml}
40 40
41 # deploy SOTA credentials 41 # deploy SOTA credentials
42 if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then 42 if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then
@@ -49,7 +49,7 @@ do_install() {
49 49
50FILES_${PN} = " \ 50FILES_${PN} = " \
51 ${libdir}/sota/conf.d \ 51 ${libdir}/sota/conf.d \
52 ${libdir}/sota/conf.d/20-${aktualizr_toml}.toml \ 52 ${libdir}/sota/conf.d/20-${aktualizr_toml} \
53 ${localstatedir}/sota \ 53 ${localstatedir}/sota \
54 ${localstatedir}/sota/sota_provisioning_credentials.zip \ 54 ${localstatedir}/sota/sota_provisioning_credentials.zip \
55 " 55 "
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"
9LICENSE = "MPL-2.0" 9LICENSE = "MPL-2.0"
10LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" 10LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3"
11 11
12DEPENDS = "aktualizr-native openssl-native" 12DEPENDS = "aktualizr aktualizr-native openssl-native"
13RDEPENDS_${PN} = "aktualizr"
14 13
15SRC_URI = " \ 14SRC_URI = " \
16 file://LICENSE \ 15 file://LICENSE \
@@ -52,7 +51,7 @@ do_install() {
52 fi 51 fi
53 52
54 install -m 0700 -d ${D}${localstatedir}/sota 53 install -m 0700 -d ${D}${localstatedir}/sota
55 install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/sota_implicit_prov_ca.toml \ 54 install -m 0644 ${STAGING_DIR_HOST}${libdir}/sota/sota_implicit_prov_ca.toml \
56 ${D}${libdir}/sota/conf.d/20-sota_implicit_prov_ca.toml 55 ${D}${libdir}/sota/conf.d/20-sota_implicit_prov_ca.toml
57 aktualizr_cert_provider --credentials ${SOTA_PACKED_CREDENTIALS} \ 56 aktualizr_cert_provider --credentials ${SOTA_PACKED_CREDENTIALS} \
58 --device-ca ${SOTA_CACERT_PATH} \ 57 --device-ca ${SOTA_CACERT_PATH} \
@@ -60,7 +59,7 @@ do_install() {
60 --root-ca \ 59 --root-ca \
61 --server-url \ 60 --server-url \
62 --local ${D}${localstatedir}/sota \ 61 --local ${D}${localstatedir}/sota \
63 --config ${STAGING_DIR_NATIVE}${libdir}/sota/sota_implicit_prov_ca.toml 62 --config ${STAGING_DIR_HOST}${libdir}/sota/sota_implicit_prov_ca.toml
64} 63}
65 64
66FILES_${PN} = " \ 65FILES_${PN} = " \
diff --git a/recipes-sota/aktualizr/aktualizr-hsm-prov.bb b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb
index d526cd2..ce92e9c 100644
--- a/recipes-sota/aktualizr/aktualizr-hsm-prov.bb
+++ b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb
@@ -5,8 +5,7 @@ SECTION = "base"
5LICENSE = "MPL-2.0" 5LICENSE = "MPL-2.0"
6LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" 6LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3"
7 7
8DEPENDS = "aktualizr-native" 8DEPENDS = "aktualizr aktualizr-native"
9RDEPENDS_${PN} = "aktualizr"
10 9
11SRC_URI = " \ 10SRC_URI = " \
12 file://LICENSE \ 11 file://LICENSE \
@@ -19,11 +18,10 @@ require credentials.inc
19 18
20do_install() { 19do_install() {
21 install -m 0700 -d ${D}${libdir}/sota/conf.d 20 install -m 0700 -d ${D}${libdir}/sota/conf.d
22 install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/sota_hsm_prov.toml \ 21 install -m 0644 ${STAGING_DIR_HOST}${libdir}/sota/sota_hsm_prov.toml \
23 ${D}${libdir}/sota/conf.d/20-sota_hsm_prov.toml 22 ${D}${libdir}/sota/conf.d/20-sota_hsm_prov.toml
24 if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then 23 if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then
25 aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} --no-root-ca \ 24 aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} --no-root-ca \
26 -i ${STAGING_DIR_NATIVE}${libdir}/sota/sota_hsm_prov.toml \
27 -o ${D}${libdir}/sota/conf.d/30-implicit_server.toml -p ${D} 25 -o ${D}${libdir}/sota/conf.d/30-implicit_server.toml -p ${D}
28 fi 26 fi
29} 27}
diff --git a/recipes-sota/aktualizr/aktualizr-implicit-prov.bb b/recipes-sota/aktualizr/aktualizr-implicit-prov.bb
index e08eeef..6e5f338 100644
--- a/recipes-sota/aktualizr/aktualizr-implicit-prov.bb
+++ b/recipes-sota/aktualizr/aktualizr-implicit-prov.bb
@@ -5,8 +5,7 @@ SECTION = "base"
5LICENSE = "MPL-2.0" 5LICENSE = "MPL-2.0"
6LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" 6LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3"
7 7
8DEPENDS = "aktualizr-native" 8DEPENDS = "aktualizr aktualizr-native"
9RDEPENDS_${PN} = "aktualizr"
10 9
11SRC_URI = " \ 10SRC_URI = " \
12 file://LICENSE \ 11 file://LICENSE \
@@ -19,11 +18,10 @@ require credentials.inc
19 18
20do_install() { 19do_install() {
21 install -m 0700 -d ${D}${libdir}/sota/conf.d 20 install -m 0700 -d ${D}${libdir}/sota/conf.d
22 install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/sota_implicit_prov.toml \ 21 install -m 0644 ${STAGING_DIR_HOST}${libdir}/sota/sota_implicit_prov.toml \
23 ${D}${libdir}/sota/conf.d/20-sota_implicit_prov.toml 22 ${D}${libdir}/sota/conf.d/20-sota_implicit_prov.toml
24 if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then 23 if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then
25 aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} \ 24 aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} \
26 -i ${STAGING_DIR_NATIVE}${libdir}/sota/sota_implicit_prov.toml \
27 -o ${D}${libdir}/sota/conf.d/30-implicit_server.toml -p ${D} 25 -o ${D}${libdir}/sota/conf.d/30-implicit_server.toml -p ${D}
28 fi 26 fi
29} 27}
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb
index 8dc4b31..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 "
13RDEPENDS_${PN}_append_class-target = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', ' slcand-start', '', d)} " 13RDEPENDS_${PN}_append_class-target = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', ' slcand-start', '', d)} "
14RDEPENDS_${PN}_append_class-target = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', ' softhsm softhsm-testtoken', '', d)}" 14RDEPENDS_${PN}_append_class-target = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', ' softhsm softhsm-testtoken', '', d)}"
15 15
16RDEPENDS_${PN}_append_class-target = " ${PN}-tools "
17RDEPENDS_${PN}-secondary_append_class-target = " ${PN}-tools "
18
16PV = "1.0+git${SRCPV}" 19PV = "1.0+git${SRCPV}"
17PR = "7" 20PR = "7"
18 21
@@ -23,7 +26,7 @@ SRC_URI = " \
23 file://aktualizr-secondary.socket \ 26 file://aktualizr-secondary.socket \
24 file://aktualizr-serialcan.service \ 27 file://aktualizr-serialcan.service \
25 " 28 "
26SRCREV = "114dc6c519ca9a605d73ad292821348607d0fa12" 29SRCREV = "9f538a8a411ca917184fe11a6cf92e5ebf9efc61"
27BRANCH ?= "master" 30BRANCH ?= "master"
28 31
29S = "${WORKDIR}/git" 32S = "${WORKDIR}/git"
@@ -81,7 +84,7 @@ do_install_append_class-native () {
81 install -m 0644 ${B}/src/sota_tools/garage-sign/lib/* ${D}${libdir} 84 install -m 0644 ${B}/src/sota_tools/garage-sign/lib/* ${D}${libdir}
82} 85}
83 86
84PACKAGES =+ " ${PN}-examples ${PN}-host-tools ${PN}-secondary " 87PACKAGES =+ " ${PN}-examples ${PN}-host-tools ${PN}-tools ${PN}-secondary "
85 88
86FILES_${PN} = " \ 89FILES_${PN} = " \
87 ${bindir}/aktualizr \ 90 ${bindir}/aktualizr \
@@ -111,6 +114,10 @@ FILES_${PN}-host-tools = " \
111 ${libdir}/sota/sota_implicit_prov_ca.toml \ 114 ${libdir}/sota/sota_implicit_prov_ca.toml \
112 " 115 "
113 116
117FILES_${PN}-tools = " \
118 ${bindir}/aktualizr-check-discovery \
119 "
120
114FILES_${PN}-secondary = " \ 121FILES_${PN}-secondary = " \
115 ${bindir}/aktualizr-secondary \ 122 ${bindir}/aktualizr-secondary \
116 ${libdir}/sota/sota_secondary.toml \ 123 ${libdir}/sota/sota_secondary.toml \
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 () {
8 with zipfile.ZipFile(d.getVar("SOTA_PACKED_CREDENTIALS", True), 'r') as zip_ref: 8 with zipfile.ZipFile(d.getVar("SOTA_PACKED_CREDENTIALS", True), 'r') as zip_ref:
9 try: 9 try:
10 with zip_ref.open('tufrepo.url', mode='r') as url_file: 10 with zip_ref.open('tufrepo.url', mode='r') as url_file:
11 url = url_file.read().decode() + '/health/version' 11 url = url_file.read().decode().strip(' \t\n') + '/health/version'
12 except (KeyError, ValueError, RuntimeError): 12 except (KeyError, ValueError, RuntimeError):
13 return 13 return
14 r = urllib.request.urlopen(url) 14 r = urllib.request.urlopen(url)