store-copy: Canonicalize the mtime and permissions of the store copy.
authorLudovic Courtès <ludo@gnu.org>
Sun, 4 Nov 2018 21:05:32 +0000 (22:05 +0100)
committerLudovic Courtès <ludo@gnu.org>
Tue, 6 Nov 2018 22:21:24 +0000 (23:21 +0100)
commit72dc64f8f720268930eed448abfc15d2a0eca3cf
tree25ba24f00fc197f9b53a5921faa09d8f16f0c85f
parent1ff53787dbd4b1846ae523aef86ada3996de5e6d
store-copy: Canonicalize the mtime and permissions of the store copy.

Fixes a bug whereby directories in the output of 'guix pack -f tarball'
would not be read-only.

* guix/build/store-copy.scm (reset-permissions): New procedure.
(populate-store): Pass #:keep-mtime? #t to 'copy-recursively'.  Call
'reset-permissions'.
* tests/pack.scm ("self-contained-tarball"): In CHECK, define
'canonical?' and use it to check that every file has an mtime of 1 and
is read-only.
* tests/guix-pack.sh: Invoke "chmod -Rf +w" before "rm -rf" in trap.
guix/build/store-copy.scm
tests/guix-pack.sh
tests/pack.scm