diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2018-06-01 14:42:27 +0200 |
---|---|---|
committer | Patrick Vacek <patrickvacek@gmail.com> | 2018-06-04 10:06:06 +0200 |
commit | e393c71f6a79825b1e0386fb140272663762dce8 (patch) | |
tree | 4c53d827a2a89f6be0f43eb8909117d88306e17f | |
parent | 645c5346b84adb283b2298f0c4f38d5f85688e9f (diff) | |
download | meta-updater-e393c71f6a79825b1e0386fb140272663762dce8.tar.gz |
aktualizr: Upgrade to use simplified implicit_writer config.
There is no longer a need for dumping the whole config, now we can just
add what we need to a new config file and use that in addition to the
base config. This simplifies several things and fixes a few bugs.
Also renamed the configs to make provenance a little clearer.
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-auto-prov.bb | 5 | ||||
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb | 7 | ||||
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-hsm-prov.bb | 8 | ||||
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-implicit-prov.bb | 8 | ||||
-rwxr-xr-x | recipes-sota/aktualizr/aktualizr_git.bb | 2 |
5 files changed, 20 insertions, 10 deletions
diff --git a/recipes-sota/aktualizr/aktualizr-auto-prov.bb b/recipes-sota/aktualizr/aktualizr-auto-prov.bb index c7f1240..7f4f2e4 100644 --- a/recipes-sota/aktualizr/aktualizr-auto-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-auto-prov.bb | |||
@@ -35,7 +35,8 @@ do_install() { | |||
35 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then | 35 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then |
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} ${D}${libdir}/sota/conf.d/20-sota.toml | 38 | install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/${aktualizr_toml} \ |
39 | ${D}${libdir}/sota/conf.d/20-${aktualizr_toml}.toml | ||
39 | 40 | ||
40 | # deploy SOTA credentials | 41 | # deploy SOTA credentials |
41 | if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then | 42 | if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then |
@@ -48,7 +49,7 @@ do_install() { | |||
48 | 49 | ||
49 | FILES_${PN} = " \ | 50 | FILES_${PN} = " \ |
50 | ${libdir}/sota/conf.d \ | 51 | ${libdir}/sota/conf.d \ |
51 | ${libdir}/sota/conf.d/20-sota.toml \ | 52 | ${libdir}/sota/conf.d/20-${aktualizr_toml}.toml \ |
52 | ${localstatedir}/sota \ | 53 | ${localstatedir}/sota \ |
53 | ${localstatedir}/sota/sota_provisioning_credentials.zip \ | 54 | ${localstatedir}/sota/sota_provisioning_credentials.zip \ |
54 | " | 55 | " |
diff --git a/recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb b/recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb index c4802ed..4d5ff79 100644 --- a/recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb | |||
@@ -52,19 +52,20 @@ do_install() { | |||
52 | fi | 52 | fi |
53 | 53 | ||
54 | install -m 0700 -d ${D}${localstatedir}/sota | 54 | install -m 0700 -d ${D}${localstatedir}/sota |
55 | install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/sota_implicit_prov_ca.toml ${D}${libdir}/sota/conf.d/20-sota.toml | 55 | install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/sota_implicit_prov_ca.toml \ |
56 | ${D}${libdir}/sota/conf.d/20-sota_implicit_prov_ca.toml | ||
56 | aktualizr_cert_provider --credentials ${SOTA_PACKED_CREDENTIALS} \ | 57 | aktualizr_cert_provider --credentials ${SOTA_PACKED_CREDENTIALS} \ |
57 | --device-ca ${SOTA_CACERT_PATH} \ | 58 | --device-ca ${SOTA_CACERT_PATH} \ |
58 | --device-ca-key ${SOTA_CAKEY_PATH} \ | 59 | --device-ca-key ${SOTA_CAKEY_PATH} \ |
59 | --root-ca \ | 60 | --root-ca \ |
60 | --server-url \ | 61 | --server-url \ |
61 | --local ${D}${localstatedir}/sota \ | 62 | --local ${D}${localstatedir}/sota \ |
62 | --config ${D}${libdir}/sota/conf.d/20-sota.toml | 63 | --config ${STAGING_DIR_NATIVE}${libdir}/sota/sota_implicit_prov_ca.toml |
63 | } | 64 | } |
64 | 65 | ||
65 | FILES_${PN} = " \ | 66 | FILES_${PN} = " \ |
66 | ${libdir}/sota/conf.d \ | 67 | ${libdir}/sota/conf.d \ |
67 | ${libdir}/sota/conf.d/20-sota.toml \ | 68 | ${libdir}/sota/conf.d/20-sota_implicit_prov_ca.toml \ |
68 | ${libdir}/sota/root.crt \ | 69 | ${libdir}/sota/root.crt \ |
69 | ${localstatedir}/sota/* \ | 70 | ${localstatedir}/sota/* \ |
70 | " | 71 | " |
diff --git a/recipes-sota/aktualizr/aktualizr-hsm-prov.bb b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb index 7e2d638..d526cd2 100644 --- a/recipes-sota/aktualizr/aktualizr-hsm-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb | |||
@@ -19,15 +19,19 @@ require credentials.inc | |||
19 | 19 | ||
20 | do_install() { | 20 | do_install() { |
21 | install -m 0700 -d ${D}${libdir}/sota/conf.d | 21 | install -m 0700 -d ${D}${libdir}/sota/conf.d |
22 | install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/sota_hsm_prov.toml \ | ||
23 | ${D}${libdir}/sota/conf.d/20-sota_hsm_prov.toml | ||
22 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then | 24 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then |
23 | aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} --no-root-ca \ | 25 | aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} --no-root-ca \ |
24 | -i ${STAGING_DIR_NATIVE}${libdir}/sota/sota_hsm_prov.toml -o ${D}${libdir}/sota/conf.d/20-sota.toml -p ${D} | 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 | fi | 28 | fi |
26 | } | 29 | } |
27 | 30 | ||
28 | FILES_${PN} = " \ | 31 | FILES_${PN} = " \ |
29 | ${libdir}/sota/conf.d \ | 32 | ${libdir}/sota/conf.d \ |
30 | ${libdir}/sota/conf.d/20-sota.toml \ | 33 | ${libdir}/sota/conf.d/20-sota_hsm_prov.toml \ |
34 | ${libdir}/sota/conf.d/30-implicit_server.toml \ | ||
31 | " | 35 | " |
32 | 36 | ||
33 | # vim:set ts=4 sw=4 sts=4 expandtab: | 37 | # vim:set ts=4 sw=4 sts=4 expandtab: |
diff --git a/recipes-sota/aktualizr/aktualizr-implicit-prov.bb b/recipes-sota/aktualizr/aktualizr-implicit-prov.bb index e5cd79e..e08eeef 100644 --- a/recipes-sota/aktualizr/aktualizr-implicit-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-implicit-prov.bb | |||
@@ -19,15 +19,19 @@ require credentials.inc | |||
19 | 19 | ||
20 | do_install() { | 20 | do_install() { |
21 | install -m 0700 -d ${D}${libdir}/sota/conf.d | 21 | install -m 0700 -d ${D}${libdir}/sota/conf.d |
22 | install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/sota_implicit_prov.toml \ | ||
23 | ${D}${libdir}/sota/conf.d/20-sota_implicit_prov.toml | ||
22 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then | 24 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then |
23 | aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} \ | 25 | aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} \ |
24 | -i ${STAGING_DIR_NATIVE}${libdir}/sota/sota_implicit_prov.toml -o ${D}${libdir}/sota/conf.d/20-sota.toml -p ${D} | 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 | fi | 28 | fi |
26 | } | 29 | } |
27 | 30 | ||
28 | FILES_${PN} = " \ | 31 | FILES_${PN} = " \ |
29 | ${libdir}/sota/conf.d \ | 32 | ${libdir}/sota/conf.d \ |
30 | ${libdir}/sota/conf.d/20-sota.toml \ | 33 | ${libdir}/sota/conf.d/20-implicit_prov.toml \ |
34 | ${libdir}/sota/conf.d/30-implicit_server.toml \ | ||
31 | ${libdir}/sota/root.crt \ | 35 | ${libdir}/sota/root.crt \ |
32 | " | 36 | " |
33 | 37 | ||
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 1374503..3a3ca56 100755 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb | |||
@@ -23,7 +23,7 @@ SRC_URI = " \ | |||
23 | file://aktualizr-secondary.socket \ | 23 | file://aktualizr-secondary.socket \ |
24 | file://aktualizr-serialcan.service \ | 24 | file://aktualizr-serialcan.service \ |
25 | " | 25 | " |
26 | SRCREV = "3b89858cf8ce9a8331cc4e6a5d2b5783d2eb7ae9" | 26 | SRCREV = "114dc6c519ca9a605d73ad292821348607d0fa12" |
27 | BRANCH ?= "master" | 27 | BRANCH ?= "master" |
28 | 28 | ||
29 | S = "${WORKDIR}/git" | 29 | S = "${WORKDIR}/git" |