From 59f9c4ca9feb2c070df508c7196f06a6e87307b4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Pouiller?= Date: Wed, 23 Nov 2016 13:58:43 +0100 Subject: [PATCH] fs/tar: make results reproducible MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Thomas Petazzoni --- fs/tar/tar.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/tar/tar.mk b/fs/tar/tar.mk index 11c69c5a8b..b14c977d76 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)) -- 2.30.2