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

composer archive --format=zip does not preserve permission umask on files #8330

Closed
jimmy-ho opened this issue Sep 17, 2019 · 6 comments
Closed

composer archive --format=zip does not preserve permission umask on files #8330

jimmy-ho opened this issue Sep 17, 2019 · 6 comments
Labels
Bug
Milestone

Comments

@jimmy-ho
Copy link
Contributor

@jimmy-ho jimmy-ho commented Sep 17, 2019

It is noticed when using composer/satis that during the archive process to create dist of repository tags/branches that permission umask on files that may have an executable flag set is not maintained.

composer/satis simply uses the composer archive functionality where the issue lies.

I have traced this down to the ZipArchiver not using the setExternalAttributesName applied on the resultant file in the zip archive.

I have a patch forthcoming to address this issue for review.

Unless someone can explain if this was intentional.

This is related to composer/satis#314

@stof

This comment has been minimized.

Copy link
Contributor

@stof stof commented Sep 17, 2019

I don't think this was intentional. Most probably the developer implementing the ZipArchiver was not aware of the setExternalAttributesName API (or maybe it was implemented before this API was added in PHP 5.6)

@jimmy-ho

This comment has been minimized.

Copy link
Contributor Author

@jimmy-ho jimmy-ho commented Sep 17, 2019

Cool thanks @stof for your feedback, I'll update once I have a PR up for quick review.

@stof

This comment has been minimized.

Copy link
Contributor

@stof stof commented Sep 17, 2019

@jimmy-ho make sure to keep the ZipArchiver working on PHP < 5.6 (as the min version of PHP supported by Composer is 5.3), by skipping the setExternalAttributesName usage there (it is better to generate the archive as today on old PHP runtimes than to fail to generate it).

@jimmy-ho

This comment has been minimized.

Copy link
Contributor Author

@jimmy-ho jimmy-ho commented Sep 17, 2019

Thanks for the callout @stof, will do.

@alcohol alcohol added the Bug label Sep 17, 2019
@jimmy-ho

This comment has been minimized.

Copy link
Contributor Author

@jimmy-ho jimmy-ho commented Sep 17, 2019

PR for this at: #8331

@Seldaek Seldaek added this to the 1.10 milestone Sep 18, 2019
@Seldaek

This comment has been minimized.

Copy link
Member

@Seldaek Seldaek commented Jan 14, 2020

Fixed by #8331

@Seldaek Seldaek closed this Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.