Skip to content
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

Add a user defined rules/config file not tracked by git #5325

Merged
merged 1 commit into from
Sep 10, 2020

Conversation

Staphylo
Copy link
Collaborator

@Staphylo Staphylo commented Sep 5, 2020

- Why I did it

This change introduces the rules/config.user file.
Since this path is tracked by .gitignore, it provides a mean to change
the configuration of a sonic build without dirtying the git tree.

- How I did it

This configuration gets loaded after rules/config as a mean to override default values.
Thus it allows the default configuration to grow with new default values without having
to track each and single one of them when one generates a configuration.
If the rules/config.user configuration file does not exists this step is ignored.

- How to verify it

Here is an example of the use of rules/config.user

echo DEFAULT_PASSWORD=password > rules/config.user

You should now see the new password being displayed when running a make operation.
Running git status should not show any files in the dirty section nor in the not staged section.

- Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006

- Description for the changelog

Add a user defined rules/config.user file not tracked by git

This change introduce the rules/config.user file.
It gets loaded after rules/config as a mean to override default values.
If the configuration file does not exists this step is ignored.
Since this path is tracked by .gitignore, it provides a mean to change
the configuration of sonic build without dirtying the git tree.

Signed-off-by: Samuel Angebault <staphylo@arista.com>
@jleveque
Copy link
Contributor

jleveque commented Sep 9, 2020

@Staphylo: Can you please add a bit more information to the description as to how the rules/config.user is used?

@Staphylo
Copy link
Collaborator Author

Staphylo commented Sep 9, 2020

Thanks for the review Joe.
I just updated the description. Let me know if that's enough.

Copy link
Contributor

@jleveque jleveque left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@lguohan lguohan merged commit 7e2fa7d into sonic-net:master Sep 10, 2020
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
…ic-net#5325)

This change introduce the rules/config.user file.
It gets loaded after rules/config as a mean to override default values.
If the configuration file does not exists this step is ignored.
Since this path is tracked by .gitignore, it provides a mean to change
the configuration of sonic build without dirtying the git tree.

Signed-off-by: Samuel Angebault <staphylo@arista.com>
@Staphylo Staphylo deleted the master-rules-user branch December 6, 2022 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants