From 06f60ff9a274d455c6b4fa1125e704ef2b7c6a85 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Mon, 16 Jul 2012 18:11:17 +0200 Subject: build: Create directories and files that get created during runtime This should not be needed for files marged as "ghost", but rpm-4.9 is broken in this respect :-( Building the packages works again: $ make dist $ rpmbuild -ta glusterfs-3git.tar.gz The now created files and directories are not packaged in the RPM, but are marked as belonging to the packages. Here a example for glusterfs-geo-replication: $ rpm -qlp glusterfs-geo-replication-3git-1.fc17.x86_64.rpm \ | grep /var/lib /var/lib/glusterd/geo-replication /var/lib/glusterd/geo-replication/gsyncd.conf $ rpm2cpio < glusterfs-geo-replication-3git-1.fc17.x86_64.rpm \ | cpio -t --quiet '/var/lib/*' $ Change-Id: I32019cfbf40e25d9b7ce875fa92b98bae19dabee BUG: 839668 See-also: https://bugzilla.redhat.com/show_bug.cgi?id=839656 Signed-off-by: Niels de Vos Reviewed-on: http://review.gluster.org/3899 Tested-by: Gluster Build System Reviewed-by: Krishnan Parthasarathi --- glusterfs.spec.in | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'glusterfs.spec.in') diff --git a/glusterfs.spec.in b/glusterfs.spec.in index ddc972b40f5..6a627c3c6bd 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -232,6 +232,23 @@ sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sha %{__install} -p -m 0644 extras/hook-scripts/*.sh \ %{buildroot}%{_sharedstatedir}/glusterd/hook-scripts/ +# Create directories and files that get created during runtime. This should +# not be needed for files marged as "ghost", but rpm-4.9 is broken in this +# respect :-( +# - see also https://bugzilla.redhat.com/show_bug.cgi?id=839656 +touch %{buildroot}%{_sharedstatedir}/glusterd/glusterd.info +%{__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/peers +%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/vols +%if 0%{?_can_georeplicate} +%if 0%{!?_without_georeplication:1} +%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/geo-replication +touch %{buildroot}%{_sharedstatedir}/glusterd/geo-replication/gsyncd.conf +%endif +%endif + # Clean up the examples we want to include as %%doc #%{__cp} -a doc/examples examples #%{__rm} -f examples/Makefile* -- cgit