From 050a27bddf830a799e8f8657b4227eded85dbd6f Mon Sep 17 00:00:00 2001 From: Mykhaylo Sul Date: Wed, 3 Apr 2019 20:39:01 +0200 Subject: OTA-2418: Remove example.com URL from automated garage-sign usage Signed-off-by: Mykhaylo Sul --- classes/image_types_ostree.bbclass | 7 ++++++- classes/sota.bbclass | 2 +- conf/layer.conf | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index 41327e1..56d4d76 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass @@ -212,6 +212,11 @@ IMAGE_CMD_garagesign () { # Push may fail due to race condition when multiple build machines try to push simultaneously # in which case targets.json should be pulled again and the whole procedure repeated push_success=0 + target_url="" + if [ -n "${GARAGE_TARGET_URL}" ]; then + target_url='--url ${GARAGE_TARGET_URL}' + fi + for push_retries in $( seq 3 ); do garage-sign targets pull --repo tufrepo \ --home-dir ${GARAGE_SIGN_REPO} @@ -221,7 +226,7 @@ IMAGE_CMD_garagesign () { --format OSTREE \ --version ${target_version} \ --length 0 \ - --url "${GARAGE_TARGET_URL}" \ + ${target_url} \ --sha256 ${ostree_target_hash} \ --hardwareids ${SOTA_HARDWARE_ID} garage-sign targets sign --repo tufrepo \ diff --git a/classes/sota.bbclass b/classes/sota.bbclass index 92b4c43..7ffcd23 100644 --- a/classes/sota.bbclass +++ b/classes/sota.bbclass @@ -36,7 +36,7 @@ GARAGE_SIGN_REPO ?= "${DEPLOY_DIR_IMAGE}/garage_sign_repo" GARAGE_SIGN_KEYNAME ?= "garage-key" GARAGE_TARGET_NAME ?= "${OSTREE_BRANCHNAME}" GARAGE_TARGET_VERSION ?= "" -GARAGE_TARGET_URL ?= "https://example.com/" +GARAGE_TARGET_URL ?= "" SOTA_MACHINE ??="none" SOTA_MACHINE_rpi ?= "raspberrypi" diff --git a/conf/layer.conf b/conf/layer.conf index 627a1b8..ec791bb 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -10,4 +10,4 @@ BBFILE_PATTERN_sota = "^${LAYERDIR}/" BBFILE_PRIORITY_sota = "7" LAYERDEPENDS_sota = "filesystems-layer" -LAYERSERIES_COMPAT_sota = "thud" +LAYERSERIES_COMPAT_sota = "thud warrior" -- cgit v1.2.3-54-g00ecf