cmdline += ["--key-file", workdir(context.config.passphrase)]
options += ["--ro-bind", context.config.passphrase, workdir(context.config.passphrase)]
if context.config.verity_key:
- key = workdir(context.config.verity_key) if context.config.verity_key.exists() else context.config.verity_key
- cmdline += ["--private-key", str(key)]
if context.config.verity_key_source.type != KeySourceType.file:
cmdline += ["--private-key-source", str(context.config.verity_key_source)]
if context.config.verity_key.exists():
+ cmdline += ["--private-key", workdir(context.config.verity_key)]
options += ["--ro-bind", context.config.verity_key, workdir(context.config.verity_key)]
+ else:
+ cmdline += ["--private-key", context.config.verity_key]
if context.config.verity_certificate:
cmdline += ["--certificate", workdir(context.config.verity_certificate)]
options += ["--ro-bind", context.config.verity_certificate, workdir(context.config.verity_certificate)]
):
cmd: list[PathString] = [
"sbsign",
- "--key", workdir(context.config.secure_boot_key),
"--cert", workdir(context.config.secure_boot_certificate),
"--output", workdir(output),
]
if context.config.secure_boot_key_source.type == KeySourceType.engine:
cmd += ["--engine", context.config.secure_boot_key_source.source]
if context.config.secure_boot_key.exists():
+ cmd += ["--key", workdir(context.config.secure_boot_key)]
options += ["--ro-bind", context.config.secure_boot_key, workdir(context.config.secure_boot_key)]
+ else:
+ cmd += ["--key", workdir(context.config.secure_boot_key)]
cmd += [workdir(input)]
run(
cmd,
"sbvarsign",
"--attr",
"NON_VOLATILE,BOOTSERVICE_ACCESS,RUNTIME_ACCESS,TIME_BASED_AUTHENTICATED_WRITE_ACCESS",
- "--key", workdir(context.config.secure_boot_key),
"--cert", workdir(context.config.secure_boot_certificate),
"--output", workdir(keys / f"{db}.auth"),
]
if context.config.secure_boot_key_source.type == KeySourceType.engine:
cmd += ["--engine", context.config.secure_boot_key_source.source]
if context.config.secure_boot_key.exists():
+ cmd += ["--key", workdir(context.config.secure_boot_key),]
options += [
"--ro-bind", context.config.secure_boot_key, workdir(context.config.secure_boot_key),
]
+ else:
+ cmd += ["--key", context.config.secure_boot_key]
cmd += [db, workdir(context.workspace / "mkosi.esl")]
run(
cmd,