Skip to content

fix: allow rootless install and demo --force-procfs (#648)#653

Draft
jenish-25 wants to merge 1 commit into
Tracer-Cloud:mainfrom
jenish-25:fix/rootless-install-648
Draft

fix: allow rootless install and demo --force-procfs (#648)#653
jenish-25 wants to merge 1 commit into
Tracer-Cloud:mainfrom
jenish-25:fix/rootless-install-648

Conversation

@jenish-25

Copy link
Copy Markdown

What & why

Closes part of #648. The daemon already supports rootless operation via tracer init --force-procfs, but the installer and tracer demo never caught up — a non-root user (laptop, codespace, rootless container) is hard-gated at the env-check before the binary ever lands on disk, even though the runtime would support them.

⚠️ Draft / coordination: @WatchTree-19 filed #648 and offered to take all four parts. I picked it up as a first contribution — happy to hand off, split, or combine if you're already on it. cc @VaibhavUpreti @tiagonix

Changes

Installer (tracer-installer)

  • Root check is now advisory instead of fatal, via a new InstallCheck::is_required() (defaults to true; RootCheck overrides to false). Non-root users see a WARNING and the install continues.
  • Non-root installs now target ~/.local/bin/tracer instead of /usr/local/bin — the same location the updater already probes (update/updater.rs). Root installs are unchanged (/usr/local/bin).
  • Post-install "Next steps" now prints the real install path and a rootless tracer init --force-procfs hint, replacing the stale ~/.tracerbio/bin/tracer chown/chmod block (that was a third, nonexistent path).

CLI (tracer)

  • tracer demo gains --force-procfs, propagated into the init args. The flag was already documented in demo --help-advanced but not wired to a struct field, so it errored with unexpected argument. Now it works.

Docs

  • README documents the rootless (--force-procfs) path for both init and demo.

On part 2 of the issue (--interactive-prompts none hang)

Already fixed on main — the auth path exits non-zero without prompting. Verified with the issue's exact repro:

$ tracer init --force-procfs --interactive-prompts none --pipeline-name x
Unable to log in automatically. Please open https://.../ and copy your init code here.
$ echo $?
1

So no change was needed there.

Testing

  • New unit tests (TDD): install-dir selection (root vs. ~/.local/bin vs. no-home error), RootCheck is advisory, post-install setup_command, and demo --force-procfs propagation.
  • Runtime-verified on macOS: tracer demo --force-procfs --help-advanced now parses (exit 0); an unknown flag still errors; the init repro above exits 1 fast.
  • cargo fmt -- --check, cargo clippy --all-targets -- -D warnings, and the changed-crate test suites all pass on the pinned toolchain (1.91.1).

Open question for maintainers

tracer info shows tracer login && tracer init while the README leads with sudo tracer init --token …. #648 flags this as a fourth inconsistency. I left tracer info untouched to avoid changing product copy unilaterally — happy to align it either way if you have a preferred happy path.

The daemon already supports rootless operation via `tracer init
--force-procfs`, but the installer and `tracer demo` never caught up, so
non-root users were hard-gated before the binary ever landed on disk.

- Installer root check is now advisory (`InstallCheck::is_required`)
  rather than fatal; a non-root user gets a WARNING instead of an abort.
- Non-root installs now go to `~/.local/bin/tracer` (matching the path
  the updater already knows about) instead of `/usr/local/bin`.
- `tracer demo` gains `--force-procfs`, propagated into the init args,
  so rootless users can run the demo (the flag was already documented in
  `--help-advanced` but not wired up).
- Post-install "Next steps" now shows the real install path and a
  rootless `tracer init --force-procfs` hint, replacing the stale
  `~/.tracerbio/bin/tracer` chown/chmod block.
- README documents the rootless (`--force-procfs`) path for init/demo.

Part 2 of the issue (`--interactive-prompts none` hang) is already
fixed on main: the auth path exits non-zero without prompting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant