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