Skip to content

Commit

Permalink
Check against 257~devel instead of 257
Browse files Browse the repository at this point in the history
Otherwise the new --secure-boot-auto-enroll= option isn't used with
devel and rc versions of systemd bootctl.
  • Loading branch information
DaanDeMeyer committed Nov 17, 2024
1 parent 3d44b68 commit 43c8996
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mkosi/bootloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ def install_systemd_boot(context: Context) -> None:
bootctlver = systemd_tool_version("bootctl", sandbox=context.sandbox)

if want_bootctl_auto_enroll := (
context.config.secure_boot and context.config.secure_boot_auto_enroll and bootctlver >= 257
context.config.secure_boot and context.config.secure_boot_auto_enroll and bootctlver >= "257~devel"
):
cmd += ["--secure-boot-auto-enroll=yes"]

Expand All @@ -804,7 +804,7 @@ def install_systemd_boot(context: Context) -> None:
context.root / shim_second_stage_binary(context),
)

if context.config.secure_boot and context.config.secure_boot_auto_enroll and bootctlver < 257:
if context.config.secure_boot and context.config.secure_boot_auto_enroll and bootctlver < "257~devel":
assert context.config.secure_boot_key
assert context.config.secure_boot_certificate

Expand Down

0 comments on commit 43c8996

Please sign in to comment.