summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-08-08 09:53:54 -0400
committerBen Gamari <ben@smart-cactus.org>2022-08-08 19:20:12 -0400
commitc5a85a16da7c06d3d1e56f0902dd1ea120d7cf12 (patch)
tree4327cb39dacddcac4afec2d5dc07b49609adabe3
parent82eeb5f1025d1f93b287db163329ce9d715ab6e1 (diff)
downloadhaskell-c5a85a16da7c06d3d1e56f0902dd1ea120d7cf12.tar.gz
hadrian: Fix access mode of installed package registration files
Previously hadrian's bindist Makefile would modify package registrations placed by `install` via a shell pipeline and `mv`. However, the use of `mv` means that if umask is set then the user may otherwise end up with package registrations which are inaccessible. Fix this by ensuring that the mode is 0644.
-rw-r--r--hadrian/bindist/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/hadrian/bindist/Makefile b/hadrian/bindist/Makefile
index 9bf9ad119f..5159558c5f 100644
--- a/hadrian/bindist/Makefile
+++ b/hadrian/bindist/Makefile
@@ -46,6 +46,8 @@ define patchpackageconf \
((echo "$1" | grep rts) && (cat '$2.copy' | sed 's|haddock-.*||' > '$2.copy.copy')) || (cat '$2.copy' > '$2.copy.copy')
# We finally replace the original file.
mv '$2.copy.copy' '$2'
+ # Fix the mode, in case umask is set
+ chmod 644 '$2'
endef
# QUESTION : should we use shell commands?