Whamcloud - gitweb
LU-1199 build: Change various %defines to %globals
authorChristopher J. Morrone <morrone2@llnl.gov>
Thu, 8 Mar 2012 02:43:38 +0000 (18:43 -0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 9 Oct 2012 00:36:46 +0000 (20:36 -0400)
commit5b1e28811de3825a6960d2cc532cec66e26ccfe1
treeffdcfcc810273d8125b28eb08a983b1fb66a8de4
parentcbefadd851c00a6d07cfc076eee8b59140d5e609
LU-1199 build: Change various %defines to %globals

As a general rule, "%define" should not be used inside
of %{ } blocks.  %define is locally scoped.  While it
appears to work with constructs like this:

   %{!?foo: %define foo bar}

that is only because of an rpm quirk that fails to
free non-global scope variables immediately.  Later use
of parameterized macros in the file can trigger cleanup
of the local variables, and "foo" will be once again
undefined.

The solution is to use %global like so:

   %{!?foo: %global foo bar}

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: Ie18b0b86324334330b726bf69249d97e47e9350e
Reviewed-on: http://review.whamcloud.com/3420
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre.spec.in