From: Daniel P. Berrangé <berrange(a)redhat.com>
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é <berrange(a)redhat.com>
---
meson.build | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 56823ca25b..d148d3de0b 100644
--- a/meson.build
+++ b/meson.build
@@ -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
--
2.48.1