Update selinux policy macros to reflect the latest changes in
selinux-policy-macros repo
This commit is contained in:
parent
11e95ea76d
commit
5c972253e7
10
rpm.macros
10
rpm.macros
@ -20,11 +20,13 @@
|
|||||||
|
|
||||||
%_selinux_policy_version SELINUXPOLICYVERSION
|
%_selinux_policy_version SELINUXPOLICYVERSION
|
||||||
|
|
||||||
|
%_selinux_store_path SELINUXSTOREPATH
|
||||||
|
|
||||||
%_file_context_file %{_sysconfdir}/selinux/${SELINUXTYPE}/contexts/files/file_contexts
|
%_file_context_file %{_sysconfdir}/selinux/${SELINUXTYPE}/contexts/files/file_contexts
|
||||||
%_file_context_file_pre %{_localstatedir}/lib/rpm-state/file_contexts.pre
|
%_file_context_file_pre %{_localstatedir}/lib/rpm-state/file_contexts.pre
|
||||||
|
|
||||||
%_file_custom_defined_booleans %{_sharedstatedir}/selinux/${_policytype}/rpmbooleans.custom
|
%_file_custom_defined_booleans %{_selinux_store_path}/${_policytype}/rpmbooleans.custom
|
||||||
%_file_custom_defined_booleans_tmp %{_sharedstatedir}/selinux/${_policytype}/rpmbooleans.custom.tmp
|
%_file_custom_defined_booleans_tmp %{_selinux_store_path}/${_policytype}/rpmbooleans.custom.tmp
|
||||||
|
|
||||||
# %selinux_requires
|
# %selinux_requires
|
||||||
%selinux_requires \
|
%selinux_requires \
|
||||||
@ -64,7 +66,7 @@ if [ -z "${_policytype}" ]; then \
|
|||||||
_policytype="targeted" \
|
_policytype="targeted" \
|
||||||
fi \
|
fi \
|
||||||
if [ $1 -eq 0 ]; then \
|
if [ $1 -eq 0 ]; then \
|
||||||
%{_sbindir}/semodule -n -X %{!-p:200}%{-p*} -r %* &> /dev/null || : \
|
%{_sbindir}/semodule -n -X %{!-p:200}%{-p*} -s ${_policytype} -r %* &> /dev/null || : \
|
||||||
if %{_sbindir}/selinuxenabled && [ "${SELINUXTYPE}" = "${_policytype}" ]; then \
|
if %{_sbindir}/selinuxenabled && [ "${SELINUXTYPE}" = "${_policytype}" ]; then \
|
||||||
%{_sbindir}/load_policy \
|
%{_sbindir}/load_policy \
|
||||||
fi \
|
fi \
|
||||||
@ -93,7 +95,7 @@ if [ -z "${_policytype}" ]; then \
|
|||||||
fi \
|
fi \
|
||||||
if %{_sbindir}/selinuxenabled && [ "${SELINUXTYPE}" = "${_policytype}" ]; then \
|
if %{_sbindir}/selinuxenabled && [ "${SELINUXTYPE}" = "${_policytype}" ]; then \
|
||||||
if [ -f %{_file_context_file_pre} ]; then \
|
if [ -f %{_file_context_file_pre} ]; then \
|
||||||
%{_sbindir}/fixfiles -C %{_file_context_file_pre} restore \
|
%{_sbindir}/fixfiles -C %{_file_context_file_pre} restore &> /dev/null \
|
||||||
rm -f %{_file_context_file_pre} \
|
rm -f %{_file_context_file_pre} \
|
||||||
fi \
|
fi \
|
||||||
fi \
|
fi \
|
||||||
|
@ -438,6 +438,7 @@ mv %{buildroot}%{_usr}/share/man/man8/style.css %{buildroot}%{_usr}/share/selinu
|
|||||||
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d
|
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d
|
||||||
install -m 644 %{SOURCE102} %{buildroot}%{_rpmconfigdir}/macros.d/macros.selinux-policy
|
install -m 644 %{SOURCE102} %{buildroot}%{_rpmconfigdir}/macros.d/macros.selinux-policy
|
||||||
sed -i 's/SELINUXPOLICYVERSION/%{version}-%{release}/' %{buildroot}%{_rpmconfigdir}/macros.d/macros.selinux-policy
|
sed -i 's/SELINUXPOLICYVERSION/%{version}-%{release}/' %{buildroot}%{_rpmconfigdir}/macros.d/macros.selinux-policy
|
||||||
|
sed -i 's/SELINUXSTOREPATH/%{_sharestatedir}/selinux/' %{buildroot}%{_rpmconfigdir}/macros.d/macros.selinux-policy
|
||||||
|
|
||||||
|
|
||||||
rm -rf selinux_config
|
rm -rf selinux_config
|
||||||
|
Loading…
Reference in New Issue
Block a user