← Back to issue list

Zip packages are not extracted properly with snapcraft 2.35

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1742373
Type
issue
State
closed
Author
~sorenfriis
Labels
Created
Updated
Closed

Current evaluation

Closed without documented resolution. Author provided a code workaround. Likely abandoned or resolved in a later release.

Suggested action:

No scores available.

Issue body

We have a snapcraft build that downloads various zip packages and does something with the content. The issue can also be reproduced with a snapcraft.yaml file with the following content: ******************************************************************************* name: test version: '123' grade: stable confinement: devmode summary: fdsfsdfsfd description: fdsfdsfsdfd parts: fonts: plugin: dump source: https://01.org/sites/default/files/downloads/clear-sans/clearsans-1.00.zip source-type: zip organize: 'TTF': usr/share/fonts/truetype/clear-sans stage: - usr/share/fonts/truetype/clear-sans ******************************************************************************* After upgrading from snapcraft 2.34 to 2.35 on Ubuntu 16.04 LTS, the unzipping fails: Pulling fonts Downloading 'clearsans-1.00.zip'[====================================================================================================================================================] 100% Traceback (most recent call last): File "/usr/bin/snapcraft", line 9, in <module> load_entry_point('snapcraft==2.35', 'console_scripts', 'snapcraft')() ... File "/usr/lib/python3/dist-packages/snapcraft/internal/sources/_zip.py", line 58, in provision extracted_file = f.extract(info.filename, path=dst) File "/usr/lib/python3.5/zipfile.py", line 1335, in extract return self._extract_member(member, path, pwd) File "/usr/lib/python3.5/zipfile.py", line 1398, in _extract_member open(targetpath, "wb") as target: PermissionError: [Errno 13] Permission denied: '/home/sfriis/SW/moosepoint/moosepoint_snap/parts/fonts/src/EOT/ClearSans-Bold.eot' It somehow manages to create a completely empty directory (named EOT in this case) which you cannot even run ls on. By commenting out line 59 in /usr/lib/python3/dist-packages/snapcraft/internal/sources/_zip.py, this problem is going away.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Closed without documented resolution. Author provided a code workaround. Likely abandoned or resolved in a later release.
qwen/qwen3.6-35b-a3b Closed without resolution. A PermissionError during zip extraction in snapcraft 2.35 was reported. With zero maintainer comments and no official fix, the issue was abandoned.
qwen/qwen3.6-35b-a3b Closed after a workaround was identified to bypass a PermissionError during zip extraction in snapcraft 2.35. Modifying the _zip.py extraction logic resolved the build failure.
qwen/qwen3.6-35b-a3b Closed without official resolution. A PermissionError during zip extraction in snapcraft 2.35 was reported. A user suggested commenting out line 59 in _zip.py as a workaround, but no fix or maintainer response was provided.
qwen3.6-35b-a3b-mtp-q6 Abandoned without official resolution. Users bypassed the snapcraft 2.35 zip extraction PermissionError by commenting out line 59 in snapcraft/internal/sources/_zip.py.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1761598 Snapcraft modifies binaries snapcraft (launchpad) closed Closed without resolution. Snapcraft 2.39.2 and 2.40.1 modified binaries by adding 4096 bytes, a regression from 2.35. The report was abandoned with no comments or fix applied.
72%
#1688151 snapcraft pull doesn't save the installed build dependencies snapcraft (launchpad) closed Closed without comments or resolution. The bug where snapcraft pull omitted build package dependencies from the pull state file was abandoned.
72%
#1947968 snapcraft missing 22.04 branch snapcraft (launchpad) closed Closed without resolution. The missing ubuntu-22.04 branch for the snapcraft snap caused dpkg installation failures. Likely abandoned or resolved upstream.
72%
#1988858 snapcraft trying to install extra package causing conflict snapcraft (launchpad) closed Closed without a tracked fix or comments. The author reported a build dependency conflict caused by snapcraft pulling extra packages. The issue appears abandoned or resolved by the author.
71%
#1980089 Compiled snap hooks not executed when packaging with Snapcraft 7 snapcraft (launchpad) closed Closed without resolution. Snapcraft 7.0.3 omitted meta/hooks wrapper scripts for compiled snap hooks, breaking execution. The issue appears abandoned.
71%
#1500505 snapcraft produces snaps with dangling external symlinks snapcraft (launchpad) closed Closed without resolution. Snapcraft generated snaps with dangling external symlinks for system libraries and Java components. A manual unpack, remove, and repack workaround was provided, but no upstream fix was implemented.
70%
#1951910 Refreshing snapd while running snapcraft fails with empty response from server snapcraft (launchpad) closed Closed without comments or resolution after ~78 days. Likely abandoned or marked stale. No fix or workaround was implemented.
70%
#1675516 can't cleanbuild snapcraft itself snapcraft (launchpad) closed Closed without resolution or comments, the report of a failed snapcraft cleanbuild due to missing build-packages was abandoned.
70%
#1981979 snapcraft 7.0.8+ stopped working on non debian systems snapcraft (launchpad) closed Closed without resolution or comments. The reported apt_pkg error blocking snapcraft 7.0.8+ builds on non-Debian systems remains unfixed and the issue appears abandoned.
70%