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

[Backport 2.28] Use config.py as a module in depends.py #7104

Merged
merged 6 commits into from
Mar 2, 2023

Conversation

AndrzejKurek
Copy link
Contributor

This is a backport of #6493.
depends.py now uses config.py to get the available configuration options as well as manipulate the config file.
Straightforward backport, the only conflicts were due to the surrounding code using config.h instead of mbedtls_config.h.

Andrzej Kurek and others added 5 commits February 15, 2023 05:42
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
Requested config option can be either boolean or a string.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
As suggested by gilles-peskine-arm.

Co-authored-by: Gilles Peskine <gilles.peskine@arm.com>
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
As suggested by gilles-peskine-arm.

Co-authored-by: Gilles Peskine <gilles.peskine@arm.com>
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
@AndrzejKurek AndrzejKurek added needs-review Every commit must be reviewed by at least two team members, needs-ci Needs to pass CI tests component-test Test framework and CI scripts labels Feb 15, 2023
Copy link
Contributor

@gilles-peskine-arm gilles-peskine-arm 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, but I just noticed the CI has seen something I haven't, apparently something needs to change in the backport.

"""Set/unset a configuration option, optionally specifying a value.
value can be either True/False (set/unset config option), or a string,
which will make a symbol defined with a certain value."""
if not option_exists(conf, option):
Copy link
Contributor

Choose a reason for hiding this comment

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

depends.py in 2.28 currently relies on being able to unset an option that doesn't exist.

depends.py: Symbol MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT was not found in include/mbedtls/config.h

I think it would be best to remove the A64 symbols from the 2.28 version of the file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Another good side of reusing well prepared scripts :)

@gilles-peskine-arm gilles-peskine-arm added needs-work and removed needs-review Every commit must be reviewed by at least two team members, labels Feb 15, 2023
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
@AndrzejKurek AndrzejKurek added needs-review Every commit must be reviewed by at least two team members, and removed needs-ci Needs to pass CI tests labels Feb 17, 2023
Copy link
Contributor

@gilles-peskine-arm gilles-peskine-arm 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 both me and CI now.

Copy link
Contributor

@mprse mprse left a comment

Choose a reason for hiding this comment

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

Backport consistent with the original PR.

LGTM

@mprse mprse added approved Design and code approved - may be waiting for CI or backports and removed needs-review Every commit must be reviewed by at least two team members, labels Mar 1, 2023
@gilles-peskine-arm gilles-peskine-arm merged commit 2b810e3 into Mbed-TLS:mbedtls-2.28 Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Design and code approved - may be waiting for CI or backports component-test Test framework and CI scripts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants