aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Yann E. MORIN <yann.morin.1998@free.fr>2018-11-12 18:33:12 +0100
committerGravatar Peter Korsgaard <peter@korsgaard.com>2018-11-26 17:24:45 +0100
commit668e4b1ab0c5ada1ab66cbec1a22b402df73686a (patch)
treebeae1d0c71e993d0d20d927de4fa6feb89bcf4a8
parent8603656ec8c88bd499e27b5465679b4922241fc0 (diff)
downloadbuildroot-668e4b1ab0c5ada1ab66cbec1a22b402df73686a.tar.gz
buildroot-668e4b1ab0c5ada1ab66cbec1a22b402df73686a.tar.bz2
fs/tar: add support for xattrs (thus capabilties)
By default, tar will not include any extended attribute (xattr) when creating archives, and thus will not store capabilties either (as they are stored in the xattr 'security.capability'). Using option --xattrs is enough to create a tarball with all the xattrs attached to a file. However, extracting all xattrs from a tarball requires that --xattrs-include='*' be used. This is not symetric (but on purpose, as per the documentation), and so is confusing to some. So, we use --xattrs-include='*' to create the archive, so as to be explicit that we want all xattrs to be stored. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Ricardo Martincoski <ricardo.martincoski@gmail.com> Cc: Peter Korsgaard <peter@korsgaard.com> Cc: Arnout Vandecappelle <arnout@mind.be> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com> (cherry picked from commit 6d688e2132f9feb63e325c2456d23edfc53f79a8) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rw-r--r--fs/tar/tar.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/tar/tar.mk b/fs/tar/tar.mk
index e39c2fdbf1..5535119724 100644
--- a/fs/tar/tar.mk
+++ b/fs/tar/tar.mk
@@ -8,7 +8,7 @@ TAR_OPTS := $(call qstrip,$(BR2_TARGET_ROOTFS_TAR_OPTIONS))
define ROOTFS_TAR_CMD
(cd $(TARGET_DIR); find -print0 | LC_ALL=C sort -z | \
- tar $(TAR_OPTS) -cf $@ --null --no-recursion -T - --numeric-owner)
+ tar $(TAR_OPTS) -cf $@ --null --xattrs-include='*' --no-recursion -T - --numeric-owner)
endef
$(eval $(rootfs))