Attempt to use rich dependencies
Selinux boolean should be set only in case given selinux policy is installed. Do not require it inside containers.
This commit is contained in:
parent
e2a32c8eca
commit
7232bc0a99
17
bind.spec
17
bind.spec
|
@ -164,9 +164,10 @@ Obsoletes: caching-nameserver < 31:9.4.1-7.fc8
|
||||||
Provides: caching-nameserver = 31:9.4.1-7.fc8
|
Provides: caching-nameserver = 31:9.4.1-7.fc8
|
||||||
Obsoletes: dnssec-conf < 1.27-2
|
Obsoletes: dnssec-conf < 1.27-2
|
||||||
Provides: dnssec-conf = 1.27-2
|
Provides: dnssec-conf = 1.27-2
|
||||||
Requires(post): policycoreutils-python-utils
|
# This wild require should satisfy %selinux_set_boolean macro only
|
||||||
Requires(post): libselinux-utils
|
# in case it needs to be used
|
||||||
Requires(post): selinux-policy
|
Requires(post): ((policycoreutils-python-utils and libselinux-utils) if (selinux-policy-targeted or selinux-policy-mls))
|
||||||
|
Requires(post): ((selinux-policy and selinux-policy-base) if (selinux-policy-targeted or selinux-policy-mls))
|
||||||
Recommends: bind-utils bind-dnssec-utils
|
Recommends: bind-utils bind-dnssec-utils
|
||||||
BuildRequires: gcc, make
|
BuildRequires: gcc, make
|
||||||
BuildRequires: openssl-devel, libtool, autoconf, pkgconfig, libcap-devel
|
BuildRequires: openssl-devel, libtool, autoconf, pkgconfig, libcap-devel
|
||||||
|
@ -1029,7 +1030,10 @@ fi;
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%?ldconfig
|
%?ldconfig
|
||||||
%selinux_set_booleans %{selinuxbooleans}
|
if -e %{_sysconfdir}/selinux/config; then
|
||||||
|
%selinux_set_booleans -s targeted %{selinuxbooleans}
|
||||||
|
%selinux_set_booleans -s mls %{selinuxbooleans}
|
||||||
|
fi
|
||||||
if [ "$1" -eq 1 ]; then
|
if [ "$1" -eq 1 ]; then
|
||||||
# Initial installation
|
# Initial installation
|
||||||
[ -x /sbin/restorecon ] && /sbin/restorecon /etc/rndc.* /etc/named.* >/dev/null 2>&1 ;
|
[ -x /sbin/restorecon ] && /sbin/restorecon /etc/rndc.* /etc/named.* >/dev/null 2>&1 ;
|
||||||
|
@ -1061,9 +1065,12 @@ fi
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%?ldconfig
|
%?ldconfig
|
||||||
%selinux_unset_booleans %{selinuxbooleans}
|
|
||||||
# Package upgrade, not uninstall
|
# Package upgrade, not uninstall
|
||||||
%systemd_postun_with_restart named.service
|
%systemd_postun_with_restart named.service
|
||||||
|
if -e %{_sysconfdir}/selinux/config; then
|
||||||
|
%selinux_unset_booleans -s targeted %{selinuxbooleans}
|
||||||
|
%selinux_unset_booleans -s mls %{selinuxbooleans}
|
||||||
|
fi
|
||||||
|
|
||||||
%if %{with SDB}
|
%if %{with SDB}
|
||||||
%post sdb
|
%post sdb
|
||||||
|
|
Loading…
Reference in New Issue