-
Notifications
You must be signed in to change notification settings - Fork 359
Allow to override /etc dir location #6163
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
base: master
Are you sure you want to change the base?
Conversation
Some systems, e.g. FreeBSD, place third-part software configuration files in /usr/local/etc instead of /etc. Extend the install command to accept "etcprefix" option used for global configuration paths. By default it's "/", so it keeps the current behaviour unchanged. Signed-off-by: Roman Bogorodskiy <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @novel,
Thanks for raising and addressing this issue. Unfortunately, I see a few blockers in your implementation, but also a better way to solve this issue.
The path for the system-wide configuration files are defined in avocado/core/settings.py
. We can either add a precedence of /usr/local
if the systems you mention really do not use /etc
for configuration, OR, we can implement a Settings
plugin which contains a adjust_settings_path()
implementation that adds usr/local
to the path.
Let me know if you need help pursuing these options.
Thanks!
Thanks for the response!
FreeBSD does use /etc for configuration, but only for a base system configuration. Third party software configuration should be in /usr/local/etc. More details about that: https://man.freebsd.org/cgi/man.cgi?hier(7) Regarding the change, I think I'm modifying Plugin is an interesting idea, I didn't think about doing it this way. Though, IIUC, that's of a runtime solution rather then install-time tunable. I think I don't have use cases right now to change that in runtime, not sure about others.
|
That's enough to make Avocado (under FreeBSD at least) to look for configuration in
I'm not sure I got what you meant here. I'll write a patch with the Thanks!
|
I mean, there are two approaches to address that:
Generally, both ways work for me. |
Some systems, e.g. FreeBSD, place third-part software configuration files in /usr/local/etc instead of /etc.
Extend the install command to accept "etcprefix" option used for global configuration paths. By default it's "/", so it keeps the current behaviour unchanged.