summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-08-08 09:53:54 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-08-09 02:31:49 -0400
commit681aa076259c05c626266cf516de7e7c5524eadb (patch)
tree09e4cf216588919c485769086512b4a45f9b1e8a
parent1c582f44e41f534a8506a76618f6cffe5d71ed42 (diff)
downloadhaskell-681aa076259c05c626266cf516de7e7c5524eadb.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?