summaryrefslogtreecommitdiffstats
path: root/glusterfs.spec.in
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2015-01-16 13:48:49 +0100
committerNiels de Vos <ndevos@redhat.com>2015-01-19 00:55:31 -0800
commit10e4add35f64c24fe9ef03dc6824975fc9db1455 (patch)
tree97813833dac239fe1e9bf5fdd26bd56a88fc948d /glusterfs.spec.in
parent4d003c1b1b6dfd4ba94bb006b7ab6451fc62e170 (diff)
build: add a tmpfiles.d config file for /run/gluster
New distrubutions have a /run directory on a volatile tmpfs filesystem. This causes /run/gluster to be removed with each reboot. A tmpfiles.d configuration is used to create the directory on boot. EL5 and EL-6 do not use /run, current Fedora versions do. By checking %{_tmpfilesdir} in the .spec, we can identify if the distribution uses tmpfiles.d. Change-Id: I231e7d6603d573cb905246558e14a51577c0eb56 BUG: 1182934 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/9458 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Diffstat (limited to 'glusterfs.spec.in')
-rw-r--r--glusterfs.spec.in13
1 files changed, 13 insertions, 0 deletions
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
index 876db1b635e..cd300ebd621 100644
--- a/glusterfs.spec.in
+++ b/glusterfs.spec.in
@@ -73,6 +73,12 @@
%global _with_systemd true
%endif
+%if 0%{?_tmpfilesdir:1}
+%define _with_tmpfilesdir --with-tmpfilesdir=%{_tmpfilesdir}
+%else
+%define _with_tmpfilesdir --without-tmpfilesdir
+%endif
+
# there is no systemtap support! Perhaps some day there will be
%global _without_systemtap --enable-systemtap=no
@@ -485,6 +491,7 @@ This package provides the glusterfs server daemon.
# there is no need to run ./autogen or have a BuildRequires for automake.
[ -e 'install-sh' -o -e 'install.sh' ] || ./autogen.sh
%configure \
+ %{?_with_tmpfilesdir} \
%{?_without_rdma} \
%{?_without_epoll} \
%{?_without_fusermount} \
@@ -831,6 +838,9 @@ fi
%exclude %{_mandir}/man8/gluster.8*
%dir %{_localstatedir}/log/glusterfs
%dir %{_localstatedir}/run/gluster
+%if 0%{?_tmpfilesdir:1}
+%{_tmpfilesdir}/gluster.conf
+%endif
%dir %{_sharedstatedir}/glusterd
%if ( 0%{!?_without_rdma:1} )
%exclude %{_libdir}/glusterfs/%{version}%{?prereltag}/rpc-transport/rdma*
@@ -1020,6 +1030,9 @@ fi
%ghost %attr(0600,-,-) %{_sharedstatedir}/glusterd/nfs/run/nfs.pid
%changelog
+* Fri Jan 16 2015 Niels de Vos <ndevos@redhat.com>
+- add support for /run/gluster through a tmpfiles.d config file (#1182934)
+
* Fri Dec 12 2014 Niels de Vos <ndevos@redhat.com>
- do not package all /usr/share/glusterfs/* files in regression-tests (#1169005)