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-08 09:56:40 -0400 |
commit | b3cffa9bfd2ac8e19750458799bd4804607c2d18 (patch) | |
tree | fb8763b97dc3cb68605abc3f0ab1a7f6bd0382b3 | |
parent | 78d04cfadfd728bb088b08b1e88905b43cc0360c (diff) | |
download | haskell-wip/T21965.tar.gz |
hadrian: Fix access mode of installed package registration fileswip/T21965
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/Makefile | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hadrian/bindist/Makefile b/hadrian/bindist/Makefile index 94a74b2162..57610513b6 100644 --- a/hadrian/bindist/Makefile +++ b/hadrian/bindist/Makefile @@ -83,6 +83,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? |