[libvirt PATCH 146/351] meson: src: build libvirt_security_manager.a static library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/meson.build              |  1 +
 src/security/Makefile.inc.am | 43 ------------------------------------
 src/security/meson.build     | 31 ++++++++++++++++++++++++++
 3 files changed, 32 insertions(+), 43 deletions(-)
 create mode 100644 src/security/meson.build

diff --git a/src/meson.build b/src/meson.build
index 637f86b5ee4..d416531c12b 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -91,6 +91,7 @@ subdir('remote')
 subdir('admin')
 subdir('locking')
 subdir('logging')
+subdir('security')
 
 subdir('esx')
 subdir('hyperv')
diff --git a/src/security/Makefile.inc.am b/src/security/Makefile.inc.am
index ec24931a80a..12afd7f8db0 100644
--- a/src/security/Makefile.inc.am
+++ b/src/security/Makefile.inc.am
@@ -5,31 +5,6 @@ SECURITY_DRIVER_APPARMOR_HELPER_SOURCES = \
 	security/virt-aa-helper.c \
 	$(NULL)
 
-SECURITY_DRIVER_SOURCES = \
-	security/security_driver.h \
-	security/security_driver.c \
-	security/security_nop.h \
-	security/security_nop.c \
-	security/security_stack.h \
-	security/security_stack.c \
-	security/security_dac.h \
-	security/security_dac.c \
-	security/security_manager.h \
-	security/security_manager.c \
-	security/security_util.h \
-	security/security_util.c \
-	$(NULL)
-
-SECURITY_DRIVER_SELINUX_SOURCES = \
-	security/security_selinux.h \
-	security/security_selinux.c \
-	$(NULL)
-
-SECURITY_DRIVER_APPARMOR_SOURCES = \
-	security/security_apparmor.h \
-	security/security_apparmor.c \
-	$(NULL)
-
 SECURITY_DRIVER_APPARMOR_GENERATED_PROFILES_IN = \
 	security/apparmor/usr.lib.libvirt.virt-aa-helper.in \
 	security/apparmor/usr.sbin.libvirtd.in \
@@ -48,25 +23,7 @@ security/apparmor/%: $(srcdir)/security/apparmor/%.in
 		-e 's|[@]libexecdir[@]|@libexecdir@|' \
 		$< > $@
 
-libvirt_security_manager_la_SOURCES = $(SECURITY_DRIVER_SOURCES)
-noinst_LTLIBRARIES += libvirt_security_manager.la
-libvirt_la_BUILT_LIBADD += libvirt_security_manager.la
-libvirt_security_manager_la_CFLAGS = \
-	-I$(srcdir)/conf \
-	$(AM_CFLAGS) \
-	$(NULL)
-libvirt_security_manager_la_LDFLAGS = $(AM_LDFLAGS)
-libvirt_security_manager_la_LIBADD =
-
-if WITH_SECDRIVER_SELINUX
-libvirt_security_manager_la_SOURCES += $(SECURITY_DRIVER_SELINUX_SOURCES)
-libvirt_security_manager_la_CFLAGS += $(SELINUX_CFLAGS)
-endif WITH_SECDRIVER_SELINUX
-
 if WITH_SECDRIVER_APPARMOR
-libvirt_security_manager_la_SOURCES += $(SECURITY_DRIVER_APPARMOR_SOURCES)
-libvirt_security_manager_la_CFLAGS += $(APPARMOR_CFLAGS)
-
 if WITH_LIBVIRTD
 libexec_PROGRAMS += virt-aa-helper
 
diff --git a/src/security/meson.build b/src/security/meson.build
new file mode 100644
index 00000000000..3dc88c2c546
--- /dev/null
+++ b/src/security/meson.build
@@ -0,0 +1,31 @@
+security_driver_sources = [
+  'security_dac.c',
+  'security_driver.c',
+  'security_manager.c',
+  'security_nop.c',
+  'security_stack.c',
+  'security_util.c',
+]
+
+if conf.has('WITH_SECDRIVER_APPARMOR')
+  security_driver_sources += 'security_apparmor.c'
+endif
+
+if conf.has('WITH_SECDRIVER_SELINUX')
+  security_driver_sources += 'security_selinux.c'
+endif
+
+security_driver_lib = static_library(
+  'virt_security_manager',
+  [
+    security_driver_sources,
+  ],
+  dependencies: [
+    apparmor_dep,
+    selinux_dep,
+    src_dep,
+  ],
+  include_directories: [
+    conf_inc_dir,
+  ],
+)
-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux