[Rpm-maint] Fwd: new DISTEPOCH tag and cleaning of RELEASE tag polution

Per Øyvind Karlsen pkarlsen at rpm5.org
Sat Dec 20 03:17:40 UTC 2008

Consensus between rpm implementations is always nice, so I'll forward it to
you guys as well
for feedback. rpm.org patch can be done on request. :)

---------- Forwarded message ----------
From: Per Øyvind Karlsen <pkarlsen at rpm5.org>
Date: 2008/12/20
Subject: new DISTEPOCH tag and cleaning of RELEASE tag polution
To: rpm-devel at rpm5.org, rpm5distro at zarb.org

I've modified DISTTAG tag to be specified in macros file just like
and commited it to CVS already.
Here's my next step, a DISTEPOCH tag where distribution version can be

This will change EVR to EVRD which will be represented as
%{EPOCH}:%{VERSION}-%{RELEASE}:%{DISTEPOCH}, ie. 1:2.3.4-5:2009.1.
The distepoch tag will behave kinda like the epoch tag in the way that it's
optional, but
it's significance in version comparision will be the least.

ie. this way 1:2.3.4-5:2009.1 will be treated as newer than
1:2.3.4-5:2009.0, so this is
consistent with the behaviour of ie. %{_dist} in Fedora, or %mkrel in

As you see from this, the distribution tag will be kept out of the actual
while the distribution release will be moved to a new tag separately from

As the distrib tag is quite nice to have and all, it will still be part of
the package file name.
Consider the following ~/.rpmmacros:
%disttag           mdv
%distepoch      2009.0

This will create package with the following filename:

>From /usr/lib/rpm/macros:
%_build_name_fmt    %%{ARCH}/%{___NVRDA}.rpm

Notice that package filename will only be changed to this new style if
%disttag & %distepoch is used,
otherwise old package file name is kept.

You can also use 'DistTag:' & 'DistEpoch:'  per package basis as with ie.
'Distribution:' etc.

This patch is quite non-intrusive and only of concern to anyone choosing to
use these tags,
otherwise you won't be affected by it. There's of course a lot of further
improvements that
can be made, but they're not that important initially.

So WDYT? I personally think this is a very nice solution curing the abuse of
%release for this
purpose while providing a standard way for these things as well.
I'll wait for some comments first in case of any objections before
commiting, meanwhile
you can find the patch here:

Per Øyvind
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rpm.org/pipermail/rpm-maint/attachments/20081220/f021a816/attachment.htm 

More information about the Rpm-maint mailing list