On Fri, Feb 25, 2005 at 05:19:49PM -0500, Bill Nottingham wrote: > Tom 'spot' Callaway (tcallawa@xxxxxxxxxx) said: > > On Fri, 2005-02-25 at 21:26 +0200, Ville Skyttä wrote: > > >On Fri, 2005-02-25 at 19:43 +0100, Dag Wieers wrote: > > > > > >> You can use: > > >> > > >> rpm -qf /etc/redhat-release --qf '%{RPMTAG_VERSION}\n' > > > > > >...or just %{VERSION} (in uppercase). > > > > Ok. New macros: > > So, every package BuildRequires: redhat-release? > > Frankly, I think it's somewhat gross. Not that I have better > solutions off of the top of my head. why have the chrooted system do the guesswork, when the information is there at the rpmbuild level? rpmbuild --define 'disttag whatever' ... And if you can convince Jeff to patch up an automated suffix to the rpm tag you could keep the specfile totally clean from disttags, e.g. like they look like today. The idea has been brought to Jeff, but he thought we were asking for a Disttag tag in the rpm header and implemented this instead. In fact the best solution would be to have a releasesuffix macro/header tag which rpm automatically tags onto the releasetag, e.g. rpmbuild -bs --define 'releasesuffix .at' foo.spec produces the distro agnostic foo-1.2.3-4.at.src.rpm rpmbuild --rebuild --define 'releasesuffix rhel4.at' foo-1.2.3-4.at.src.rpm produces foo-1.2.3-4.rhel4.at.i386.rpm As a side effect the releasesuffix macro/header tag can be used both for disttags as well as for repotags, the latter being just a mark of origin. -- Axel.Thimm at ATrpms.net
Attachment:
pgpJpwrRe6lMA.pgp
Description: PGP signature