From nobody Tue Feb 10 21:19:15 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=1622536731; cv=none; d=zohomail.com; s=zohoarc; b=XTf/evG3TK4T2vu5/IdDlexeIwu2Z77092J2PYYVgrLkYoxX9xlg70UtcdqJtx3jgPlyUEk1QsBTL+Hbamos2RQtT/lDgdoMnLdkJNjk5Ck4eDtFQ9/SP+X/TbbX05Fo3GxqzfFfJl28tkmDhEmHf+LM56sy+N0DwerFh0Vn6xY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622536731; 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=TMqsv0w2endhMJradOEd74O9SfkRxcwxFmnfsmzkV1w=; b=iLmOaimPF5ng3W/pd8PzHC+5MyHALOFynXWlawwu831cIdBfEWoASmrreUelEYXpo8/lCDhCeS65ATh0g0v2AHnScClt1QrhOFag3tRyOQB6MbHtFjocvIJNPK30hbV0CIS+4osp7gYvzjqmUpuJHpcO+14Foe0dCT7hiZGGt+0= 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 1622536731890969.6586694432278; Tue, 1 Jun 2021 01:38:51 -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-170-_V1-r2x4NiOz975neibZXQ-1; Tue, 01 Jun 2021 04:38:49 -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 DE76C8015F5; Tue, 1 Jun 2021 08:38:43 +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 BA41D2B4DE; Tue, 1 Jun 2021 08:38:43 +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 84A251818459; Tue, 1 Jun 2021 08:38:43 +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 1518cV1Z026147 for ; Tue, 1 Jun 2021 04:38:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7831617A63; Tue, 1 Jun 2021 08:38:31 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.195.114]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D5419E2D4 for ; Tue, 1 Jun 2021 08:38:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622536730; 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=TMqsv0w2endhMJradOEd74O9SfkRxcwxFmnfsmzkV1w=; b=YmdMHuRwDV6mUwmAmP66ABcfLZ9SLUxAMok85tUIpqiwLybePpAOQ2vmnDfT7vSq+2DNCF X8VaBP3Z0uYEQa9R3HKXrIJg+PTScdmBWOrzNFqQIFSdjzE9ijogM86iEm4y9sIIJ6yq1o FD58v/AuMm30D9Qloc/AMVU+cNz+ivg= X-MC-Unique: _V1-r2x4NiOz975neibZXQ-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 20/26] meson: Turn apparmor_profiles into a feature Date: Tue, 1 Jun 2021 10:37:51 +0200 Message-Id: <20210601083757.10194-21-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.84 on 10.5.11.23 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" 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 --- libvirt.spec.in | 2 +- meson.build | 14 +++++++++++--- meson_options.txt | 2 +- mingw-libvirt.spec.in | 2 +- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index cc04efe081..529c29214d 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1128,7 +1128,7 @@ export SOURCE_DATE_EPOCH=3D$(stat --printf=3D'%Y' %{_= specdir}/%{name}.spec) -Dselinux=3Denabled \ %{?arg_selinux_mount} \ -Dapparmor=3Ddisabled \ - -Dapparmor_profiles=3Dfalse \ + -Dapparmor_profiles=3Ddisabled \ -Dsecdriver_apparmor=3Ddisabled \ -Dudev=3Denabled \ -Dyajl=3Denabled \ diff --git a/meson.build b/meson.build index 55bb724a52..be6765a034 100644 --- a/meson.build +++ b/meson.build @@ -857,11 +857,19 @@ if apparmor_dep.found() conf.set_quoted('APPARMOR_PROFILES_PATH', '/sys/kernel/security/apparmor= /profiles') endif =20 -if get_option('apparmor_profiles') +if not get_option('apparmor_profiles').disabled() + apparmor_profiles_enable =3D true + if not conf.has('WITH_APPARMOR') - error('Cannot enable apparmor_profiles without apparmor') + apparmor_profiles_enable =3D 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 - conf.set('WITH_APPARMOR_PROFILES', 1) endif =20 # FIXME rewrite to use dependency() once we can use 2.4.48 diff --git a/meson_options.txt b/meson_options.txt index 2606648b64..f4f40fe9b5 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -69,7 +69,7 @@ option('driver_vmware', type: 'feature', value: 'auto', d= escription: 'VMware dri option('driver_vz', type: 'feature', value: 'auto', description: 'Virtuozz= o driver') =20 option('secdriver_apparmor', type: 'feature', value: 'auto', description: = 'use AppArmor security driver') -option('apparmor_profiles', type: 'boolean', value: false, description: 'i= nstall apparmor profiles') +option('apparmor_profiles', type: 'feature', value: 'disabled', descriptio= n: 'install apparmor profiles') option('secdriver_selinux', type: 'feature', value: 'auto', description: '= use SELinux security driver') =20 =20 diff --git a/mingw-libvirt.spec.in b/mingw-libvirt.spec.in index 87223e205c..bcc2bd93e3 100644 --- a/mingw-libvirt.spec.in +++ b/mingw-libvirt.spec.in @@ -108,7 +108,7 @@ exit 1 -Dcurl=3Denabled \ -Ddocs=3Denabled \ -Dapparmor=3Ddisabled \ - -Dapparmor_profiles=3Dfalse \ + -Dapparmor_profiles=3Ddisabled \ -Dattr=3Ddisabled \ -Daudit=3Ddisabled \ -Dbash_completion=3Ddisabled \ --=20 2.31.1