-
Notifications
You must be signed in to change notification settings - Fork 704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unpack doesn't preserve (executable) permissions #6514
Comments
See #6454 and #5813. Most likely we'll make
I.e. not setting bits on unpacking is by design. |
I agree that distributing native binaries is wrong, however, one will not always be able to modify existing scripts. |
@dtaskoff this is partly due to |
I don't think that's fair, because the shebang might contain additional information and is now ignored.
It's a bug ;) |
sdist creates files without executable bits, so this issue is obsoleted. |
@phadej so how do you figure out which interpreter to use? Eg whether a script is a posix, shell or ksh script? They'll likely have the same extension (or none). Parse the shebang? |
Maintainer of package should know which kind of script they are writing. (or python or ruby or ...) |
Scripts may be "data files" and used by users as well. |
In cabal nix-style setup user barely see tarballs. I argue that if "bigger" package is assembled and distributed then Also it is Don't speculate. If you have real use-case, it would be helpful. The OP case, users can be advised to call |
@phadej so if the tar package is fixed (because it is a bug there), you will adjust the cabal-install code? The current behavior relies on a bug to be present. I suggest cabal-install explicitly removes the executable bits then. |
Yes, we should be explicit on unpack too. PR welcome. |
Maybe, but then again, we shouldn't use |
Bug description
cabal unpack
doesn't preserve permissions of executable files.To Reproduce
shows autogen.sh's permissions to be -rw-r--r--, while
shows them to be -rwxr-xr-x, which are the original permissions.
Expected behavior
Permissions to be preserved.
System information
cabal 3.0.0.0
,ghc 8.8.2
Additional context
The text was updated successfully, but these errors were encountered: