fix(selinux): resolve distcheck errors

main
Tsu-ba-me 10 months ago
parent 54646bfb66
commit 8a21e84548
  1. 2
      Makefile.am
  2. 1
      configure.ac
  3. 70
      selinux/Makefile.am
  4. 7
      selinux/anvil-node.te
  5. 30
      selinux/anvil-subnode.te

@ -21,7 +21,7 @@ TARFILES = $(PACKAGE_NAME)-$(VERSION).tar.bz2 \
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
SUBDIRS = Anvil cgi-bin html journald.conf.d libvirt man ocf \ SUBDIRS = Anvil cgi-bin html journald.conf.d libvirt man ocf \
pxe scancore-agents scripts share striker-ui \ pxe scancore-agents scripts selinux share striker-ui \
striker-ui-api tools units striker-ui-api tools units
anvilconfdir = ${sysconfdir}/anvil anvilconfdir = ${sysconfdir}/anvil

@ -165,6 +165,7 @@ AC_CONFIG_FILES([Makefile
pxe/Makefile pxe/Makefile
scancore-agents/Makefile scancore-agents/Makefile
scripts/Makefile scripts/Makefile
selinux/Makefile
share/Makefile share/Makefile
striker-ui/Makefile striker-ui/Makefile
striker-ui-api/Makefile striker-ui-api/Makefile

@ -3,18 +3,64 @@ MAINTAINERCLEANFILES = Makefile.in
SE_MAKEFILE_PATH = /usr/share/selinux/devel/Makefile SE_MAKEFILE_PATH = /usr/share/selinux/devel/Makefile
SE_TYPE = targeted SE_TYPE = targeted
anvil-node.pp: anvil-node.te SE_SRC_SUBNODE_TE = anvil-subnode.te
-@echo "Target: anvil-node.pp"
-@if ! test -r $(SE_MAKEFILE_PATH); then \ EXTRA_DIST = \
-@echo "Missing makefile from selinux devel. \ $(SE_SRC_SUBNODE_TE)
Did you forget to install the selinux-policy-devel package?"
# Variables:
# $@ : target name
# $< : first prerequisite
# $^ : all prerequisites
#
# Command prefixes:
# - : ignore errors
# @ : don't print command
all: anvil-subnode.pp
-@echo "Making $@: $^"
.PHONY: se-makefile
se-makefile:
-@echo "Making $@: $^"
if ! test -r "$(SE_MAKEFILE_PATH)"; then \
printf "\n*** %s\n*** %s\n\n" \
"Missing makefile from selinux devel." \
"Did you forget to install the selinux-policy-devel package?" >&2; \
exit 1; \
fi fi
make -f $(SE_MAKEFILE_PATH) $@
install: .PHONY: subnode-te
-@echo "Target: install" subnode-te: anvil-subnode.te
install -D -m 0644 -t $(DESTDIR)/usr/share/selinux/packages/$(SE_TYPE)/ anvil-node.pp -@echo "Making $@: $^"
cp -r -p --no-preserve=mode "$<" "./$(SE_SRC_SUBNODE_TE)"
anvil-subnode.pp: se-makefile subnode-te
-@echo "Making $@: $^"
-pwd
-ls -Al "$(srcdir)"
-ls -Al
make -f "$(SE_MAKEFILE_PATH)" "$@"
-ls -Al "$(srcdir)"
-ls -Al
install-data-hook:
-@echo "Making $@: $^"
-pwd
-@echo "srcdir: $(srcdir)"
-@echo "destdir: $(destdir)"
-@echo "DESTDIR: $(DESTDIR)"
uninstall-hook:
-@echo "Making $@: $^"
-pwd
-@echo "srcdir: $(srcdir)"
-@echo "destdir: $(destdir)"
-@echo "DESTDIR: $(DESTDIR)"
clean: clean-local:
-@echo "Target: clean" -@echo "Making $@: $^"
rm -f *.pp -pwd
-ls -Al
rm -f *.fc *.if *.pp *.te
rm -rf tmp

@ -1,7 +0,0 @@
#============= drbd_t ==============
allow drbd_t self:netlink_generic_socket { bind create getattr setopt };
allow drbd_t var_lock_t:file { read lock open write };
#============= virsh_t ==============
allow virsh_t mnt_t:file { open read };

@ -0,0 +1,30 @@
policy_module(anvil-subnode, 1.0.0)
########################################
#
# Declarations
#
########################################
#
# Local policy
#
# Use existing types; don't declare unless it's new.
#
require {
# type drbd_t;
type mnt_t;
type var_lock_t;
type virsh_t;
}
#============= drbd_t ==============
# allow drbd_t self:netlink_generic_socket { bind create getattr setopt };
# allow drbd_t var_lock_t:file { read lock open write };
#============= virsh_t ==============
allow virsh_t mnt_t:file { open read };
Loading…
Cancel
Save