summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-01-30 17:57:13 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-02-18 16:48:28 +0000
commit938168824c09bc5d3790224af8c9c67caf49cad7 (patch)
treeee0a2d77bdd0df496de60ebb0a4301642b95fefb
parentcdda267645506b2471a1085b42de3cdfa238d8d5 (diff)
downloadpoky-938168824c09bc5d3790224af8c9c67caf49cad7.tar.gz
poky-938168824c09bc5d3790224af8c9c67caf49cad7.tar.bz2
poky-938168824c09bc5d3790224af8c9c67caf49cad7.zip
image_types: Ensure tar archives are reproducible
The tar output seems to vary depending on the version of tar used and distro configuration. Be explict about the output format to avoid this and be determinstic. (From OE-Core rev: 6a474f77424bca84cbbb9226d045fbe4c6590b44) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c56f3c9febc1732aa1302524c6c4da36f16bd1f7) Signed-off-by: Steve Sakoman <steve@sakoman.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 d81747527b..6de16d42b9 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -126,7 +126,7 @@ IMAGE_CMD_squashfs-lz4 = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAM
# required when extracting, but it seems prudent to use it in both cases.
IMAGE_CMD_TAR ?= "tar"
# ignore return code 1 "file changed as we read it" as other tasks(e.g. do_image_wic) may be hardlinking rootfs
-IMAGE_CMD_tar = "${IMAGE_CMD_TAR} --sort=name --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS} . || [ $? -eq 1 ]"
+IMAGE_CMD_tar = "${IMAGE_CMD_TAR} --sort=name --format=gnu --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS} . || [ $? -eq 1 ]"
do_image_cpio[cleandirs] += "${WORKDIR}/cpio_append"
IMAGE_CMD_cpio () {