Repository navigation
ci: verify executable permissions in packaged macOS prebuilds - #1004
Open
Mike Hamanaka (hamanakam1) wants to merge 1 commit into
Open
Mike Hamanaka (hamanakam1) wants to merge 1 commit into
Mike Hamanaka (hamanakam1) wants to merge 1 commit into
Conversation
Contributor
|
Mike Hamanaka (@hamanakam1) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
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.
Verify executable permissions in the published macOS prebuilds
Summary
Add a packaging regression check that inspects the actual npm tarball produced by the publish and test pipelines and fails unless both macOS
spawn-helperbinaries retain executable permissions.Problem
The
spawn-helperfiles in the macOS prebuilds must be executable becausenode-ptyinvokes them throughposix_spawn. A published tarball can contain the files with mode0644even when the local build output was executable. That producesposix_spawnp failedat runtime, particularly for package-manager workflows that preserve the tarball's file modes.An install-time
chmodis not a complete fix because package managers may skip lifecycle scripts. The invariant must be checked at package creation time.Change
After the pipeline's existing
chmod +x prebuilds/darwin-*/spawn-helperstep, runnpm pack --ignore-scripts, inspect the resulting tarball withtar -tvf, and require executable mode (-rwxr-xr-x) for both macOS prebuild helpers.The check is present in both
buildStepsandtestStepsso packaging regressions fail before publication and remain covered by the normal test path.Why this approach
spawn-helperentries when the assertion fails.Validation
ruby -e 'require "yaml"; YAML.load_file("publish.yml")'git diff --checknpm cinpm test— 24 passing; lint passed viaposttestThe local source checkout does not contain the pipeline-downloaded
prebuilds/artifacts, so the package assertion itself is intended to execute in the Azure publish/test jobs after those artifacts are downloaded.Scope
This change does not publish a package, modify the upstream repository, or change the runtime helper path. It only makes the existing packaging invariant enforceable.