[Git][ghc/ghc][master] hadrian: Fix access mode of installed package registration files

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Tue Aug 9 06:32:00 UTC 2022



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
681aa076 by Ben Gamari at 2022-08-09T02:31:49-04:00
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.

- - - - -


1 changed file:

- hadrian/bindist/Makefile


Changes:

=====================================
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?



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/681aa076259c05c626266cf516de7e7c5524eadb

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/681aa076259c05c626266cf516de7e7c5524eadb
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20220809/529464fa/attachment-0001.html>


More information about the ghc-commits mailing list