-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Tooling] Configuring default paths by environment variable #30790
Comments
chip-tool already has a way to set its temp path... The interactive history should just be using that setting instead of hardcoding |
…directory. Addresses part of project-chip#30790
…directory. Addresses part of project-chip#30790
…directory. (#30803) Addresses part of #30790 Co-authored-by: Andrei Litvin <[email protected]>
It would be nice if this was an argument similar to the --KVS so we can pass it when starting the application. Or just simply use the same directory that we pass via --KVS. |
@bzbarsky-apple any chance you could look into this? |
I fixed chip-tool to store its history in the same place it stores its other data: see the PR above. Past that, I do not have the bandwidth to look into the Linux-specific bits right now, especially since I have no convenient way to compile/test them. |
Reproduction steps / Feature
The applications built with the SDK inherit several default paths, such as for local state and KVS. These can only be modified in source or via build flags. This is problematic because the target file structure and permissions need to be assumed during build time. Moreover, it makes it impossible to use an application by different users on the same host (since they'll end up sharing the same state and KVS).
Example macros which can be overridden during compilation:
connectedhomeip/src/platform/Linux/CHIPLinuxStorage.h
Lines 47 to 59 in 2a4a2ca
connectedhomeip/src/platform/Linux/CHIPPlatformConfig.h
Lines 69 to 71 in 2a4a2ca
Chip Tool's interactive history path (no macro):
connectedhomeip/examples/chip-tool/commands/interactive/InteractiveCommands.cpp
Line 26 in 2a4a2ca
The request is to make such paths configurable via environment variables, rather than macros. This way, the paths can be adjusted per use case on runtime. It also simplifies development and testing because it allows maintaining multiple states for each applications (e.g. Chip Tool).
In all above cases, only the parent directory (
/tmp
) needs to become configurable, so I suppose a single macro can define it globally and an environment variable can be used to override the whole storage path directory.Platform
core (please add to version below)
Platform Version(s)
No response
Type
Manually tested with SDK
(Optional) If manually tested please explain why this is only manually tested
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: