diff options
author | Andy Doan <andy@foundries.io> | 2019-07-16 16:13:07 -0500 |
---|---|---|
committer | Andy Doan <andy@foundries.io> | 2019-07-17 21:48:26 -0500 |
commit | 086f225a581204f45c1c95cffc06c55d3f4eee30 (patch) | |
tree | 8ce943769c62ff913317b207b25982ba3474f8b8 | |
parent | f68e1d59f0a0ed4341dad3b16d4979b1b63336d7 (diff) | |
download | meta-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.bbclass | 6 | ||||
-rw-r--r-- | classes/sota.bbclass | 1 |
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" | |||
51 | GARAGE_TARGET_NAME ?= "${OSTREE_BRANCHNAME}" | 51 | GARAGE_TARGET_NAME ?= "${OSTREE_BRANCHNAME}" |
52 | GARAGE_TARGET_VERSION ?= "" | 52 | GARAGE_TARGET_VERSION ?= "" |
53 | GARAGE_TARGET_URL ?= "" | 53 | GARAGE_TARGET_URL ?= "" |
54 | GARAGE_CUSTOMIZE_TARGET ?= "" | ||
54 | 55 | ||
55 | SOTA_MACHINE ??="none" | 56 | SOTA_MACHINE ??="none" |
56 | SOTA_MACHINE_rpi ?= "raspberrypi" | 57 | SOTA_MACHINE_rpi ?= "raspberrypi" |