fix(macos): sign and package bux-shim with hypervisor entitlement - #71
Open
JingMox wants to merge 1 commit into
Open
fix(macos): sign and package bux-shim with hypervisor entitlement#71JingMox wants to merge 1 commit into
JingMox wants to merge 1 commit into
Conversation
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.
Description
macOS requires the
com.apple.security.hypervisorentitlement to call Hypervisor.framework.bux-shimwas never signed with it, sokrun_start_enterreturned-22(EINVAL) and no VM could be created — surfacing as the misleadingguest agent did not become ready.The CI side had nothing to sign either:
cargo build -p bux-clidoes not produce thebux-shimbinary (buxdepends on it as a library only), and the release archive never shipped it.Changes
crates/bux-shim/bux-shim.entitlementsdeclaringcom.apple.security.hypervisorMakefile: signbux-shimaftermake build— macOS only, no-op on Linux. Every rebuild invalidates the signature, so this has to be part of the build rather than a manual step.cd.yml: buildbux-shim, sign it on macOS, and include it in the release archiveVerified locally: after stripping the signature,
make signreapplies it andcodesign -d --entitlements -reports the entitlement.The
cd.ymlchanges only run onv*tags, so they are not exercised by this PR. They can be validated after merge by triggering the CD workflow manually (workflow_dispatch) — thereleasejob is tag-gated and will be skipped, so nothing gets published.Note this removes only the first blocker on macOS. VM startup still fails further down inside libkrun's virtio-fs setup; that is a separate defect.
Closes #70