summaryrefslogtreecommitdiffstats
path: root/classes/image_types_ostree.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'classes/image_types_ostree.bbclass')
-rw-r--r--classes/image_types_ostree.bbclass12
1 files changed, 6 insertions, 6 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass
index 68fb563..5d55cdb 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -15,14 +15,14 @@ SYSTEMD_USED = "${@oe.utils.ifelse(d.getVar('VIRTUAL-RUNTIME_init_manager') == '
15 15
16IMAGE_CMD_TAR = "tar --xattrs --xattrs-include=*" 16IMAGE_CMD_TAR = "tar --xattrs --xattrs-include=*"
17CONVERSION_CMD_tar = "touch ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}; ${IMAGE_CMD_TAR} --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.tar -C ${TAR_IMAGE_ROOTFS} . || [ $? -eq 1 ]" 17CONVERSION_CMD_tar = "touch ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}; ${IMAGE_CMD_TAR} --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.tar -C ${TAR_IMAGE_ROOTFS} . || [ $? -eq 1 ]"
18CONVERSIONTYPES_append = " tar" 18CONVERSIONTYPES:append = " tar"
19 19
20TAR_IMAGE_ROOTFS_task-image-ostree = "${OSTREE_ROOTFS}" 20TAR_IMAGE_ROOTFS_task-image-ostree = "${OSTREE_ROOTFS}"
21 21
22do_image_ostree[dirs] = "${OSTREE_ROOTFS}" 22do_image_ostree[dirs] = "${OSTREE_ROOTFS}"
23do_image_ostree[cleandirs] = "${OSTREE_ROOTFS}" 23do_image_ostree[cleandirs] = "${OSTREE_ROOTFS}"
24do_image_ostree[depends] = "coreutils-native:do_populate_sysroot virtual/kernel:do_deploy ${INITRAMFS_IMAGE}:do_image_complete" 24do_image_ostree[depends] = "coreutils-native:do_populate_sysroot virtual/kernel:do_deploy ${INITRAMFS_IMAGE}:do_image_complete"
25IMAGE_CMD_ostree () { 25IMAGE_CMD:ostree () {
26 # Copy required as we change permissions on some files. 26 # Copy required as we change permissions on some files.
27 tar --xattrs --xattrs-include='*' -cf - -S -C ${IMAGE_ROOTFS} -p . | tar --xattrs --xattrs-include='*' -xf - -C ${OSTREE_ROOTFS} 27 tar --xattrs --xattrs-include='*' -cf - -S -C ${IMAGE_ROOTFS} -p . | tar --xattrs --xattrs-include='*' -xf - -C ${OSTREE_ROOTFS}
28 28
@@ -129,7 +129,7 @@ IMAGE_CMD_ostree () {
129IMAGE_TYPEDEP_ostreecommit = "ostree" 129IMAGE_TYPEDEP_ostreecommit = "ostree"
130do_image_ostreecommit[depends] += "ostree-native:do_populate_sysroot" 130do_image_ostreecommit[depends] += "ostree-native:do_populate_sysroot"
131do_image_ostreecommit[lockfiles] += "${OSTREE_REPO}/ostree.lock" 131do_image_ostreecommit[lockfiles] += "${OSTREE_REPO}/ostree.lock"
132IMAGE_CMD_ostreecommit () { 132IMAGE_CMD:ostreecommit () {
133 if ! ostree --repo=${OSTREE_REPO} refs 2>&1 > /dev/null; then 133 if ! ostree --repo=${OSTREE_REPO} refs 2>&1 > /dev/null; then
134 ostree --repo=${OSTREE_REPO} init --mode=archive-z2 134 ostree --repo=${OSTREE_REPO} init --mode=archive-z2
135 fi 135 fi
@@ -154,7 +154,7 @@ IMAGE_CMD_ostreecommit () {
154IMAGE_TYPEDEP_ostreepush = "ostreecommit" 154IMAGE_TYPEDEP_ostreepush = "ostreecommit"
155do_image_ostreepush[depends] += "aktualizr-native:do_populate_sysroot ca-certificates-native:do_populate_sysroot" 155do_image_ostreepush[depends] += "aktualizr-native:do_populate_sysroot ca-certificates-native:do_populate_sysroot"
156do_image_ostreepush[lockfiles] += "${OSTREE_REPO}/ostree.lock" 156do_image_ostreepush[lockfiles] += "${OSTREE_REPO}/ostree.lock"
157IMAGE_CMD_ostreepush () { 157IMAGE_CMD:ostreepush () {
158 # send a copy of the repo manifest to backend if available 158 # send a copy of the repo manifest to backend if available
159 local SEND_MANIFEST="" 159 local SEND_MANIFEST=""
160 # check if garage-push supports the --repo-manifest option before trying 160 # check if garage-push supports the --repo-manifest option before trying
@@ -182,7 +182,7 @@ do_image_garagesign[depends] += "unzip-native:do_populate_sysroot"
182# This lock solves OTA-1866, which is that removing GARAGE_SIGN_REPO while using 182# This lock solves OTA-1866, which is that removing GARAGE_SIGN_REPO while using
183# garage-sign simultaneously for two images often causes problems. 183# garage-sign simultaneously for two images often causes problems.
184do_image_garagesign[lockfiles] += "${DEPLOY_DIR_IMAGE}/garagesign.lock" 184do_image_garagesign[lockfiles] += "${DEPLOY_DIR_IMAGE}/garagesign.lock"
185IMAGE_CMD_garagesign () { 185IMAGE_CMD:garagesign () {
186 if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then 186 if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then
187 # if credentials are issued by a server that doesn't support offline signing, exit silently 187 # if credentials are issued by a server that doesn't support offline signing, exit silently
188 unzip -p ${SOTA_PACKED_CREDENTIALS} root.json targets.pub targets.sec tufrepo.url 2>&1 >/dev/null || exit 0 188 unzip -p ${SOTA_PACKED_CREDENTIALS} root.json targets.pub targets.sec tufrepo.url 2>&1 >/dev/null || exit 0
@@ -270,7 +270,7 @@ IMAGE_CMD_garagesign () {
270} 270}
271 271
272IMAGE_TYPEDEP_garagecheck = "garagesign" 272IMAGE_TYPEDEP_garagecheck = "garagesign"
273IMAGE_CMD_garagecheck () { 273IMAGE_CMD:garagecheck () {
274 if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then 274 if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then
275 # if credentials are issued by a server that doesn't support offline signing, exit silently 275 # if credentials are issued by a server that doesn't support offline signing, exit silently
276 unzip -p ${SOTA_PACKED_CREDENTIALS} root.json targets.pub targets.sec tufrepo.url 2>&1 >/dev/null || exit 0 276 unzip -p ${SOTA_PACKED_CREDENTIALS} root.json targets.pub targets.sec tufrepo.url 2>&1 >/dev/null || exit 0