Strange RPM versioning problem in qemu in Rawhide

Toshio Kuratomi a.badger at gmail.com
Tue Aug 2 22:13:01 UTC 2011


On Tue, Aug 02, 2011 at 12:31:15PM -0700, Adam Williamson wrote:
> On Tue, 2011-08-02 at 21:24 +0200, Michael Schwendt wrote:
> > On Tue, 02 Aug 2011 11:58:08 -0700, AW (Adam) wrote:
> > 
> > > > 0.2.20110718525e3df.fc16
> > > > 0.2.2011072859fadcc.fc17
> > > > 
> > > > Split up into the elements that RPM compares, these are:
> > > > 
> > > > 0, 2, 20110718525, e,     3,  df, fc, 16
> > > > 0, 2, 2011072859,  fadcc, fc, 17
> > > >       ^^^^^^^^^^^^
> > > > The third elements cause this evr-comparison to have a result which you
> > > > don't expect. Bump the second element "2" to "3" and you should be
> > > > fine :-).
> > > 
> > > Well, in this case yes, but this problem could emerge again in a case
> > > where there's no version bump that 'should have' been carried out.
> > 
> > When would that be?
> > 
> > Packagers ought to bump the most-significant portion of %{release}
> > with every build where %{version} stays the same. In this case:
> >   0.2.somelongstuff => 0.3.somesimilarlylongstuff
> 
> oh, yes, you're right, my mistake. I was mistaking the 0.2 / 0.3 bit for
> an upstream version number, but of course it's not that, it's the
> 'failsafe' revision bump, which does indeed solve this kinda problem. I
> think it might still be a good idea to split the date from the git rev,
> but since we have the extra revision digit there, it's not really
> crucial. I was forgetting about that.
>
That is the intention of the Guideline, where you substitute
s/\./(git|cvs|svn|bzr|hg)/

So the above releases should have been:
  0.2.20110718git525e3df.fc16
  0.2.20110728git59fadcc.fc17

(Note that the git hash is optional, so they could also have been:
  0.2.20110718git
  0.2.20110728git
)

I can see how people would misinterpret the guidelines as currently written,
though:
"""
If a snapshot package is considered a "pre-release package", you should
follow the guidelines listed in Pre-Release Packages , and use an
%{alphatag} beginning with the date in YYYYMMDD format and followed by up to
16 (ASCII) alphanumeric characters of your choosing. The date should
reference the date the checkout was taken; the rest can be as simple as
"cvs" or "snap", or a subversion change number like "svn12345" or an
abbreviated git hash like "git5aef11739b".

If a snapshot package is considered a "post-release package", the following
applies:

Release Tag for Post-Release Snapshot Packages: %{X}.%{alphatag}

Where %{X} is the build number from any previous "stable" package build,
incremented by one (if no previous stable package build, use 1), and
%{alphatag} is the checkout string, as described above.
"""
http://fedoraproject.org/wiki/Packaging:NamingGuidelines#Snapshot_packages

I'm updating this now.

* Reorder the section to have snapshot, pre-release, post-release.
* Rewrite the snapshot package section as below
"""
Snapshot packages contain data about where the snapshot came from as well as
ordering information for rpm.  The information about the snapshot will be
called %{checkout} in this section.

%{checkout} consists of the date that the snapshot is made in YYYYMMDD
format, a short (2-5 characters) string identifying the type of revision
control system or that this is a snapshot, and optionally, up to 13
characters (ASCII) alphanumeric characters that could be useful in finding
the revision in the revision control system.

For instance, if you create a snapshot from a git repository on January 2,
2011 with git hash 9e88d7e9efb1bcd5b41a408037bb7cfd47220a64, %{checkout}
string could be any of the following::
   20110102snap
   20110102git
   20110102git9e88d7e

If the snapshot package is considered a "pre-release package", you should
follow the guidelines listed in Pre-Release Packages for snapshot packages,
using the %{checkout} that you decide on above.  (For instance, in
kismet-0.0.3.20040204svn, 20040204svn is the %{checkout})

If the snapshot is a "post-release package", you should follow the
guidelines in the Post-Release Packages section.  Where the %{posttag} in
that section is the %{checkout} string you decided on above.
"""

-Toshio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/devel/attachments/20110802/ff08ec6c/attachment.bin 


More information about the devel mailing list