diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2021-06-17 14:11:19 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2021-06-24 14:10:29 +0200 |
commit | 9c93573d15e90232de0effb4c28332c454dbc290 (patch) | |
tree | 08fd857b05e992a020bb498fd808fe34421e20e3 | |
parent | 16abea6ff14d375c2264b4cac28305ea63e336c3 (diff) | |
download | guix-9c93573d15e90232de0effb4c28332c454dbc290.tar.gz |
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.
-rw-r--r-- | guix/build/node-build-system.scm | 9 |
1 files changed, 8 insertions, 1 deletions
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) |