Repository navigation
fix(macos): strip quarantine before bootstrapping the broker service - #207
Open
neroshooter wants to merge 1 commit into
Open
neroshooter wants to merge 1 commit into
neroshooter wants to merge 1 commit into
Conversation
Files copied from a browser-downloaded DMG inherit com.apple.quarantine. launchd refuses the quarantined LaunchDaemon plist, so the installer failed with "Bootstrap failed: 5: Input/output error". Remove the attribute from the installed apps, plist, and /usr/local files before bootstrapping the service. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This branch has not been deployed
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
Installing from a DMG downloaded with Safari or Chrome fails at the end of
Install libvirtualhid.command:The apps are copied to
/Applications, but the broker service never starts. Files on a mounted disk image inherit the image'scom.apple.quarantineattribute.installanddittokeep it, so/Library/LaunchDaemons/dev.lizardbyte.app.libvirtualhid.plistends up quarantined andlaunchctl bootstrap systemrejects it.This PR removes
com.apple.quarantine(withxattr -dr) from everything the installer copies, beforelaunchctl bootstrap:VirtualHIDBroker.appandVirtualHIDControl.app, right afterdittoand before the signature checks;/usr/localheaders, static library, license tool, CMake package, and license texts, when present.The installer already checks the bundled apps with
codesign --verify --deep --strictbefore and after copying them, and the DMG itself is notarized and stapled, so dropping the download marker does not skip any signature check.Screenshot
Issues Fixed or Closed
Roadmap Issues
Testing
Manual validation on macOS 27.0.1 (Apple Silicon), using the current release DMG (
libvirtualhid-macOS-universal.dmg, SHA-2566ebe73f6…236a871):Bootstrap failed: 5: Input/output error.xattr -lshowedcom.apple.quarantineon the installed plist and on both apps, andlaunchctl print system/dev.lizardbyte.app.libvirtualhidreported the service as missing.launchctl printreportedstate = running.bash -n scripts/macos/install.commandpasses.xattr -dr com.apple.quarantineremoves the attribute from a bundle and exits 0 on files and directories that do not have it, so the script stays compatible withset -efor DMGs opened without quarantine.Not run: I could not build a signed DMG containing this change (that needs the Developer ID identity and the virtual HID provisioning profile), so the patched installer has not been tested end to end from a quarantined DMG. No automated test was added because
install.commandrequiressudo,launchctl, and a mounted signed image, and the repository has no harness for it.Type of Change
Checklist
AI Usage
See our AI usage policy.
Claude Code helped diagnose the failed install, write the fix, and draft this description. I reproduced the failure and confirmed the workaround on my own Mac.
Generated with Claude Code (Claude Opus 5.5, low thinking level).
🤖 Generated with Claude Code