← Back to issue list

zip: support extracting non-unix zip files

View original Github issue

Metadata

Project
snapcraft
Number
#1862
Type
pull request
State
merged
Author
kyrofa
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #1862 as commit a8ff01a43, preventing 0o000 permissions from being applied when extracting ZIP files created on non-Unix systems.

Resolution: closed resolved

Reason: PR #1862 was approved and merged as commit a8ff01a43. It skips chmod for extracted entries with a 0o000 mode, resolving LP bug #1742373.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [x] Have you successfully run `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh unit`? ----- Currently, Snapcraft assumes that the external_attr attribute of each item in the ZipFile contains unix permissions. That unfortunately isn't the case of the zip file was created on a non-unix system, and such zip files cause Snapcraft to create files and directories with 0o000 permissions. This PR fixes LP: [#1742373](https://bugs.launchpad.net/snapcraft/+bug/1742373) by checking the extracted mode before applying it, and not using `chmod` if the mode is 0o000.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #1862 as commit a8ff01a43, preventing 0o000 permissions from being applied when extracting ZIP files created on non-Unix systems.
stealth/space-bunny-alpha — closed resolved Merged in #1862 (a8ff01a43): ZIP extraction checks entry modes and skips chmod for 0o000, fixing permission handling for ZIPs created on non-Unix systems.
qwen/qwen3.6-35b-a3b — — Merged a fix for non-Unix zip extraction that previously created 0o000 permissions. The change validates extracted modes and skips chmod when zero, resolving Launchpad bug 1742373. Approved with 20 additions and 1 deletion.
qwen3.6-35b-a3b-mtp-q6 — — Merged a fix for non-Unix zip files that incorrectly set 0o000 permissions. The code now validates extracted file modes before applying them, skipping chmod when the mode is zero, resolving Launchpad bug 1742373.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.