[packagers] noob help needed with %{dist}
Martin Hamant
mh at accelance.fr
Fri May 4 13:48:13 CEST 2007
Le Fri, 4 May 2007 11:25:59 +0200 (CEST)
Dag Wieers <dag at wieers.com> écrivait:
> On Fri, 4 May 2007, Martin Hamant wrote:
>
> > I don't understand how does it works. My target is to make a RPM
> > (for private use) that could be built on different distro, and so i
> > have questions:
> >
> > - Is %{dist} internally defined by RPM engine (seems not! I tried
> > some echo %{dist}... ) , or do I need a special macro to get it
> > defined before the build ?
>
> We update the SPEC file for each build. So the disttag is added to
> the Release tag before building.
You mean that you use a temporary spec file, a parsed copy of the
original one in which you append the disttag on the Release line just
before building it ?
>
>
> > - I know rpmforge packagers use %{dist} to dynamically name their
> > package (in release) : Why can't i see any {%dist} references in
> > specfiles ?
>
> Our buildsystem provides the dist macro when building, like:
>
> --define "dist el4"
>
> If it would be hardcoded in the SPEC file, there would not be an
> advantage to have a macro.
>
> Beware though, we invented the %{dist} macro, but sadly Fedora took
> the idea and used it in an incompatible manner. Fedora defines the
> dist macro as being '.fc6' or '.el5'. While we defined it as being
> 'fc6' and 'el5.
>
> The reason for this is that we use the dist macro to have
> conditionals in the SPEC file that allows us to build from the same
> SPEC file. Fedora however uses the dist macro only for tagging the
> Release.
>
> Sadly, both uses are not compatible.
>
Yes, I read that on
http://fedoraproject.org/wiki/Packaging/DistTag?action=show&redirect=DistTag
more sadly, they don't specify how they feed the tag value ... or I
don't understand what they mean by "When you run make tag or make
build the values for %{dist} and its helper variables are assigned
according to the cvs branch that you are working in. You do NOT need to
define these variables in your spec file."
Thank you for the --define tip, I will use that !
>
> > Thank you very much !
>
> You're welcome.
:) I have more question about the way you use SVN with your build
system... but that's off-topic ; maybe I could open another thread about
it if you're ok ?
Thanks
--
Martin
More information about the packagers
mailing list