stages/authselect: rename profile_id option to profile

Rename the `profile_id` option to `profile` in the stage schema. This is
a follow-up to PR#696 comment after is has been merged [1].

[1] https://github.com/osbuild/osbuild/pull/696#discussion_r661253293

Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
Tomas Hozza 2021-07-15 14:26:50 +02:00 committed by Tomas Hozza
parent cc39d5a8b4
commit 7617cb9a44
3 changed files with 8 additions and 8 deletions

View file

@ -4,10 +4,10 @@ Select system identity and authentication sources with authselect.
Sets system identity and authentication sources. Sets system identity and authentication sources.
The stage calls `authselect select` to set authselect profile to 'profile_id'. The stage calls `authselect select` to set authselect profile to 'profile'.
Optionally a list of profile features to enable may be provided using 'features' Optionally a list of profile features to enable may be provided using 'features'
option. The list of available profile features can be obtained by running option. The list of available profile features can be obtained by running
`authselect list-features <profile_id>`. `authselect list-features <profile>`.
Notes: Notes:
- Requires 'chroot' in the buildroot. - Requires 'chroot' in the buildroot.
@ -23,10 +23,10 @@ import osbuild.api
SCHEMA = """ SCHEMA = """
"additionalProperties": false, "additionalProperties": false,
"required": ["profile_id"], "required": ["profile"],
"description": "Select system identity and authentication sources.", "description": "Select system identity and authentication sources.",
"properties": { "properties": {
"profile_id": { "profile": {
"type": "string", "type": "string",
"description": "Desired authselect profile to activate." "description": "Desired authselect profile to activate."
}, },
@ -43,13 +43,13 @@ SCHEMA = """
def main(tree, options): def main(tree, options):
profile_id = options["profile_id"] profile = options["profile"]
features = options.get("features", []) features = options.get("features", [])
cmd = [ cmd = [
"/usr/sbin/chroot", tree, "/usr/sbin/chroot", tree,
# force authselect to overwrite existing files without making a backup # force authselect to overwrite existing files without making a backup
"/usr/bin/authselect", "select", "--force", "--nobackup", profile_id "/usr/bin/authselect", "select", "--force", "--nobackup", profile
] ]
cmd.extend(features) cmd.extend(features)

View file

@ -459,7 +459,7 @@
{ {
"name": "org.osbuild.authselect", "name": "org.osbuild.authselect",
"options": { "options": {
"profile_id": "nis", "profile": "nis",
"features": [ "features": [
"with-ecryptfs", "with-ecryptfs",
"with-mkhomedir" "with-mkhomedir"

View file

@ -32,7 +32,7 @@
{ {
"name": "org.osbuild.authselect", "name": "org.osbuild.authselect",
"options": { "options": {
"profile_id": "nis", "profile": "nis",
"features": [ "features": [
"with-ecryptfs", "with-ecryptfs",
"with-mkhomedir" "with-mkhomedir"