patch applied (ghc-7.0/packages/Cabal): Reimplement createDirectoryIfMissingVerbose to use sensible file permissions
duncan.coutts at googlemail.com
Tue May 17 15:40:04 CEST 2011
Tue May 17 05:01:05 PDT 2011 Duncan Coutts <duncan at community.haskell.org>
* Reimplement createDirectoryIfMissingVerbose to use sensible file permissions
Hopefully should fix ghc ticket #4982.
The problem was permissions on directories: previously we used ordinary
createDirectory and on unix this creates dirs using the current user's
umask. If the root user has a silly umask then someone doing sudo
install will end up with dirs that are not readable by non-root users.
So the solution is to do the same as we do with files: override the
umask and explicitly set the file permissions based on the kind of
file: ordinary file, executable file and now also directory.
Sadly we also had to re-implement createDirectoryIfMissing to use our
new createDirectory wrapper function.
M ./Distribution/Compat/CopyFile.hs -1 +4
M ./Distribution/Compat/Exception.hs -1 +1
M ./Distribution/Simple/Utils.hs -10 +50
View patch online:
More information about the Cvs-libraries