]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Don't require sbsigntools for secure boot auto enroll unless required
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 16 Nov 2024 14:49:03 +0000 (15:49 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 17 Nov 2024 16:29:49 +0000 (17:29 +0100)
If bootctl 257 or newer is installed, we don't use sbsigntools anymore
so don't require it in that case.

mkosi/__init__.py

index 928a973db5a297ef16f1e64495157943c39c2f1e..fec4cf2dc29a7a021db45261edd0b9fe3065ece5 100644 (file)
@@ -2631,7 +2631,15 @@ def check_tools(config: Config, verb: Verb) -> None:
                 reason="sign verity roothash signature with OpenSSL engine",
             )
 
-        if want_efi(config) and config.secure_boot and config.secure_boot_auto_enroll:
+        if (
+            want_efi(config)
+            and config.secure_boot
+            and config.secure_boot_auto_enroll
+            and (
+                not config.find_binary("bootctl")
+                or systemd_tool_version("bootctl", sandbox=config.sandbox) < "257~devel"
+            )
+        ):
             check_tool(config, "sbsiglist", reason="set up systemd-boot secure boot auto-enrollment")
             check_tool(config, "sbvarsign", reason="set up systemd-boot secure boot auto-enrollment")