From nobody Tue Feb 10 19:47:42 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1622536736; cv=none; d=zohomail.com; s=zohoarc; b=hZBO1Sba1O3IbL0ezKNnR/OLfy5RLi6zA04/H9sG/niX9KqXng7DRZtHzh9YVg1zJZ98hxbOH9fsyFnPv0/YHUH5quWA49TIfeI37uiqlZu+ftK4dYKAQA2VMmoamD2Ne+td8oEM3QEAmFRoCtrfNUiQMklLMdTNGH7ABwtsiP0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622536736; 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=GexvpNsaPSLULOisd4pstP1vFSfuABwRvr/myUh1jMs=; b=YizCJkg5bvPcViTEj9iUNIWhkO8TchJogYx4rnxvDPa8MFeNShDCW6x86cjJrCUYEBEMeq1ODWkKTBjsXQciV/H4EAt73Y6Ql8kL4ZY+kX8sN5QH61f223ZdTZ52ua6cCBVt6pFRCCp0i2erFlaF6KhY+FqCR4WAK0cuzlMG7ZQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1622536736303129.31534731073646; Tue, 1 Jun 2021 01:38:56 -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-558-kjTTRzeMN3KHDuAaNJe4FQ-1; Tue, 01 Jun 2021 04:38:52 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 121D91020C38; Tue, 1 Jun 2021 08:38:48 +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 E672377F12; Tue, 1 Jun 2021 08:38:47 +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 A59EE181845F; Tue, 1 Jun 2021 08:38:47 +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 1518cUg9026126 for ; Tue, 1 Jun 2021 04:38:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id 731DCE2D8; Tue, 1 Jun 2021 08:38:30 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.195.114]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D0648E2D4 for ; Tue, 1 Jun 2021 08:38:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622536734; 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=GexvpNsaPSLULOisd4pstP1vFSfuABwRvr/myUh1jMs=; b=g6ObhvsM4rNNE0CZO2fBn7Hf/xi3kBQY883j/P1gWE8e6sFqmlPppGCzYyoXUOAw7std77 ijA3K+HJtdCJBWwlnLmCjjlnyARgk750VS/BlIqrfTH6ZzjdUCcAaVyAnisbM4l9y1P45D YcbgKduIzgmOThCYYeJy//5QwjhUPiU= X-MC-Unique: kjTTRzeMN3KHDuAaNJe4FQ-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 19/26] meson: Rewrite apparmor_profiles check Date: Tue, 1 Jun 2021 10:37:50 +0200 Message-Id: <20210601083757.10194-20-abologna@redhat.com> In-Reply-To: <20210601083757.10194-1-abologna@redhat.com> References: <20210601083757.10194-1-abologna@redhat.com> 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.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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" Attempting to enable apparmor_profiles when apparmor support is not enabled should result in an error. Signed-off-by: Andrea Bolognani --- meson.build | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index a9f87473db..55bb724a52 100644 --- a/meson.build +++ b/meson.build @@ -852,14 +852,18 @@ endif =20 apparmor_dep =3D dependency('libapparmor', required: get_option('apparmor'= )) if apparmor_dep.found() - if get_option('apparmor_profiles') - conf.set('WITH_APPARMOR_PROFILES', 1) - endif conf.set('WITH_APPARMOR', 1) conf.set_quoted('APPARMOR_DIR', sysconfdir / 'apparmor.d') conf.set_quoted('APPARMOR_PROFILES_PATH', '/sys/kernel/security/apparmor= /profiles') endif =20 +if get_option('apparmor_profiles') + if not conf.has('WITH_APPARMOR') + error('Cannot enable apparmor_profiles without apparmor') + endif + conf.set('WITH_APPARMOR_PROFILES', 1) +endif + # FIXME rewrite to use dependency() once we can use 2.4.48 attr_dep =3D cc.find_library('attr', required: get_option('attr')) if attr_dep.found() --=20 2.31.1