mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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 \
|
-Dselinux=enabled \
|
||||||
%{?arg_selinux_mount} \
|
%{?arg_selinux_mount} \
|
||||||
-Dapparmor=disabled \
|
-Dapparmor=disabled \
|
||||||
-Dapparmor_profiles=false \
|
-Dapparmor_profiles=disabled \
|
||||||
-Dsecdriver_apparmor=disabled \
|
-Dsecdriver_apparmor=disabled \
|
||||||
-Dudev=enabled \
|
-Dudev=enabled \
|
||||||
-Dyajl=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')
|
conf.set_quoted('APPARMOR_PROFILES_PATH', '/sys/kernel/security/apparmor/profiles')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('apparmor_profiles')
|
if not get_option('apparmor_profiles').disabled()
|
||||||
|
apparmor_profiles_enable = true
|
||||||
|
|
||||||
if not conf.has('WITH_APPARMOR')
|
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
|
endif
|
||||||
conf.set('WITH_APPARMOR_PROFILES', 1)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# FIXME rewrite to use dependency() once we can use 2.4.48
|
# 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('driver_vz', type: 'feature', value: 'auto', description: 'Virtuozzo driver')
|
||||||
|
|
||||||
option('secdriver_apparmor', type: 'feature', value: 'auto', description: 'use AppArmor security 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')
|
option('secdriver_selinux', type: 'feature', value: 'auto', description: 'use SELinux security driver')
|
||||||
|
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ exit 1
|
|||||||
-Dcurl=enabled \
|
-Dcurl=enabled \
|
||||||
-Ddocs=enabled \
|
-Ddocs=enabled \
|
||||||
-Dapparmor=disabled \
|
-Dapparmor=disabled \
|
||||||
-Dapparmor_profiles=false \
|
-Dapparmor_profiles=disabled \
|
||||||
-Dattr=disabled \
|
-Dattr=disabled \
|
||||||
-Daudit=disabled \
|
-Daudit=disabled \
|
||||||
-Dbash_completion=disabled \
|
-Dbash_completion=disabled \
|
||||||
|
Loading…
Reference in New Issue
Block a user