Lindows.com Package Version Policy

Version 2.0.4
Revision History
Revision 2.0.4Feb 9, 2004Revised by: JN
Updated release constant definition to remove provision for release constants of zero (0), see FAQ 2.
Revision 2.0.3Nov 24, 2003Revised by: JN
Added clarification to the vendor tag. An empty vendor tag is now valid in certain situations which is now illustrated in some of the updated examples.
Revision 2.0.2Nov 8, 2003Revised by: JN
Added notes in the glossary concerning the epoch.
Revision 2.0.1Oct 30, 2003Revised by: JN
Fixed a number of typos in version examples.
Revision 2.0.0Oct 24, 2003Revised by: JN
Overhauled versioning rules so that the release constant is the most significant part of the lindows portion of the downstream number. Added initial version component table, import policy, FAQ, version examples, new glossary entries and other cleanups.
Revision 1.1.0Oct 16, 2003Revised by: JN
Updated versioning rules to new spec, improved introduction, added definition for release constant.
Revision 1.0.2Oct 6, 2003Revised by: DS
Fleshed out some definitions.
Revision 1.0.1Oct 6, 2003Revised by: JN
Initial document created.

This documents describes the version policy for packages released from Lindows.com. This document will eventually be expanded to cover all aspects of the release management process (ie: autobuilder, warehouse, etc.).


Table of Contents
1. Introduction
2. Version Types
3. How To Version A Package Change
4. Package Importing Policy
5. FAQ
Glossary

1. Introduction

Package versioning is very important because:

These advantages can only be realized when the following fundamental rules of versioning are followed:

  1. No packages with the same name and version number can contain different contents. This creates confusion and makes changes impossible to track.

  2. No packages with the same name and different version numbers can contain the same contents. A violation here is not as serious as rule 1 above, but is serious nonetheless. When this happens, it indicates that there are superfluous builds happening. Since every proper version number change indicates in some way how the package changed, the new version will be misleading because no change really happened. When this rule is ignored, people can no longer read version numbers accurately because they cease to become meaningful. (In the real world, sometimes superfluous builds happen. This is ok every once in a while, but the point is that it should never become the normal case).


2. Version Types

A version is an ordered collection of fields, as described in the definition.

Once you understand the different types and specifications, reading version numbers becomes easy: There are two types of package versions that we deal with at Lindows.com.


3. How To Version A Package Change

We are downstream from the downstream maintainers of Debian, and we must take care not to interfere with the Debian versioning scheme; we want to be able to tell when there are packages in Debian that supersede ours. The Debian Policy Manual and Debian Developer's Reference specify several "magic" properties of versions that we must preserve in our versioning. Even in cases where we are the upstream maintainers of a package that is not in Debian and never will be in Debian, we still must preserve the debian portion of the downstream version. (For a detailed explanation why, see FAQ 1.

The first three fields in the release version are reserved for Debian. The first numeric field in the release version is the Debian revision; the second numeric field is reserved for non-maintainer uploads, and the third numeric field is reserved for recompilation-only uploads. Therefore, any package modifications we do should result in changes to the release version only after the third numeric field. If all three numeric fields do not exist in the current version, zeroes must be inserted as placeholders.

Lindows.com versioning begins after the third separator field. The fourth field is the release constant. The next field separator indicates the vendor tag (ie: '.lindows' for Lindows.com packages, '.contrib' for packages contributed by the publisher program). The fifth field is the downstream lindows branch number (starting with zero). The next three fields (fields six through eight) are used exactly as Debian uses the first three. Fields after the eighth are reserved for the warehouse program when performing binary package mangling.

For example, if the Debian version of apache is 2.0-3, a Lindows.com revision of that package compiled for the coho distribution (release constant 45) would be 2.0-3.0.0.45.lindows0.1. If the next change was a simple recompilation-only, the version would become 2.0-3.0.0.45.lindows0.1.0.1. Next, if there was a packaging revision made, the version would become 2.0-3.0.0.45.lindows0.2.

As a more advanced example, if apache is then just recompiled for the marlin release (release constant 50), the version would become 2.0-3.0.0.50.lindows0.2.0.x, where x = the next available downstream lindows recompilation only field in marlin of all versions of apache matching 2.0-3.0.0.50.lindows0.2.0.*.


4. Package Importing Policy


5. FAQ

  1. Question. Why must packages which have an upstream source that originates at Lindows.com pad the 3 debian downstream fields with zeros (0)? For these packages, can we not drop these 3 fields because this package never has and never will go to Debian?

    Answer. The reason we must keep these 3 fields is because the warehouse could mangle the package version. In this case, it needs to pad the appropriate number of fields with zero (0) so that any "real" downstream change in the future will supercede it. If the numbers of fields were different in the two schemes, we would have to be able to determine what scheme the package was using in order to add the proper number of padded fields. However, this would be impossible to determine because a version like 2.0 (with no downstream number), is valid in both schemes.

  2. Question. Why is the release constant a required field? Why can't it be implicitly or explicitly zero (0) indicating that it is release neutral (meaning no build dependencies)?

    Answer. Nothing is release neutral because it always has some build dependencies, even if at the very least it's just the build essential packages (ie: dpkg-dev, debhelper, etc.). Furthermore, if the release constant was explicitly zero (0), and it was mangled, it's version number would potentially collide with other packages in other releases.

Glossary

Package Version

A package version is a string describing the version of that package. It is composed of an upstream version and optionally an epoch and/or a release version, in the form: [epoch:]upstream_version[-release_version].

Upstream Version

From the Debian Policy Manual: This is the main part of the version number. It is usually the version number of the original ("upstream") package from which the .deb file has been made, if this is applicable. Usually this will be in the same format as that specified by the upstream author(s); however, it may need to be reformatted to fit into the package management system's format and comparison scheme.

The upstream_version may contain only alphanumerics and the characters . + - : (full stop, plus, hyphen, colon) and should start with a digit. If there is no debian_revision then hyphens are not allowed; if there is no epoch then colons are not allowed.

Epoch

From the Debian Policy Manual: " This is a single (generally small) unsigned integer. It may be omitted, in which case zero is assumed. This is a single (generally small) unsigned integer. It is used to allow mistakes in the version numbers of older versions of a package, and also a package's previous version numbering schemes, to be left behind. It should only be used for this purpose. "

Note: The epoch should should never, under any circumstances, be incremented on packages that originate from debian. The epoch is only used by debian to fix old versioning problems. We cannot use it or else we make it impossible to ever be superceded by the original debian package which is something that the new versioning scheme makes provision for.

Downstream Version

From the Debian Policy Manual: This part of the version number specifies the version of the Debian package based on the upstream version. It may contain only alphanumerics and the characters + and . (plus and full stop).

The Debian Developer's Reference also specifies several "magic" fields in the release version. The first numeric field is the revision; the second numeric field is reserved for non-maintainer uploads, and the third numeric field is reserved for recompilation-only uploads. Therefore, any modifications we do to packages should result in changes to the release version only after the third numeric field.

Downstream Debian Packaging Revision Field

Indicates a Debian packaging revision. Counting for this field begins at 1. Every time it increments, the following fields are reset:

Downstream Debian Non-Maintainer Upload

Indicates a Debian non-maintainer upload. Counting for this field begins at 1. Every time it increments, the following fields are reset:

Downstream Debian Recompilation Only

Indicates a Debian recompilation only change. Counting for this field begins at 1.

Downstream Lindows Release Constant Field

The first portion of the Lindows.com downstream release. This numeric field is fixed per release. This is a required field. The following release constants are defined thus far:

  • 40 prickleback

  • 45 coho

  • 50 marlin

  • 60 skipjack

Note: When this field changes, no fields are reset, however at least a recompilation change must accompany this change.

Downstream Lindows Vendor Tag Field Separator

This denotes the vendor that owns the lindows branch field and the lindows package revision field.

Valid values:

  • ".contrib": The vendor is a developer in the publisher program (actual person is in the 'Maintainer' field in the package).

  • ".lindows": The vendor is Lindows.com.

  • "." (empty): There is no vendor. In other words, the lindows branch field and the lindows package revision field are both zero (ie: have not been claimed yet).

Downstream Lindows Branch Number Field

Indicates a Lindows branch. Counting for this field begins at 0. Every time it increments, the following fields are reset:

Downstream Lindows Packaging Revision Field

Indicates a Lindows packaging revision. Counting for this field begins at 1. Every time it increments, the following fields are reset:

Downstream Lindows Non-Maintainer Upload Field

Indicates a new Lindows non-maintainer upload. Counting for this field begins at 1. Every time it increments, the following fields are reset:

Downstream Lindows Recompilation Only Field

Indicates a Lindows recompilation only change. Counting for this field begins at 1.

Release Version

Synonymous with a downstream version.

Revision

Synonymous with a downstream version.

Version Field

A contiguous portion of the version containing either entirely numeric characters or entirely non-numeric characters, bounded by either fields of the other type or by either end of the version.

Version Numeric Field

A version field composed entirely of numeric characters.

Version Non-Numeric Field

A version field composed entirely of non-numeric characters.

Version Separator Field

A non-numeric field with at least 1 period (.).