summaryrefslogtreecommitdiffstats
path: root/glusterfs.spec.in
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2017-04-26 08:11:56 -0400
committerKaleb KEITHLEY <kkeithle@redhat.com>2017-04-27 15:57:15 +0000
commit0e50c4b3ea734456c14e2d7a578463999bd332c3 (patch)
tree91f6440b85a36bc04e988e4829aa86a3b6b72396 /glusterfs.spec.in
parenta94b7df7b9308a590ebcac15536d22a386561f10 (diff)
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>
Diffstat (limited to 'glusterfs.spec.in')
-rw-r--r--glusterfs.spec.in16
1 files changed, 15 insertions, 1 deletions
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
index 89cc284fcb3..27a4351c1af 100644
--- a/glusterfs.spec.in
+++ b/glusterfs.spec.in
@@ -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
@@ -876,6 +877,15 @@ 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
##
%if ( 0%{!?_without_events:1} )
@@ -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)