packaging: /var/run/gluster owner gluster:gluster(0775) for statedumps

gfapi has the ability to take statedumps. However, if the application
using gfapi isn't running with root privs the statedump file can't be
written to the default location, i.e. /var/run/gluster.

Change-Id: I97d8919ef8b8cd4775e1a206f939a2bf0046786d
BUG: 1445569
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: https://review.gluster.org/17122
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Kaleb S. KEITHLEY 2017-04-26 08:11:56 -04:00 committed by Kaleb KEITHLEY
parent a94b7df7b9
commit 0e50c4b3ea
2 changed files with 16 additions and 2 deletions

View File

@ -1,2 +1,2 @@
# hardcoding /run for now, should be detected while building from source?
d /run/gluster 0755 root root -
d /run/gluster 0775 gluster gluster -

View File

@ -190,6 +190,7 @@ Source0: @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Requires(pre): shadow-utils
%if ( 0%{?rhel} && 0%{?rhel} <= 5 )
BuildRequires: python-simplejson
%endif
@ -875,6 +876,15 @@ else
fi
exit 0
##-----------------------------------------------------------------------------
## All %%pre should be placed here and keep them sorted
##
%pre
getent group gluster > /dev/null || groupadd -r gluster
getent passwd gluster > /dev/null || useradd -r -g gluster -d /var/run/gluster -s /sbin/nologin -c "GlusterFS daemons" gluster
exit 0
##-----------------------------------------------------------------------------
## All %%preun should be placed here and keep them sorted
##
@ -983,7 +993,7 @@ exit 0
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/performance/write-behind.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/performance/nl-cache.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/system/posix-acl.so
%dir %{_localstatedir}/run/gluster
%dir %attr(0775,gluster,gluster) %{_localstatedir}/run/gluster
%if 0%{?_tmpfilesdir:1}
%{_tmpfilesdir}/gluster.conf
%endif
@ -1262,6 +1272,10 @@ exit 0
%endif
%changelog
* Wed Apr 26 2017 Kaleb S. KEITHLEY <kkeithle@redhat.com>
- /var/run/gluster owner gluster:gluster(0775) for qemu(gfapi)
statedumps (#1445569)
* Thu Apr 20 2017 Kaleb S. KEITHLEY <kkeithle@redhat.com>
- firewalld-filesystem -> firewalld (#1443959)