summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Doan <andy@foundries.io>2019-07-16 16:13:07 -0500
committerLaurent Bonnans <laurent.bonnans@here.com>2019-08-14 16:34:28 +0200
commitfe8e93af15a0698a7f20883a5b7fdcde7c10c5f5 (patch)
tree035604d27275dfad928d66ac633955ea8af3a9f9
parent26ebe50b22ffb8069e5eac2dfbed9ce128adf4b0 (diff)
downloadmeta-updater-fe8e93af15a0698a7f20883a5b7fdcde7c10c5f5.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> (cherry picked from commit 086f225a581204f45c1c95cffc06c55d3f4eee30)
-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 134f5f5..79147cf 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -241,6 +241,12 @@ IMAGE_CMD_garagesign () {
241 ${target_url} \ 241 ${target_url} \
242 --sha256 ${ostree_target_hash} \ 242 --sha256 ${ostree_target_hash} \
243 --hardwareids ${SOTA_HARDWARE_ID} 243 --hardwareids ${SOTA_HARDWARE_ID}
244 if [ -n "${GARAGE_CUSTOMIZE_TARGET}" ]; then
245 bbplain "Running command(${GARAGE_CUSTOMIZE_TARGET}) to customize target"
246 ${GARAGE_CUSTOMIZE_TARGET} \
247 ${GARAGE_SIGN_REPO}/tufrepo/roles/unsigned/targets.json \
248 ${GARAGE_TARGET_NAME}-${target_version}
249 fi
244 garage-sign targets sign --repo tufrepo \ 250 garage-sign targets sign --repo tufrepo \
245 --home-dir ${GARAGE_SIGN_REPO} \ 251 --home-dir ${GARAGE_SIGN_REPO} \
246 --key-name=targets 252 --key-name=targets
diff --git a/classes/sota.bbclass b/classes/sota.bbclass
index 4465e6c..61d27ad 100644
--- a/classes/sota.bbclass
+++ b/classes/sota.bbclass
@@ -53,6 +53,7 @@ GARAGE_SIGN_KEYNAME ?= "garage-key"
53GARAGE_TARGET_NAME ?= "${OSTREE_BRANCHNAME}" 53GARAGE_TARGET_NAME ?= "${OSTREE_BRANCHNAME}"
54GARAGE_TARGET_VERSION ?= "" 54GARAGE_TARGET_VERSION ?= ""
55GARAGE_TARGET_URL ?= "" 55GARAGE_TARGET_URL ?= ""
56GARAGE_CUSTOMIZE_TARGET ?= ""
56 57
57SOTA_MACHINE ??="none" 58SOTA_MACHINE ??="none"
58SOTA_MACHINE_rpi ?= "raspberrypi" 59SOTA_MACHINE_rpi ?= "raspberrypi"