diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2018-06-12 09:57:37 +0200 |
---|---|---|
committer | Patrick Vacek <patrickvacek@gmail.com> | 2018-06-19 12:46:16 +0200 |
commit | 9579f0cb3a481186e8142c68bb226708a41549cd (patch) | |
tree | b33eeaec8a3a78b9b5f3cc5c71186427b081c0fb /recipes-sota | |
parent | f88aa91531f6e238729f4cb430e08889f1620686 (diff) | |
download | meta-updater-9579f0cb3a481186e8142c68bb226708a41549cd.tar.gz |
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.
Diffstat (limited to 'recipes-sota')
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb | 7 | ||||
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-hsm-prov.bb | 5 | ||||
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-implicit-prov.bb | 5 |
3 files changed, 7 insertions, 10 deletions
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" | |||
9 | LICENSE = "MPL-2.0" | 9 | LICENSE = "MPL-2.0" |
10 | LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" | 10 | LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" |
11 | 11 | ||
12 | DEPENDS = "aktualizr-native openssl-native" | 12 | DEPENDS = "aktualizr aktualizr-native openssl-native" |
13 | RDEPENDS_${PN} = "aktualizr" | ||
14 | 13 | ||
15 | SRC_URI = " \ | 14 | SRC_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 | ||
66 | FILES_${PN} = " \ | 65 | FILES_${PN} = " \ |
diff --git a/recipes-sota/aktualizr/aktualizr-hsm-prov.bb b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb index a5ce3b0..ce92e9c 100644 --- a/recipes-sota/aktualizr/aktualizr-hsm-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb | |||
@@ -5,8 +5,7 @@ SECTION = "base" | |||
5 | LICENSE = "MPL-2.0" | 5 | LICENSE = "MPL-2.0" |
6 | LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" | 6 | LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" |
7 | 7 | ||
8 | DEPENDS = "aktualizr-native" | 8 | DEPENDS = "aktualizr aktualizr-native" |
9 | RDEPENDS_${PN} = "aktualizr" | ||
10 | 9 | ||
11 | SRC_URI = " \ | 10 | SRC_URI = " \ |
12 | file://LICENSE \ | 11 | file://LICENSE \ |
@@ -19,7 +18,7 @@ require credentials.inc | |||
19 | 18 | ||
20 | do_install() { | 19 | do_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 \ |
diff --git a/recipes-sota/aktualizr/aktualizr-implicit-prov.bb b/recipes-sota/aktualizr/aktualizr-implicit-prov.bb index 544e83d..6e5f338 100644 --- a/recipes-sota/aktualizr/aktualizr-implicit-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-implicit-prov.bb | |||
@@ -5,8 +5,7 @@ SECTION = "base" | |||
5 | LICENSE = "MPL-2.0" | 5 | LICENSE = "MPL-2.0" |
6 | LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" | 6 | LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" |
7 | 7 | ||
8 | DEPENDS = "aktualizr-native" | 8 | DEPENDS = "aktualizr aktualizr-native" |
9 | RDEPENDS_${PN} = "aktualizr" | ||
10 | 9 | ||
11 | SRC_URI = " \ | 10 | SRC_URI = " \ |
12 | file://LICENSE \ | 11 | file://LICENSE \ |
@@ -19,7 +18,7 @@ require credentials.inc | |||
19 | 18 | ||
20 | do_install() { | 19 | do_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} \ |