From a06d62f27af3ff5ebfd18611ceebb6727da855cc Mon Sep 17 00:00:00 2001 From: n80fr1n60 Date: Mon, 24 Feb 2025 03:59:54 -0800 Subject: [PATCH 1/2] conditionally remove tests from cross build --- src/luks/meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/luks/meson.build b/src/luks/meson.build index 8a8394e0..adccfdf3 100644 --- a/src/luks/meson.build +++ b/src/luks/meson.build @@ -71,4 +71,7 @@ else endif # Tests. -subdir('tests') + +if not meson.is_cross_build() + subdir('tests') +endif From 5964194c2571cb828c7d631e5953430924d7f63c Mon Sep 17 00:00:00 2001 From: n80fr1n60 Date: Mon, 3 Mar 2025 05:04:51 -0800 Subject: [PATCH 2/2] excluded tests from cross builds --- src/pins/pkcs11/meson.build | 5 ++++- src/pins/tang/meson.build | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pins/pkcs11/meson.build b/src/pins/pkcs11/meson.build index b09fd8f8..95182e9e 100644 --- a/src/pins/pkcs11/meson.build +++ b/src/pins/pkcs11/meson.build @@ -26,7 +26,10 @@ if pcscd.found() and pkcs11tool.found() mans += join_paths(meson.current_source_dir(), 'clevis-encrypt-pkcs11.1') ### TODO: Include man pages # mans += join_paths(meson.current_source_dir(), 'clevis-decrypt-pkcs11.1') - subdir('tests') + if not meson.is_cross_build() + subdir('tests') + endif + threads_dep = dependency('threads', required: true) executable('clevis-pkcs11-afunix-socket-unlock', ['clevis-pkcs11-afunix-socket-unlock.c'], dependencies: threads_dep, diff --git a/src/pins/tang/meson.build b/src/pins/tang/meson.build index 902165cd..99799027 100644 --- a/src/pins/tang/meson.build +++ b/src/pins/tang/meson.build @@ -1,11 +1,13 @@ curl = find_program('curl', required: false) -if curl.found() +if curl.found() or meson.is_cross_build() bins += join_paths(meson.current_source_dir(), 'clevis-decrypt-tang') bins += join_paths(meson.current_source_dir(), 'clevis-encrypt-tang') mans += join_paths(meson.current_source_dir(), 'clevis-encrypt-tang.1') +if not meson.is_cross_build() subdir('tests') +endif else warning('Will not install tang pin due to missing dependencies!') endif