From patchwork Tue Mar 21 00:06:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 741344 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vnCnT1PYjz9s7B for ; Tue, 21 Mar 2017 11:07:57 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4F4EE87030; Tue, 21 Mar 2017 00:07:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QkQ-0D44Jkwa; Tue, 21 Mar 2017 00:07:51 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 1757986496; Tue, 21 Mar 2017 00:07:51 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 064FC1C2E1E for ; Tue, 21 Mar 2017 00:07:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 01D5E866D1 for ; Tue, 21 Mar 2017 00:07:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jgcdxlgC24uX for ; Tue, 21 Mar 2017 00:07:46 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exchange.essensium.com (220.77.144.195.ipv4.evonet.be [195.144.77.220]) by fraxinus.osuosl.org (Postfix) with ESMTPS id C7CE386340 for ; Tue, 21 Mar 2017 00:07:45 +0000 (UTC) Received: from localhost.localdomain (10.3.7.11) by beleexch01.local.ess-mail.com (10.3.7.8) with Microsoft SMTP Server (TLS) id 15.0.847.32; Tue, 21 Mar 2017 01:07:24 +0100 From: "Arnout Vandecappelle (Essensium/Mind)" To: Date: Tue, 21 Mar 2017 01:06:57 +0100 Message-ID: <20170321000712.26500-2-arnout@mind.be> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170321000712.26500-1-arnout@mind.be> References: <20170321000712.26500-1-arnout@mind.be> MIME-Version: 1.0 X-Originating-IP: [10.3.7.11] X-ClientProxiedBy: beleexch01.local.ess-mail.com (10.3.7.8) To beleexch01.local.ess-mail.com (10.3.7.8) Cc: Peter Seiderer Subject: [Buildroot] [PATCH 01/16] download/git: create GNU format tar files 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" On most distros, the tar format defaults to GNU. However, at build time the default format may be changed to posix. Also, future versions of tar will default to posix. Since we want the tarballs created by the git download method to be reproducible (so their hash can be checked), we should explicitly specify the format. Since existing tarballs on sources.buildroot.org use the GNU format, and also the existing hashes in the *.hash files are based on GNU format tarballs, we use the GNU format. In addition, the Posix format encodes atime and ctime as well as mtime, but tar offers no option like --mtime to override them. In the GNU format, atime and ctime are only encoded if the --incremental option is given. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) Cc: Peter Seiderer --- Peter, can you test if this solves the issue for you? --- support/download/git | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/support/download/git b/support/download/git index 7921411835..056057c700 100755 --- a/support/download/git +++ b/support/download/git @@ -94,6 +94,8 @@ popd >/dev/null # Generate the archive, sort with the C locale so that it is reproducible find "${basename}" -not -type d >"${basename}.list" LC_ALL=C sort <"${basename}.list" >"${basename}.list.sorted" -tar cf - --numeric-owner --owner=0 --group=0 --mtime="${date}" \ +# Create GNU-format tarballs, since that's the format of the tarballs on +# sources.buildroot.org and used in the *.hash files +tar cf - --numeric-owner --owner=0 --group=0 --mtime="${date}" --format=gnu \ -T "${basename}.list.sorted" >"${output}.tar" gzip -n <"${output}.tar" >"${output}"