fix: allow rootless install and demo --force-procfs (#648)#653
Draft
jenish-25 wants to merge 1 commit into
Draft
fix: allow rootless install and demo --force-procfs (#648)#653jenish-25 wants to merge 1 commit into
jenish-25 wants to merge 1 commit into
Conversation
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.
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.
What & why
Closes part of #648. The daemon already supports rootless operation via
tracer init --force-procfs, but the installer andtracer demonever 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.Changes
Installer (
tracer-installer)InstallCheck::is_required()(defaults totrue;RootCheckoverrides tofalse). Non-root users see aWARNINGand the install continues.~/.local/bin/tracerinstead of/usr/local/bin— the same location the updater already probes (update/updater.rs). Root installs are unchanged (/usr/local/bin).tracer init --force-procfshint, replacing the stale~/.tracerbio/bin/tracerchown/chmod block (that was a third, nonexistent path).CLI (
tracer)tracer demogains--force-procfs, propagated into the init args. The flag was already documented indemo --help-advancedbut not wired to a struct field, so it errored withunexpected argument. Now it works.Docs
--force-procfs) path for bothinitanddemo.On part 2 of the issue (
--interactive-prompts nonehang)Already fixed on
main— the auth path exits non-zero without prompting. Verified with the issue's exact repro:So no change was needed there.
Testing
~/.local/binvs. no-home error),RootCheckis advisory, post-installsetup_command, anddemo --force-procfspropagation.tracer demo --force-procfs --help-advancednow parses (exit 0); an unknown flag still errors; the init repro above exits1fast.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 infoshowstracer login && tracer initwhile the README leads withsudo tracer init --token …. #648 flags this as a fourth inconsistency. I lefttracer infountouched to avoid changing product copy unilaterally — happy to align it either way if you have a preferred happy path.