codrsquad / codrsquad/runez

runez.decompress() seems to have bug related to file permissions against zip files

Open
#40 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
9
Forks
4
Avg merge
39m
Merged PRs (30d)
1

Description

This is a source base zip from https://github.com/ThomasDickey/ncurses-snapshots:
ncurses-snapshots-6_5_20250927.zip
If you use runez.decompress() in Python to decompress it, you'll find that a lot of files that should be executable become non-executable, including the important "./configure". This makes portable-python fail because it utilizes runez for decompressing.

Furthermore, this is a tarball:
ncurses-6.5.tar.gz
If you decompress it with linux command tar then compress it to a .zip with linux command zip, then decompress it again with runez.decompress() in Python, the issue also occurs.

However, decompressing the zip files with linux command unzip provides no issues.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the runez.decompress() entry point and reproduce the problem with the attached ncurses ZIP, checking the extracted permissions of ./configure and other executable files. Compare the result with Linux unzip; done means executable permissions are preserved when decompressing these ZIP archives.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.