mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
meson: Turn apparmor_profiles into a feature
Similar knobs, such as firewalld_zone and sysctl_config, are already features, so convert this one as well to comply with expectations. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
090e8076a9
commit
08c13484da
@ -1128,7 +1128,7 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/%{name}.spec)
|
||||
-Dselinux=enabled \
|
||||
%{?arg_selinux_mount} \
|
||||
-Dapparmor=disabled \
|
||||
-Dapparmor_profiles=false \
|
||||
-Dapparmor_profiles=disabled \
|
||||
-Dsecdriver_apparmor=disabled \
|
||||
-Dudev=enabled \
|
||||
-Dyajl=enabled \
|
||||
|
14
meson.build
14
meson.build
@ -857,11 +857,19 @@ if apparmor_dep.found()
|
||||
conf.set_quoted('APPARMOR_PROFILES_PATH', '/sys/kernel/security/apparmor/profiles')
|
||||
endif
|
||||
|
||||
if get_option('apparmor_profiles')
|
||||
if not get_option('apparmor_profiles').disabled()
|
||||
apparmor_profiles_enable = true
|
||||
|
||||
if not conf.has('WITH_APPARMOR')
|
||||
error('Cannot enable apparmor_profiles without apparmor')
|
||||
apparmor_profiles_enable = false
|
||||
if get_option('apparmor_profiles').enabled()
|
||||
error('Cannot enable apparmor_profiles without apparmor')
|
||||
endif
|
||||
endif
|
||||
|
||||
if apparmor_profiles_enable
|
||||
conf.set('WITH_APPARMOR_PROFILES', 1)
|
||||
endif
|
||||
conf.set('WITH_APPARMOR_PROFILES', 1)
|
||||
endif
|
||||
|
||||
# FIXME rewrite to use dependency() once we can use 2.4.48
|
||||
|
@ -69,7 +69,7 @@ option('driver_vmware', type: 'feature', value: 'auto', description: 'VMware dri
|
||||
option('driver_vz', type: 'feature', value: 'auto', description: 'Virtuozzo driver')
|
||||
|
||||
option('secdriver_apparmor', type: 'feature', value: 'auto', description: 'use AppArmor security driver')
|
||||
option('apparmor_profiles', type: 'boolean', value: false, description: 'install apparmor profiles')
|
||||
option('apparmor_profiles', type: 'feature', value: 'disabled', description: 'install apparmor profiles')
|
||||
option('secdriver_selinux', type: 'feature', value: 'auto', description: 'use SELinux security driver')
|
||||
|
||||
|
||||
|
@ -108,7 +108,7 @@ exit 1
|
||||
-Dcurl=enabled \
|
||||
-Ddocs=enabled \
|
||||
-Dapparmor=disabled \
|
||||
-Dapparmor_profiles=false \
|
||||
-Dapparmor_profiles=disabled \
|
||||
-Dattr=disabled \
|
||||
-Daudit=disabled \
|
||||
-Dbash_completion=disabled \
|
||||
|
Loading…
Reference in New Issue
Block a user