summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErnst Sjöstrand <ernst.sjostrand@verisure.com>2019-11-25 05:41:41 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-11-27 13:23:27 +0000
commit930c1f69c928e21bda6bef7aad926d335195e107 (patch)
treecf87356edb0be52d68edd256cf60ee01bf8e5bb7
parent84cc08942fd3d17fb603e90f362a1ee5653a225d (diff)
downloadopenembedded-core-contrib-930c1f69c928e21bda6bef7aad926d335195e107.tar.gz
do_image_cpio: Improve reproducibility
Find lists files in the order that the filesystem has registered them, which can vary. Adding a sort should have minimal performance impact. Also use the --reproducible option to cpio. Signed-off-by: Ernst Sjöstrand <ernst.sjostrand@verisure.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/image_types.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 2eeffbb366..c7af889075 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -128,7 +128,7 @@ IMAGE_CMD_tar = "${IMAGE_CMD_TAR} --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NA
do_image_cpio[cleandirs] += "${WORKDIR}/cpio_append"
IMAGE_CMD_cpio () {
- (cd ${IMAGE_ROOTFS} && find . | cpio -o -H newc >${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio)
+ (cd ${IMAGE_ROOTFS} && find . | sort | cpio --reproducible -o -H newc >${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio)
# We only need the /init symlink if we're building the real
# image. The -dbg image doesn't need it! By being clever
# about this we also avoid 'touch' below failing, as it