On 7/16/20 11:54 AM, Pavel Hrdina wrote:
APPARMOR_MOUNT is not used so dropping it in meson.

Signed-off-by: Pavel Hrdina <phrd...@redhat.com>
---
  configure.ac        |  3 ---
  m4/virt-apparmor.m4 | 41 -----------------------------------------
  meson.build         |  8 ++++++++
  meson_options.txt   |  4 ++++
  4 files changed, 12 insertions(+), 44 deletions(-)
  delete mode 100644 m4/virt-apparmor.m4

diff --git a/configure.ac b/configure.ac
index 53c87b4e293..5bf4727faa7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
@@ -479,7 +477,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
diff --git a/m4/virt-apparmor.m4 b/m4/virt-apparmor.m4
deleted file mode 100644
index ebddfce2015..00000000000
--- a/m4/virt-apparmor.m4
+++ /dev/null
@@ -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])
-])
diff --git a/meson.build b/meson.build
index d8ff8e0d658..be0bc975116 100644
--- a/meson.build
+++ b/meson.build
@@ -951,6 +951,13 @@ else
    acl_dep = dependency('', required: false)
  endif
+apparmor_dep = cc.find_library('AppArmor', required: get_option('apparmor'))

IIUC this tries to find -lAppArmor, but the library is called /usr/lib64/libapparmor.so.1.6.2. And also, it provides pkgconfig file: /usr/lib64/pkgconfig/libapparmor.pc

I don't know how to fix it, so I'm just reporting it.

Sorry,
Michal

Reply via email to