From 17ee8a7741f4752c9dbb27885dd7cbdb2e3655ef Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Mon, 11 Jan 2021 22:26:54 -0300 Subject: image_types_ota.bbclass: use standard ext4 features Avoid removing 64bit and metadata_csum by default and prefer the standard ext4 features instead. 64bit enables the file system to be larger than 2^32 blocks and metadata_csum enables metadata checksumming, both of which are enabled by default on recent mke2fs releases. It is unclear why 64bit was disabled by looking at the git history, but my assumption would be that either kernel or userspace was old enough for this feature to not be supported/available. Since this option is currently used by most distros by default, it should now be safe to enable it (requires kernel >= 2.6.28). metadata_csum was disabled in 4d34fa53db to make the u-boot tooling work with the ext4 file system (when saving environment), but the correct fix should instead be a fix at the userspace tooling instead, since not every target requires u-boot. Signed-off-by: Ricardo Salveti --- classes/image_types_ota.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass index 1b7dbf8..283b50e 100644 --- a/classes/image_types_ota.bbclass +++ b/classes/image_types_ota.bbclass @@ -69,7 +69,7 @@ IMAGE_CMD_ota () { echo "{\"${ostree_target_hash}\":\"${GARAGE_TARGET_NAME}-${target_version}\"}" > ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota/import/installed_versions } -EXTRA_IMAGECMD_ota-ext4 = "-O ^64bit,^metadata_csum -L otaroot -i 4096 -t ext4" +EXTRA_IMAGECMD_ota-ext4 = "-L otaroot -i 4096 -t ext4" IMAGE_TYPEDEP_ota-ext4 = "ota" IMAGE_ROOTFS_task-image-ota-ext4 = "${OTA_SYSROOT}" IMAGE_CMD_ota-ext4 () { -- cgit v1.2.3-54-g00ecf From 0b2db6c1527b7b8114dbc97369e082338645623a Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Mon, 18 Jan 2021 12:47:55 +0100 Subject: image_types_ostree.bbclass: get lock before accessing OSTREE_REPO In commit d13ec585ae677affd88b9d92c6ea135cc249b2fa: [ image_types_ostree: use OSTree repo location for lockfiles ] A lockfile ${OSTREE_REPO}/ostree.lock was added to prevent concurrent access to the repository by multiple bitbake instances, but it should not only apply to ostreecommit task, but ostreepush task also need it. This fixes a following race condition error: | | ERROR: Execution of '.../temp/run.do_image_ostreecommit.34262' failed with exit code 1: | error: Writing content object: Creating temp file: No such file or directory Signed-off-by: Ming Liu --- classes/image_types_ostree.bbclass | 1 + 1 file changed, 1 insertion(+) diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index e66956a..4d9b0a9 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass @@ -163,6 +163,7 @@ IMAGE_CMD_ostreecommit () { IMAGE_TYPEDEP_ostreepush = "ostreecommit" do_image_ostreepush[depends] += "aktualizr-native:do_populate_sysroot ca-certificates-native:do_populate_sysroot" +do_image_ostreepush[lockfiles] += "${OSTREE_REPO}/ostree.lock" IMAGE_CMD_ostreepush () { # send a copy of the repo manifest to backend if available local SEND_MANIFEST="" -- cgit v1.2.3-54-g00ecf