Skip to content

Commit d98f459

Browse files
committed
guix: Explicitly set umask in build container
A difference in system umask value can cause non-determinism when zip archives are produced. Set it to a reasonable default.
1 parent 1e7dd58 commit d98f459

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

contrib/guix/libexec/build.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ export LC_ALL=C
33
set -e -o pipefail
44
export TZ=UTC
55

6+
# Althought Guix _does_ set umask when building its own packages (in our case,
7+
# this is all packages in manifest.scm), it does not set it for `guix
8+
# environment`. It does make sense for at least `guix environment --container`
9+
# to set umask, so if that change gets merged upstream and we bump the
10+
# time-machine to a commit which includes the aforementioned change, we can
11+
# remove this line.
12+
#
13+
# This line should be placed before any commands which creates files.
14+
umask 0022
15+
616
if [ -n "$V" ]; then
717
# Print both unexpanded (-v) and expanded (-x) forms of commands as they are
818
# read from this file.

0 commit comments

Comments
 (0)