svn snapshot packages

Michael Schwendt bugs.michael at gmx.net
Sun Jan 8 17:49:22 UTC 2006


On Sun, 08 Jan 2006 04:33:00 -0800, Michael A. Peters wrote:

> Would just like some clarification.
> 
> In the wiki -
> 
> http://fedoraproject.org/wiki/PackageNamingGuidelines
> 
> If a snapshot package is considered a "pre-release package", you should
> follow the guidelines listed in Pre-Release Packages, and use an
> %{alphatag} in the following format: 
> 
> YYYYMMDDcvs
> 
> Where YYYY is the digits for the year, MM is the zero-padded digits for
> the month, DD is the zero-padded digits for the day, and "cvs" is the
> type of checkout. The date in reference is the date that the checkout
> was taken. 
> 
> -=-
> 
> With svn checkouts, is it OK to use the svn revision instead of
> YYYYMMDD ?
> 
> It is more precise imho as it specifies exactly the upstream revision
> used (as there may be more than one revision on any given YYYYMMDD)

It isn't more precise or not fully safe in general. The svn revision is
specific to the life-time of the svn repository. The "date of checkout" is
not. Prefer the YYYYMMDD marker.  Or add "svnREVHERE" at the end instead
of just "svn".  E.g. 20060108svn541

Mind you, a YYYYMMDD checkout from CVS can also be from a branch much
older than YYYYMMDD.

Ultimately, the src.rpm contains exact information on what version of the
software is included and how to check it out from cvs/svn.

> Secondly - if it is OK to use the svn revision, is it OK to put the svn
> before the revision?
> 
> svn99 vs svn101 I think is cleaner than 99svn vs 101svn

That's only because you want to replace the date with the svn rev.
And if the developers switch from svn to cvs or vice versa, you
no longer compare numbers, but source code versioning system acronyms.
Stick to release numbers, and don't focus on the least-significant
"junk" in the %{release} field.

> But I'm flexible.
> 
> -=-
> Related %{?dist} question -
> 
> pre-release snapshot packages always need to have an initial number of 0
> so that when final release is made, it can be bumped to 1 (as explained
> in the wiki)
> 
> I prefer to put the %{?dist} after the 0 before the %{alphatag} because
> it guarantees that when upgrading distro, the package built against the
> newer distro will look newer to yum. This normally would not be an
> issue, but it might be if new code in the svn tree builds fine against
> one compiler but doesn't against newer compiler in newer distro. Rare
> case, sure, but ... project developers aren't always working with
> bleeding edge compilers (which rawhide often uses).
> 
> Thoughts appreciated.

It's bad. Messy. Moving the dist tag to the left makes it enter the area
of even more versioned Obsoletes/Provides/Requires, and so on. Keep the
dist tag out of there.

In which way would you benefit from moving the dist tag to the left?




More information about the fedora-extras-list mailing list