Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor garagesign task and fetch its binary from a new location #107

Merged
merged 3 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions classes/image_types_ostree.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ IMAGE_CMD:garagesign () {
fi

rm -rf ${GARAGE_SIGN_REPO}
garage-sign init --repo tufrepo \
${GARAGE_SIGN_TOOL} init --repo tufrepo \
--home-dir ${GARAGE_SIGN_REPO} \
--credentials ${SOTA_PACKED_CREDENTIALS}

Expand Down Expand Up @@ -236,9 +236,9 @@ IMAGE_CMD:garagesign () {
fi

for push_retries in $( seq ${GARAGE_PUSH_RETRIES} ); do
garage-sign targets pull --repo tufrepo \
${GARAGE_SIGN_TOOL} targets pull --repo tufrepo \
--home-dir ${GARAGE_SIGN_REPO}
garage-sign targets add --repo tufrepo \
${GARAGE_SIGN_TOOL} targets add --repo tufrepo \
--home-dir ${GARAGE_SIGN_REPO} \
--name ${GARAGE_TARGET_NAME} \
--format OSTREE \
Expand All @@ -253,12 +253,12 @@ IMAGE_CMD:garagesign () {
${GARAGE_SIGN_REPO}/tufrepo/roles/unsigned/targets.json \
${GARAGE_TARGET_NAME}-${target_version}
fi
garage-sign targets sign --repo tufrepo \
${GARAGE_SIGN_TOOL} targets sign --repo tufrepo \
--home-dir ${GARAGE_SIGN_REPO} \
${target_expiry} \
--key-name=targets
errcode=0
garage-sign targets push --repo tufrepo \
${GARAGE_SIGN_TOOL} targets push --repo tufrepo \
--home-dir ${GARAGE_SIGN_REPO} || errcode=$?
if [ "$errcode" -eq "0" ]; then
push_success=1
Expand Down
1 change: 1 addition & 0 deletions classes/sota.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ OSTREE_OTA_REPO_CONFIG ?= ""

INITRAMFS_IMAGE ?= "initramfs-ostree-image"

GARAGE_SIGN_TOOL ?= "garage-sign"
GARAGE_SIGN_REPO ?= "${DEPLOY_DIR_IMAGE}/garage_sign_repo"
GARAGE_SIGN_KEYNAME ?= "garage-key"
GARAGE_TARGET_NAME ?= "${OSTREE_BRANCHNAME}"
Expand Down
10 changes: 5 additions & 5 deletions recipes-sota/aktualizr/aktualizr_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ PRIVATE_LIBS:${PN}-ptest = "libaktualizr.so libaktualizr_secondary.so"
PV = "1.0+git${SRCPV}"
PR = "7"

GARAGE_SIGN_PV = "0.7.4-25-g7cfca74"
GARAGE_SIGN_PV = "0.7.7"

SRC_URI = " \
gitsm://github.com/uptane/aktualizr;branch=${BRANCH};name=aktualizr;protocol=https \
Expand All @@ -27,13 +27,13 @@ SRC_URI = " \
file://aktualizr-serialcan.service \
file://aktualizr-tmpfiles.conf \
file://run-ptest \
${@ d.expand("https://tuf-cli-releases.ota.here.com/cli-${GARAGE_SIGN_PV}.tgz;unpack=0;name=garagesign") if not oe.types.boolean(d.getVar('GARAGE_SIGN_AUTOVERSION')) else ''} \
${@ d.expand("https://garage-sign.s3.eu-west-1.amazonaws.com/cli-${GARAGE_SIGN_PV}.tgz;unpack=0;name=garagesign") if not oe.types.boolean(d.getVar('GARAGE_SIGN_AUTOVERSION')) else ''} \
"

SRC_URI[garagesign.md5sum] = "584cd16aa7824e34b593dae63796466b"
SRC_URI[garagesign.sha256sum] = "c7d5fdceef3e815363e3aa398c38643ca213f9b7f66d50f55c76a66cb74565d2"
SRC_URI[garagesign.md5sum] = "138fc97c7130258efa80865a83290ad1"
SRC_URI[garagesign.sha256sum] = "16d9eef5a3144fbddf74ec206714ce2c526f4b68d8259da7fb5004f284848d59"

SRCREV = "c90723717a4a196cfb9d923dbcd48c5d6031d2c4"
SRCREV = "f88fb5fae020b0aa10d9cefc836e47a38161469f"
BRANCH ?= "master"

S = "${WORKDIR}/git"
Expand Down