summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2017-08-10 13:13:39 -0400
committerShyamsundar Ranganathan <srangana@redhat.com>2017-08-28 12:51:46 +0000
commitbec4e0ca91fecd0788386b2608da7f0ac4c728d5 (patch)
tree4e9cc694dd92efe06b781726ca98dfa12573972b
parentbace1dd564f401f904dac6b965299f77228e4b1d (diff)
packaging: /run and /var/run; prefer /run
Fedora packaging guidelines say to use /run. On newer Fedora and el7 /var/run is a symlink to ../run (i.e. /run). /run is a tmpfs file system that is mounted earlier than /var might be. See https://bugzilla.redhat.com/show_bug.cgi?id=1476794 Reviewed-on: https://review.gluster.org/18017 Change-Id: I08d948a43c7698bebd26c88a673a7f77c2d317ca BUG: 1484440 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: https://review.gluster.org/18100 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
-rw-r--r--glusterfs.spec.in11
1 files changed, 6 insertions, 5 deletions
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
index b13c97f..f68e38f 100644
--- a/glusterfs.spec.in
+++ b/glusterfs.spec.in
@@ -107,6 +107,7 @@
%if ( 0%{?rhel} && 0%{?rhel} <= 6 )
%{!?python2_sitelib: %global python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python2_sitearch: %global python2_sitearch %(python2 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
+%global _rundir %{_localstatedir}/run
%endif
%if ( 0%{?_with_systemd:1} )
@@ -710,7 +711,7 @@ install -D -p -m 0755 %{SOURCE6} \
mkdir -p %{buildroot}%{_localstatedir}/log/glusterd
mkdir -p %{buildroot}%{_localstatedir}/log/glusterfs
mkdir -p %{buildroot}%{_localstatedir}/log/glusterfsd
-mkdir -p %{buildroot}%{_localstatedir}/run/gluster
+mkdir -p %{buildroot}%{_rundir}/gluster
# Remove unwanted files from all the shared libraries
find %{buildroot}%{_libdir} -name '*.a' -delete
@@ -891,7 +892,7 @@ if [ $? -eq 0 ]; then
#Cleaning leftover glusterd socket file which is created by glusterd in
#rpm_script_t context.
- rm -rf /var/run/glusterd.socket
+ rm -f %{_rundir}/glusterd.socket
# glusterd _was_ running, we killed it, it exited after *.upgrade=on,
# so start it again
@@ -901,7 +902,7 @@ else
#Cleaning leftover glusterd socket file which is created by glusterd in
#rpm_script_t context.
- rm -rf /var/run/glusterd.socket
+ rm -f %{_rundir}/glusterd.socket
fi
exit 0
@@ -910,7 +911,7 @@ exit 0
##
%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
+getent passwd gluster > /dev/null || useradd -r -g gluster -d %{_rundir}/gluster -s /sbin/nologin -c "GlusterFS daemons" gluster
exit 0
@@ -1029,7 +1030,7 @@ exit 0
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/performance/nl-cache.so
%dir %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/system
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/system/posix-acl.so
-%dir %attr(0775,gluster,gluster) %{_localstatedir}/run/gluster
+%dir %attr(0775,gluster,gluster) %{_rundir}/gluster
%if 0%{?_tmpfilesdir:1}
%{_tmpfilesdir}/gluster.conf
%endif