Hi, 

I've googled around to find an alternative to my rpm macros that fails to work 
since fedora-20. (maybe 18?) (I migrated from fc-17) 

When doing: 

rpmbuild --with foo=3 bar.spec 
I get the following error: 
warning: Macro %_with_foo needs whitespace before body 

Looking at what is defined using --showrc, I see: 
-8: _with_foo =3 --with-foo=3 

The result is that same as on fc-17 or rhel-6, but in thos OS, I don't get a 
warning. 

I used to parse that in the following way: 
%{?_with_foo: %define foo %(set -- %{_with_foo}; echo $1 | grep -v with | sed 
's/=//')} 

I use that in several rpms since ages to allow for alternative builds. 


=> What can I do to keep the same command line syntax: rpmbuild --with 
parameter=value ... 
(example: rpmbuild --with examples=all --with root_dir=/opt --with 
corp_key=corp.pub myprog.spec) 

It seems that if I replace the '=' with ':' it works, unfortunately, sometimes 
I have ':' in the parameter value wich is not practical to parse. 
I've read that: http://rpm5.org/docs/api/macros.html (I know it's rpm5, not 
rpm) and that: http://lists.rpm.org/pipermail/rpm-list/2013-January/001360.html 
but couldn't find a solution to my problem. 

If someone could give me advices on that , that would be cool. 
(I'm maintainer of severa OSCAR cluster rpms, helped to package jobmonarch and 
ganglia, all using this --with feature, so I need to fix that). 


-- 
Olivier LAHAYE 

_______________________________________________
Rpm-maint mailing list
[email protected]
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to