From patchwork Fri Nov 18 09:10:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 696502 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tKsfj0ykwz9t0X for ; Fri, 18 Nov 2016 20:10:53 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 69F1D2EC9C; Fri, 18 Nov 2016 09:10:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d2kNgkeDTCSj; Fri, 18 Nov 2016 09:10:35 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 251F62EB6E; Fri, 18 Nov 2016 09:10:33 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id E57251C067B for ; Fri, 18 Nov 2016 09:10:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E1CE7878BB for ; Fri, 18 Nov 2016 09:10:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gY0lvGdtaSTg for ; Fri, 18 Nov 2016 09:10:28 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lupi.sysmic.org (sysmic.org [62.210.89.17]) by whitealder.osuosl.org (Postfix) with ESMTPS id 4A8EA86E41 for ; Fri, 18 Nov 2016 09:10:28 +0000 (UTC) Received: from lupi.online.net (sysmic.org [62.210.89.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jezz) by lupi.sysmic.org (Postfix) with ESMTPSA id ECDE24264B; Fri, 18 Nov 2016 10:10:26 +0100 (CET) From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= To: buildroot@busybox.net Date: Fri, 18 Nov 2016 10:10:13 +0100 Message-Id: <1479460224-6119-5-git-send-email-jezz@sysmic.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1479460224-6119-1-git-send-email-jezz@sysmic.org> References: <1479460224-6119-1-git-send-email-jezz@sysmic.org> MIME-Version: 1.0 Cc: Thomas Petazzoni , =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= Subject: [Buildroot] [PATCH v2 04/15] fs/tar: make results reproducible X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" In order to make tar images reproducible, we use --sort flag. However, this flags is available only from tar 1.28. So we also bump necessary host-tar version. This work was sponsored by `BA Robotic Systems'. Signed-off-by: Jérôme Pouiller --- fs/tar/tar.mk | 2 +- support/dependencies/check-host-tar.sh | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/tar/tar.mk b/fs/tar/tar.mk index 11c69c5..5a1b263 100644 --- a/fs/tar/tar.mk +++ b/fs/tar/tar.mk @@ -7,7 +7,7 @@ TAR_OPTS := $(call qstrip,$(BR2_TARGET_ROOTFS_TAR_OPTIONS)) define ROOTFS_TAR_CMD - tar $(TAR_OPTS) -cf $@ --numeric-owner -C $(TARGET_DIR) . + tar $(TAR_OPTS) -cf $@ --sort=name --numeric-owner -C $(TARGET_DIR) . endef $(eval $(call ROOTFS_TARGET,tar)) diff --git a/support/dependencies/check-host-tar.sh b/support/dependencies/check-host-tar.sh index 932d3c4..cef6d82 100755 --- a/support/dependencies/check-host-tar.sh +++ b/support/dependencies/check-host-tar.sh @@ -26,10 +26,9 @@ if [ ! -z "${version_bsd}" ] ; then minor=0 fi -# Minimal version = 1.17 (previous versions do not correctly unpack archives -# containing hard-links if the --strip-components option is used). +# Minimal version = 1.28 (previous versions do not does not support --sort=name) major_min=1 -minor_min=17 +minor_min=28 if [ $major -gt $major_min ]; then echo $tar else