Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx> --- src/security/Makefile.inc.am | 31 ------------------------------- src/security/meson.build | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 31 deletions(-) diff --git a/src/security/Makefile.inc.am b/src/security/Makefile.inc.am index 12afd7f8db0..50e2706be9f 100644 --- a/src/security/Makefile.inc.am +++ b/src/security/Makefile.inc.am @@ -1,10 +1,5 @@ # vim: filetype=automake -SECURITY_DRIVER_APPARMOR_HELPER_SOURCES = \ - $(DATATYPES_SOURCES) \ - security/virt-aa-helper.c \ - $(NULL) - SECURITY_DRIVER_APPARMOR_GENERATED_PROFILES_IN = \ security/apparmor/usr.lib.libvirt.virt-aa-helper.in \ security/apparmor/usr.sbin.libvirtd.in \ @@ -23,32 +18,6 @@ security/apparmor/%: $(srcdir)/security/apparmor/%.in -e 's|[@]libexecdir[@]|@libexecdir@|' \ $< > $@ -if WITH_SECDRIVER_APPARMOR -if WITH_LIBVIRTD -libexec_PROGRAMS += virt-aa-helper - -virt_aa_helper_SOURCES = $(SECURITY_DRIVER_APPARMOR_HELPER_SOURCES) - -virt_aa_helper_LDFLAGS = \ - $(AM_LDFLAGS) \ - $(NULL) -virt_aa_helper_LDADD = \ - libvirt.la \ - libvirt_driver_storage_impl.la \ - $(GLIB_LIBS) \ - $(NULL) -if WITH_DTRACE_PROBES -virt_aa_helper_LDADD += libvirt_probes.lo -endif WITH_DTRACE_PROBES -virt_aa_helper_CFLAGS = \ - -I$(srcdir)/conf \ - -I$(top_srcdir)/src/hypervisor \ - -I$(srcdir)/security \ - $(AM_CFLAGS) \ - $(NULL) -endif WITH_LIBVIRTD -endif WITH_SECDRIVER_APPARMOR - if WITH_APPARMOR_PROFILES apparmordir = $(sysconfdir)/apparmor.d/ apparmor_DATA = \ diff --git a/src/security/meson.build b/src/security/meson.build index 1e85d8dcf5f..4014ddccc45 100644 --- a/src/security/meson.build +++ b/src/security/meson.build @@ -15,6 +15,10 @@ if conf.has('WITH_SECDRIVER_SELINUX') security_driver_sources += 'security_selinux.c' endif +apparmor_helper_sources = files( + 'virt-aa-helper.c', +) + security_driver_lib = static_library( 'virt_security_manager', [ @@ -31,3 +35,19 @@ security_driver_lib = static_library( ) libvirt_libs += security_driver_lib + +if conf.has('WITH_LIBVIRTD') and conf.has('WITH_APPARMOR') + virt_helpers += { + 'name': 'virt-aa-helper', + 'sources': [ + apparmor_helper_sources, + datatypes_sources, + dtrace_gen_objects, + ], + 'include': [ + conf_inc_dir, + hypervisor_inc_dir, + include_directories('.'), + ], + } +endif -- 2.26.2