diff options
author | Kaleb S. KEITHLEY <kkeithle@redhat.com> | 2017-08-23 11:33:48 -0400 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2017-09-14 02:21:39 +0000 |
commit | 3ac9840d109554ad92937e8d89bc95e7d2289de2 (patch) | |
tree | 9e5d64a51ad2a7915df6b0b7b6f05b976b6bd1d2 | |
parent | 6a84270897f35adca37c304cc06d80ec849b1dea (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
(Not sure why the python2 macros are/were conditional on rhel <= 5
in this branch. In later branches and over in CentOS Storage SIG
dist-git and, less importantly in Fedora dist-git, it is rhel <= 6;
which is correct IMO.)
Reviewed-on: https://review.gluster.org/18017
Change-Id: I08d948a43c7698bebd26c88a673a7f77c2d317ca
BUG: 1484443
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: https://review.gluster.org/18101
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
-rw-r--r-- | glusterfs.spec.in | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/glusterfs.spec.in b/glusterfs.spec.in index 87fb390bbe7..18009623e75 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -96,9 +96,10 @@ %endif # From https://fedoraproject.org/wiki/Packaging:Python#Macros -%if ( 0%{?rhel} && 0%{?rhel} <= 5 ) +%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} ) @@ -704,7 +705,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 @@ -757,9 +758,9 @@ install -D -p -m 0644 extras/glusterfs-logrotate \ # ganesha ghosts mkdir -p %{buildroot}%{_sysconfdir}/ganesha touch %{buildroot}%{_sysconfdir}/ganesha/ganesha-ha.conf -mkdir -p %{buildroot}%{_localstatedir}/run/gluster/shared_storage/nfs-ganesha/exports -touch %{buildroot}%{_localstatedir}/run/gluster/shared_storage/nfs-ganesha/ganesha.conf -touch %{buildroot}%{_localstatedir}/run/gluster/shared_storage/nfs-ganesha/ganesha-ha.conf +mkdir -p %{buildroot}%{_rundir}/gluster/shared_storage/nfs-ganesha/exports +touch %{buildroot}%{_rundir}/gluster/shared_storage/nfs-ganesha/ganesha.conf +touch %{buildroot}%{_rundir}/gluster/shared_storage/nfs-ganesha/ganesha-ha.conf %if ( 0%{!?_without_georeplication:1} ) # geo-rep ghosts @@ -898,7 +899,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 -rf %{_rundir}/glusterd.socket # glusterd _was_ running, we killed it, it exited after *.upgrade=on, # so start it again @@ -908,7 +909,7 @@ else #Cleaning leftover glusterd socket file which is created by glusterd in #rpm_script_t context. - rm -rf /var/run/glusterd.socket + rm -rf %{_rundir}/glusterd.socket fi exit 0 @@ -1041,7 +1042,7 @@ exit 0 %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/performance/stat-prefetch.so %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/performance/write-behind.so %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/system/posix-acl.so -%dir %{_localstatedir}/run/gluster +%dir %{_rundir}/gluster %if 0%{?_tmpfilesdir:1} %{_tmpfilesdir}/gluster.conf %endif @@ -1113,10 +1114,10 @@ exit 0 %{_sharedstatedir}/glusterd/hooks/1/start/post/S31ganesha-start.sh %{_sysconfdir}/ganesha/ganesha-ha.conf.sample %ghost %config(noreplace) %{_sysconfdir}/ganesha/ganesha-ha.conf -%ghost %dir %{_localstatedir}/run/gluster/shared_storage/nfs-ganesha -%ghost %dir %{_localstatedir}/run/gluster/shared_storage/nfs-ganesha/exports -%ghost %config(noreplace) %{_localstatedir}/run/gluster/shared_storage/nfs-ganesha/ganesha.conf -%ghost %config(noreplace) %{_localstatedir}/run/gluster/shared_storage/nfs-ganesha/ganesha-ha.conf +%ghost %dir %{_rundir}/gluster/shared_storage/nfs-ganesha +%ghost %dir %{_rundir}/gluster/shared_storage/nfs-ganesha/exports +%ghost %config(noreplace) %{_rundir}/gluster/shared_storage/nfs-ganesha/ganesha.conf +%ghost %config(noreplace) %{_rundir}/gluster/shared_storage/nfs-ganesha/ganesha-ha.conf %if ( 0%{!?_without_georeplication:1} ) %files geo-replication |