Repository navigation
fix(publish): S_IFREG + create_system=3 on wheel scripts (1.2.13) - #35
Merged
Merged
Conversation
Every zccache Linux/macOS wheel shipped to PyPI has had the
bundled `zccache` binary install without execute permissions:
/usr/local/bin/zccache: Permission denied (exit 126)
Two bits both need to be set for pip/installer to apply the mode
bits to the unpacked script, and both were missing:
- `info.create_system = 3` tells the unpacker to interpret
external_attr as Unix mode bits. The default is 0 (DOS) under
which the unpacker interprets external_attr as DOS file
attributes and ignores Unix perms entirely.
- `stat.S_IFREG` is the regular-file type bit. pip calls
`stat.S_ISREG()` on the upper 16 bits and falls back to umask
defaults (0o644) when it's missing, even when 0o755 is set.
With both corrected, script entries now ship external_attr
0x81ed0000 — byte-identical to uv / ruff / maturin-built wheels.
This was discovered during the FastLED/fbuild 2.1.20 postmortem
that found the exact same bug (S_IFREG) shipped there. zccache is
worse because it's also missing create_system=3, so its wheels
have been broken on non-Windows since the script was written.
Ecosystem-wide audit: zackees/self#25.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
First release with working Linux/macOS script permissions on the bundled `zccache` binary. Prior releases are all broken on non-Windows: `zccache: Permission denied` on any command. Release notes vs 1.2.12: - fix(publish): set S_IFREG + create_system=3 on wheel script entries so pip applies +x to the bundled binary on install Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
zackees
added a commit
to FastLED/fbuild
that referenced
this pull request
Apr 19, 2026
1.2.12 is the last zccache release that ships broken Linux/macOS wheels — the bundled `zccache` binary lacks +x and every cache operation fails with `Permission denied`. The upstream fix landed in zccache 1.2.13 (forge-ci/zccache#35: S_IFREG + create_system=3 on wheel script entries). Bumping the floor so fresh pip installs of fbuild 2.1.21 don't pin themselves to a broken zccache. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
zackees
added a commit
to FastLED/fbuild
that referenced
this pull request
Apr 19, 2026
1.2.12 is the last zccache release that ships broken Linux/macOS wheels — the bundled `zccache` binary lacks +x and every cache operation fails with `Permission denied`. The upstream fix landed in zccache 1.2.13 (forge-ci/zccache#35: S_IFREG + create_system=3 on wheel script entries). Bumping the floor so fresh pip installs of fbuild 2.1.21 don't pin themselves to a broken zccache. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
zackees
added a commit
to FastLED/fbuild
that referenced
this pull request
Apr 19, 2026
1.2.12 is the last zccache release that ships broken Linux/macOS wheels — the bundled `zccache` binary lacks +x and every cache operation fails with `Permission denied`. The upstream fix landed in zccache 1.2.13 (forge-ci/zccache#35: S_IFREG + create_system=3 on wheel script entries). Bumping the floor so fresh pip installs of fbuild 2.1.21 don't pin themselves to a broken zccache. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every zccache Linux/macOS wheel shipped to PyPI has had the bundled
zccachebinary install without execute permissions:Two bits both need to be set for pip's wheel installer to apply the script's mode bits; both were missing in
ci/publish.py:info.create_system = 3(Unix). The default is 0 (DOS), under which pip interpretsexternal_attras DOS file attributes rather than Unix mode, so the perm bits are ignored entirely.stat.S_IFREG(regular-file type bit,0o100000) OR-ed into the mode. pip callsstat.S_ISREG()on the upper 16 bits ofexternal_attrbefore applying the mode; without IFREG the test returns False and pip falls back to umask defaults (0o644) even when0o755is set.With both corrected, script entries now ship
external_attr=0x81ed0000— byte-identical touv/ruff/maturin-built wheels.Context
Surfaced during the FastLED/fbuild 2.1.20 postmortem (FastLED/fbuild#143). fbuild had the same S_IFREG bug but did set
create_system=3. zccache is missing both, which means its wheels have been broken on non-Windows essentially since the publish script was written.Ecosystem-wide audit tracking issue: zackees/self#25.
Also included: version bump to 1.2.13
1.2.12's PyPI filenames are permanently burned — PyPI doesn't allow re-uploading, so shipping the fix requires a fresh version.
Cargo.tomlworkspace version + all 18=1.2.12intra-workspace pins +Cargo.lockbumped.Verification
Rebuild any wheel locally from
dist/and check:Expected (post-fix):
external_attr=0x81ed0000 ok=True.Previously:
external_attr=0x01ed0000 ok=False(andcreate_system=0, so theS_ISREGtest wasn't even the first failure — thecreate_systemguard fails first).Test plan
cargo check --workspaceclean after version bumpsuv lockclean./publishcuts 1.2.13 and Step 6 (or equivalent post-upload check) passespip install zccache==1.2.13 && zccache --helpon Linux returns exit 0Follow-ups for the wider audit
Per zackees/self#25:
ci/publish.pythat rejects any wheel whose.data/scripts/*entries don't havecreate_system=3andS_ISREG(mode) and mode & 0o100. Turns this bug class into a build-time failure.publish.pyinzackees/python-rust-build-chainso future Rust+Python repos copy a known-good pattern.🤖 Generated with Claude Code