Skip to content

Conversation

@dpiparo
Copy link
Member

@dpiparo dpiparo commented Oct 26, 2025

via environment variable ROOTENV_USER_PATH.

Fixes #20132

@dpiparo dpiparo requested a review from bellenot October 26, 2025 13:13
@dpiparo dpiparo self-assigned this Oct 26, 2025
@dpiparo dpiparo requested a review from pcanal as a code owner October 26, 2025 13:13
Copy link
Collaborator

@ferdymercury ferdymercury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!
Just a couple of docu improvement suggestions.

/// case the home directory resides on an auto-mounted remote file system
/// and one wants to avoid the file system from being mounted.
/// In case the environment variable ROOTENV_USER_PATH is specified,
/// `$ROOTENV_USER_PATH/<name>` is considered instead of `$HOME/<name>`.
Copy link
Collaborator

@ferdymercury ferdymercury Oct 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// `$ROOTENV_USER_PATH/<name>` is considered instead of `$HOME/<name>`.
/// and ROOTENV_NO_HOME is not set, then
/// `$ROOTENV_USER_PATH/<name>` is considered instead of `$HOME/<name>`.
/// If you prefer avoiding environment variables, in `.bash_aliases` you could define instead
/// `alias root="root -e 'gEnv->ReadFile(\"/your/path/\", kEnvLocal);'"`
/// or create a `rootlogon.C` script where you run this statement or create a custom TEnv object.

Comment on lines 391 to 392
/// i.e.\ `$ROOTSYS/etc/system<name>` (or `ROOTETCDIR/system<name>`),
/// `$HOME/<name>` and `$PWD/<name>`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// i.e.\ `$ROOTSYS/etc/system<name>` or `ROOTETCDIR/system<name>` (kEnvGlobal),
/// `$HOME/<name>` or (kEnvUser), and `$PWD/<name>` (kEnvLocal).

export CLING_CPPSYSINCL=$(LC_ALL=C c++ -xc++ -E -v /dev/null 2>&1 | sed -n '/^.include/,${/^ \/.*++/{p}}' | tr '\n' ':' | tr ' ' ':')
```
This caching reduces sub-process creation during initialization and can be useful when multiple ROOT instances or binaries linked to ROOT are executed (less system-calls, cleaner debugging).
* It is now possible to read a configuration file (a "rootrc file") at startup instead of the one in the home directory, by specifying its full path with the `ROOTENV_USER_PATH` environment variable.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* It is now possible to read a configuration file (a "rootrc file") at startup instead of the one in the home directory, by specifying its full path with the `ROOTENV_USER_PATH` environment variable.
* It is now possible to read a user configuration file (a "rootrc file") at startup in a custom path instead of the one in the home directory, by specifying its full path with the `ROOTENV_USER_PATH` environment variable.

@github-actions
Copy link

github-actions bot commented Oct 26, 2025

Test Results

    22 files      22 suites   3d 16h 1m 58s ⏱️
 3 702 tests  3 702 ✅ 0 💤 0 ❌
79 490 runs  79 490 ✅ 0 💤 0 ❌

Results for commit 6fe9cd6.

♻️ This comment has been updated with latest results.

via environment variable ROOTENV_USER_PATH.

Fixes root-project#20132
@dpiparo dpiparo force-pushed the custom_rootrc_path branch from 5311b1a to 6fe9cd6 Compare October 26, 2025 18:51
@dpiparo
Copy link
Member Author

dpiparo commented Oct 26, 2025

Thanks for the comments. All integrated, almost as formulated. Last round of tests.

@dpiparo dpiparo merged commit a5d2f7c into root-project:master Oct 27, 2025
26 of 27 checks passed
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.

Look for .rootrc in a custom dir

2 participants