|
|
21ab4e |
From c37e8974ac8506bfa6a59445f9e25996e13c82c2 Mon Sep 17 00:00:00 2001
|
|
|
21ab4e |
From: Niels de Vos <ndevos@redhat.com>
|
|
|
21ab4e |
Date: Wed, 3 May 2017 22:31:57 +0200
|
|
|
21ab4e |
Subject: [PATCH 411/426] packaging: /var/run/gluster owner
|
|
|
21ab4e |
gluster:gluster(0775) for statedumps
|
|
|
21ab4e |
|
|
|
21ab4e |
gfapi has the ability to take statedumps. However, if the application
|
|
|
21ab4e |
using gfapi isn't running with root privs the statedump file can't be
|
|
|
21ab4e |
written to the default location, i.e. /var/run/gluster.
|
|
|
21ab4e |
|
|
|
21ab4e |
Cherry picked from commit 0e50c4b3ea734456c14e2d7a578463999bd332c3:
|
|
|
21ab4e |
> Change-Id: I97d8919ef8b8cd4775e1a206f939a2bf0046786d
|
|
|
21ab4e |
> BUG: 1445569
|
|
|
21ab4e |
> Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
|
|
|
21ab4e |
> Reviewed-on: https://review.gluster.org/17122
|
|
|
21ab4e |
> Smoke: Gluster Build System <jenkins@build.gluster.org>
|
|
|
21ab4e |
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
|
|
|
21ab4e |
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
|
|
|
21ab4e |
> Reviewed-by: Niels de Vos <ndevos@redhat.com>
|
|
|
21ab4e |
|
|
|
21ab4e |
Change-Id: I97d8919ef8b8cd4775e1a206f939a2bf0046786d
|
|
|
21ab4e |
BUG: 1445570
|
|
|
21ab4e |
Signed-off-by: Niels de Vos <ndevos@redhat.com>
|
|
|
21ab4e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/105119
|
|
|
21ab4e |
Reviewed-by: Milind Changire <mchangir@redhat.com>
|
|
|
21ab4e |
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
21ab4e |
---
|
|
|
21ab4e |
extras/run-gluster.tmpfiles.in | 2 +-
|
|
|
21ab4e |
glusterfs.spec.in | 15 ++++++++++++++-
|
|
|
21ab4e |
2 files changed, 15 insertions(+), 2 deletions(-)
|
|
|
21ab4e |
|
|
|
21ab4e |
diff --git a/extras/run-gluster.tmpfiles.in b/extras/run-gluster.tmpfiles.in
|
|
|
21ab4e |
index 49a2662..329f2dd 100644
|
|
|
21ab4e |
--- a/extras/run-gluster.tmpfiles.in
|
|
|
21ab4e |
+++ b/extras/run-gluster.tmpfiles.in
|
|
|
21ab4e |
@@ -1,2 +1,2 @@
|
|
|
21ab4e |
# hardcoding /run for now, should be detected while building from source?
|
|
|
21ab4e |
-d /run/gluster 0755 root root -
|
|
|
21ab4e |
+d /run/gluster 0775 gluster gluster -
|
|
|
21ab4e |
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
|
|
|
21ab4e |
index da334d5..c83f897 100644
|
|
|
21ab4e |
--- a/glusterfs.spec.in
|
|
|
21ab4e |
+++ b/glusterfs.spec.in
|
|
|
21ab4e |
@@ -208,6 +208,7 @@ Source0: @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz
|
|
|
21ab4e |
|
|
|
21ab4e |
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
|
|
21ab4e |
|
|
|
21ab4e |
+Requires(pre): shadow-utils
|
|
|
21ab4e |
%if ( 0%{?rhel} && 0%{?rhel} <= 5 )
|
|
|
21ab4e |
BuildRequires: python-simplejson
|
|
|
21ab4e |
%endif
|
|
|
21ab4e |
@@ -924,6 +925,15 @@ fi
|
|
|
21ab4e |
%endif
|
|
|
21ab4e |
|
|
|
21ab4e |
##-----------------------------------------------------------------------------
|
|
|
21ab4e |
+## All %%pre should be placed here and keep them sorted
|
|
|
21ab4e |
+##
|
|
|
21ab4e |
+%pre
|
|
|
21ab4e |
+getent group gluster > /dev/null || groupadd -r gluster
|
|
|
21ab4e |
+getent passwd gluster > /dev/null || useradd -r -g gluster -d /var/run/gluster -s /sbin/nologin -c "GlusterFS daemons" gluster
|
|
|
21ab4e |
+exit 0
|
|
|
21ab4e |
+
|
|
|
21ab4e |
+
|
|
|
21ab4e |
+##-----------------------------------------------------------------------------
|
|
|
21ab4e |
## All %%preun should be placed here and keep them sorted
|
|
|
21ab4e |
##
|
|
|
21ab4e |
%if ( 0%{?_build_server} )
|
|
|
21ab4e |
@@ -1130,7 +1140,7 @@ exit 0
|
|
|
21ab4e |
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/performance/write-behind.so
|
|
|
21ab4e |
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/performance/nl-cache.so
|
|
|
21ab4e |
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/system/posix-acl.so
|
|
|
21ab4e |
-%dir %{_localstatedir}/run/gluster
|
|
|
21ab4e |
+%dir %attr(0775,gluster,gluster) %{_localstatedir}/run/gluster
|
|
|
21ab4e |
%if 0%{?_tmpfilesdir:1}
|
|
|
21ab4e |
%{_tmpfilesdir}/gluster.conf
|
|
|
21ab4e |
%endif
|
|
|
21ab4e |
@@ -2051,6 +2061,9 @@ end
|
|
|
21ab4e |
%endif
|
|
|
21ab4e |
|
|
|
21ab4e |
%changelog
|
|
|
21ab4e |
+* Wed May 3 2017 Niels de Vos <ndevos@redhat.com>
|
|
|
21ab4e |
+- /var/run/gluster owner gluster:gluster(0775) for qemu(gfapi) statedumps (#1445570)
|
|
|
21ab4e |
+
|
|
|
21ab4e |
* Wed Feb 1 2017 Poornima G <pgurusid@redhat.com>
|
|
|
21ab4e |
- Install /var/lib/glusterd/groups/metadata-cache by default
|
|
|
21ab4e |
|
|
|
21ab4e |
--
|
|
|
21ab4e |
1.8.3.1
|
|
|
21ab4e |
|