From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SF0BMVw8y2CDKgAAgWs5BA (envelope-from ) for ; Thu, 17 Jun 2021 14:13:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id SEPKLFw8y2DMdAAA1q6Kng (envelope-from ) for ; Thu, 17 Jun 2021 12:13:16 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 472511DFBC for ; Thu, 17 Jun 2021 14:13:16 +0200 (CEST) Received: from localhost ([::1]:50732 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ltqtW-0005t6-BP for larch@yhetil.org; Thu, 17 Jun 2021 08:13:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltqtK-0005qX-GU for guix-patches@gnu.org; Thu, 17 Jun 2021 08:13:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42355) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ltqtK-0005KC-7e for guix-patches@gnu.org; Thu, 17 Jun 2021 08:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ltqtJ-0007A6-Vz for guix-patches@gnu.org; Thu, 17 Jun 2021 08:13: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: Thu, 17 Jun 2021 12:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48933 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 48933@debbugs.gnu.org, jlicht@fsfe.org Received: via spool by 48933-submit@debbugs.gnu.org id=B48933.162393195827495 (code B ref 48933); Thu, 17 Jun 2021 12:13:01 +0000 Received: (at 48933) by debbugs.gnu.org; 17 Jun 2021 12:12:38 +0000 Received: from localhost ([127.0.0.1]:53901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ltqsw-00079O-AW for submit@debbugs.gnu.org; Thu, 17 Jun 2021 08:12:38 -0400 Received: from mout-p-202.mailbox.org ([80.241.56.172]:58046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ltqsr-000798-PM for 48933@debbugs.gnu.org; Thu, 17 Jun 2021 08:12:37 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (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-202.mailbox.org (Postfix) with ESMTPS id 4G5LXW3GLSzQk1c; Thu, 17 Jun 2021 14:12:27 +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=1623931945; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vGVMYTucg0H+mEte6nNXYIrfciVgm/6hpg5AnNSHzZI=; b=liy+8VbP4q+KG+YA5wqrcJ2RFKVVItzpttAZIHANrz0+l/yYab9odBRimmy3vYxCZNsBNP PiA4/Qyut9OHXlEK3EYXGpxFYD3sO0XfYfFeZtvDabCjVGv1mmXA1Q6H53Z2wJ6yeZnYU9 NYIZQhlM+c6dtohtpoBxfRbkOdVIHh2sco0HMagLZjOKcvJ6h7hk57WknjEc3T1JcZbbwt B+FpRfM5AqYbxvgDXHtIdHSYvTt4GsRi0jGnA9VT8auP8ZY7GQSRtmvp9rrELwnHYW62nJ H1KHjn2NHkIq0fC/Hdb2kWkDfbeJjwsSwdQl8qW2kzFQmjcBocKVYmj05N9mPA== Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id a-omlJZ2uVZX; Thu, 17 Jun 2021 14:12:20 +0200 (CEST) Date: Thu, 17 Jun 2021 14:12:18 +0200 From: Lars-Dominik Braun Message-ID: References: <87bl85pm6o.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="pPxJ7XXEYghOmvy5" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87bl85pm6o.fsf@gnu.org> X-MBO-SPAM-Probability: X-Rspamd-Score: -6.58 / 15.00 / 15.00 X-Rspamd-Queue-Id: 1E4911860 X-Rspamd-UID: 9c52a8 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1623931996; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=vGVMYTucg0H+mEte6nNXYIrfciVgm/6hpg5AnNSHzZI=; b=RC2zz4saS1IUjiqsev+5le5CEDePXcVEgaZ67H0lBONmRYz831YszZyzvz3cKt7MSb1KGp YSgW/myqgExPWeX/5iABxfq2YFouPtK6HKI3p75sIMuG1tknIEK5D78FPmyvWNXyDIeYcd Wioh35KOrVxCZ1wtJzjwArVtZV8hxPNkzoc6xQDRDDKEiKRcZFlAupBm6a4HhTm8OtHHPM 6fxV66kojJPSTk3j0qlkrTC8YA2l85/3bBhaArnjQuHyaRsf9dtYKkAw71Kz35uw1E4QlF vFRYa6Q0pY6vmYdsYhsVz6uNOLnBZKVYYXVXAhWoOjhb7oApIYlOzvGtUWQP4Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1623931996; a=rsa-sha256; cv=none; b=kX47F2QW3GmstwchS6jLYeafxM/Inu+7l+fJSzEMYcsKMWmLDI/ocrzIW8T0vYypCiljSD Sfc4J0q8lK53wNuoL4/Rd5/ok77LjCdJ1yqLK7oU4rC5gFPG6003Yg0enkE65E2uh1ZCFH Nd9svxmUehDTwsg2PjbDA5VaU2AWd8u0JnFdW1QrFEICJgr6hWFm8TVDismDImLCb7eBuy D4A6LOZ7HydNxIWzXkBM5m4lLxI3pwbkQYXEqimKS4UbrAml3da5LeBDzUyrvWdg33KC3y FQOSUF1jufx8+UdIuiCz6PVe5U0u7TkrqWJyFoNxhMGTDexQYoUwoId+WTxjwg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b=liy+8VbP; dmarc=fail reason="SPF not aligned (relaxed)" header.from=6xq.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b=liy+8VbP; dmarc=fail reason="SPF not aligned (relaxed)" header.from=6xq.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 472511DFBC X-Spam-Score: -1.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: pBNVTu9DFEgU --pPxJ7XXEYghOmvy5 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Hi Ludo, > > (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")) > > I think it should be "--mtime=@". you’re right, fixed. > I didn’t know about this ‘--pax-option’ trick; since it’s only useful > when POSIXLY_CORRECT is set, perhaps we can remove it? True, removed. > (guix docker) does this: > and (guix packages) does something similar. Hm, maybe it would make sense to export a set of options, so build systems/packages can share them? Or create a package that wraps tar with the proper options? > So ‘--sort=name’ seems to be missing. It’s present, see above ↑* Updated patch attached. I’ll push it if there are no further comments. Cheers, Lars --pPxJ7XXEYghOmvy5 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-build-Make-outputs-of-node-build-system-reproducible.patch" >From 6692ebc8561d4e419c276fcdd01a4088d29c5fd7 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Thu, 17 Jun 2021 14:11:19 +0200 Subject: [PATCH] build: Make outputs of node-build-system reproducible. 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 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/guix/build/node-build-system.scm b/guix/build/node-build-system.scm index a55cab237c..70a367618e 100644 --- a/guix/build/node-build-system.scm +++ b/guix/build/node-build-system.scm @@ -120,7 +120,14 @@ #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" + "-czf" "../package.tgz" ".") #t) (define* (install #:key outputs inputs #:allow-other-keys) -- 2.31.1 --pPxJ7XXEYghOmvy5--