summaryrefslogtreecommitdiffstats
path: root/extras
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 /extras
parent4d003c1b1b6dfd4ba94bb006b7ab6451fc62e170 (diff)
downloadglusterfs-10e4add35f64c24fe9ef03dc6824975fc9db1455.tar.gz
glusterfs-10e4add35f64c24fe9ef03dc6824975fc9db1455.tar.xz
glusterfs-10e4add35f64c24fe9ef03dc6824975fc9db1455.zip
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 'extras')
-rw-r--r--extras/Makefile.am5
-rw-r--r--extras/run-gluster.tmpfiles.in2
2 files changed, 7 insertions, 0 deletions
diff --git a/extras/Makefile.am b/extras/Makefile.am
index a163b1ae3a..28a6600304 100644
--- a/extras/Makefile.am
+++ b/extras/Makefile.am
@@ -21,6 +21,11 @@ EXTRA_DIST = $(conf_DATA) specgen.scm glusterfs-mode.el glusterfs.vim \
command-completion/README
install-data-local:
+ if [ -n "$(tmpfilesdir)" ]; then \
+ $(mkdir_p) $(DESTDIR)$(tmpfilesdir); \
+ $(INSTALL_DATA) run-gluster.tmpfiles \
+ $(DESTDIR)$(tmpfilesdir)/gluster.conf; \
+ fi
$(mkdir_p) $(DESTDIR)$(GLUSTERD_WORKDIR)/groups
$(INSTALL_DATA) $(top_srcdir)/extras/group-virt.example \
$(DESTDIR)$(GLUSTERD_WORKDIR)/groups/virt
diff --git a/extras/run-gluster.tmpfiles.in b/extras/run-gluster.tmpfiles.in
new file mode 100644
index 0000000000..49a2662c4c
--- /dev/null
+++ b/extras/run-gluster.tmpfiles.in
@@ -0,0 +1,2 @@
+# hardcoding /run for now, should be detected while building from source?
+d /run/gluster 0755 root root -