The selinux policy currently builds manually, as a process that either
the user or distribution maintainer undertakes. That process consists
of:
1. Convert the intermediary files into their file form through
'make' statements at the top level.
2. Change to the selinux directory and issue the selinux "make -f"
directive.
This commit introduces a new target 'selinux-policy' which builds the
openvswitch-custom policy files.
Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Ansis Atteka <aatteka@ovn.org>
> rhel/usr_lib_systemd_system_ovs-vswitchd.service
make %{?_smp_mflags}
-make selinux/openvswitch-custom.te
-cd selinux
-make -f %{_datadir}/selinux/devel/Makefile
+make selinux-policy
%install
rm -rf $RPM_BUILD_ROOT
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=%{_localstatedir} \
--libdir=%{_libdir} --enable-ssl --enable-shared
make %{_smp_mflags}
-make selinux/openvswitch-custom.te
-cd selinux
-make -f %{_datadir}/selinux/devel/Makefile
+make selinux-policy
%install
rm -rf $RPM_BUILD_ROOT
EXTRA_DIST += \
selinux/openvswitch-custom.te.in
+
+PHONY: selinux-policy
+
+selinux-policy: selinux/openvswitch-custom.te
+ $(MAKE) -C selinux/ -f /usr/share/selinux/devel/Makefile