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

Fix pex extraction perms. #528

Merged
merged 2 commits into from
Jul 23, 2018
Merged

Fix pex extraction perms. #528

merged 2 commits into from
Jul 23, 2018

Conversation

jsirois
Copy link
Member

@jsirois jsirois commented Jul 21, 2018

Previously, a zipped pex would lose permission bits when exracted to the
filesystem for --not-zip-safe pexes or PEX_FORCE_LOCAL runs. This
was due to an underlying bug in the zipfile stdlib tracked here:
https://bugs.python.org/issue15795

Work around the bug in zipfile.Zipfile by extending it and running a
chmod'ing cleanup whenever extract or extractall is called.

Fixes #527

Previously, a zipped pex would lose permission bits when exracted to the
filesystem for `--not-zip-safe` pexes or `PEX_FORCE_LOCAL` runs. This
was due to an underlying bug in the `zipfile` stdlib tracked here:
  https://bugs.python.org/issue15795

Work around the bug in `zipfile.Zipfile` by extending it and running a
chmod'ing cleanup whenever `extract` or `extractall` is called.

Fixes pex-tool#527
Copy link

@stuhood stuhood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Copy link
Contributor

@kwlzn kwlzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@jsirois jsirois merged commit 4855509 into pex-tool:master Jul 23, 2018
@jsirois jsirois deleted the issues/527 branch July 23, 2018 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants