-
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
new-sdist adds executable permission to *.txt files #5813
Comments
That's just down to how it works internally, and I believe that |
Making |
It only matters if the user actually runs it... I suggest not running random |
Many Linux distributions have sophisticated QA mechanisms that prevent packages from doing stuff like installing executable files into |
The patch is trivial, anyway. Instead of setting every potentially executable file as executable, check the current execute permissions and continue those forward. |
Humorously enough, using |
No, |
Nor does cabal/Cabal/Distribution/Simple/SrcDist.hs Lines 430 to 438 in 787b1f2
And here is how
So |
|
@RyanGlScott it's not optional, sadly. Relying on whatever |
@asr:
No, I meant
I'm using
I'm not sure I understand how the fix works. From , you say:
However, looking at the implementation: cabal/cabal-install/Distribution/Client/CmdSdist.hs Lines 259 to 261 in f580d39
It looks like |
Note, Does we have tests that Ultimately, this should be also checked on upload on Hackage, so no tarballs with executable bits are uploaded at all, as whoever can package I.e. omitting the file permissions on unpack sounds very right thing to do. In that light, as I commented on the PR, I don't see a reason from not setting any permissions at all, just 644 for files and 655 for directories unconditionally. Bundling native binaries is just wrong, and scripts can be run by invoking their interpreter (like is done with |
I tend to disagree: I don't see a reason to strip intended executable permissions from scripts: though I certainly prefer everything 644 to everything 755... I think distros don't use |
Thank you So I was trying to reproduce this to test the fix (but I need to work slightly harder to backport it to 2.4 for Fedora), and so far I found that the original problem occurs for |
cabal-install v2-sdist makes extra-source-files executable
I finally tested this and can confirm that the issue is fixed, thank you! |
Also if it helps others I backported the fix to cabal-install-2.4.1.0 in Fedora: |
(It is a little sad that this didn't even get into cabal-install-3.2.) |
The tarball generated by
cabal new-sdist
comes with several*.txt
files having a+x
file permission set even though these files don't have that bit set in the source directory they were pulled from. See the permissions ofREADME.txt
for example:The text was updated successfully, but these errors were encountered: