From patchwork Wed Jun 9 12:56:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Dominik Braun X-Patchwork-Id: 30076 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 40DDC27BC81; Wed, 9 Jun 2021 13:59:19 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 058EC27BC78 for ; Wed, 9 Jun 2021 13:59:19 +0100 (BST) Received: from localhost ([::1]:59322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqxni-000562-0c for patchwork@mira.cbaines.net; Wed, 09 Jun 2021 08:59:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqxmU-0003mA-6N for guix-patches@gnu.org; Wed, 09 Jun 2021 08:58:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49193) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lqxmT-0001Sh-UA for guix-patches@gnu.org; Wed, 09 Jun 2021 08:58:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lqxmT-0001tA-PJ for guix-patches@gnu.org; Wed, 09 Jun 2021 08:58:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48933] [PATCH] build: Make outputs of node-build-system reproducible. Resent-From: Lars-Dominik Braun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 09 Jun 2021 12:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48933 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48933@debbugs.gnu.org Cc: jlicht@fsfe.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16232434417196 (code B ref -1); Wed, 09 Jun 2021 12:58:01 +0000 Received: (at submit) by debbugs.gnu.org; 9 Jun 2021 12:57:21 +0000 Received: from localhost ([127.0.0.1]:60739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqxlp-0001rz-Ag for submit@debbugs.gnu.org; Wed, 09 Jun 2021 08:57:21 -0400 Received: from lists.gnu.org ([209.51.188.17]:44742) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqxll-0001rq-Nj for submit@debbugs.gnu.org; Wed, 09 Jun 2021 08:57:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqxll-0003df-EM for guix-patches@gnu.org; Wed, 09 Jun 2021 08:57:17 -0400 Received: from mout-p-102.mailbox.org ([80.241.56.152]:31906) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1lqxli-0000wC-7f for guix-patches@gnu.org; Wed, 09 Jun 2021 08:57:16 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4G0Rvh451fzQk9Z; Wed, 9 Jun 2021 14:57:04 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6xq.net; s=MBO0001; t=1623243422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=Uela98vk2lRn3+zb4GGaNKKH33SnNHIV34AsPdvRAGc=; b=pV3IQ0ak+7cWDiXNjB/5sPNHCTSN/Sr6Us94KZ/5wRNJg62okwYITgfkyZ/cAie85S4IrI u3ei47KOSSXzMpFRiW7Q7nzADqHXZ1tjnBq0ISgk0t793e+y6fMB1XYIWrzvtEyT9rBTSV HjFLRBWJVx5fIYKxdQCx5ditTJUlYbd0SYUN/4W5a4V18UGTt+gkMpVBZl/5K6mOTH/OW8 yxFjVUF8zMCQCYYSLlKx93g0r03jOi52bUmgWQrvFFn9MpR2IE4sFwg1o5+jwXTXgvxRFy ZU2fma5jaIZ/JZA+SGLP9JSoEg722tnc6FcotS8su2v8ukry5gMweTmIhJCujg== Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id IbRy5ZkE_10u; Wed, 9 Jun 2021 14:57:00 +0200 (CEST) Date: Wed, 9 Jun 2021 14:56:58 +0200 From: Lars-Dominik Braun Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-MBO-SPAM-Probability: X-Rspamd-Score: -2.18 / 15.00 / 15.00 X-Rspamd-Queue-Id: 2AEF5183B X-Rspamd-UID: 844740 Received-SPF: pass client-ip=80.241.56.152; envelope-from=lars@6xq.net; helo=mout-p-102.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches package.json records two hashes of package.tgz, which change for each build, resulting in non-reproducible builds. * guix/build/node-build-system.scm (repack): Add reproducibility options to tar command. --- guix/build/node-build-system.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/guix/build/node-build-system.scm b/guix/build/node-build-system.scm index a55cab237c..9b3de43e24 100644 --- a/guix/build/node-build-system.scm +++ b/guix/build/node-build-system.scm @@ -120,7 +120,15 @@ #t) (define* (repack #:key inputs #:allow-other-keys) - (invoke "tar" "-czf" "../package.tgz" ".") + (invoke "tar" + ;; Add options suggested by https://reproducible-builds.org/docs/archives/ + "--sort=name" + (string-append "--mtime=" (getenv "SOURCE_DATE_EPOCH")) + "--owner=0" + "--group=0" + "--numeric-owner" + "--pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime" + "-czf" "../package.tgz" ".") #t) (define* (install #:key outputs inputs #:allow-other-keys)