]> code.ossystems Code Review - openembedded-core.git/commitdiff
image_types: tar with --numeric-owner
authorMax Krummenacher <max.oss.09@gmail.com>
Sat, 27 Jan 2018 13:54:08 +0000 (14:54 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 6 Feb 2018 10:54:34 +0000 (10:54 +0000)
If --numeric-owner is neither used when creating or extracting the archive
containing the rootfs then tar tries to change the numeric uid/gid of the
files based on user/group names of the host used to extract the archive.

Create the archive with --numeric-owner to remove the burden of having to
use --numeric-owner when extracting.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/image_types.bbclass

index ae3e6edef33122a725736d14deef2609cd70af40..cde27e52b56b7deaa6a098b928ee5c6cf9000750 100644 (file)
@@ -125,7 +125,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} -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS} . || [ $? -eq 1 ]"
+IMAGE_CMD_tar = "${IMAGE_CMD_TAR} --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 () {