diff options
author | Kaleb S. KEITHLEY <kkeithle@redhat.com> | 2017-07-26 10:36:11 -0400 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2017-07-28 12:28:58 +0000 |
commit | 5eed664c6c243c261506743448d99a80979942f2 (patch) | |
tree | 96877b157b53bf6b9737f0f9c5f6c8c5796dd636 | |
parent | da9f6e9a4123645a20b664a1c167599b64591f7c (diff) |
packaging: own files in (/var)/run/gluster/shared_storage/nfs-ganesha
The nfs-ganesha rpm owns /etc/ganesha and /etc/ganesha/ganesha.conf,
but gluster-ganesha installs a ganesha-ha.conf.sample in /etc/ganesha/
Ganesha HA expects to find the config files in /var/run/.../nfs-ganesha
and for there to be symlinks from /etc/ganesha/* to /var/run/...
As exports are created the ganesha export files are written to
/var/run/gluster/shared_storage/nfs-ganesha/exports/*
This change creates rpm %ghosts for most of these files to manage
ownership within rpm and ensure they are not deleted or overwritten
during package install/upgrade/removal. The name of the exports varies,
so it's not possible AFAIK to create wildcard %ghosts for them.
Change-Id: Ic4389291c0af0bd72c22fa742cdfa2011b9286f3
BUG: 1472446
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: https://review.gluster.org/17883
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
-rw-r--r-- | glusterfs.spec.in | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/glusterfs.spec.in b/glusterfs.spec.in index 67901aacbbc..6ad5afec236 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -750,6 +750,13 @@ sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sha install -D -p -m 0644 extras/glusterfs-logrotate \ %{buildroot}%{_sysconfdir}/logrotate.d/glusterfs +# 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 + %if ( 0%{!?_without_georeplication:1} ) # geo-rep ghosts mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/geo-replication @@ -1096,10 +1103,16 @@ exit 0 %endif %files ganesha -%{_sysconfdir}/ganesha/* +%dir %{_libexecdir}/ganesha %{_libexecdir}/ganesha/* %{_prefix}/lib/ocf/resource.d/heartbeat/* %{_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 %if ( 0%{!?_without_georeplication:1} ) %files geo-replication |