summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2017-09-28 14:24:19 +0200
committerPatrick Vacek <patrickvacek@gmail.com>2017-09-29 16:33:46 +0200
commit0ab7fe36dacebd2ab9e79d57987af2205a5f9a09 (patch)
tree035cd9c49dfeeef86d7e2529c40d5537cad56774 /classes
parente8916f0d63177548c088f183309f724cda0ca795 (diff)
downloadmeta-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.bbclass4
-rw-r--r--classes/sota.bbclass2
-rw-r--r--classes/sota_bleeding.inc1
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
21export SYSTEMD_USED = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', '', d)}" 21export SYSTEMD_USED = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', '', d)}"
22 22
23SOTA_IMPLICIT_PROV = "${@bb.utils.contains('DISTRO_FEATURES', 'implicit-prov', 'true', '', d)}"
24
23IMAGE_CMD_ostree () { 25IMAGE_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() {
6OVERRIDES .= "${@bb.utils.contains('DISTRO_FEATURES', 'sota', ':sota', '', d)}" 6OVERRIDES .= "${@bb.utils.contains('DISTRO_FEATURES', 'sota', ':sota', '', d)}"
7 7
8SOTA_CLIENT ??= "aktualizr" 8SOTA_CLIENT ??= "aktualizr"
9SOTA_CLIENT_PROV ??= "aktualizr-auto-prov" 9SOTA_CLIENT_PROV ??= "${@bb.utils.contains('DISTRO_FEATURES', 'implicit-prov', 'aktualizr-implicit-prov', 'aktualizr-auto-prov', d)}"
10IMAGE_INSTALL_append_sota = " ostree os-release ${SOTA_CLIENT} ${SOTA_CLIENT_PROV}" 10IMAGE_INSTALL_append_sota = " ostree os-release ${SOTA_CLIENT} ${SOTA_CLIENT_PROV}"
11IMAGE_CLASSES += " image_types_ostree image_types_ota" 11IMAGE_CLASSES += " image_types_ostree image_types_ota"
12IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'ostreepush otaimg wic', ' ', d)}" 12IMAGE_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 @@
1SRCREV_pn-aktualizr ?= "${AUTOREV}" 1SRCREV_pn-aktualizr ?= "${AUTOREV}"
2SRCREV_pn-aktualizr-native ?= "${AUTOREV}"