All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] do_image_cpio: Improve reproducibility
@ 2019-11-18  9:40 Ernst Sjöstrand
  2019-11-18 11:02 ` ✗ patchtest: failure for " Patchwork
  2019-11-18 14:35 ` [PATCH] " Ross Burton
  0 siblings, 2 replies; 6+ messages in thread
From: Ernst Sjöstrand @ 2019-11-18  9:40 UTC (permalink / raw)
  To: openembedded-core

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>
---
 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 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
-- 
2.24.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-11-25  5:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-18  9:40 [PATCH] do_image_cpio: Improve reproducibility Ernst Sjöstrand
2019-11-18 11:02 ` ✗ patchtest: failure for " Patchwork
2019-11-18 14:35 ` [PATCH] " Ross Burton
2019-11-18 15:19   ` Ernst Sjöstrand
2019-11-18 17:16     ` Ross Burton
2019-11-25  5:41       ` [PATCH v2] " Ernst Sjöstrand

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.