All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ernst Sjöstrand" <ernst.sjostrand@verisure.com>
To: "openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>,
	"ross.burton@intel.com" <ross.burton@intel.com>
Subject: Re: [PATCH v2] do_image_cpio: Improve reproducibility
Date: Mon, 25 Nov 2019 05:41:41 +0000	[thread overview]
Message-ID: <30d53936d361eb22e1fa1cca3d6380dbce80eabf.camel@verisure.com> (raw)
In-Reply-To: <ae0d48cd-535e-d0de-b388-66605947cc91@intel.com>

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

Trying again, looks like tabs were converted to spaces the first time.

 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


      reply	other threads:[~2019-11-25  5:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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       ` Ernst Sjöstrand [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30d53936d361eb22e1fa1cca3d6380dbce80eabf.camel@verisure.com \
    --to=ernst.sjostrand@verisure.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=ross.burton@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.