Skip to content

fix(server): honor relocated systemd user configuration - #5

Closed
voltcrash wants to merge 1 commit into
mainfrom
voltcrash/systemd-xdg-unit-path
Closed

voltcrash wants to merge 1 commit into
mainfrom
voltcrash/systemd-xdg-unit-path

Conversation

@voltcrash

@voltcrash voltcrash commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

This PR was opened against the wrong repository. The upstream replacement is pingdotgg#29244.

Linux boot-service setup writes outside systemd's search path when its XDG configuration directory is relocated. The installer shell can also disagree with the running user manager about that directory.

Resolve the unit directory from the destination systemd user manager's UnitPath, using the existing busctl JSON pattern so paths with spaces survive. All lifecycle operations share that directory. When the manager cannot be queried, fall back to an absolute XDG_CONFIG_HOME or HOME/.config.

Proof: the relocated-XDG regression failed before the fix; the existing lifecycle test now covers default/empty/relative/relocated roots, both shell/manager mismatch directions, and lookup failure. A read-only runtime probe confirmed the resolved path matches the live manager for four caller environments on Linux arm64 with 16 KiB pages. No real service was installed or enabled; x86_64 was not tested.

Validation: flock /tmp/t3-linux-audit-heavy-checks.lock vp run check:changed origin/main --concurrency 1 passed (format, lint, both Knip passes, GraphQL generation, affected typechecks, and 42 tests). The focused seven-case lifecycle run also passed with --maxWorkers 1.

Runtime transcript (manager queried through busctl --user --json=short get-property … UnitPath; BootService.make/status only):

Before: caller-derived unitPath differed from running manager -> assertion failed
After:
unset: matches running manager=true
empty: matches running manager=true
relative: matches running manager=true
shell-only relocation: matches running manager=true

Reviewed with review-loop: 2 rounds with Claude Opus 5.5 on high. Reviewer verdict: approved.

Created with GPT-6.1 Sol in the Codex harness.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Nov 2, 2026
@voltcrash voltcrash closed this Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant