all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / Atom feed
* [bug#48933] [PATCH] build: Make outputs of node-build-system reproducible.
@ 2021-06-09 12:56 Lars-Dominik Braun
  2021-06-16 20:51 ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Lars-Dominik Braun @ 2021-06-09 12:56 UTC (permalink / raw)
  To: 48933; +Cc: jlicht

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)
-- 
2.31.1





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-06-24 12:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09 12:56 [bug#48933] [PATCH] build: Make outputs of node-build-system reproducible Lars-Dominik Braun
2021-06-16 20:51 ` Ludovic Courtès
2021-06-17 12:12   ` Lars-Dominik Braun
2021-06-20 20:58     ` Ludovic Courtès
2021-06-24 12:12       ` bug#48933: " Lars-Dominik Braun

all messages for Guix-related lists mirrored at yhetil.org

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix

Example config snippet for mirrors.


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git