From nobody Tue Dec 16 12:41:59 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1743424839; cv=none; d=zohomail.com; s=zohoarc; b=QxLKZfsDHLpo9pYr7fJ8t3PZNAi3XpLP9YSgA552XovCiYAmIH7EuWdGEhDBSOw8bjtReDHBiEJsLrZvDjjXeHjDSBcxFHylsAbTHGG+Ixff+ImsyMJJfuLT0IrhnVZJchAaFyM4shFfM3F9VSip53r7W7ezP0RQyglWg0omZ6A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1743424839; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=MatpvC7W5xGycTomSmOuKYJ1UcuDraxz6BBE8QWTsE0=; b=WX1EUfx9C9hcV9chJGB6iaGFamx3T+j5BJTqH3CwwGe98b96PknzA+IjrA5PD8KY8qGs/MRkysW1X0jLKxRUhQmzn5k1lv6uojw4rPJ0aOoCwd99+Id2OCIZnpLIX8JtHFqNRDNSfI/osSdoXUjD6KCh0NQSM41jvLKKpVaOtkk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 174342483927976.57414977066674; Mon, 31 Mar 2025 05:40:39 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 58F001256; Mon, 31 Mar 2025 08:40:38 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 6C125135D; Mon, 31 Mar 2025 08:37:59 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 5F9B811AA; Mon, 31 Mar 2025 08:37:48 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id DD72411A6 for ; Mon, 31 Mar 2025 08:37:47 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-348-SyfbKun_NUyM9kdjGSVSqg-1; Mon, 31 Mar 2025 08:37:46 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7A0E8180886C for ; Mon, 31 Mar 2025 12:37:40 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.36]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9DAD5180A803; Mon, 31 Mar 2025 12:37:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743424667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jj30kUEzldTBlkMsRty9MQPfrqDsE7mtDJW4RQz8gAI=; b=BeZWTzlGzkMHigTfkKE1p1hDPB1NnYjgZbOcjvdv0k/QLflZEZ+jCOAu3zj8z3OZW2baMR wcxMnYzF7kJCsO+mRsuDb6453Qsn1NhkN233xSMC59rf7XD7xxy0nOJSLZ8sJb9qnYCDyx VLXLp11GLHq0VRr+ocSx7jJc2Ft8WSU= X-MC-Unique: SyfbKun_NUyM9kdjGSVSqg-1 X-Mimecast-MFC-AGG-ID: SyfbKun_NUyM9kdjGSVSqg_1743424665 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH v2 5/5] meson: drop remaining checks for apparmor version Date: Mon, 31 Mar 2025 13:37:31 +0100 Message-ID: <20250331123731.1020743-6-berrange@redhat.com> In-Reply-To: <20250331123731.1020743-1-berrange@redhat.com> References: <20250331123731.1020743-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: G3Anac9mdtr0DcZS4_iFxqC5RvIfpK4Wr9_0XwOP5MQ_1743424665 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: R5PV7Y32T2G33ZMZYNZAI22WZDFSIMNO X-Message-ID-Hash: R5PV7Y32T2G33ZMZYNZAI22WZDFSIMNO X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1743424841488019100 Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 Now that we mandate version 3, any remaining conditional checks in meson/source code can be removed. Signed-off-by: Daniel P. Berrang=C3=A9 --- meson.build | 1 - src/security/apparmor/meson.build | 11 ----------- src/security/virt-aa-helper.c | 9 ++------- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/meson.build b/meson.build index d148d3de0b..c267d52672 100644 --- a/meson.build +++ b/meson.build @@ -931,7 +931,6 @@ apparmor_dep =3D dependency('libapparmor', version: '>= =3D' + apparmor_version, required: get_option('apparmor')) if apparmor_dep.found() conf.set('WITH_APPARMOR', 1) - conf.set('WITH_APPARMOR_3', 1) conf.set_quoted('APPARMOR_DIR', sysconfdir / 'apparmor.d') conf.set_quoted('APPARMOR_PROFILES_PATH', '/sys/kernel/security/apparmor= /profiles') endif diff --git a/src/security/apparmor/meson.build b/src/security/apparmor/meso= n.build index 18968677df..09d9fac02c 100644 --- a/src/security/apparmor/meson.build +++ b/src/security/apparmor/meson.build @@ -33,14 +33,3 @@ install_data( [ 'TEMPLATE.qemu', 'TEMPLATE.lxc' ], install_dir: apparmor_dir / 'libvirt', ) - -if not conf.has('WITH_APPARMOR_3') - # We only install the empty local override for AppArmor 2.x. For - # AppArmor 3.x, upstream's preference is to avoid creating these - # files in order to limit the amount of filesystem clutter. - install_data( - 'usr.lib.libvirt.virt-aa-helper.local', - install_dir: apparmor_dir / 'local', - rename: 'usr.lib.libvirt.virt-aa-helper', - ) -endif diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index 034c042007..e3802c18be 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -1560,13 +1560,8 @@ main(int argc, char **argv) =20 /* create the profile from TEMPLATE */ if (ctl->cmd =3D=3D 'c' || purged) { - g_autofree char *tmp =3D NULL; -#if defined(WITH_APPARMOR_3) - const char *ifexists =3D "if exists "; -#else - const char *ifexists =3D ""; -#endif - tmp =3D g_strdup_printf(" #include %s\n", i= fexists, ctl->uuid); + g_autofree char *tmp =3D g_strdup_printf( + " #include if exists \n", ctl->uuid); =20 if (ctl->dryrun) { vah_info(profile); --=20 2.48.1