diff options
Diffstat (limited to 'glusterfs.spec.in')
-rw-r--r-- | glusterfs.spec.in | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/glusterfs.spec.in b/glusterfs.spec.in index 45411a39f66..039a93c43b0 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -106,7 +106,9 @@ # From https://fedoraproject.org/wiki/Packaging:Python#Macros %if ( 0%{?rhel} && 0%{?rhel} <= 6 ) %{!?python2_sitelib: %global python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%global _rundir %{_localstatedir}/run %{!?python2_sitearch: %global python2_sitearch %(python2 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} +%global _rundir /run %endif %if ( 0%{?_with_systemd:1} ) @@ -706,7 +708,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 @@ -887,7 +889,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 @@ -897,7 +899,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 @@ -906,7 +908,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 @@ -1027,7 +1029,7 @@ exit 0 %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/system/posix-acl.so %dir %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/experimental %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/experimental/fdl.so -%dir %attr(0775,gluster,gluster) %{_localstatedir}/run/gluster +%dir %attr(0775,gluster,gluster) %{_rundir}/gluster %if 0%{?_tmpfilesdir:1} %{_tmpfilesdir}/gluster.conf %endif |