fix: make root Bun installs accessible to systemd - #35
Open
omglazrgunpewpew wants to merge 2 commits into
Open
Conversation
omglazrgunpewpew
force-pushed
the
fix/root-bun-service-path
branch
from
July 16, 2026 08:29
9fc3593 to
a79ce9f
Compare
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
Root Linux installs could create
/usr/local/bin/bunas a symlink to/root/.bun/bin/bunwhile the systemd service runs as the unprivilegedhivekeepuser. When/rootis mode0700, systemd cannot traverse that path and the service fails with203/EXEC.This change gives root Linux installs a fixed managed Bun location at
/usr/local/lib/hivekeep/bun, verifies the selected executable as the service user, and copies an inaccessible Bun into that managed location without changing the legacy/usr/local/bin/bunlink. The generated unit uses the verified absolute executable, receives the matching Bun directory inPATH, and resets a failed unit before starting so a repaired install is not blocked by systemd's start limit.The installer also persists the verified root runtime in root-owned metadata, uses that metadata for root diagnostics, and runs Bun probes as
hivekeepwith a minimal environment. Non-root installs keep their normal user-local Bun behavior.For existing v1.9 installs affected by #34, rerun the updated installer after this change is available. An updater process that started from the old installer cannot repair itself during that same run because it continues executing the old script.
Type of Change
Related Issues
Fixes #34
How to Test
bun test)Validation completed:
sudo bash tests/install-bun-path.sh: all 14 installer regression cases passedbash -n install.sh tests/install-bun-path.sh docker/entrypoint.shshellcheck -S error install.sh tests/install-bun-path.shbun run typecheckbun run builddaemon-reloadalone does not clearStart request repeated too quickly; the service creation path now resets the failed state before starting, with command-order regression coverageChecklist
bun run build)tsc --noEmit)useTranslation()with keys in bothen.jsonandfr.jsonsrc/shared/types.ts, shared constants insrc/shared/constants.ts