[Fedora-packaging] disttag

Tom 'spot' Callaway tcallawa at redhat.com
Wed Mar 2 01:37:33 UTC 2005


On Tue, 2005-03-01 at 16:08 +0100, Michael Schwendt wrote:

>The purpose of a disttag postfix -- is it the primary or sole purpose? --
>is in making it possible that a single src.rpm can be built for multiple
>distribution releases without needing to worry about EVR comparison for
>upgrade paths.

The purpose of a disttag postfix was so that a single src.rpm can be
built for multiple distribution releases.

There are cases in which BuildRequires: and Requires: will be different
for different distribution releases. Hence, the disttag does double
duty:

- it differentiates multiple packages which would otherwise have the
same %{name}-%{version}-%{release}, but very different dependencies.

- it allows for a conditional check in the spec to deal with the
differing dependencies.

>But please, if we go as far as defining a %disttag value somewhere in our
>build environments, which is also to be used for determining the target
>distro in conditional spec sections, better let's define a second macro. A
>second macro, which has the sole purpose of making it unnecessary to
>examine redhat-release in the spec file.

OK, I agree with this. I don't want to insult RPMForge, but I really
don't think that an upgrade path between RHEL and Fedora is viable, or
something that we should attempt to promote. I've been thinking about
this, and it has two major downsides:

1. It implies we support it. We don't.
2. It adds an extra field to the Release to confuse people. The vast
majority of people will understand why a ".fc3" or ".el4" might show up
in the %{release} field, they won't understand why there is an .2 vs
a .3 in front of the dist.

>That one could be everything from a generic %distribution value to a
>specific %{?fedora} and %{?rhel}, which expand to a numerical release
>version. Would also allow much more obvious rpmbuild --define "fedora 4"
>builds.  I'd rather check for "%{?rhel}" == "4" than to check for
>"%{?disttag}" == ".2.el4".

This shouldn't be terribly difficult to do.

Lets say I whip up some macros that define %{rhel}, %{fedora}, and
%{rhl}, if they are relevant, with the appropriate numeric version.

What would the conditionals look like?

~spot
---
Tom "spot" Callaway: Red Hat Sales Engineer || GPG Fingerprint: 93054260
Fedora Extras Steering Committee Member (RPM Standards and Practices)
Aurora Linux Project Leader: http://auroralinux.org
Lemurs, llamas, and sparcs, oh my!




More information about the Fedora-packaging mailing list