Repository navigation
[TASK-30] Services: Serve the board and maps on macOS through launchd - #55
Merged
Merged
Conversation
The board and map services only existed as systemd user units, so a Mac got a warning instead of a running board. Install now renders user LaunchAgents from services/launchd/ on Darwin, with the same planning, checks, marker and removal as on Linux: agents are loaded with launchctl bootstrap into the user's gui domain, start at login and are booted out and deleted when config.yaml no longer asks for them. Nothing changes on Linux.
A fresh review found the plist comment held '--', which XML forbids in comments, paths went into the XML unescaped, and a failed unload was reported as removed. The marker now reads 'daeshift install', paths are XML-escaped, and an agent that stays loaded after bootout fails the install with the command to run. KeepAlive now restarts only after a failure, five seconds apart, matching the systemd units. Tests assert the bootstrap calls.
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.
The board and map services only existed as systemd user units, so a
Mac got a warning instead of a running board. The developer's new
MacBook is the first macOS machine daeshift runs on.
Install now renders user LaunchAgents from services/launchd/ on
Darwin, with the same planning, checks, marker and removal as on
Linux. Agents are loaded with launchctl bootstrap into the user's gui
domain, start at login, restart five seconds after a failure, and are
booted out and deleted when config.yaml no longer asks for them.
Paths are XML-escaped, and an agent that stays loaded after a bootout
fails the install with the command to run by hand. Nothing changes on
Linux; the warning on a machine with neither service manager now
names both.
How to see it: on a Mac, add a board or map port under projects: in
~/.daeshift/local/config.yaml and run daeshift --install; the service
answers on 127.0.0.1 and survives a reboot once you log in.
Risks: launchd behavior is stubbed in the tests; the real bootstrap
path is checked by hand on this Mac after the release.