Is it possible to dynamize "requires" at RPM build time?

Paul Howarth paul at city-fan.org
Wed Aug 23 15:30:54 UTC 2006


Chris Adams wrote:
> Once upon a time, Jesse Keating <jkeating at redhat.com> said:
>> On Wednesday 23 August 2006 11:06, Chris Adams wrote:
>>> Not that I'm advocating it, but why?  rpmbuild is pretty much
>>> independent of the RPM database except for querying build dependencies.
>> The rpm database may not have been created with the same rpm you'd be using in 
>> the buildroot.  *BOOM*
> 
> Oohhh.
> 
> <goes and checks some personal spec files...>
> 
> Well, how would you suggest a build-time dependency be generated for
> non-library stuff?  For example, I build a separate sendmail config RPM,
> and I have it depend on the version of sendmail that the sendmail-cf
> used during build it is built against (e.g. if sendmail-cf 8.12.7 is
> used to build the config, sendmail-8.12.7 is required).

How about:

m4 /usr/share/sendmail-cf/m4/version.m4 | \
	awk '/^DZ/ { print substr($1,3) }'

Paul.




More information about the fedora-devel-list mailing list