Skip to content
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

Linux binary releases as ZIP lose executable permissions #453

Closed
nh2 opened this issue Nov 25, 2020 · 2 comments · Fixed by #454
Closed

Linux binary releases as ZIP lose executable permissions #453

nh2 opened this issue Nov 25, 2020 · 2 comments · Fixed by #454
Assignees
Milestone

Comments

@nh2
Copy link

nh2 commented Nov 25, 2020

Hi, the ZIP releases lik sieve-0.5.3-linux-x64.zip on https://github.com/thsmi/sieve/releases/tag/0.5.3 are not very useful to Linux users because ZIP cannot carry file permissions, so if you try to run it you get:

$ ./sieve 
zsh: permission denied: ./sieve

If one try to fix it it still fails because other files don't have the right permisisons:

$ chmod +x sieve 
$ ./sieve 
zsh: no such file or directory: ./sieve

Could you switch to .tar.gz or a similar format that keeps executable permissions (chmod +x bits)?

Thanks!

@thsmi thsmi linked a pull request Nov 25, 2020 that will close this issue
@thsmi thsmi changed the title Linux binary releases as ZIP lose executable permissions, please use tar Linux binary releases as ZIP lose executable permissions Nov 25, 2020
@thsmi thsmi self-assigned this Nov 25, 2020
@thsmi thsmi added this to the 0.6.0 milestone Nov 25, 2020
@thsmi
Copy link
Owner

thsmi commented Nov 25, 2020

well, the original zip format from 1989 could not store permission bits. But this changed in the more than two decades ago when the "extra field" was introduced. In the "extra field" you specify the information as operating system and data pairs. This means you can embed native DOS, NT as well as UNIX file modes at the same time. Most zip packagers typically include native UNIX file mode mappings for better compatibility.

The packaging script also adds UNIX file modes to each zip file entry:
https://github.com/thsmi/sieve/blob/master/gulp/gulpfile.app.js#L473

But this meta information, is accidentally overwritten at a later stage, by an incorrect wildcard match.
The pull request attached to this issue fixes this. The 7zip screenshot shows the "sieve" file has an UNIX "extra field" which carries now the correct UNIX file mode.

image

But I would suggest to use the app image, if you are on Linux. All you need to do is, downloading the file, then chmod the download and you are done. No need for unzipping, because everything is contained in a single file.

@nh2
Copy link
Author

nh2 commented Nov 26, 2020

Thanks! Happy to check it for the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants