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 command to print merged configuration #446

Merged
merged 1 commit into from
Nov 30, 2022

Conversation

ZoltanFridrich
Copy link
Contributor

@ZoltanFridrich ZoltanFridrich commented Nov 28, 2022

Add an option to dump merged configuration to standard output. Currently its a draft which uses test configs as an input.

Closes #395

Signed-off-by: Zoltan Fridrich [email protected]

@ZoltanFridrich ZoltanFridrich force-pushed the zfridric_devel2 branch 4 times, most recently from b89d25d to 55d53c1 Compare November 29, 2022 13:57
@coveralls
Copy link

coveralls commented Nov 29, 2022

Coverage Status

Coverage decreased (-0.07%) to 71.27% when pulling 5facf24 on ZoltanFridrich:zfridric_devel2 into 5056a43 on p11-glue:master.

p11-kit/meson.build Outdated Show resolved Hide resolved
p11-kit/Makefile.am Outdated Show resolved Hide resolved
@ZoltanFridrich
Copy link
Contributor Author

ZoltanFridrich commented Nov 30, 2022

@ueno is the output format ok?
Current demo output looks like this:

$p11-kit print-config
p11-kit: invalid config filename, will be ignored in the future: /home/zfridric/upstream/p11-kit/p11-kit/fixtures/system-modules/two.badname
[global]
key3 = user3
key2 = user2
key1 = system1
user-config = merge
[two.badname]
setting = system2
module = mock-two.so
[six]
priority = 100
enable-in = test-proxy
module = mock-six.so
[four]
priority = 4
disable-in = test-disable, test-other
trust-policy = no
module = mock-four.so
[seven]
critical = yes
enable-in = test-modules
module = mock-seven.so
[two-duplicate]
module = mock-two.so
[one]
managed = yes
number = 33
setting = user1
trust-policy = yes
module = mock-one.so
[three]
priority = 3
setting = user3
enable-in = test-enable
module = mock-three.so

@ueno
Copy link
Member

ueno commented Nov 30, 2022

@ueno is the output format ok?

Looks good to me as the default (human readable) output. Eventually, we could support a structured format (e.g., JSON, TOML, etc.) with schema validation, that could be through a new option, e.g., --format=json.

@ueno ueno merged commit a8fad54 into p11-glue:master Nov 30, 2022
@ueno
Copy link
Member

ueno commented Nov 30, 2022

Thanks!

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.

Add ability to dump the merged configuration
4 participants