Skip to content

fix(macos): sign and package bux-shim with hypervisor entitlement - #71

Open
JingMox wants to merge 1 commit into
qntx:mainfrom
JingMox:bug/70-macos-shim-entitlement-and-packaging
Open

fix(macos): sign and package bux-shim with hypervisor entitlement#71
JingMox wants to merge 1 commit into
qntx:mainfrom
JingMox:bug/70-macos-shim-entitlement-and-packaging

Conversation

@JingMox

@JingMox JingMox commented Aug 19, 2026

Copy link
Copy Markdown
Member

Description

macOS requires the com.apple.security.hypervisor entitlement to call Hypervisor.framework. bux-shim was never signed with it, so krun_start_enter returned -22 (EINVAL) and no VM could be created — surfacing as the misleading guest agent did not become ready.

The CI side had nothing to sign either: cargo build -p bux-cli does not produce the bux-shim binary (bux depends on it as a library only), and the release archive never shipped it.

Changes

  • Add crates/bux-shim/bux-shim.entitlements declaring com.apple.security.hypervisor
  • Makefile: sign bux-shim after make 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: build bux-shim, sign it on macOS, and include it in the release archive

Verified locally: after stripping the signature, make sign reapplies it and codesign -d --entitlements - reports the entitlement.

The cd.yml changes only run on v* tags, so they are not exercised by this PR. They can be validated after merge by triggering the CD workflow manually (workflow_dispatch) — the release job 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: bux-shim missing hypervisor entitlement, VM creation fails on macOS

1 participant