From: Daan De Meyer Date: Mon, 27 May 2024 09:24:43 +0000 (+0200) Subject: meson: Add genkey target X-Git-Tag: v256-rc4~113^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2189b3268d3843f5ea828de2bbdf0ea2bce45b6b;p=thirdparty%2Fsystemd.git meson: Add genkey target Let's automatically generate keys instead of requiring developers to do it manually. --- diff --git a/meson.build b/meson.build index e071d58e11f..738fb0b17f5 100644 --- a/meson.build +++ b/meson.build @@ -2620,6 +2620,12 @@ foreach executable : ['systemd-journal-remote', 'systemd-measure'] endforeach if mkosi.found() + genkey = custom_target('genkey', + output : ['mkosi.key', 'mkosi.crt'], + command : [mkosi, 'genkey'], + depends : mkosi_depends, + ) + custom_target('mkosi', build_always_stale : true, build_by_default: false, @@ -2631,10 +2637,14 @@ if mkosi.found() '--output-dir', meson.current_build_dir() / 'mkosi.output', '--cache-dir', meson.current_build_dir() / 'mkosi.cache', '--build-dir', meson.current_build_dir() / 'mkosi.builddir', + '--secure-boot-key', meson.current_build_dir() / 'mkosi.key', + '--secure-boot-certificate', meson.current_build_dir() / 'mkosi.crt', + '--verity-key', meson.current_build_dir() / 'mkosi.key', + '--verity-certificate', meson.current_build_dir() / 'mkosi.crt', '--force', 'build', ], - depends : mkosi_depends, + depends : mkosi_depends + [genkey], ) endif