diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2017-09-28 14:24:19 +0200 |
---|---|---|
committer | Patrick Vacek <patrickvacek@gmail.com> | 2017-09-29 16:33:46 +0200 |
commit | 0ab7fe36dacebd2ab9e79d57987af2205a5f9a09 (patch) | |
tree | 035cd9c49dfeeef86d7e2529c40d5537cad56774 /classes | |
parent | e8916f0d63177548c088f183309f724cda0ca795 (diff) | |
download | meta-updater-0ab7fe36dacebd2ab9e79d57987af2205a5f9a09.tar.gz |
Create recipe for implicit provisioning file shuffling.
Split aktualizr into basic and native recipes by moving most of the work
to an include file. Use aktualizr-implicit-writer (on host) to do the
actual work of configuring sota.toml and installing files.
Still not quite fully functional.
Diffstat (limited to 'classes')
-rw-r--r-- | classes/image_types_ostree.bbclass | 4 | ||||
-rw-r--r-- | classes/sota.bbclass | 2 | ||||
-rw-r--r-- | classes/sota_bleeding.inc | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index cb520c2..26be7bf 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass | |||
@@ -20,6 +20,8 @@ OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}" | |||
20 | 20 | ||
21 | export SYSTEMD_USED = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', '', d)}" | 21 | export SYSTEMD_USED = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', '', d)}" |
22 | 22 | ||
23 | SOTA_IMPLICIT_PROV = "${@bb.utils.contains('DISTRO_FEATURES', 'implicit-prov', 'true', '', d)}" | ||
24 | |||
23 | IMAGE_CMD_ostree () { | 25 | IMAGE_CMD_ostree () { |
24 | if [ -z "$OSTREE_REPO" ]; then | 26 | if [ -z "$OSTREE_REPO" ]; then |
25 | bbfatal "OSTREE_REPO should be set in your local.conf" | 27 | bbfatal "OSTREE_REPO should be set in your local.conf" |
@@ -134,7 +136,7 @@ IMAGE_CMD_ostree () { | |||
134 | fi | 136 | fi |
135 | 137 | ||
136 | # deploy SOTA credentials | 138 | # deploy SOTA credentials |
137 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then | 139 | if [ -n "${SOTA_PACKED_CREDENTIALS}" -a -z "${SOTA_IMPLICIT_PROV}" ]; then |
138 | if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then | 140 | if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then |
139 | cp ${SOTA_PACKED_CREDENTIALS} var/sota/sota_provisioning_credentials.zip | 141 | cp ${SOTA_PACKED_CREDENTIALS} var/sota/sota_provisioning_credentials.zip |
140 | # Device should not be able to push data to treehub | 142 | # Device should not be able to push data to treehub |
diff --git a/classes/sota.bbclass b/classes/sota.bbclass index d3b66e0..357fefd 100644 --- a/classes/sota.bbclass +++ b/classes/sota.bbclass | |||
@@ -6,7 +6,7 @@ python __anonymous() { | |||
6 | OVERRIDES .= "${@bb.utils.contains('DISTRO_FEATURES', 'sota', ':sota', '', d)}" | 6 | OVERRIDES .= "${@bb.utils.contains('DISTRO_FEATURES', 'sota', ':sota', '', d)}" |
7 | 7 | ||
8 | SOTA_CLIENT ??= "aktualizr" | 8 | SOTA_CLIENT ??= "aktualizr" |
9 | SOTA_CLIENT_PROV ??= "aktualizr-auto-prov" | 9 | SOTA_CLIENT_PROV ??= "${@bb.utils.contains('DISTRO_FEATURES', 'implicit-prov', 'aktualizr-implicit-prov', 'aktualizr-auto-prov', d)}" |
10 | IMAGE_INSTALL_append_sota = " ostree os-release ${SOTA_CLIENT} ${SOTA_CLIENT_PROV}" | 10 | IMAGE_INSTALL_append_sota = " ostree os-release ${SOTA_CLIENT} ${SOTA_CLIENT_PROV}" |
11 | IMAGE_CLASSES += " image_types_ostree image_types_ota" | 11 | IMAGE_CLASSES += " image_types_ostree image_types_ota" |
12 | IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'ostreepush otaimg wic', ' ', d)}" | 12 | IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'ostreepush otaimg wic', ' ', d)}" |
diff --git a/classes/sota_bleeding.inc b/classes/sota_bleeding.inc index fc5947d..77d004b 100644 --- a/classes/sota_bleeding.inc +++ b/classes/sota_bleeding.inc | |||
@@ -1 +1,2 @@ | |||
1 | SRCREV_pn-aktualizr ?= "${AUTOREV}" | 1 | SRCREV_pn-aktualizr ?= "${AUTOREV}" |
2 | SRCREV_pn-aktualizr-native ?= "${AUTOREV}" | ||