diff options
author | Sunny Kumar <sunkumar@redhat.com> | 2020-04-20 12:15:42 +0100 |
---|---|---|
committer | Sunny Kumar <sunkumar@redhat.com> | 2020-04-28 08:32:54 +0000 |
commit | 37d6c03902c71fec611a70e52e92a2dc36a26706 (patch) | |
tree | 9487d8222aa0e916b00f886376e4f54f69879c53 /glusterfs.spec.in | |
parent | 2857fe3fad4d2b30894847088a54b847b88a23b9 (diff) | |
download | glusterfs-37d6c03902c71fec611a70e52e92a2dc36a26706.tar.gz glusterfs-37d6c03902c71fec611a70e52e92a2dc36a26706.tar.xz glusterfs-37d6c03902c71fec611a70e52e92a2dc36a26706.zip |
build: geo-rep requires relevant selinux permission for rsync
If selinux is set in enforcing mode geo-rep goes into faulty state.
To avoid this from happening some relevant selinux booleans need to be set
in 'on' state to allow rsync operation.
Change-Id: Ia8ce530d6548c2a545f4c99c600f5aac2bbb3363
Fixes: #1182
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
Diffstat (limited to 'glusterfs.spec.in')
-rw-r--r-- | glusterfs.spec.in | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/glusterfs.spec.in b/glusterfs.spec.in index 607fa9bbdc..67f4783edf 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -111,6 +111,12 @@ ## All %%global definitions should be placed here and keep them sorted ## +# selinux booleans whose defalut value needs modification +# these booleans will be consumed by "%%selinux_set_booleans" macro. +%if ( 0%{?rhel} && 0%{?rhel} >= 8 ) +%global selinuxbooleans rsync_full_access=1 rsync_client=1 +%endif + %if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} > 6 ) %global _with_systemd true %endif @@ -466,6 +472,12 @@ Requires: python%{_pythonver}-gluster = %{version}-%{release} Requires: rsync Requires: util-linux +# required for setting selinux bools +%if ( 0%{?rhel} && 0%{?rhel} >= 8 ) +Requires: selinux-policy-targeted +Requires(post): selinux-policy-targeted +BuildRequires: selinux-policy-devel +%endif %description geo-replication GlusterFS is a distributed file-system capable of scaling to several @@ -864,6 +876,9 @@ exit 0 %if ( 0%{!?_without_georeplication:1} ) %post geo-replication +%if ( 0%{?rhel} && 0%{?rhel} >= 8 ) +%selinux_set_booleans %{selinuxbooleans} +%endif if [ $1 -ge 1 ]; then %systemd_postun_with_restart glusterd fi |