From patchwork Sat Jan 2 15:06:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 562082 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 84EB1140332 for ; Sun, 3 Jan 2016 02:06:57 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=ylzZRZ6z; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C9A0687181; Sat, 2 Jan 2016 15:06:54 +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 kHeudVtRHca5; Sat, 2 Jan 2016 15:06:53 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id CC5F086D20; Sat, 2 Jan 2016 15:06:52 +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 218E91C15D6 for ; Sat, 2 Jan 2016 15:06:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id DF0D986D20 for ; Sat, 2 Jan 2016 15:06:51 +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 mObI6CKhowU0 for ; Sat, 2 Jan 2016 15:06:50 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by whitealder.osuosl.org (Postfix) with ESMTPS id 98BCF86D11 for ; Sat, 2 Jan 2016 15:06:50 +0000 (UTC) Received: by mail-wm0-f49.google.com with SMTP id b14so131212471wmb.1 for ; Sat, 02 Jan 2016 07:06:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=5LycIPSQ5qDxaP/5o6ecI+iu9HcqgaRAsU+DnkYP8xQ=; b=ylzZRZ6zVVchXFPXx+eX/LE/e2A5Cetoi7AhsIWjiid0U5BWL9p9oIDXmfqnVjh8Eo 1AOfOHkcdWsEMuocP/nERafKJgDiwpT7EHRhuB43FDv6VyiLfaLpCELYdBUdI3T3+3Tl 281e8gvfvBjwlHO1GeZ+vcLqNMGj2R7bESX5jcYy2kNABwDz/icFS1YVVDYB5KrVxWaW /pUQWSdUBpf4k1a/Fuv5Pt0N/R6UVeyuVinQ3BBHSskZPWVqCFzkNrfzjHtrtc9p9XI3 8Qq0iujJBp06tlHU8SSET92uDoPq/05TQCYPBPHzKc2r/ggXadd6csPIiy2dkiwa+Kzv sdIw== X-Received: by 10.28.186.87 with SMTP id k84mr44076579wmf.13.1451747209247; Sat, 02 Jan 2016 07:06:49 -0800 (PST) Received: from gourin.bzh.lan (ns304657.ip-46-105-103.eu. [46.105.103.66]) by smtp.gmail.com with ESMTPSA id yz5sm25682320wjc.36.2016.01.02.07.06.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 02 Jan 2016 07:06:48 -0800 (PST) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sat, 2 Jan 2016 16:06:42 +0100 Message-Id: <1451747202-21873-1-git-send-email-yann.morin.1998@free.fr> X-Mailer: git-send-email 1.9.1 Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH] support/download: generate reproducible Bazaar archives 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: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Similarly to what has previously been done for the Hg download backend, instruct bzr to generate the archive on stdout, so that we can generate reproducible archives. When instructing bzr to generate the output file by itself, it uses a temporary file that is then fed to gzip, which in turn stores the timestamp of that file in the generated archive, whereas when the output is generated on stdout, there is no timestamp, so the archive is then reproducible. Bizarely enough, we can tell 'bazaar' not to generate a bazaar in the archive. Cool, uh? ;-] Signed-off-by: "Yann E. MORIN" --- support/download/bzr | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/support/download/bzr b/support/download/bzr index cec9ce8..a8a8887 100755 --- a/support/download/bzr +++ b/support/download/bzr @@ -32,4 +32,6 @@ _bzr() { eval ${BZR} "${@}" } -_bzr export ${verbose} --root="'${basename}/'" --format=tgz "'${output}'" "'${repo}'" -r "'${rev}'" +_bzr export ${verbose} --root="'${basename}/'" --format=tgz \ + --per-file-timestamps - "'${repo}'" -r "'${rev}'" \ + >"${output}"