233933
From 909a6461c860fffde5f886891dd53752f60eae67 Mon Sep 17 00:00:00 2001
233933
From: Jiffin Tony Thottan <jthottan@redhat.com>
233933
Date: Tue, 18 Jun 2019 12:10:55 +0530
233933
Subject: [PATCH 195/221] build : package glusterfs-ganesha for rhel7 and above
233933
233933
Label : DOWNSTREAM ONLY
233933
233933
Change-Id: If845675b18fe055708d905ec566014baf004cb76
233933
fixes: bz#1720551
233933
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
233933
Reviewed-on: https://code.engineering.redhat.com/gerrit/173748
233933
Reviewed-by: Sreenath Girijan Menon <sgirijan@redhat.com>
233933
Tested-by: RHGS Build Bot <nigelb@redhat.com>
233933
Reviewed-by: Kaleb Keithley <kkeithle@redhat.com>
233933
---
233933
 glusterfs.spec.in | 19 ++++++++++++++-----
233933
 1 file changed, 14 insertions(+), 5 deletions(-)
233933
233933
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
233933
index 1150101..00603ec 100644
233933
--- a/glusterfs.spec.in
233933
+++ b/glusterfs.spec.in
233933
@@ -302,6 +302,9 @@ Obsoletes:        %{name}-ufo
233933
 %if ( 0%{!?_with_gnfs:1} )
233933
 Obsoletes:        %{name}-gnfs
233933
 %endif
233933
+%if ( 0%{?rhel} < 7 )
233933
+Obsoletes:        %{name}-ganesha
233933
+%endif
233933
 Provides:         %{name}-common = %{version}-%{release}
233933
 Provides:         %{name}-core = %{version}-%{release}
233933
 
233933
@@ -452,7 +455,7 @@ is in user space and easily manageable.
233933
 This package provides support to FUSE based clients and inlcudes the
233933
 glusterfs(d) binary.
233933
 
233933
-%if ( 0%{!?_without_server:1} )
233933
+%if ( 0%{!?_without_server:1} && 0%{?rhel} > 6 )
233933
 %package ganesha
233933
 Summary:          NFS-Ganesha configuration
233933
 Group:            Applications/File
233933
@@ -855,7 +858,7 @@ install -D -p -m 0644 extras/glusterfs-logrotate \
233933
     %{buildroot}%{_sysconfdir}/logrotate.d/glusterfs
233933
 
233933
 # ganesha ghosts
233933
-%if ( 0%{!?_without_server:1} )
233933
+%if ( 0%{!?_without_server:1} && 0%{?rhel} > 6 )
233933
 mkdir -p %{buildroot}%{_sysconfdir}/ganesha
233933
 touch %{buildroot}%{_sysconfdir}/ganesha/ganesha-ha.conf
233933
 mkdir -p %{buildroot}%{_localstatedir}/run/gluster/shared_storage/nfs-ganesha/
233933
@@ -1165,11 +1168,14 @@ exit 0
233933
 %endif
233933
 %endif
233933
 
233933
-%if ( 0%{?_without_server:1} )
233933
-#exclude ganesha related files
233933
+%if ( 0%{?_without_server:1} || 0%{?rhel} < 7 )
233933
+#exclude ganesha related files for rhel 6 and client builds
233933
 %exclude %{_sysconfdir}/ganesha/ganesha-ha.conf.sample
233933
 %exclude %{_libexecdir}/ganesha/*
233933
 %exclude %{_prefix}/lib/ocf/resource.d/heartbeat/*
233933
+%if ( 0%{!?_without_server:1} )
233933
+%{_sharedstatedir}/glusterd/hooks/1/start/post/S31ganesha-start.sh
233933
+%endif
233933
 %endif
233933
 
233933
 %exclude %{_datadir}/glusterfs/scripts/setup-thin-arbiter.sh
233933
@@ -1324,7 +1330,7 @@ exit 0
233933
 %exclude %{_datadir}/glusterfs/tests/vagrant
233933
 %endif
233933
 
233933
-%if ( 0%{!?_without_server:1} )
233933
+%if ( 0%{!?_without_server:1} && 0%{?rhel} > 6 )
233933
 %files ganesha
233933
 %dir %{_libexecdir}/ganesha
233933
 %{_sysconfdir}/ganesha/ganesha-ha.conf.sample
233933
@@ -1936,6 +1942,9 @@ fi
233933
 %endif
233933
 
233933
 %changelog
233933
+* Tue Jun 18  2019 Jiffin Tony Thottan <jthottan@redhat.com>
233933
+- build glusterfs-ganesha for rhel 7 and above (#1720551)
233933
+
233933
 * Fri Jun 14 2019 Atin Mukherjee <amukherj@redhat.com>
233933
 - Ensure gluster-cli package is part of client build (#1720079)
233933
 
233933
-- 
233933
1.8.3.1
233933