summaryrefslogtreecommitdiffstats
path: root/glusterfs.spec.in
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2013-01-02 16:37:04 +0100
committerAnand Avati <avati@redhat.com>2013-01-18 19:34:24 -0800
commit783f349575ac169c7777ab603614d19bcd968a7c (patch)
treebfd188284cc5d397d1f51617079749dd71d5e4d6 /glusterfs.spec.in
parentee05db0b1e8ea27eb63f62b951c71388bcf69c6e (diff)
build: glusterfs-server should own known files under /var/lib/glusterd
In continuation of Change-Id Ib1df8da7e8abdcd3edece45bd39fe238f28838f1 there are more files that should be owned by the glusterfs-server package. Note that starting glusterd, doing some peer-probes and creating volumes will create additional run-time files under /var/lib/glusterd. The filenames depend on the volumes that are created, and that prevents packages from knowing (and owning) them in advance. It seems common practice to leave files untouched under /var/lib/<app>. It would be okay to remove files generated by the package itself, but we should not remove files generated by other packages, or files that have been created by users manually. I do not see a way to detect files generated by gluster* applications and remove only these. Keeping the runtime files under /var/lib/glusterd (which do not have predictive names) is safe and they should not require much space anyway. BUG: 829734 Change-Id: I2b79682b014fcf62c2a73f076cf0b11b4ba87f4a Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/4361 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'glusterfs.spec.in')
-rw-r--r--glusterfs.spec.in9
1 files changed, 8 insertions, 1 deletions
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
index a30f9e0dd..4331b8c06 100644
--- a/glusterfs.spec.in
+++ b/glusterfs.spec.in
@@ -275,9 +275,12 @@ sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sha
# respect :-(
# - see also https://bugzilla.redhat.com/show_bug.cgi?id=839656
touch %{buildroot}%{_sharedstatedir}/glusterd/glusterd.info
+touch %{buildroot}%{_sharedstatedir}/glusterd/options
%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/glustershd
%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/{add-brick,create,delete,set,start,stop,remove,remove-brick}/{pre,post}
-%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/nfs
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/nfs/run
+touch %{buildroot}%{_sharedstatedir}/glusterd/nfs/nfs-server.vol
+touch %{buildroot}%{_sharedstatedir}/glusterd/nfs/run/nfs.pid
%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/peers
%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/vols
%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/groups
@@ -426,6 +429,7 @@ fi
%{_libdir}/glusterfs/%{version}/xlator/nfs*
%{_sharedstatedir}/glusterd/hook-scripts
%ghost %attr(0644,-,-) %{_sharedstatedir}/glusterd/glusterd.info
+%ghost %attr(0600,-,-) %{_sharedstatedir}/glusterd/options
# This is really ugly, but I have no idea how to mark these directories in an
# other way. They should belong to the glusterfs-server package, but don't
# exist after installation. They are generated on the first start...
@@ -455,6 +459,9 @@ fi
%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/glustershd
%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/vols
%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/nfs
+%ghost %attr(0600,-,-) %{_sharedstatedir}/glusterd/nfs/nfs-server.vol
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/nfs/run
+%ghost %attr(0644,-,-) %{_sharedstatedir}/glusterd/nfs/run/nfs.pid
%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/peers
%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/groups