From f8e968a49468fdea5503423c2c9c4be82c76ad6f Mon Sep 17 00:00:00 2001 From: "Bala.FA" Date: Thu, 22 Aug 2013 09:03:38 +0530 Subject: build: handle dependencies for syslog properly This patch conditionally enables rsyslog dependencies based on syslog build option. Change-Id: I2168f29a03504ec839c3048ce112e8dfb2226aa0 BUG: 928648 Signed-off-by: Bala.FA Reviewed-on: http://review.gluster.org/5684 Tested-by: Gluster Build System Reviewed-by: Kaleb KEITHLEY Reviewed-by: Vijay Bellur --- glusterfs.spec.in | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/glusterfs.spec.in b/glusterfs.spec.in index e77ac90e..f4741875 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -180,12 +180,14 @@ both GlusterFS server and client framework. %package libs Summary: GlusterFS common libraries Group: Applications/File +%if ( 0%{!?_without_syslog:1} ) %if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} > 6 ) Requires: rsyslog-mmjsonparse %endif %if ( 0%{?rhel} && 0%{?rhel} == 6 ) Requires: rsyslog-mmcount %endif +%endif %description libs GlusterFS is a clustered file-system capable of scaling to several @@ -496,6 +498,7 @@ sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sha touch %{buildroot}%{_sharedstatedir}/glusterd/geo-replication/gsyncd_template.conf %endif +%if ( 0%{!?_without_syslog:1} ) %if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} > 6 ) %{__install} -D -p -m 0644 extras/gluster-rsyslog-7.2.conf \ %{buildroot}%{_sysconfdir}/rsyslog.d/gluster.conf @@ -510,6 +513,7 @@ touch %{buildroot}%{_sharedstatedir}/glusterd/geo-replication/gsyncd_template.co %{__install} -D -p -m 0644 extras/logger.conf.example \ %{buildroot}%{_sysconfdir}/glusterfs/logger.conf.example %endif +%endif # the rest of the ghosts touch %{buildroot}%{_sharedstatedir}/glusterd/glusterd.info @@ -590,21 +594,27 @@ touch %{buildroot}%{_sharedstatedir}/glusterd/nfs/run/nfs.pid %post libs /sbin/ldconfig +%if ( 0%{!?_without_syslog:1} ) %if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} >= 6 ) %_init_restart rsyslog %endif +%endif %postun libs /sbin/ldconfig +%if ( 0%{!?_without_syslog:1} ) %if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} >= 6 ) %_init_restart rsyslog %endif +%endif %files libs %{_libdir}/*.so.* +%if ( 0%{!?_without_syslog:1} ) %if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} >= 6 ) %{_sysconfdir}/rsyslog.d/gluster.conf %endif +%endif %exclude %{_libdir}/libgfapi.* %files cli -- cgit