diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-08-08 09:53:54 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2022-08-15 17:11:26 -0400 |
commit | e2832cbd830a98541193ec07dddf94fcd247f026 (patch) | |
tree | d40b1ab0760c1531236713a9fc7a7304ffcbb693 | |
parent | 658d3fd5646e94101494b76f438b4e500cdcc174 (diff) | |
download | haskell-e2832cbd830a98541193ec07dddf94fcd247f026.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.
(cherry picked from commit 681aa076259c05c626266cf516de7e7c5524eadb)
-rw-r--r-- | hadrian/bindist/Makefile | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hadrian/bindist/Makefile b/hadrian/bindist/Makefile index a95215d346..d46105a018 100644 --- a/hadrian/bindist/Makefile +++ b/hadrian/bindist/Makefile @@ -45,6 +45,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? |