diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-12-08 15:11:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-08 15:11:18 +0100 |
commit | a5799902771dd8601dd933afae6cb6b5307a5d0e (patch) | |
tree | ab3d9adedec3dffddb368984eac6010d5330d25d /meson.build | |
parent | cryptsetup: retry TPM2 unseal operation if it fails with TPM2_RC_PCR_CHANGED (diff) | |
parent | ukify: allow multiple initrds (diff) | |
download | systemd-a5799902771dd8601dd933afae6cb6b5307a5d0e.tar.xz systemd-a5799902771dd8601dd933afae6cb6b5307a5d0e.zip |
Merge pull request #25180 from keszybz/ukify
ukify: add helper to create UKIs
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 08c9c842ab..1ddb42993a 100644 --- a/meson.build +++ b/meson.build @@ -716,6 +716,17 @@ if run_command(python, '-c', 'import jinja2', check : false).returncode() != 0 error('python3 jinja2 missing') endif +python_310 = run_command(python, '-c', + 'import sys; sys.exit(0 if sys.version_info >= (3,10) else 1)', + check : false).returncode() == 0 +if get_option('ukify') == 'auto' + want_ukify = python_310 +elif get_option('ukify') == 'true' and not python310 + error('ukify requires Python >= 3.10') +else + want_ukify = get_option('ukify') == 'true' +endif + ############################################################ gperf = find_program('gperf') @@ -2191,6 +2202,7 @@ subdir('src/test') subdir('src/fuzz') subdir('rules.d') subdir('test') +subdir('src/ukify/test') # needs to be last for test_env variable ############################################################ @@ -2587,7 +2599,7 @@ if conf.get('HAVE_BLKID') == 1 and conf.get('HAVE_GNU_EFI') == 1 boot_link_with = [libsystemd_static, libshared_static] endif - public_programs += executable( + exe = executable( 'bootctl', 'src/boot/bootctl.c', include_directories : includes, @@ -2596,6 +2608,14 @@ if conf.get('HAVE_BLKID') == 1 and conf.get('HAVE_GNU_EFI') == 1 versiondep], install_rpath : rootpkglibdir, install : true) + public_programs += exe + + if want_tests != 'false' + test('test-bootctl-json', + test_bootctl_json_sh, + args : exe.full_path(), + depends : exe) + endif public_programs += executable( 'systemd-bless-boot', @@ -4008,6 +4028,18 @@ if want_tests != 'false' and want_kernel_install args : [exe.full_path(), loaderentry_install]) endif +if want_ukify + exe = custom_target( + 'ukify', + input : 'src/ukify/ukify.py', + output : 'ukify', + command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'], + install : true, + install_mode : 'rwxr-xr-x', + install_dir : rootlibexecdir) + public_programs += exe +endif + ############################################################ runtest_env = custom_target( |