summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2015-08-14 16:59:04 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-19 18:05:33 +0100
commit3aaea35bb593e41def90e0a0902d57ddcd9f3419 (patch)
tree5fa0d145c49fc2cfb89dbff1125a4dd04090b57e
parent3753b51a173e308df2e1ddc30d56cdced45ebf69 (diff)
downloadpoky-3aaea35bb593e41def90e0a0902d57ddcd9f3419.tar.gz
image_types.bbclass: allow replacing tar command
Usually, the host's tar command is sufficient. However, special cases like archiving xattrs depend on a modern GNU tar version. The new IMAGE_CMD_TAR makes that possible, with xattrs given as example. (From OE-Core rev: d8db122114f4d0600b662f79b3673108b4b6c0b7) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/image_types.bbclass14
1 files changed, 13 insertions, 1 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 35ceb7beaf..8547574a1d 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -71,7 +71,19 @@ IMAGE_CMD_btrfs () {
71IMAGE_CMD_squashfs = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs ${EXTRA_IMAGECMD} -noappend" 71IMAGE_CMD_squashfs = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs ${EXTRA_IMAGECMD} -noappend"
72IMAGE_CMD_squashfs-xz = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-xz ${EXTRA_IMAGECMD} -noappend -comp xz" 72IMAGE_CMD_squashfs-xz = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-xz ${EXTRA_IMAGECMD} -noappend -comp xz"
73IMAGE_CMD_squashfs-lzo = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-lzo ${EXTRA_IMAGECMD} -noappend -comp lzo" 73IMAGE_CMD_squashfs-lzo = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-lzo ${EXTRA_IMAGECMD} -noappend -comp lzo"
74IMAGE_CMD_tar = "tar -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar -C ${IMAGE_ROOTFS} ." 74
75# By default, tar from the host is used, which can be quite old. If
76# you need special parameters (like --xattrs) which are only supported
77# by GNU tar upstream >= 1.27, then override that default:
78# IMAGE_CMD_TAR = "tar --xattrs --xattrs-include=*"
79# IMAGE_DEPENDS_tar_append = " tar-replacement-native"
80# EXTRANATIVEPATH += "tar-native"
81#
82# The GNU documentation does not specify whether --xattrs-include is necessary.
83# In practice, it turned out to be not needed when creating archives and
84# required when extracting, but it seems prudent to use it in both cases.
85IMAGE_CMD_TAR ?= "tar"
86IMAGE_CMD_tar = "${IMAGE_CMD_TAR} -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar -C ${IMAGE_ROOTFS} ."
75 87
76do_rootfs[cleandirs] += "${WORKDIR}/cpio_append" 88do_rootfs[cleandirs] += "${WORKDIR}/cpio_append"
77IMAGE_CMD_cpio () { 89IMAGE_CMD_cpio () {