stages/bootc.install-to-filesystem: parametrize stateroot value
This adds an extra option to make the stateroot name customizable. Fixes https://github.com/osbuild/osbuild/issues/2151
This commit is contained in:
parent
60ec19f692
commit
825045a914
2 changed files with 9 additions and 6 deletions
|
|
@ -43,6 +43,9 @@ def main(options, inputs, paths):
|
||||||
target_imgref = options.get("target-imgref")
|
target_imgref = options.get("target-imgref")
|
||||||
if target_imgref:
|
if target_imgref:
|
||||||
pargs.extend(["--target-imgref", target_imgref])
|
pargs.extend(["--target-imgref", target_imgref])
|
||||||
|
stateroot = options.get("stateroot")
|
||||||
|
if stateroot:
|
||||||
|
pargs.extend(["--stateroot", stateroot])
|
||||||
# add target and go
|
# add target and go
|
||||||
pargs.append(dst)
|
pargs.append(dst)
|
||||||
subprocess.run(pargs, env=env, check=True)
|
subprocess.run(pargs, env=env, check=True)
|
||||||
|
|
|
||||||
|
|
@ -7,16 +7,12 @@
|
||||||
"mounted in the \"mounts\" path.",
|
"mounted in the \"mounts\" path.",
|
||||||
"Buildhost commands used: bootc"
|
"Buildhost commands used: bootc"
|
||||||
],
|
],
|
||||||
"capabilities": [
|
"capabilities": ["CAP_MAC_ADMIN"],
|
||||||
"CAP_MAC_ADMIN"
|
|
||||||
],
|
|
||||||
"schema_2": {
|
"schema_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"required": [
|
"required": ["images"],
|
||||||
"images"
|
|
||||||
],
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"images": {
|
"images": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
@ -44,6 +40,10 @@
|
||||||
"target-imgref": {
|
"target-imgref": {
|
||||||
"description": "Specify the image to fetch for subsequent updates",
|
"description": "Specify the image to fetch for subsequent updates",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"stateroot": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The stateroot name to use. If not specified, defer to bootc's default"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue