summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJérôme Pouiller <jezz@sysmic.org>2016-11-23 13:58:43 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-11-23 22:55:34 +0100
commit59f9c4ca9feb2c070df508c7196f06a6e87307b4 (patch)
treeeabd6cd994412263bfd355d72f516991216990c4 /fs
parent9b91b21dae40d6db1c320a76cfdbabeedcb2d1c2 (diff)
fs/tar: make results reproducible
In order to make tar images reproducible, force files order in tarball. This work was sponsored by `BA Robotic Systems'. Signed-off-by: Jérôme Pouiller <jezz@sysmic.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/tar/tar.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/tar/tar.mk b/fs/tar/tar.mk
index 11c69c5a8..b14c977d7 100644
--- a/fs/tar/tar.mk
+++ b/fs/tar/tar.mk
@@ -7,7 +7,8 @@
TAR_OPTS := $(call qstrip,$(BR2_TARGET_ROOTFS_TAR_OPTIONS))
define ROOTFS_TAR_CMD
- tar $(TAR_OPTS) -cf $@ --numeric-owner -C $(TARGET_DIR) .
+ (cd $(TARGET_DIR); find -print0 | LC_ALL=C sort -z | \
+ tar $(TAR_OPTS) -cf $@ --null -T - --no-recursion --numeric-owner)
endef
$(eval $(call ROOTFS_TARGET,tar))