Re: rpmbuild ignoring --macros?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




--- On Tue, 1/5/10, Andy Armstrong <andy@xxxxxxxxxx> wrote:

> From: Andy Armstrong <andy@xxxxxxxxxx>
> Subject: rpmbuild ignoring --macros?
> To: "General discussion about the RPM package manager" <rpm-list@xxxxxxxxxxxxx>
> 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@xxxxxxxxxxxxx
> http://lists.rpm.org/mailman/listinfo/rpm-list
> 


      
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux