aboutsummaryrefslogtreecommitdiff
path: root/contrib/guix
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-02-25 08:20:22 +0800
committerfanquake <fanquake@gmail.com>2021-02-25 08:22:04 +0800
commit56f06a986385b24818a53fde24c6f3a0b01f1a93 (patch)
tree6ded8d3eaf67a1b06ba9fbaf552eabca3b9e3ea2 /contrib/guix
parentb54a10e777f912081e5c00dabcf3643b10775a50 (diff)
parentd98f4593cf00ab2973f8113e30506861b24383bc (diff)
downloadbitcoin-56f06a986385b24818a53fde24c6f3a0b01f1a93.tar.xz
Merge #21271: guix: Explicitly set umask in build container
d98f4593cf00ab2973f8113e30506861b24383bc guix: Explicitly set umask in build container (Carl Dong) Pull request description: Opened as a separate PR to fix non-reproducibility found through testing here: https://github.com/bitcoin/bitcoin/pull/21089#issuecomment-783549633 Many thanks to everyone who helped find this! ACKs for top commit: laanwj: ACK d98f4593cf00ab2973f8113e30506861b24383bc fanquake: ACK d98f4593cf00ab2973f8113e30506861b24383bc - I'm seeing matching hashes. Tree-SHA512: ea339c3902f2f4dea32e8ef5cc675a1df0679530881260ae999aaaf7339d5b12c46e01e58677cbb079f33e573ad105e2b443a835f3e944ef8e943a25f83027f1
Diffstat (limited to 'contrib/guix')
-rw-r--r--contrib/guix/libexec/build.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh
index 72588c54a7..119fe04c75 100644
--- a/contrib/guix/libexec/build.sh
+++ b/contrib/guix/libexec/build.sh
@@ -3,6 +3,16 @@ export LC_ALL=C
set -e -o pipefail
export TZ=UTC
+# Althought Guix _does_ set umask when building its own packages (in our case,
+# this is all packages in manifest.scm), it does not set it for `guix
+# environment`. It does make sense for at least `guix environment --container`
+# to set umask, so if that change gets merged upstream and we bump the
+# time-machine to a commit which includes the aforementioned change, we can
+# remove this line.
+#
+# This line should be placed before any commands which creates files.
+umask 0022
+
if [ -n "$V" ]; then
# Print both unexpanded (-v) and expanded (-x) forms of commands as they are
# read from this file.