From: Daniel P. Berrangé <berra...@redhat.com> Now that we mandate version 3, any remaining conditional checks in meson/source code can be removed.
Signed-off-by: Daniel P. Berrangé <berra...@redhat.com> --- 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 = dependency('libapparmor', version: '>=' + 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/meson.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) /* create the profile from TEMPLATE */ if (ctl->cmd == 'c' || purged) { - g_autofree char *tmp = NULL; -#if defined(WITH_APPARMOR_3) - const char *ifexists = "if exists "; -#else - const char *ifexists = ""; -#endif - tmp = g_strdup_printf(" #include %s<libvirt/%s.files>\n", ifexists, ctl->uuid); + g_autofree char *tmp = g_strdup_printf( + " #include if exists <libvirt/%s.files>\n", ctl->uuid); if (ctl->dryrun) { vah_info(profile); -- 2.48.1