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