]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Check against 257~devel instead of 257
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 17 Nov 2024 12:18:42 +0000 (13:18 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 17 Nov 2024 12:22:37 +0000 (13:22 +0100)
Otherwise the new --secure-boot-auto-enroll= option isn't used with
devel and rc versions of systemd bootctl.

mkosi/bootloader.py

index e3985d59889432b296e04deaf6a74f16d60076cd..a11e3aeb432ab7324174049bfea165df2d773e6f 100644 (file)
@@ -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"]
 
@@ -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