[oe-commits] [openembedded-core] 23/37: do_image_cpio: Improve reproducibility

git at git.openembedded.org git at git.openembedded.org
Mon Nov 25 22:09:29 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit d9ddf2d5d44487e526741b6a6ece28aa8d776962
Author: Ernst Sjöstrand <ernst.sjostrand at verisure.com>
AuthorDate: Mon Nov 25 05:41:41 2019 +0000

    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 at verisure.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/image_types.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 2eeffbb..c7af889 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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list