Repository navigation
Install the Mac battery mirror through VM integrations - #252
Merged
Merged
Conversation
Existing VMs keep their disk across app updates, so they get the battery port but not the guest module and bridge from omacom#220. The only way to add them was to stage eight repo files through the shared folder and run the retrofit script by hand. The VM integrations manager already delivers reviewed guest features to existing VMs, so deliver the battery with it. Add a battery component to the integration bundle. It carries the retrofit script, the DKMS sources and the bridge files, and runs the script with --source pointing at the staged bundle. The managed files include the DKMS sources at the factory package's path, so a guest built with the battery already reports current. When the files are current and the module is built for the running kernel, installation records the component without rerunning the script, leaving package-owned files alone. The module needs DKMS and headers for the running kernel. Images before v0.3.0 have neither, and after a kernel update the headers match the new kernel until a restart. In those cases the component reports disabled rather than repair, the review names the reason, and installation skips it without failing the other integrations. The host accepted only bootstrap and sudo as components it installs, and rejected a report naming battery as invalid. Accept battery and treat it as supported, so a guest with the earlier sudo-only bundle is offered the update and a guest with battery reports up to date. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HTMdXGJ5j4UcAVdNtQLW4y
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.
What changed and why
Existing VMs keep their disk across app updates, so after #220 they get the battery port but not the guest module and bridge. The only way to add them has been to stage eight repo files through the shared folder and run
install-battery-into-existing-guest.shby hand. The VM integrations manager from #193 already delivers reviewed guest features to existing VMs, so this delivers the battery through it. VM integrations → Review… now installs the Mac battery mirror along with sudo Touch ID support.--sourcepointing at the staged, verified bundle./usr/src/try-omarchy-battery-1.0.0/), so a guest built with the battery reports current. When the files are current anddkms statusshows the module built for the running kernel, installation records the component without rerunning the script, leaving the package-owned files untouched.disabledinstead ofrepair, the review names the reason, and installation skips it without failing Touch ID.GuestIntegrationReportrejected any report naming a component outside its allowed list, and treated anything beyondbootstrap/sudoas "use matching app". It now acceptsbatteryas a supported component, so a guest with the earlier sudo-only bundle is offered the update and a guest with the battery reports up to date.docs/host-battery.mdnow points to VM integrations for retrofitting, keeping the shared-folder route as a fallback;docs/integration-updates.mdand the README list the battery.Testing
make test: passed. New Python tests cover: the bundle carrying every file the installer stages; the version and path matching the factory DKMS package;disabledversusrepairstatus; each unavailable reason; the installer running from the staged bundle; skipping an unbuildable battery; and keeping an installed one without rerunning the script. New Swift tests cover decoding and summarising reports that includebattery, and offering the update to a sudo-only guest.git diff --check: clean.make buildfrom this commit (fresh guest image; the guest build needed a local-only package-lock refresh because Arch Linux ARM has moved past several pins onmain, which is not part of this PR).sudo: already verified; retained.andbattery: already verified; retained.disabledpath (image before v0.3.0, or a kernel update without a restart), and a fresh image reporting up to date without setup. These are covered by the unit tests above.🤖 Generated with Claude Code
https://claude.ai/code/session_01HTMdXGJ5j4UcAVdNtQLW4y