org.osbuild.mkfs.ext4: Add verity option to
This allows enabling the ext4 "verity" feature (which is currently default to off). This will be needed in the automotive work we're doing. Signed-off-by: Alexander Larsson <alexl@redhat.com>
This commit is contained in:
parent
4add41d50f
commit
3343696a7b
1 changed files with 11 additions and 0 deletions
|
|
@ -37,6 +37,10 @@ SCHEMA_2 = r"""
|
|||
"description": "Label for the file system",
|
||||
"type": "string",
|
||||
"maxLength": 16
|
||||
},
|
||||
"verity": {
|
||||
"description": "Enable fs-verity support",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -48,11 +52,18 @@ def main(devices, options):
|
|||
|
||||
uuid = options["uuid"]
|
||||
label = options.get("label")
|
||||
verity = options.get("verity")
|
||||
opts = []
|
||||
|
||||
if label:
|
||||
opts = ["-L", label]
|
||||
|
||||
if verity is not None:
|
||||
if verity:
|
||||
opts += ["-O", "verity"]
|
||||
else:
|
||||
opts += ["-O", "^verity"]
|
||||
|
||||
subprocess.run(["mkfs.ext4", "-U", uuid] + opts + [device],
|
||||
encoding='utf8', check=True)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue