Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
project('clevis', 'c', license: 'GPL3+',
version: '23',
default_options: 'c_std=c99'
default_options: [
'c_std=c99',
'warning_level=2',
'werror=true'
]
)

libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'))
Expand All @@ -15,9 +19,6 @@ data.set('bindir', bindir)
data.set('libdir', libdir)

add_project_arguments(
'-Wall',
'-Wextra',
'-Werror',
'-Wstrict-aliasing',
'-Wchar-subscripts',
'-Wformat-security',
Expand Down
2 changes: 1 addition & 1 deletion src/bash/meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
bashcomp = dependency('bash-completion', required: false)

if bashcomp.found()
bashcompdir = bashcomp.get_pkgconfig_variable('completionsdir')
bashcompdir = bashcomp.get_variable(pkgconfig : 'completionsdir')
install_data('clevis', install_dir: bashcompdir)
else
warning('Will not install bash completion due to missing dependencies!')
Expand Down
2 changes: 1 addition & 1 deletion src/luks/dracut/clevis-pin-null/meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dracut = dependency('dracut', required: false)

if dracut.found()
dracutdir = dracut.get_pkgconfig_variable('dracutmodulesdir') + '/50' + meson.project_name() + '-pin-null'
dracutdir = dracut.get_variable(pkgconfig : 'dracutmodulesdir') + '/50' + meson.project_name() + '-pin-null'

configure_file(
input: 'module-setup.sh.in',
Expand Down
2 changes: 1 addition & 1 deletion src/luks/dracut/clevis-pin-pkcs11/meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dracut = dependency('dracut', required: false)

if dracut.found()
dracutdir = dracut.get_pkgconfig_variable('dracutmodulesdir') + '/50' + meson.project_name() + '-pin-pkcs11'
dracutdir = dracut.get_variable(pkgconfig : 'dracutmodulesdir') + '/50' + meson.project_name() + '-pin-pkcs11'

configure_file(
input: 'module-setup.sh.in',
Expand Down
2 changes: 1 addition & 1 deletion src/luks/dracut/clevis-pin-sss/meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dracut = dependency('dracut', required: false)

if dracut.found()
dracutdir = dracut.get_pkgconfig_variable('dracutmodulesdir') + '/50' + meson.project_name() + '-pin-sss'
dracutdir = dracut.get_variable(pkgconfig : 'dracutmodulesdir') + '/50' + meson.project_name() + '-pin-sss'

configure_file(
input: 'module-setup.sh.in',
Expand Down
2 changes: 1 addition & 1 deletion src/luks/dracut/clevis-pin-tang/meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dracut = dependency('dracut', required: false)

if dracut.found()
dracutdir = dracut.get_pkgconfig_variable('dracutmodulesdir') + '/50' + meson.project_name() + '-pin-tang'
dracutdir = dracut.get_variable(pkgconfig : 'dracutmodulesdir') + '/50' + meson.project_name() + '-pin-tang'

configure_file(
input: 'module-setup.sh.in',
Expand Down
2 changes: 1 addition & 1 deletion src/luks/dracut/clevis-pin-tpm1/meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dracut = dependency('dracut', required: false)

if dracut.found()
dracutdir = dracut.get_pkgconfig_variable('dracutmodulesdir') + '/50' + meson.project_name() + '-pin-tpm1'
dracutdir = dracut.get_variable(pkgconfig : 'dracutmodulesdir') + '/50' + meson.project_name() + '-pin-tpm1'

configure_file(
input: 'module-setup.sh.in',
Expand Down
2 changes: 1 addition & 1 deletion src/luks/dracut/clevis-pin-tpm2/meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dracut = dependency('dracut', required: false)

if dracut.found()
dracutdir = dracut.get_pkgconfig_variable('dracutmodulesdir') + '/50' + meson.project_name() + '-pin-tpm2'
dracutdir = dracut.get_variable(pkgconfig : 'dracutmodulesdir') + '/50' + meson.project_name() + '-pin-tpm2'

configure_file(
input: 'module-setup.sh.in',
Expand Down
2 changes: 1 addition & 1 deletion src/luks/dracut/clevis/meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dracut = dependency('dracut', required: false)

if dracut.found()
dracutdir = dracut.get_pkgconfig_variable('dracutmodulesdir') + '/50' + meson.project_name()
dracutdir = dracut.get_variable(pkgconfig : 'dracutmodulesdir') + '/50' + meson.project_name()

dracut_data = configuration_data()
dracut_data.merge_from(data)
Expand Down
2 changes: 1 addition & 1 deletion src/luks/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ clevis_luks_unbind = configure_file(input: 'clevis-luks-unbind.in',

# SystemD dependencies checked here, used both in systemd and dracut subdirs
systemd = dependency('systemd', required: false)
systemdutildir = systemd.found() ? systemd.get_pkgconfig_variable('systemdutildir', default: '') : ''
systemdutildir = systemd.found() ? systemd.get_variable(pkgconfig : 'systemdutildir', default_value: '') : ''

sd_reply_pass = find_program(
(systemdutildir != '') ? join_paths(systemdutildir, 'systemd-reply-password') : '',
Expand Down
26 changes: 13 additions & 13 deletions src/luks/tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,21 @@ common_functions = configure_file(input: 'luks-common-test-functions.in',

env = environment()
env.prepend('PATH',
join_paths(meson.source_root(), 'src'),
join_paths(meson.source_root(), 'src', 'luks'),
join_paths(meson.source_root(), 'src', 'pins', 'sss'),
join_paths(meson.source_root(), 'src', 'pins', 'tang'),
join_paths(meson.source_root(), 'src', 'pins', 'tpm1'),
join_paths(meson.source_root(), 'src', 'pins', 'tpm2'),
join_paths(meson.project_source_root(), 'src'),
join_paths(meson.project_source_root(), 'src', 'luks'),
join_paths(meson.project_source_root(), 'src', 'pins', 'sss'),
join_paths(meson.project_source_root(), 'src', 'pins', 'tang'),
join_paths(meson.project_source_root(), 'src', 'pins', 'tpm1'),
join_paths(meson.project_source_root(), 'src', 'pins', 'tpm2'),
meson.current_source_dir(),
meson.current_build_dir(),
join_paths(meson.build_root(), 'src'),
join_paths(meson.build_root(), 'src', 'luks'),
join_paths(meson.build_root(), 'src', 'pins', 'sss'),
join_paths(meson.build_root(), 'src', 'pins', 'tang'),
join_paths(meson.build_root(), 'src', 'pins', 'tang', 'tests'),
join_paths(meson.build_root(), 'src', 'pins', 'tpm1'),
join_paths(meson.build_root(), 'src', 'pins', 'tpm2'),
join_paths(meson.project_build_root(), 'src'),
join_paths(meson.project_build_root(), 'src', 'luks'),
join_paths(meson.project_build_root(), 'src', 'pins', 'sss'),
join_paths(meson.project_build_root(), 'src', 'pins', 'tang'),
join_paths(meson.project_build_root(), 'src', 'pins', 'tang', 'tests'),
join_paths(meson.project_build_root(), 'src', 'pins', 'tpm1'),
join_paths(meson.project_build_root(), 'src', 'pins', 'tpm2'),
separator: ':'
)

Expand Down
4 changes: 2 additions & 2 deletions src/pins/file/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ mans += join_paths(meson.current_source_dir(), 'clevis-encrypt-file.1')

env = environment()
env.append('PATH',
join_paths(meson.source_root(), 'src'),
join_paths(meson.project_source_root(), 'src'),
meson.current_source_dir(),
'/usr/libexec',
libexecdir,
Expand All @@ -18,7 +18,7 @@ env.append('PATH',
test('pin-file', find_program('./pin-file'), env: env)

if dracut.found()
dracutdir = dracut.get_pkgconfig_variable('dracutmodulesdir') + '/50' + meson.project_name() + '-pin-file'
dracutdir = dracut.get_variable(pkgconfig : 'dracutmodulesdir') + '/50' + meson.project_name() + '-pin-file'
configure_file(
input: 'dracut.module-setup.sh.in',
output: 'module-setup.sh',
Expand Down
34 changes: 17 additions & 17 deletions src/pins/pkcs11/tests/meson.build
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
env = environment()
env.prepend('PATH',
join_paths(meson.source_root(), 'src'),
join_paths(meson.source_root(), 'src', 'pins', 'pkcs11'),
join_paths(meson.source_root(), 'src', 'pins', 'pkcs11', 'tests'),
join_paths(meson.build_root(), 'src'),
join_paths(meson.build_root(), 'src', 'pins'),
join_paths(meson.build_root(), 'src', 'pins', 'pkcs11'),
join_paths(meson.build_root(), 'src', 'pins', 'pkcs11', 'tests'),
join_paths(meson.source_root(), 'src'),
join_paths(meson.source_root(), 'src', 'luks'),
join_paths(meson.source_root(), 'src', 'luks', 'tests'),
join_paths(meson.build_root(), 'src'),
join_paths(meson.build_root(), 'src', 'luks'),
join_paths(meson.build_root(), 'src', 'luks', 'tests'),
join_paths(meson.source_root(), 'src', 'pins', 'tang'),
join_paths(meson.source_root(), 'src', 'pins', 'tang', 'tests'),
join_paths(meson.build_root(), 'src', 'pins', 'tang'),
join_paths(meson.build_root(), 'src', 'pins', 'tang', 'tests'),
join_paths(meson.project_source_root(), 'src'),
join_paths(meson.project_source_root(), 'src', 'pins', 'pkcs11'),
join_paths(meson.project_source_root(), 'src', 'pins', 'pkcs11', 'tests'),
join_paths(meson.project_build_root(), 'src'),
join_paths(meson.project_build_root(), 'src', 'pins'),
join_paths(meson.project_build_root(), 'src', 'pins', 'pkcs11'),
join_paths(meson.project_build_root(), 'src', 'pins', 'pkcs11', 'tests'),
join_paths(meson.project_source_root(), 'src'),
join_paths(meson.project_source_root(), 'src', 'luks'),
join_paths(meson.project_source_root(), 'src', 'luks', 'tests'),
join_paths(meson.project_build_root(), 'src'),
join_paths(meson.project_build_root(), 'src', 'luks'),
join_paths(meson.project_build_root(), 'src', 'luks', 'tests'),
join_paths(meson.project_source_root(), 'src', 'pins', 'tang'),
join_paths(meson.project_source_root(), 'src', 'pins', 'tang', 'tests'),
join_paths(meson.project_build_root(), 'src', 'pins', 'tang'),
join_paths(meson.project_build_root(), 'src', 'pins', 'tang', 'tests'),
separator: ':'
)

Expand Down
4 changes: 2 additions & 2 deletions src/pins/sss/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ if jansson.found() and libcrypto.found()

env = environment()
env.prepend('PATH',
join_paths(meson.source_root(), 'src'),
join_paths(meson.source_root(), 'src', 'pins', 'tang'),
join_paths(meson.project_source_root(), 'src'),
join_paths(meson.project_source_root(), 'src', 'pins', 'tang'),
meson.current_build_dir(),
'/usr/libexec',
libexecdir,
Expand Down
14 changes: 7 additions & 7 deletions src/pins/tang/tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ tang_data.set('TANGD_KEYGEN', '')
tang_data.set('TANGD', '')

if socat.found()
tang_data.set('SOCAT', socat.path())
tang_data.set('SOCAT', socat.full_path())
endif

if kgen.found()
tang_data.set('TANGD_KEYGEN', kgen.path())
tang_data.set('TANGD_KEYGEN', kgen.full_path())
endif

if tang.found()
tang_data.set('TANGD', tang.path())
tang_data.set('TANGD', tang.full_path())
endif

tang_tests_common = configure_file(
Expand All @@ -42,10 +42,10 @@ tang_tests_common = configure_file(

env = environment()
env.prepend('PATH',
join_paths(meson.source_root(), 'src'),
join_paths(meson.source_root(), 'src', 'pins', 'tang'),
join_paths(meson.build_root(), 'src', 'luks', 'tests'),
join_paths(meson.build_root(), 'src', 'pins', 'tang', 'tests'),
join_paths(meson.project_source_root(), 'src'),
join_paths(meson.project_source_root(), 'src', 'pins', 'tang'),
join_paths(meson.project_build_root(), 'src', 'luks', 'tests'),
join_paths(meson.project_build_root(), 'src', 'pins', 'tang', 'tests'),
separator: ':'
)

Expand Down
4 changes: 2 additions & 2 deletions src/pins/template/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if curl.found()
#%# Set up a test environment
env = environment()
env.append('PATH',
join_paths(meson.source_root(), 'src'),
join_paths(meson.project_source_root(), 'src'),
meson.current_source_dir(),
'/usr/libexec',
libexecdir,
Expand All @@ -35,7 +35,7 @@ endif

#%# dracut support
if dracut.found()
dracutdir = dracut.get_pkgconfig_variable('dracutmodulesdir') + '/50' + meson.project_name() + '-pin-@pin@'
dracutdir = dracut.get_variable(pkgconfig : 'dracutmodulesdir') + '/50' + meson.project_name() + '-pin-@pin@'
#?# In general, substituation is not needed but it's better to
#?# stay flexible.
configure_file(
Expand Down
32 changes: 16 additions & 16 deletions src/pins/tpm1/tests/meson.build
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Tests
env = environment()
env.prepend('PATH',
join_paths(meson.source_root(), 'src'),
join_paths(meson.source_root(), 'src', 'pins', 'tpm1'),
join_paths(meson.source_root(), 'src', 'pins', 'tpm1', 'tests'),
join_paths(meson.build_root(), 'src'),
join_paths(meson.build_root(), 'src', 'luks', 'tests'),
join_paths(meson.build_root(), 'src', 'pins', 'tang', 'tests'),
join_paths(meson.build_root(), 'src', 'pins', 'tpm1'),
join_paths(meson.build_root(), 'src', 'pins', 'tpm1', 'tests'),
join_paths(meson.project_source_root(), 'src'),
join_paths(meson.project_source_root(), 'src', 'pins', 'tpm1'),
join_paths(meson.project_source_root(), 'src', 'pins', 'tpm1', 'tests'),
join_paths(meson.project_build_root(), 'src'),
join_paths(meson.project_build_root(), 'src', 'luks', 'tests'),
join_paths(meson.project_build_root(), 'src', 'pins', 'tang', 'tests'),
join_paths(meson.project_build_root(), 'src', 'pins', 'tpm1'),
join_paths(meson.project_build_root(), 'src', 'pins', 'tpm1', 'tests'),
separator: ':'
)

Expand All @@ -23,14 +23,14 @@ tcsd = find_program('tcsd', '/usr/sbin/tcsd', required: false)
swtpm = find_program('swtpm', '/usr/bin/swtpm', required: false)
swtpm_setup = find_program('swtpm_setup', '/usr/bin/swtpm_setup', required: false)

tpm1_data.set('TPM_VERSION_BIN', tpm_version.found() ? tpm_version.path() : '')
tpm1_data.set('TPM_SEALDATA_BIN', tpm_sealdata.found() ? tpm_sealdata.path() : '')
tpm1_data.set('TPM_UNSEALDATA_BIN', tpm_unsealdata.found() ? tpm_unsealdata.path() : '')
tpm1_data.set('TPM_TAKEOWNERSHIP_BIN', tpm_takeownership.found() ? tpm_takeownership.path() : '')
tpm1_data.set('TCSD_BIN', tcsd.found() ? tcsd.path() : '')
tpm1_data.set('SWTPM_BIN', swtpm.found() ? swtpm.path() : '')
tpm1_data.set('SWTPM_SETUP_BIN', swtpm_setup.found() ? swtpm_setup.path() : '')
tpm1_data.set('LIBCLEVIS_TPM1_TCSD_PRELOAD', libclevis_tpm1_tcsd_preload.path())
tpm1_data.set('TPM_VERSION_BIN', tpm_version.found() ? tpm_version.full_path() : '')
tpm1_data.set('TPM_SEALDATA_BIN', tpm_sealdata.found() ? tpm_sealdata.full_path() : '')
tpm1_data.set('TPM_UNSEALDATA_BIN', tpm_unsealdata.found() ? tpm_unsealdata.full_path() : '')
tpm1_data.set('TPM_TAKEOWNERSHIP_BIN', tpm_takeownership.found() ? tpm_takeownership.full_path() : '')
tpm1_data.set('TCSD_BIN', tcsd.found() ? tcsd.full_path() : '')
tpm1_data.set('SWTPM_BIN', swtpm.found() ? swtpm.full_path() : '')
tpm1_data.set('SWTPM_SETUP_BIN', swtpm_setup.found() ? swtpm_setup.full_path() : '')
tpm1_data.set('LIBCLEVIS_TPM1_TCSD_PRELOAD', libclevis_tpm1_tcsd_preload.full_path())

configure_file(
input: 'tpm1-common-test-functions.in',
Expand Down
34 changes: 17 additions & 17 deletions src/pins/tpm2/tests/meson.build
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Tests.
env = environment()
env.prepend('PATH',
join_paths(meson.source_root(), 'src'),
join_paths(meson.source_root(), 'src', 'luks'),
join_paths(meson.source_root(), 'src', 'luks', 'tests'),
join_paths(meson.source_root(), 'src', 'pins', 'sss'),
join_paths(meson.source_root(), 'src', 'pins', 'tang'),
join_paths(meson.source_root(), 'src', 'pins', 'tpm2'),
join_paths(meson.source_root(), 'src', 'pins', 'tpm2', 'tests'),
join_paths(meson.build_root(), 'src'),
join_paths(meson.build_root(), 'src', 'luks'),
join_paths(meson.build_root(), 'src', 'luks', 'tests'),
join_paths(meson.build_root(), 'src', 'pins', 'sss'),
join_paths(meson.build_root(), 'src', 'pins', 'tang'),
join_paths(meson.build_root(), 'src', 'pins', 'tpm2'),
join_paths(meson.build_root(), 'src', 'pins', 'tpm2', 'tests'),
join_paths(meson.project_source_root(), 'src'),
join_paths(meson.project_source_root(), 'src', 'luks'),
join_paths(meson.project_source_root(), 'src', 'luks', 'tests'),
join_paths(meson.project_source_root(), 'src', 'pins', 'sss'),
join_paths(meson.project_source_root(), 'src', 'pins', 'tang'),
join_paths(meson.project_source_root(), 'src', 'pins', 'tpm2'),
join_paths(meson.project_source_root(), 'src', 'pins', 'tpm2', 'tests'),
join_paths(meson.project_build_root(), 'src'),
join_paths(meson.project_build_root(), 'src', 'luks'),
join_paths(meson.project_build_root(), 'src', 'luks', 'tests'),
join_paths(meson.project_build_root(), 'src', 'pins', 'sss'),
join_paths(meson.project_build_root(), 'src', 'pins', 'tang'),
join_paths(meson.project_build_root(), 'src', 'pins', 'tpm2'),
join_paths(meson.project_build_root(), 'src', 'pins', 'tpm2', 'tests'),
separator: ':'
)

Expand All @@ -25,9 +25,9 @@ socat = find_program('socat', required: false)
swtpm = find_program('swtpm', '/usr/bin/swtpm', required: false)
swtpm_setup = find_program('swtpm_setup', '/usr/bin/swtpm_setup', required: false)

tpm2_data.set('SOCAT_BIN', socat.found() ? socat.path() : '')
tpm2_data.set('SWTPM_BIN', swtpm.found() ? swtpm.path() : '')
tpm2_data.set('SWTPM_SETUP_BIN', swtpm_setup.found() ? swtpm_setup.path() : '')
tpm2_data.set('SOCAT_BIN', socat.found() ? socat.full_path() : '')
tpm2_data.set('SWTPM_BIN', swtpm.found() ? swtpm.full_path() : '')
tpm2_data.set('SWTPM_SETUP_BIN', swtpm_setup.found() ? swtpm_setup.full_path() : '')

configure_file(
input: 'tpm2-common-test-functions.in',
Expand Down
Loading