256ebe
From d2319a4746ba07ada5b3a20462ec2900e1c03c5a Mon Sep 17 00:00:00 2001
256ebe
From: Atin Mukherjee <amukherj@redhat.com>
256ebe
Date: Thu, 13 Jun 2019 19:56:32 +0530
256ebe
Subject: [PATCH 192/192] build: Ensure gluster-cli package is built as part of
256ebe
 client build
256ebe
256ebe
Till RHGS 3.4.x RHGS client was shipping gluster-cli rpm. With RHGS 3.5
256ebe
which is a rebase of glusterfs 6.0 gluster-cli is only built for server.
256ebe
gluster cli offers a remote cli execution capability with --remote-host
256ebe
option for which you need not to have cli and glusterd co located and
256ebe
hence shipping cli as part of the client package is mandatory. With out
256ebe
this change the client upgrade for RHEL minor versions are also broken.
256ebe
256ebe
>Fixes: bz#1720615
256ebe
>Change-Id: I5071f3255ff615113b36b08cd5326be6e37d907d
256ebe
>Signed-off-by: Niels de Vos <ndevos@redhat.com>
256ebe
256ebe
upstream patch: https://review.gluster.org/#/c/glusterfs/+/22868/
256ebe
256ebe
BUG: 1720079
256ebe
Change-Id: I11ec3e2b4d98b3e701147c60ca797d54570d598e
256ebe
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
256ebe
Reviewed-on: https://code.engineering.redhat.com/gerrit/173388
256ebe
Tested-by: RHGS Build Bot <nigelb@redhat.com>
256ebe
---
256ebe
 cli/src/Makefile.am | 2 --
256ebe
 doc/Makefile.am     | 4 ++--
256ebe
 glusterfs.spec.in   | 9 +++------
256ebe
 3 files changed, 5 insertions(+), 10 deletions(-)
256ebe
256ebe
diff --git a/cli/src/Makefile.am b/cli/src/Makefile.am
256ebe
index 6be070f..3e7511f 100644
256ebe
--- a/cli/src/Makefile.am
256ebe
+++ b/cli/src/Makefile.am
256ebe
@@ -1,6 +1,4 @@
256ebe
-if WITH_SERVER
256ebe
 sbin_PROGRAMS = gluster
256ebe
-endif
256ebe
 
256ebe
 gluster_SOURCES = cli.c registry.c input.c cli-cmd.c cli-rl.c cli-cmd-global.c \
256ebe
 	 cli-cmd-volume.c cli-cmd-peer.c cli-rpc-ops.c cli-cmd-parser.c\
256ebe
diff --git a/doc/Makefile.am b/doc/Makefile.am
256ebe
index 7c04d74..9904767 100644
256ebe
--- a/doc/Makefile.am
256ebe
+++ b/doc/Makefile.am
256ebe
@@ -1,9 +1,9 @@
256ebe
 EXTRA_DIST = glusterfs.8 mount.glusterfs.8 gluster.8 \
256ebe
 			glusterd.8 glusterfsd.8
256ebe
 
256ebe
-man8_MANS = glusterfs.8 mount.glusterfs.8
256ebe
+man8_MANS = gluster.8 glusterfs.8 mount.glusterfs.8
256ebe
 if WITH_SERVER
256ebe
-man8_MANS += gluster.8 glusterd.8 glusterfsd.8
256ebe
+man8_MANS += glusterd.8 glusterfsd.8
256ebe
 endif
256ebe
 
256ebe
 CLEANFILES =
256ebe
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
256ebe
index 29e4a37..c505cd9 100644
256ebe
--- a/glusterfs.spec.in
256ebe
+++ b/glusterfs.spec.in
256ebe
@@ -353,7 +353,6 @@ is in user space and easily manageable.
256ebe
 
256ebe
 This package provides the api include files.
256ebe
 
256ebe
-%if ( 0%{!?_without_server:1} )
256ebe
 %package cli
256ebe
 Summary:          GlusterFS CLI
256ebe
 Requires:         %{name}-libs%{?_isa} = %{version}-%{release}
256ebe
@@ -368,7 +367,6 @@ called Translators from GNU Hurd kernel. Much of the code in GlusterFS
256ebe
 is in user space and easily manageable.
256ebe
 
256ebe
 This package provides the GlusterFS CLI application and its man page
256ebe
-%endif
256ebe
 
256ebe
 %package cloudsync-plugins
256ebe
 Summary:          Cloudsync Plugins
256ebe
@@ -891,10 +889,8 @@ touch %{buildroot}%{_sharedstatedir}/glusterd/nfs/run/nfs.pid
256ebe
 find ./tests ./run-tests.sh -type f | cpio -pd %{buildroot}%{_prefix}/share/glusterfs
256ebe
 
256ebe
 ## Install bash completion for cli
256ebe
-%if ( 0%{!?_without_server:1} )
256ebe
 install -p -m 0744 -D extras/command-completion/gluster.bash \
256ebe
     %{buildroot}%{_sysconfdir}/bash_completion.d/gluster
256ebe
-%endif
256ebe
 
256ebe
 %if ( 0%{!?_without_server:1} )
256ebe
 echo "RHGS 3.5" > %{buildroot}%{_datadir}/glusterfs/release
256ebe
@@ -1193,12 +1189,10 @@ exit 0
256ebe
 %dir %{_includedir}/glusterfs/api
256ebe
      %{_includedir}/glusterfs/api/*
256ebe
 
256ebe
-%if ( 0%{!?_without_server:1} )
256ebe
 %files cli
256ebe
 %{_sbindir}/gluster
256ebe
 %{_mandir}/man8/gluster.8*
256ebe
 %{_sysconfdir}/bash_completion.d/gluster
256ebe
-%endif
256ebe
 
256ebe
 %files cloudsync-plugins
256ebe
 %dir %{_libdir}/glusterfs/%{version}%{?prereltag}/cloudsync-plugins
256ebe
@@ -1938,6 +1932,9 @@ fi
256ebe
 %endif
256ebe
 
256ebe
 %changelog
256ebe
+* Fri Jun 14 2019 Atin Mukherjee <amukherj@redhat.com>
256ebe
+- Ensure gluster-cli package is part of client build (#1720079)
256ebe
+
256ebe
 * Mon May 27 2019 Jiffin Tony Thottan <jthottan@redhat.com>
256ebe
 - Change the dependency to 2.7.3 on nfs-ganesha for glusterfs-ganesha (#1714078)
256ebe
 
256ebe
-- 
256ebe
1.8.3.1
256ebe