mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
meson: add AppArmor build dependency
APPARMOR_MOUNT is not used so dropping it in meson. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
parent
296bb0bb95
commit
d75d7ddc06
@ -114,7 +114,6 @@ fi
|
||||
|
||||
# Check for compiler and library settings.
|
||||
|
||||
LIBVIRT_ARG_APPARMOR
|
||||
LIBVIRT_ARG_ATTR
|
||||
LIBVIRT_ARG_AUDIT
|
||||
LIBVIRT_ARG_BASH_COMPLETION
|
||||
@ -150,7 +149,6 @@ LIBVIRT_ARG_VIRTUALPORT
|
||||
LIBVIRT_ARG_WIRESHARK
|
||||
LIBVIRT_ARG_YAJL
|
||||
|
||||
LIBVIRT_CHECK_APPARMOR
|
||||
LIBVIRT_CHECK_ATTR
|
||||
LIBVIRT_CHECK_AUDIT
|
||||
LIBVIRT_CHECK_BASH_COMPLETION
|
||||
@ -477,7 +475,6 @@ LIBVIRT_RESULT_DRIVER_MODULES
|
||||
AC_MSG_NOTICE([])
|
||||
AC_MSG_NOTICE([Libraries])
|
||||
AC_MSG_NOTICE([])
|
||||
LIBVIRT_RESULT_APPARMOR
|
||||
LIBVIRT_RESULT_ATTR
|
||||
LIBVIRT_RESULT_AUDIT
|
||||
LIBVIRT_RESULT_BASH_COMPLETION
|
||||
|
@ -1,41 +0,0 @@
|
||||
dnl The libapparmor.so library
|
||||
dnl
|
||||
dnl Copyright (C) 2012-2013 Red Hat, Inc.
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU Lesser General Public
|
||||
dnl License as published by the Free Software Foundation; either
|
||||
dnl version 2.1 of the License, or (at your option) any later version.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Lesser General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU Lesser General Public
|
||||
dnl License along with this library. If not, see
|
||||
dnl <http://www.gnu.org/licenses/>.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([LIBVIRT_ARG_APPARMOR],[
|
||||
LIBVIRT_ARG_WITH_FEATURE([APPARMOR], [AppArmor], [check])
|
||||
LIBVIRT_ARG_WITH([APPARMOR_MOUNT], [set AppArmor mount point], [check])
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_CHECK_APPARMOR],[
|
||||
LIBVIRT_CHECK_LIB([APPARMOR], [apparmor],
|
||||
[aa_change_profile], [sys/apparmor.h])
|
||||
|
||||
if test "$with_apparmor" = "yes"; then
|
||||
AC_DEFINE_UNQUOTED([APPARMOR_DIR],
|
||||
"/etc/apparmor.d",
|
||||
[path to apparmor directory])
|
||||
AC_DEFINE_UNQUOTED([APPARMOR_PROFILES_PATH],
|
||||
"/sys/kernel/security/apparmor/profiles",
|
||||
[path to kernel profiles])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_RESULT_APPARMOR],[
|
||||
LIBVIRT_RESULT_LIB([APPARMOR])
|
||||
])
|
@ -964,6 +964,13 @@ else
|
||||
acl_dep = dependency('', required: false)
|
||||
endif
|
||||
|
||||
apparmor_dep = dependency('libapparmor', required: get_option('apparmor'))
|
||||
if apparmor_dep.found()
|
||||
conf.set('WITH_APPARMOR', 1)
|
||||
conf.set_quoted('APPARMOR_DIR', '/etc/apparmor.d')
|
||||
conf.set_quoted('APPARMOR_PROFILES_PATH', '/sys/kernel/security/apparmor/profiles')
|
||||
endif
|
||||
|
||||
|
||||
# define top include directory
|
||||
|
||||
@ -985,6 +992,7 @@ configure_file(output: 'meson-config.h', configuration: conf)
|
||||
|
||||
libs_summary = {
|
||||
'acl': acl_dep.found(),
|
||||
'apparmor': apparmor_dep.found(),
|
||||
}
|
||||
summary(libs_summary, section: 'Libraries', bool_yn: true)
|
||||
|
||||
|
@ -9,5 +9,9 @@ option('test_coverage', type: 'boolean', value: false, description: 'turn on cod
|
||||
option('git_werror', type: 'feature', value: 'auto', description: 'use -Werror if building from GIT')
|
||||
|
||||
|
||||
# build dependencies options
|
||||
option('apparmor', type: 'feature', value: 'auto', description: 'apparmor support')
|
||||
|
||||
|
||||
# build driver options
|
||||
option('driver_remote', type: 'feature', value: 'enabled', description: 'remote driver')
|
||||
|
Loading…
Reference in New Issue
Block a user