Repository navigation
fix: pack node-gyp's gyp entrypoints as executable - #12652
Conversation
gyp's make generator execs gyp/gyp_main.py and gyp/gyp directly through their shebangs when it regenerates the Makefile during a from-source native build. They were missing from publishConfig.executableFiles, so they got packed at 0644 and the build failed with "Permission denied" (make error 126). pnpm#11485 fixed the node-gyp bin shims but not these two. Add them to PUBLISH_EXECUTABLE_FILES so the pnpm and `@pnpm/exe` tarballs pack them at 0755. Closes pnpm#12455
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThe PR adds ChangesRestore node-gyp gyp executables
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Summary by QodoFix packaging: ship node-gyp gyp entrypoints as executable files Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
Context used 1. Node-gyp exec bits untested
|
|
Code review by qodo was updated up to the latest commit b91d777 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.changeset/node-gyp-gyp-executable.md:
- Line 6: The changeset description is too implementation-heavy and includes
internal rationale/history; rewrite the entry to be user-facing only. Update the
changeset content using the changeset file’s descriptive summary so it simply
states that pnpm now preserves execute permissions for the bundled node-gyp gyp
entrypoints, without mentioning packaging internals, build failure details, or
linked issue history.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: f9c30db6-60fe-451e-921d-a1edec84cf49
📒 Files selected for processing (4)
.changeset/node-gyp-gyp-executable.md.meta-updater/src/index.tspnpm11/pnpm/artifacts/exe/package.jsonpnpm11/pnpm/package.json
Move the implementation detail to the commit history and keep the changeset to a short release note, as CONTRIBUTING asks.
|
Code review by qodo was updated up to the latest commit fc86c47 |
1 similar comment
|
Code review by qodo was updated up to the latest commit fc86c47 |
Summary
The bundled node-gyp ships two gyp entrypoints —
gyp/gyp_main.pyandgyp/gyp— as non-executable (0644) inside thepnpmand@pnpm/exetarballs. Both start with a shebang and are exec'd directly by gyp'smakegenerator when it regenerates theMakefileduring a from-source native addon build, so the build fails withPermission denied/make: *** [Makefile] Error 126.#11485 restored the execute bit on the node-gyp bin shims for the same class of bug (#11483) but missed these two gyp entrypoints. This adds them to
PUBLISH_EXECUTABLE_FILESin the meta-updater, which writespublishConfig.executableFilesfor both thepnpmand@pnpm/exemanifests.Reproduced on the published 11.9.0 tarballs:
@pnpm/[email protected]packs them the same way. Files onpublishConfig.executableFilescome out 0755 while the two gyp entrypoints, which carry the same shebangs, come out 0644.Closes #12455
Squash Commit Body
Checklist
pacquet/port needed — this only changes how thepnpm/@pnpm/exetarballs are packed (publishConfig.executableFiles), which has no equivalent in the Rust port.meta-updater --test(lint:meta) in CI, same as fix(exe): restore execute bit on node-gyp shims in @pnpm/exe #11485.Summary by CodeRabbit
node-gypentrypoint files with the correct executable permissions.node-gypartifacts are bundled correctly in the produced tarballs.