From nobody Sun Feb 8 14:22:39 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1594893730; cv=none; d=zohomail.com; s=zohoarc; b=JS13DV/KFj7643rJMBeg9WEP+7MPqM+ZGkum9EkQNHwUydPzTGYAejOPmmaqq8557ueyo/k4BrdyJF36Yx2VFhyc3gIb/CD97EciG4T/mSlS1jGuqLoMPJEx2ROowdpPcmA3zJEsMNuR8PsBsDfxkGcVIs8dpFqaHpjcY0DgrqM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594893730; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=p2uu5yWWou5obYpinxYBpvtHQw9Sq40FtB9XzZRrgYY=; b=jSHbgWuYlSjRRyZDfV8RV9bZqj+ZaiBt0cafl98WGxAJMpo6lcLuQKlS0c9T0cWLVcXX9I5uVR/14CrCkPnwalf1FHbKK5MqukJY7nyskMtubTO6RFrb5SaKKRvwhKMLRWg70DjoJnRd4WjYQiF6ee2u8a4WJCbBkxiB56nWT8Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1594893730231731.1250259003707; Thu, 16 Jul 2020 03:02:10 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-179-bBPXJri1OWKz24tjaPgT-g-1; Thu, 16 Jul 2020 06:01:06 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 31AD980572E; Thu, 16 Jul 2020 10:00:59 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0C91B2B6DC; Thu, 16 Jul 2020 10:00:59 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C9A621800FDE; Thu, 16 Jul 2020 10:00:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06GA0t9B015592 for ; Thu, 16 Jul 2020 06:00:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0915F2B6DC; Thu, 16 Jul 2020 10:00:55 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.194.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 786DB2DE6B for ; Thu, 16 Jul 2020 10:00:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594893729; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=p2uu5yWWou5obYpinxYBpvtHQw9Sq40FtB9XzZRrgYY=; b=detGX9Yi9r17+CvJX44R6HKpqNjyQSdi+lmmSh/QPy2qZnAcZ+B0wyB6RrleY4c4/JRSBz d0OT+pXCr6HAfN1teHALNESnFu2VPhuCv9rzPR6AUJ8gnWmMTDJ8rAsZiclpuMYqD4uE6k 6+Js2jhshyDiidgsEWEaihZyY6ZLt5A= X-MC-Unique: bBPXJri1OWKz24tjaPgT-g-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 034/351] meson: add AppArmor build dependency Date: Thu, 16 Jul 2020 11:54:30 +0200 Message-Id: <812e0158ec3b28946e5907f44d7434fb9c94a7e5.1594891445.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" APPARMOR_MOUNT is not used so dropping it in meson. Signed-off-by: Pavel Hrdina --- 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 =20 # Check for compiler and library settings. =20 -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 =20 -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 . -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" =3D "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 =3D dependency('', required: false) endif =20 +apparmor_dep =3D cc.find_library('AppArmor', required: get_option('apparmo= r')) +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 + =20 # define top include directory =20 @@ -972,6 +979,7 @@ configure_file(output: 'meson-config.h', configuration:= conf) =20 libs_summary =3D { 'acl': acl_dep.found(), + 'apparmor': apparmor_dep.found(), } summary(libs_summary, section: 'Libraries', bool_yn: true) =20 diff --git a/meson_options.txt b/meson_options.txt index 0f79f8aea03..dc60d569dd2 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -6,3 +6,7 @@ option('runstatedir', type: 'string', value: '', descriptio= n: 'State directory f option('test_suite', type: 'boolean', value: true, description: 'Whether t= o enable and build test suite by default') option('expensive_tests', type: 'feature', value: 'auto', description: 'se= t the default for enabling expensive tests (long timeouts), use VIR_TEST_EX= PENSIVE to override') option('test_coverage', type: 'boolean', value: false, description: 'turn = on code coverage instrumentation') + + +# build dependencies options +option('apparmor', type: 'feature', value: 'auto', description: 'apparmor = support') --=20 2.26.2