mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-16 22:12:36 +00:00
build: add seccomp build option
Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
This commit is contained in:
parent
826391b2a2
commit
0b9adfdad4
10
meson.build
10
meson.build
@ -146,6 +146,7 @@ want_capabilities = get_option('capabilities')
|
|||||||
want_apparmor = get_option('apparmor')
|
want_apparmor = get_option('apparmor')
|
||||||
want_openssl = get_option('openssl')
|
want_openssl = get_option('openssl')
|
||||||
want_selinux = get_option('selinux')
|
want_selinux = get_option('selinux')
|
||||||
|
want_seccomp = get_option('seccomp')
|
||||||
|
|
||||||
srcconf.set_quoted('DEFAULT_CGROUP_PATTERN', cgrouppattern)
|
srcconf.set_quoted('DEFAULT_CGROUP_PATTERN', cgrouppattern)
|
||||||
if coverity
|
if coverity
|
||||||
@ -291,6 +292,7 @@ endif
|
|||||||
threads = dependency('threads')
|
threads = dependency('threads')
|
||||||
|
|
||||||
## Seccomp.
|
## Seccomp.
|
||||||
|
if want_seccomp
|
||||||
libseccomp = dependency('libseccomp', required: false)
|
libseccomp = dependency('libseccomp', required: false)
|
||||||
srcconf.set10('HAVE_SECCOMP', libseccomp.found())
|
srcconf.set10('HAVE_SECCOMP', libseccomp.found())
|
||||||
pkgconfig_libs += libseccomp
|
pkgconfig_libs += libseccomp
|
||||||
@ -327,6 +329,9 @@ if libseccomp.found()
|
|||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
endif
|
endif
|
||||||
|
else
|
||||||
|
srcconf.set10('HAVE_SECCOMP', false)
|
||||||
|
endif
|
||||||
|
|
||||||
## SELinux.
|
## SELinux.
|
||||||
if want_selinux
|
if want_selinux
|
||||||
@ -667,9 +672,12 @@ subdir('src/lxc/pam')
|
|||||||
# Library.
|
# Library.
|
||||||
liblxc_dependencies = [
|
liblxc_dependencies = [
|
||||||
threads,
|
threads,
|
||||||
libseccomp,
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if want_seccomp
|
||||||
|
liblxc_dependencies += libseccomp
|
||||||
|
endif
|
||||||
|
|
||||||
if want_capabilities
|
if want_capabilities
|
||||||
liblxc_dependencies += [libcap]
|
liblxc_dependencies += [libcap]
|
||||||
endif
|
endif
|
||||||
|
@ -32,6 +32,9 @@ option('commands', type: 'boolean', value: 'true',
|
|||||||
option('capabilities', type: 'boolean', value: 'true',
|
option('capabilities', type: 'boolean', value: 'true',
|
||||||
description: 'use capabilities')
|
description: 'use capabilities')
|
||||||
|
|
||||||
|
option('seccomp', type: 'boolean', value: 'true',
|
||||||
|
description: 'use seccomp')
|
||||||
|
|
||||||
option('apparmor', type: 'boolean', value: 'true',
|
option('apparmor', type: 'boolean', value: 'true',
|
||||||
description: 'use apparmor')
|
description: 'use apparmor')
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ liblxc_sources = files(
|
|||||||
'uuid.c',
|
'uuid.c',
|
||||||
'uuid.h')
|
'uuid.h')
|
||||||
|
|
||||||
if libseccomp.found()
|
if want_seccomp and libseccomp.found()
|
||||||
liblxc_sources += files('seccomp.c')
|
liblxc_sources += files('seccomp.c')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user