From e2d78039bc847ad6230caa0fe1b4658e7e9690b2 Mon Sep 17 00:00:00 2001 From: Laurent Bonnans Date: Fri, 8 Nov 2019 13:50:36 +0100 Subject: Send a copy of repo manifest through garage-push Signed-off-by: Laurent Bonnans --- classes/image_types_ostree.bbclass | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index 0e047b1..f10e523 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass @@ -186,13 +186,19 @@ IMAGE_CMD_ostreecommit () { IMAGE_TYPEDEP_ostreepush = "ostreecommit" do_image_ostreepush[depends] += "aktualizr-native:do_populate_sysroot ca-certificates-native:do_populate_sysroot" IMAGE_CMD_ostreepush () { - # Print warnings if credetials are not set or if the file has not been found. + # send a copy of the repo manifest to backend if available + local SEND_MANIFEST="" + if [ -f ${IMAGE_ROOTFS}${sysconfdir}/manifest.xml ]; then + SEND_MANIFEST="--repo-manifest ${IMAGE_ROOTFS}${sysconfdir}/manifest.xml" + fi + if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then garage-push -vv --repo=${OSTREE_REPO} \ --ref=${OSTREE_BRANCHNAME} \ --credentials=${SOTA_PACKED_CREDENTIALS} \ - --cacert=${STAGING_ETCDIR_NATIVE}/ssl/certs/ca-certificates.crt + --cacert=${STAGING_ETCDIR_NATIVE}/ssl/certs/ca-certificates.crt \ + $SEND_MANIFEST else bbwarn "SOTA_PACKED_CREDENTIALS file does not exist." fi -- cgit v1.2.3-54-g00ecf From 82c41c269eccb87c297de0199f8d996f7da3866d Mon Sep 17 00:00:00 2001 From: Laurent Bonnans Date: Mon, 11 Nov 2019 17:26:26 +0100 Subject: Only push repo manifest if garage-push supports it Signed-off-by: Laurent Bonnans --- classes/image_types_ostree.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index f10e523..0f0fd28 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass @@ -188,7 +188,8 @@ do_image_ostreepush[depends] += "aktualizr-native:do_populate_sysroot ca-certifi IMAGE_CMD_ostreepush () { # send a copy of the repo manifest to backend if available local SEND_MANIFEST="" - if [ -f ${IMAGE_ROOTFS}${sysconfdir}/manifest.xml ]; then + # check if garage-push supports the --repo-manifest option before trying + if $(garage-push --help | grep -q '^\s*--repo-manifest') && [ -f ${IMAGE_ROOTFS}${sysconfdir}/manifest.xml ]; then SEND_MANIFEST="--repo-manifest ${IMAGE_ROOTFS}${sysconfdir}/manifest.xml" fi -- cgit v1.2.3-54-g00ecf From cea07e508e8d3ae49d4cdc7e7caa16cf44a5a898 Mon Sep 17 00:00:00 2001 From: Laurent Bonnans Date: Mon, 11 Nov 2019 17:39:58 +0100 Subject: Bump aktualizr to latest master With support with new garage-push --repo-manifest option Signed-off-by: Laurent Bonnans --- recipes-sota/aktualizr/aktualizr_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 22cba07..7e4115a 100644 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -30,7 +30,7 @@ SRC_URI = " \ SRC_URI[garagesign.md5sum] = "de0877ecb693fd48ec11052e51b0ff1a" SRC_URI[garagesign.sha256sum] = "cf25759574c9c1206835daeaf6fc345f6db7b5ccdb95fb828c86d7451f78f0aa" -SRCREV = "fa59e33208d3b1dc690a30ce8339b3b4162f8022" +SRCREV = "9677f025abbb958ad36d4b58cae1dd4fe5750cf0" BRANCH ?= "master" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf