Remove unnecessary steps from targeted policy build

We can install the permissivedomains.cil module directly, no need to
copy it to %{buildroot} first.

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
This commit is contained in:
Ondrej Mosnacek 2020-12-12 12:08:56 +01:00 committed by zpytela
parent fa72125856
commit 167b0505ce

View File

@ -424,14 +424,11 @@ mkdir -p %{buildroot}%{_datadir}/selinux/packages
make clean make clean
%if %{BUILD_TARGETED} %if %{BUILD_TARGETED}
# Build targeted policy # Build targeted policy
# Commented out because only targeted ref policy currently builds
cp %{SOURCE28} %{buildroot}/
%makeCmds targeted mcs allow %makeCmds targeted mcs allow
%makeModulesConf targeted base contrib %makeModulesConf targeted base contrib
%installCmds targeted mcs allow %installCmds targeted mcs allow
# install permissivedomains.cil # install permissivedomains.cil
%{_sbindir}/semodule -p %{buildroot} -X 100 -s targeted -i %{buildroot}/permissivedomains.cil %{_sbindir}/semodule -p %{buildroot} -X 100 -s targeted -i %{SOURCE28}
rm -rf %{buildroot}/permissivedomains.cil
# recreate sandbox.pp # recreate sandbox.pp
rm -rf %{buildroot}%{_sharedstatedir}/selinux/targeted/active/modules/100/sandbox rm -rf %{buildroot}%{_sharedstatedir}/selinux/targeted/active/modules/100/sandbox
%make_build %common_params UNK_PERMS=allow NAME=targeted TYPE=mcs sandbox.pp %make_build %common_params UNK_PERMS=allow NAME=targeted TYPE=mcs sandbox.pp