summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2015-07-14 19:41:20 -0400
committerMark H Weaver <mhw@netris.org>2015-07-14 19:41:20 -0400
commit2e9511dfbdb5ddd78c2f205c4ca7fc23738d79f8 (patch)
tree09faad98641e641018cc1f3bd42d6e166ba3f1c8
parentc6d33a9d9c7a9ec3f5d7b1afb6d836dae3c8706e (diff)
downloadpatches-2e9511dfbdb5ddd78c2f205c4ca7fc23738d79f8.tar
patches-2e9511dfbdb5ddd78c2f205c4ca7fc23738d79f8.tar.gz
packages: patch-and-repack: Build tarballs deterministically.
* guix/packages.scm (patch-and-repack)[build]: When invoking 'tar' to repack the archive, pass "--mtime=@0", "--owner=root:0", and "--group=root:0".
-rw-r--r--guix/packages.scm8
1 files changed, 6 insertions, 2 deletions
diff --git a/guix/packages.scm b/guix/packages.scm
index 34222724c0..3983d1409a 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -480,7 +480,11 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET."
(begin (chdir "..") #t)
(zero? (system* (string-append #+tar "/bin/tar")
- "cvfa" #$output directory)))))))
+ "cvfa" #$output directory
+ ;; avoid non-determinism in the archive
+ "--mtime=@0"
+ "--owner=root:0"
+ "--group=root:0")))))))
(let ((name (tarxz-name original-file-name))
(modules (delete-duplicates (cons '(guix build utils) modules))))