Adding a new target?

Panu Matilainen pmatilai at laiskiainen.org
Tue Oct 30 07:16:21 UTC 2012


On 10/23/2012 05:26 PM, david.hagood at gmail.com wrote:
> I am doing cross-compilation of RPMs for an embedded ARM, and what I'd
> like to do is add the needed macros such that
>
> rpmbuild -ba <my spec file>.spec -target <my target arch>
>
> But from what I can see, the logic to define a new -target is only in the
> /usr/lib directory, and I'd like to be able to reference a more "local" rc
> file - ideally, one in the project's directory.
>
> Any suggestions on best practices?

/usr/lib/rpm/rpmrc is "factory defaults", custom additions can be added to

a) "vendor" rpmrc (depends on how rpm was built, 
/usr/lib/rpm/redhat/rpmrc on Fedora/RHEL and derivates)
b) per-host rpmrc (typically /etc/rpmrc)
c) per-user rpmrc (~/.rpmrc)

b) and c) are the best choices as those shouldn't be modified by system 
package updates. Alternatively you can speficy alternative rpmrc search 
path with --rcfile commandline switch.

	- Panu -


More information about the Rpm-list mailing list