Bug 765273 (GLUSTER-3541)

Summary: _without_geo-replication macro isn't set in spec file
Product: [Community] GlusterFS Reporter: persson
Component: buildAssignee: Lakshmipathi G <lakshmipathi>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.2.3CC: gluster-bugs, lakshmipathi
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: RTNR Mount Type: ---
Documentation: --- CRM:
Verified Versions: 3.2.4 Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description persson 2011-09-13 08:59:12 UTC
Two things:

at least on the system where I'm trying this (SLES 11), --without geo-replication is ignored by rpmbuild and the macro is not set. I suspect this has something to do with the corresponding macro having a dash in its name (%_without_geo-replication). The result is that geo replication is always built even if it's not wanted. My provisional fix (for lack of a better one) is to not use the dash:

--without georeplication

and rename the macro to %_without_georeplication. This works.

However, when doing so, the second issue appears: at line 243 there is a lone

%post geo-replication

macro, which fails when geo-replication is disabled (package doesn't exist). My solution was to wrap that with the conditional that checks if geo-replication is wanted:

%if 0%{!?_without_georeplication:1}
%post geo-replication
#restart glusterd.
/etc/init.d/glusterd restart &> /dev/null
%endif

...

Comment 1 Lakshmipathi G 2011-09-19 04:25:51 UTC
Thanks Persson,fixed & tested the macro issue.http://review.gluster.com/451

Comment 2 Lakshmipathi G 2011-10-03 05:12:01 UTC
tested with  3.2.4