8dd7ee47c5
Some downstream distributors like RHEL don't have patchelf(1). Relying on patchelf(1) during the build will make it difficult for such downstreams to distribute Toolbox. Fortunately, the path of the dynamic linker (ie., PT_INTERP) is hardcoded in the ABI specification of each architecture [1]. This means that Toolbox's build system can keep it's own architecture to dynamic linker mapping, and specify it during the build through the GNU ld linker's --dynamic-linker flag, as opposed to using a tool like patchelf(1) to change the path of the dynamic linker in the built binary to the one inside /run/host. Currently, the list of architectures covers the ones that Fedora builds for. [1] https://sourceware.org/glibc/wiki/ABIList https://github.com/containers/toolbox/pull/942
63 lines
1.6 KiB
Meson
63 lines
1.6 KiB
Meson
project(
|
|
'toolbox',
|
|
'c',
|
|
version: '0.0.99.2',
|
|
license: 'ASL 2.0',
|
|
meson_version: '>= 0.58.0',
|
|
)
|
|
|
|
cc = meson.get_compiler('c')
|
|
|
|
go = find_program('go')
|
|
go_md2man = find_program('go-md2man')
|
|
shellcheck = find_program('shellcheck', required: false)
|
|
skopeo = find_program('skopeo', required: false)
|
|
|
|
bash_completion = dependency('bash-completion', required: false)
|
|
|
|
profiledir = get_option('profile_dir')
|
|
|
|
tmpfilesdir = get_option('tmpfiles_dir')
|
|
if tmpfilesdir == ''
|
|
systemd_dep = dependency('systemd')
|
|
tmpfilesdir = systemd_dep.get_variable(pkgconfig: 'tmpfilesdir')
|
|
endif
|
|
|
|
if bash_completion.found()
|
|
install_data(
|
|
'completion/bash/toolbox',
|
|
install_dir: bash_completion.get_variable(pkgconfig: 'completionsdir')
|
|
)
|
|
endif
|
|
|
|
if not skopeo.found()
|
|
message('Running system tests requires Skopeo for OCI image manipulation.')
|
|
endif
|
|
|
|
install_subdir(
|
|
'test',
|
|
install_dir: join_paths(get_option('datadir'), meson.project_name()),
|
|
exclude_files: [
|
|
'system/libs/bats-assert/.git',
|
|
'system/libs/bats-assert/.gitignore',
|
|
'system/libs/bats-assert/.travis.yml',
|
|
'system/libs/bats-assert/package.json',
|
|
'system/libs/bats-support/.git',
|
|
'system/libs/bats-support/.gitignore',
|
|
'system/libs/bats-support/.travis.yml',
|
|
'system/libs/bats-support/package.json'
|
|
],
|
|
exclude_directories: [
|
|
'system/libs/bats-assert/.git',
|
|
'system/libs/bats-assert/script',
|
|
'system/libs/bats-assert/test',
|
|
'system/libs/bats-support/.git',
|
|
'system/libs/bats-support/script',
|
|
'system/libs/bats-support/test'
|
|
]
|
|
)
|
|
|
|
subdir('data')
|
|
subdir('doc')
|
|
subdir('profile.d')
|
|
subdir('src')
|