From nobody Tue Dec 16 12:47:53 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=1743418374; cv=none; d=zohomail.com; s=zohoarc; b=CCNCYBfl9A55zE9q9j+0xf/Q4FvKo+VLC5KgTELC1bUqO/a3yndq3qUu8XhSQoiNaNk/eHvwmwoOH+vSEhFE1mP6GHLeJkqwFIrf/lSKx0lT/5DoFQ/m67VNeelQRRFQcgx6l3h0vzN/qW6VIqx6qyvUTxFvDve5/wvR8oxF7Tk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1743418374; 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=VU3l/YQ0FEjp8njEUoMXjuSNkHor2iCUTtHop0D444s=; b=g9bisGgPPm007CFp05bGxDHHUzxSNyHMPSQTgEZXMsJjR0spDbN0sodh1wtBry5waU6xE4Pveb5KCzg7k2aK8E+rLOloESCDXCyXBAB7pTGjO6HQy8FNkTunvhsF2M9WOiPk3bsVIcQj/fgsq1t+QA1A8sRDNDXdoBFtvGUJYdw= 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 1743418374639812.445826361261; Mon, 31 Mar 2025 03:52:54 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id EFC6A927; Mon, 31 Mar 2025 06:52:53 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 6C9CD11EF; Mon, 31 Mar 2025 06:51:03 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 6E7F21215; Mon, 31 Mar 2025 06:50:58 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 4DAB812EB for ; Mon, 31 Mar 2025 06:49:39 -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-623-0jBW00ElOYWQFERir_-YrA-1; Mon, 31 Mar 2025 06:49:37 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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 1D965180035E for ; Mon, 31 Mar 2025 10:49:37 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.36]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1C87219560AD; Mon, 31 Mar 2025 10:49:35 +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_MSPIKE_H5, RCVD_IN_MSPIKE_WL,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=1743418179; 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=CD38CyuvSxrRChbetjZIylNAhIcuuCNh2tdAqG9lZPc=; b=HI6bwwztYOp3I3cxBv18QzXF84ho3cFR6OfVlrk7XDtOkOnwmzX0o/qfgaWENaFwM22S57 q0JfRapUGT5j+oamZkVIBZgcB4Q6WB5b2lDl8yUyi/1bqAMs7BSW5FSV4IAYa/bfax7APn gf9vI0SdH1xImCEKh+5d4gt4Jl+XOGE= X-MC-Unique: 0jBW00ElOYWQFERir_-YrA-1 X-Mimecast-MFC-AGG-ID: 0jBW00ElOYWQFERir_-YrA_1743418177 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 3/3] meson: drop remaining checks for apparmor version Date: Mon, 31 Mar 2025 11:48:23 +0100 Message-ID: <20250331104823.971241-4-berrange@redhat.com> In-Reply-To: <20250331104823.971241-1-berrange@redhat.com> References: <20250331104823.971241-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: sL4KKcCuXHtLffTAUqmU0qpnkzqRJIU_laFps83Axa8_1743418177 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: ATGQCZINRRKQRORVQ5ZMBAVLYY2FHNMX X-Message-ID-Hash: ATGQCZINRRKQRORVQ5ZMBAVLYY2FHNMX 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: 1743418375952019000 Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 We can now assume at least version three: * Debian 12: 3.0.8 * openSUSE Leap 15.5: 3.0.4 * openSUSE Leap 15.6: 3.1.7 * Ubuntu 22.04: 3.0.4 * Ubuntu 24.04: 4.0.0 Signed-off-by: Daniel P. Berrang=C3=A9 --- meson.build | 3 --- src/security/apparmor/meson.build | 11 ----------- src/security/virt-aa-helper.c | 9 ++------- 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/meson.build b/meson.build index 56823ca25b..9e23b3089f 100644 --- a/meson.build +++ b/meson.build @@ -929,9 +929,6 @@ endif apparmor_dep =3D dependency('libapparmor', required: get_option('apparmor'= )) if apparmor_dep.found() conf.set('WITH_APPARMOR', 1) - if apparmor_dep.version().version_compare('>=3D3.0.0') - conf.set('WITH_APPARMOR_3', 1) - endif 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 f1319541e4..c1bd10717b 100644 --- a/src/security/apparmor/meson.build +++ b/src/security/apparmor/meson.build @@ -44,14 +44,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..25bffdd30b 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 %s\n", ifexists, c= tl->uuid); =20 if (ctl->dryrun) { vah_info(profile); --=20 2.48.1