|
|
d1681e |
From aa20e41c3087f9ec68d0a7890ed953e5bc7aa096 Mon Sep 17 00:00:00 2001
|
|
|
d1681e |
From: "Kaleb S. KEITHLEY" <kkeithle@redhat.com>
|
|
|
d1681e |
Date: Wed, 26 Jul 2017 10:36:11 -0400
|
|
|
d1681e |
Subject: [PATCH 67/74] packaging: own files in
|
|
|
d1681e |
(/var)/run/gluster/shared_storage/nfs-ganesha
|
|
|
d1681e |
|
|
|
d1681e |
The nfs-ganesha rpm owns /etc/ganesha and /etc/ganesha/ganesha.conf,
|
|
|
d1681e |
but gluster-ganesha installs a ganesha-ha.conf.sample in /etc/ganesha/
|
|
|
d1681e |
|
|
|
d1681e |
Ganesha HA expects to find the config files in /var/run/.../nfs-ganesha
|
|
|
d1681e |
and for there to be symlinks from /etc/ganesha/* to /var/run/...
|
|
|
d1681e |
|
|
|
d1681e |
As exports are created the ganesha export files are written to
|
|
|
d1681e |
/var/run/gluster/shared_storage/nfs-ganesha/exports/*
|
|
|
d1681e |
|
|
|
d1681e |
This change creates rpm %ghosts for most of these files to manage
|
|
|
d1681e |
ownership within rpm and ensure they are not deleted or overwritten
|
|
|
d1681e |
during package install/upgrade/removal. The name of the exports varies,
|
|
|
d1681e |
so it's not possible AFAIK to create wildcard %ghosts for them.
|
|
|
d1681e |
|
|
|
d1681e |
Change-Id: Ic4389291c0af0bd72c22fa742cdfa2011b9286f3
|
|
|
d1681e |
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
|
|
|
d1681e |
Reviewed-on: https://review.gluster.org/17883
|
|
|
d1681e |
Smoke: Gluster Build System <jenkins@build.gluster.org>
|
|
|
d1681e |
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
|
|
|
d1681e |
Reviewed-by: Niels de Vos <ndevos@redhat.com>
|
|
|
d1681e |
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
|
|
|
d1681e |
---
|
|
|
d1681e |
glusterfs.spec.in | 15 ++++++++++++++-
|
|
|
d1681e |
1 file changed, 14 insertions(+), 1 deletion(-)
|
|
|
d1681e |
|
|
|
d1681e |
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
|
|
|
d1681e |
index e6e2ba3..cbc77c3 100644
|
|
|
d1681e |
--- a/glusterfs.spec.in
|
|
|
d1681e |
+++ b/glusterfs.spec.in
|
|
|
d1681e |
@@ -818,6 +818,13 @@ sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sha
|
|
|
d1681e |
install -D -p -m 0644 extras/glusterfs-logrotate \
|
|
|
d1681e |
%{buildroot}%{_sysconfdir}/logrotate.d/glusterfs
|
|
|
d1681e |
|
|
|
d1681e |
+# ganesha ghosts
|
|
|
d1681e |
+mkdir -p %{buildroot}%{_sysconfdir}/ganesha
|
|
|
d1681e |
+touch %{buildroot}%{_sysconfdir}/ganesha/ganesha-ha.conf
|
|
|
d1681e |
+mkdir -p %{buildroot}%{_localstatedir}/run/gluster/shared_storage/nfs-ganesha/exports
|
|
|
d1681e |
+touch %{buildroot}%{_localstatedir}/run/gluster/shared_storage/nfs-ganesha/ganesha.conf
|
|
|
d1681e |
+touch %{buildroot}%{_localstatedir}/run/gluster/shared_storage/nfs-ganesha/ganesha-ha.conf
|
|
|
d1681e |
+
|
|
|
d1681e |
%if ( 0%{!?_without_georeplication:1} )
|
|
|
d1681e |
mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/geo-replication
|
|
|
d1681e |
touch %{buildroot}%{_sharedstatedir}/glusterd/geo-replication/gsyncd_template.conf
|
|
|
d1681e |
@@ -1309,10 +1316,16 @@ exit 0
|
|
|
d1681e |
|
|
|
d1681e |
%if ( 0%{?_build_server} )
|
|
|
d1681e |
%files ganesha
|
|
|
d1681e |
-%{_sysconfdir}/ganesha/*
|
|
|
d1681e |
+%dir %{_libexecdir}/ganesha
|
|
|
d1681e |
%{_libexecdir}/ganesha/*
|
|
|
d1681e |
%{_prefix}/lib/ocf/resource.d/heartbeat/*
|
|
|
d1681e |
%{_sharedstatedir}/glusterd/hooks/1/start/post/S31ganesha-start.sh
|
|
|
d1681e |
+%{_sysconfdir}/ganesha/ganesha-ha.conf.sample
|
|
|
d1681e |
+%ghost %config(noreplace) %{_sysconfdir}/ganesha/ganesha-ha.conf
|
|
|
d1681e |
+%ghost %dir %{_localstatedir}/run/gluster/shared_storage/nfs-ganesha
|
|
|
d1681e |
+%ghost %dir %{_localstatedir}/run/gluster/shared_storage/nfs-ganesha/exports
|
|
|
d1681e |
+%ghost %config(noreplace) %{_localstatedir}/run/gluster/shared_storage/nfs-ganesha/ganesha.conf
|
|
|
d1681e |
+%ghost %config(noreplace) %{_localstatedir}/run/gluster/shared_storage/nfs-ganesha/ganesha-ha.conf
|
|
|
d1681e |
%endif
|
|
|
d1681e |
|
|
|
d1681e |
%if ( 0%{?_build_server} )
|
|
|
d1681e |
--
|
|
|
d1681e |
1.8.3.1
|
|
|
d1681e |
|