diff options
author | Ernst Sjöstrand <ernst.sjostrand@verisure.com> | 2019-11-25 05:41:41 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-11-27 13:25:18 +0000 |
commit | 051cfa77c5e7988e1889b02e3e18f74365992deb (patch) | |
tree | 032a41821380eec762bde3bdf225963b909438ca /meta/classes | |
parent | 95bd5a3961b87b19b7d9fc7d30e7d5a1be2a758d (diff) | |
download | poky-051cfa77c5e7988e1889b02e3e18f74365992deb.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.
(From OE-Core rev: 930c1f69c928e21bda6bef7aad926d335195e107)
Signed-off-by: Ernst Sjöstrand <ernst.sjostrand@verisure.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/image_types.bbclass | 2 |
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 | |||
128 | 128 | ||
129 | do_image_cpio[cleandirs] += "${WORKDIR}/cpio_append" | 129 | do_image_cpio[cleandirs] += "${WORKDIR}/cpio_append" |
130 | IMAGE_CMD_cpio () { | 130 | IMAGE_CMD_cpio () { |
131 | (cd ${IMAGE_ROOTFS} && find . | cpio -o -H newc >${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio) | 131 | (cd ${IMAGE_ROOTFS} && find . | sort | cpio --reproducible -o -H newc >${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio) |
132 | # We only need the /init symlink if we're building the real | 132 | # We only need the /init symlink if we're building the real |
133 | # image. The -dbg image doesn't need it! By being clever | 133 | # image. The -dbg image doesn't need it! By being clever |
134 | # about this we also avoid 'touch' below failing, as it | 134 | # about this we also avoid 'touch' below failing, as it |