[PATCH 6/7] apparmor: Move static data out of examples/

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

 



These files need to be installed on the system for apparmor
support to work, so they don't belong with examples.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 examples/Makefile.am                          | 40 -------------------
 src/security/Makefile.inc.am                  | 40 +++++++++++++++++++
 .../security}/apparmor/TEMPLATE.lxc           |  0
 .../security}/apparmor/TEMPLATE.qemu          |  0
 .../security}/apparmor/libvirt-lxc            |  0
 .../security}/apparmor/libvirt-qemu           |  0
 .../apparmor/usr.lib.libvirt.virt-aa-helper   |  0
 .../security}/apparmor/usr.sbin.libvirtd      |  0
 8 files changed, 40 insertions(+), 40 deletions(-)
 rename {examples => src/security}/apparmor/TEMPLATE.lxc (100%)
 rename {examples => src/security}/apparmor/TEMPLATE.qemu (100%)
 rename {examples => src/security}/apparmor/libvirt-lxc (100%)
 rename {examples => src/security}/apparmor/libvirt-qemu (100%)
 rename {examples => src/security}/apparmor/usr.lib.libvirt.virt-aa-helper (100%)
 rename {examples => src/security}/apparmor/usr.sbin.libvirtd (100%)

diff --git a/examples/Makefile.am b/examples/Makefile.am
index 76907a1c8f..e2ec6e7fba 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -19,12 +19,6 @@
 FILTERS = $(wildcard $(srcdir)/xml/nwfilter/*.xml)
 
 EXTRA_DIST = \
-	apparmor/TEMPLATE.qemu \
-	apparmor/TEMPLATE.lxc \
-	apparmor/libvirt-qemu \
-	apparmor/libvirt-lxc \
-	apparmor/usr.lib.libvirt.virt-aa-helper \
-	apparmor/usr.sbin.libvirtd \
 	lxcconvert/virt-lxc-convert \
 	polkit/libvirt-acl.rules \
 	$(wildcard $(srcdir)/systemtap/*.stp) \
@@ -70,40 +64,6 @@ admin_logging_SOURCES = admin/logging.c
 INSTALL_DATA_LOCAL =
 UNINSTALL_LOCAL =
 
-if WITH_APPARMOR_PROFILES
-apparmordir = $(sysconfdir)/apparmor.d/
-apparmor_DATA = \
-	apparmor/usr.lib.libvirt.virt-aa-helper \
-	apparmor/usr.sbin.libvirtd \
-	$(NULL)
-
-abstractionsdir = $(apparmordir)/abstractions
-abstractions_DATA = \
-	apparmor/libvirt-qemu \
-	apparmor/libvirt-lxc \
-	$(NULL)
-
-templatesdir = $(apparmordir)/libvirt
-templates_DATA = \
-	apparmor/TEMPLATE.qemu \
-	apparmor/TEMPLATE.lxc \
-	$(NULL)
-
-APPARMOR_LOCAL_DIR = "$(DESTDIR)$(apparmordir)/local"
-install-apparmor-local:
-	$(MKDIR_P) "$(APPARMOR_LOCAL_DIR)"
-	echo "# Site-specific additions and overrides for \
-		'usr.lib.libvirt.virt-aa-helper'" \
-		>"$(APPARMOR_LOCAL_DIR)/usr.lib.libvirt.virt-aa-helper"
-
-uninstall-apparmor-local:
-	rm -f "$(APPARMOR_LOCAL_DIR)/usr.lib.libvirt.virt-aa-helper"
-	rmdir "$(APPARMOR_LOCAL_DIR)" || :
-
-INSTALL_DATA_LOCAL += install-apparmor-local
-UNINSTALL_LOCAL += uninstall-apparmor-local
-endif WITH_APPARMOR_PROFILES
-
 if WITH_NWFILTER
 NWFILTER_DIR = "$(DESTDIR)$(sysconfdir)/libvirt/nwfilter"
 
diff --git a/src/security/Makefile.inc.am b/src/security/Makefile.inc.am
index 0ade97d355..b24cdfd083 100644
--- a/src/security/Makefile.inc.am
+++ b/src/security/Makefile.inc.am
@@ -32,6 +32,12 @@ EXTRA_DIST += \
 	$(SECURITY_DRIVER_SELINUX_SOURCES) \
 	$(SECURITY_DRIVER_APPARMOR_SOURCES) \
 	$(SECURITY_DRIVER_APPARMOR_HELPER_SOURCES) \
+	security/apparmor/TEMPLATE.qemu \
+	security/apparmor/TEMPLATE.lxc \
+	security/apparmor/libvirt-qemu \
+	security/apparmor/libvirt-lxc \
+	security/apparmor/usr.lib.libvirt.virt-aa-helper \
+	security/apparmor/usr.sbin.libvirtd \
 	$(NULL)
 
 libvirt_security_manager_la_SOURCES = $(SECURITY_DRIVER_SOURCES)
@@ -80,3 +86,37 @@ virt_aa_helper_CFLAGS = \
 	$(NULL)
 endif WITH_LIBVIRTD
 endif WITH_SECDRIVER_APPARMOR
+
+if WITH_APPARMOR_PROFILES
+apparmordir = $(sysconfdir)/apparmor.d/
+apparmor_DATA = \
+	security/apparmor/usr.lib.libvirt.virt-aa-helper \
+	security/apparmor/usr.sbin.libvirtd \
+	$(NULL)
+
+abstractionsdir = $(apparmordir)/abstractions
+abstractions_DATA = \
+	security/apparmor/libvirt-qemu \
+	security/apparmor/libvirt-lxc \
+	$(NULL)
+
+templatesdir = $(apparmordir)/libvirt
+templates_DATA = \
+	security/apparmor/TEMPLATE.qemu \
+	security/apparmor/TEMPLATE.lxc \
+	$(NULL)
+
+APPARMOR_LOCAL_DIR = "$(DESTDIR)$(apparmordir)/local"
+install-apparmor-local:
+	$(MKDIR_P) "$(APPARMOR_LOCAL_DIR)"
+	echo "# Site-specific additions and overrides for \
+		'usr.lib.libvirt.virt-aa-helper'" \
+		>"$(APPARMOR_LOCAL_DIR)/usr.lib.libvirt.virt-aa-helper"
+
+uninstall-apparmor-local:
+	rm -f "$(APPARMOR_LOCAL_DIR)/usr.lib.libvirt.virt-aa-helper"
+	rmdir "$(APPARMOR_LOCAL_DIR)" || :
+
+INSTALL_DATA_LOCAL += install-apparmor-local
+UNINSTALL_LOCAL += uninstall-apparmor-local
+endif WITH_APPARMOR_PROFILES
diff --git a/examples/apparmor/TEMPLATE.lxc b/src/security/apparmor/TEMPLATE.lxc
similarity index 100%
rename from examples/apparmor/TEMPLATE.lxc
rename to src/security/apparmor/TEMPLATE.lxc
diff --git a/examples/apparmor/TEMPLATE.qemu b/src/security/apparmor/TEMPLATE.qemu
similarity index 100%
rename from examples/apparmor/TEMPLATE.qemu
rename to src/security/apparmor/TEMPLATE.qemu
diff --git a/examples/apparmor/libvirt-lxc b/src/security/apparmor/libvirt-lxc
similarity index 100%
rename from examples/apparmor/libvirt-lxc
rename to src/security/apparmor/libvirt-lxc
diff --git a/examples/apparmor/libvirt-qemu b/src/security/apparmor/libvirt-qemu
similarity index 100%
rename from examples/apparmor/libvirt-qemu
rename to src/security/apparmor/libvirt-qemu
diff --git a/examples/apparmor/usr.lib.libvirt.virt-aa-helper b/src/security/apparmor/usr.lib.libvirt.virt-aa-helper
similarity index 100%
rename from examples/apparmor/usr.lib.libvirt.virt-aa-helper
rename to src/security/apparmor/usr.lib.libvirt.virt-aa-helper
diff --git a/examples/apparmor/usr.sbin.libvirtd b/src/security/apparmor/usr.sbin.libvirtd
similarity index 100%
rename from examples/apparmor/usr.sbin.libvirtd
rename to src/security/apparmor/usr.sbin.libvirtd
-- 
2.20.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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