]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: mandate apparmor >= 3.0.0
authorDaniel P. Berrangé <berrange@redhat.com>
Mon, 31 Mar 2025 10:43:33 +0000 (11:43 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 1 Apr 2025 11:27:13 +0000 (12:27 +0100)
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

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
meson.build

index 50afb74146901e86f15da2fc3192c63ebdf56cc0..f8742338f89a5a6f3a7a4de9f196ff7527c53c8b 100644 (file)
@@ -926,12 +926,12 @@ if acl_dep.found()
   conf.set('WITH_LIBACL', 1)
 endif
 
-apparmor_dep = dependency('libapparmor', required: get_option('apparmor'))
+apparmor_version = '3.0.0'
+apparmor_dep = dependency('libapparmor', version: '>=' + apparmor_version,
+                          required: get_option('apparmor'))
 if apparmor_dep.found()
   conf.set('WITH_APPARMOR', 1)
-  if apparmor_dep.version().version_compare('>=3.0.0')
-    conf.set('WITH_APPARMOR_3', 1)
-  endif
+  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