path: root/
diff options
authorNiels de Vos <>2013-01-02 16:37:04 +0100
committerAnand Avati <>2013-01-18 19:34:24 -0800
commit783f349575ac169c7777ab603614d19bcd968a7c (patch)
treebfd188284cc5d397d1f51617079749dd71d5e4d6 /
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 <> Reviewed-on: Reviewed-by: Kaleb KEITHLEY <> Tested-by: Gluster Build System <> Reviewed-by: Anand Avati <>
Diffstat (limited to '')
1 files changed, 8 insertions, 1 deletions
diff --git a/ b/
index a30f9e0dd..4331b8c06 100644
--- a/
+++ b/
@@ -275,9 +275,12 @@ sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sha
# respect :-(
# - see also
touch %{buildroot}%{_sharedstatedir}/glusterd/
+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/
%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/peers
%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/vols
%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/groups
@@ -426,6 +429,7 @@ fi
%ghost %attr(0644,-,-) %{_sharedstatedir}/glusterd/
+%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/
%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/peers
%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/groups