summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Doan <andy@foundries.io>2019-07-16 16:13:07 -0500
committerAndy Doan <andy@foundries.io>2019-07-17 21:48:26 -0500
commit086f225a581204f45c1c95cffc06c55d3f4eee30 (patch)
tree8ce943769c62ff913317b207b25982ba3474f8b8
parentf68e1d59f0a0ed4341dad3b16d4979b1b63336d7 (diff)
downloadmeta-updater-086f225a581204f45c1c95cffc06c55d3f4eee30.tar.gz
Allow customization of data in targets.json
This allows a user to define their own script to be executed after a target has been added to the repository but not yet signed. Signed-off-by: Andy Doan <andy@foundries.io>
-rw-r--r--classes/image_types_ostree.bbclass6
-rw-r--r--classes/sota.bbclass1
2 files changed, 7 insertions, 0 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass
index 56d4d76..5301c18 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -229,6 +229,12 @@ IMAGE_CMD_garagesign () {
229 ${target_url} \ 229 ${target_url} \
230 --sha256 ${ostree_target_hash} \ 230 --sha256 ${ostree_target_hash} \
231 --hardwareids ${SOTA_HARDWARE_ID} 231 --hardwareids ${SOTA_HARDWARE_ID}
232 if [ -n "${GARAGE_CUSTOMIZE_TARGET}" ]; then
233 bbplain "Running command(${GARAGE_CUSTOMIZE_TARGET}) to customize target"
234 ${GARAGE_CUSTOMIZE_TARGET} \
235 ${GARAGE_SIGN_REPO}/tufrepo/roles/unsigned/targets.json \
236 ${GARAGE_TARGET_NAME}-${target_version}
237 fi
232 garage-sign targets sign --repo tufrepo \ 238 garage-sign targets sign --repo tufrepo \
233 --home-dir ${GARAGE_SIGN_REPO} \ 239 --home-dir ${GARAGE_SIGN_REPO} \
234 --key-name=targets 240 --key-name=targets
diff --git a/classes/sota.bbclass b/classes/sota.bbclass
index bf27b6d..94c3043 100644
--- a/classes/sota.bbclass
+++ b/classes/sota.bbclass
@@ -51,6 +51,7 @@ GARAGE_SIGN_KEYNAME ?= "garage-key"
51GARAGE_TARGET_NAME ?= "${OSTREE_BRANCHNAME}" 51GARAGE_TARGET_NAME ?= "${OSTREE_BRANCHNAME}"
52GARAGE_TARGET_VERSION ?= "" 52GARAGE_TARGET_VERSION ?= ""
53GARAGE_TARGET_URL ?= "" 53GARAGE_TARGET_URL ?= ""
54GARAGE_CUSTOMIZE_TARGET ?= ""
54 55
55SOTA_MACHINE ??="none" 56SOTA_MACHINE ??="none"
56SOTA_MACHINE_rpi ?= "raspberrypi" 57SOTA_MACHINE_rpi ?= "raspberrypi"