make tag and %{?dist}

Josh Boyer jwboyer at jdub.homelinux.org
Wed May 4 03:13:56 UTC 2005


On Tue, 2005-05-03 at 22:48 -0400, Matthew Miller wrote:
> On Tue, May 03, 2005 at 09:28:03PM -0500, Josh Boyer wrote:
> > Yeah, but that "scary macro voodoo" is something I want to avoid, and it
> > doesn't really solve the problem.  That would just define %{dist} to
> > whatever version of the distro the user had installed at the time.
> 
> Right.... what's wrong with that? In fact, isn't it the point?

No, that's exactly what I'm trying to avoid.

> 
> > Perhaps the make targets in CVS could define %{dist} for the user based
> > on what branch the command is being run.  For example, if you run 'make
> > i386' in the devel branch %{dist} gets defined to ".fc4" automatically.
> > Similarly, if you run it in the FC-3 branch, it gets defined to ".fc3".
> 
> So that way, when you accidentally build the package from the wrong branch,
> it gets tagged with with the wrong tag for the build, and if you don't
> notice, your final file gets copied to the wrong place?

What final file?  The RPM?

I'm talking about making things easier for the packagers here.  If users
are building their own packages from the stuff in CVS rather than
downloading the officially built RPMs, they should know what they are
doing already.

> 
> If your spec files are actually different across distro releases, I don't
> think you wanna be using dist tags -- in that case, you hard-code it because
> functional differences in the file effectively hard-code a distinction
> anyway.

But my spec files are _not_ different except for the fact that the CVS
and build systems require them to have a different Release field for
each distro.  Which is what %{dist} theoretically could be used for if
it was actually defined.

Have you actually tried to use the same spec file in both the devel and
FC-3 branches and get a package built?  It doesn't work because you have
to run 'make tag' first which creates a CVS tag based on the Name,
Version, and Release fields in the spec file.  When you use the same
spec file for both branches, 'make tag' fails in the second branch
because the same CVS tag can't be in multiple branches.

With what I'm proposing, 'make tag' would expand %{dist} based on the
CVS branch it was run in, and the CVS tags would be different.  Now you
can use the exact same spec file for both branches (assuming there are
no functional differences), and builds can still occur.  Problem
solved.  

> 
> The dist tag provides a way so that it doesn't *matter* where you happen to
> get the spec file from (since it's identical) and your package is still
> built and clearly labelled as belonging on the release on which you built
> it.
> 

Exactly.  So if I am in the devel branch of Extras CVS, I better damn
well realize that any package built from there would have .fc4 in the
Release section of the RPM.

I think we are missing one another's points.

josh




More information about the fedora-extras-list mailing list