Preserve file permissions when unpacking sources#666
Preserve file permissions when unpacking sources#666snoyberg merged 1 commit intocommercialhaskell:masterfrom
Conversation
The `tar` package, in name of portability, doesn't preserve file
permissions when creating and unpacking archives. A sample package which
relies on permissions to be kept as they were packed with is
`ghc-parser` which executes a bash script as part of its build process.
Before this patch we'd get
```
/run/user/1000/stack26234/ghc-parser-0.1.7.0/Setup.hs:2:1: Warning:
Module ‘System.Cmd’ is deprecated: Use "System.Process" instead
/bin/sh: ./build-parser.sh: Permission denied
Configuring ghc-parser-0.1.7.0...
Warning: 'hs-source-dirs: src-7.8.3' directory does not exist.
```
but now the package builds fine.
|
Testing on Windows before merging, but this looks good. |
|
Hmm, I'm getting errors like this when running the integration test on Windows: Do you have access to a Windows system to test this on? |
|
@snoyberg No Windows machine access. I'm not sure why that problem would occur: |
|
It seems like Windows doesn't like setting permissions on a directory when a trailing backslash is present. I think I can fix this easily. |
|
Fix added for Windows and merged, thanks! |
The
tarpackage, in name of portability, doesn't preserve filepermissions when creating and unpacking archives. A sample package which
relies on permissions to be kept as they were packed with is
ghc-parserwhich executes a bash script as part of its build process.Before this patch we'd get
but now the package builds fine.
cc @mboes