提交 6ee53e54 编写于 作者: A Andrea Bolognani

apparmor: Move static data out of examples/

These files need to be installed on the system for apparmor
support to work, so they don't belong with examples.
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
Reviewed-by: NErik Skultety <eskultet@redhat.com>
上级 50d5cb0d
......@@ -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"
......
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册