rpmbuild ignoring --macros?

Valery Reznic valery_reznic at yahoo.com
Tue Jan 5 14:33:58 UTC 2010



--- On Tue, 1/5/10, Andy Armstrong <andy at hexten.net> wrote:

> From: Andy Armstrong <andy at hexten.net>
> Subject: rpmbuild ignoring --macros?
> To: "General discussion about the RPM package manager" <rpm-list at lists.rpm.org>
> Date: Tuesday, January 5, 2010, 4:03 PM
> (sorry for the barrage of questions -
> and thanks for the answers)
> 
> I've got a macros file that I'd like rpmbuild to use. It
> seems that rpmbuild 4.4.2.3 is ignoring the --macros switch.
Not an answer to your questions, but...
Rpmbuild supposed to be tool, that reliable convert srpm to binary rpm.
If your .rpmmacros contains not only stuff like rpmbild directory, but something essential to rpm build, than no one will be able to build this rpm without mymacros.

Don't like as a good idea (unless you are trying to secure your job this way :)

So if the content of the mymacros is (relative) unimportant - directories, etc - I suggest to put it into ~/.rpmmacros.
If it's important - use make file (or whatever build system you use) to combine your spec with mymacros.
Something like this in Makefile:
spec_file: mymacros spec_file.in 
   rm $@
   cat mymacros spec_file.in > $@ 

Where spec-file.in is your original specfile

Valery


> If I
> 
> $ rpmbuild -qa --macros=mymacros myapp.spec
> 
> it attempts to build below /usr/src/redhat/BUILD
> 
> If I
> 
> $ ln -s $(pwd)/mymacros ~/.rpmmacros
> $ rpmbuild -qa myapp.spec
> 
> I get the behaviour I'm expecting.
> 
> I'd prefer not to have a ~/.rpmmacros and assumed that
> naming a macros file using the --macros switch would be
> alternative. What am I missing?
> 
> Thanks again.
> 
> -- 
> Andy Armstrong, Hexten
> 
> 
> 
> _______________________________________________
> Rpm-list mailing list
> Rpm-list at lists.rpm.org
> http://lists.rpm.org/mailman/listinfo/rpm-list
> 


      


More information about the Rpm-list mailing list