{{ message }}
services: default to canonical Linux service labels - #23837
Merged
Conversation
Signed-off-by: Patrick Linnane <patrick@linnane.io>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Inactive legacy systemd units evade the real loaded-service probe, breaking restart-only migration.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Moves generated Linux services to canonical sh.brew.* labels while retaining legacy compatibility.
Changes:
- Defaults generated systemd services and timers to canonical labels.
- Adds restart-driven legacy migration handling and status discovery fixes.
- Updates relocation logic and regression coverage.
File summaries
Review details
- Files reviewed: 12/12 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
8 tasks
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.

Phase two of moving the default Linux service label from
homebrew.<formula>tosh.brew.<formula>, following #23792 and matching the macOS change in #23750. Generated systemd services and timers now use the canonical label for the unit filenames and the timer'sUnit=target. Legacyhomebrew.<formula>units stay discoverable and controllable, explicitname linux:labels and unrelated package-provided timer targets are unchanged, and macOS behavior is unchanged.Migration is restart-only, as on macOS:
startandrunreport a pending migration for a generated service loaded under the legacy label and point atbrew services restart, which stops and disables the legacy units, removes their files and installs the canonical ones. Bundle keeps finding the legacy service file in existing kegs.Two fixes found in review: systemd status discovery no longer lets an absent canonical unit mask a registered legacy unit that has stopped or failed, so
brew services infokeeps reporting its label, exit code and loaded file; andKeg#homebrew_created_file?now recognizes thesh.brew.prefix so canonical service files keep full-prefix relocation on/usr/local.brew benchmarkresults.brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?Claude Code (Fable 5.1) drafted the implementation and tests; I reviewed the diff, verified the new tests fail without the change and pass with it, and ran
brew lgtm --online.