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