[CentOS] rpmbuild --define | some rpm sorcerer around?

Mon Jun 11 16:00:11 UTC 2018
lejeczek <peljasz at yahoo.co.uk>

On 09/06/18 13:13, Phil Perry wrote:
> On 08/06/18 22:54, lejeczek wrote:
>>
>>
>> On 08/06/18 19:38, Phil Perry wrote:
>>> On 08/06/18 15:54, lejeczek wrote:
>>>> hi
>>>>
>>>> how do you pass vars to rpmbuild for definition? eg
>>>>
>>>> rpmbuild --define \'"${_definition2}"\'
>>>>
>>>> I've been fiddling with ways to escape, but none is fricking working..
>>>> I mean, rpmbuild rushes to work(no errors nor failure) so if you try 
>>>> just the command line do not believe it, because later as it 
>>>> executes %if you will see process does not see these definitions.
>>>>
>>>> many thanks, L
>>>
>>> I'm not sure what you are trying to define above.
>>>
>>> Normal convention where one wishes to define _foobar as "foo" for 
>>> example would be:
>>>
>>> rpmbuild --define '_foobar foo'
>>>
>>> or generically
>>>
>>> rpmbuild --define 'SomeVariable SomeValue'
>>>
>>> Hope that helps
>>
>> Try to pass bash var to rpmbuild, eg:
>>
>> $ _def1="_me no"
>> $ rpmbuild --define ${_def1}
>>
>>
> 
> I assume you are doing this in a bash script?
> 
> ${_def1} may need to be quoted as it contains a space.
> 
> But for that I would do the following to make it more readable:
> 
> ME="no"
> rpmbuild --define '_me ${ME}'
> 
> 
> or if ${ME} contains spaces:
> 
> rpmbuild --define '_me "${ME}"'
> 
> 

none of of these work for me, like I said earlier I fiddle a bit with 
it. I was hoping someone could confirm this and then maybe it's a bug?