Skip to content

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

Merged
lguohan merged 1 commit intosonic-net:masterfrom
Staphylo:master-rules-user
Sep 10, 2020
Merged

Add a user defined rules/config file not tracked by git#5325
lguohan merged 1 commit intosonic-net:masterfrom
Staphylo:master-rules-user

Conversation

@Staphylo
Copy link
Copy Markdown
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 <[email protected]>
@jleveque
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@jleveque jleveque requested review from lguohan and yxieca September 9, 2020 19:03
@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 <[email protected]>
@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