PpaVersioning

Differences between revisions 9 and 10
Revision 9 as of 2008-08-18 09:47:04
Size: 4707
Editor: i59F77370
Comment:
Revision 10 as of 2009-01-05 13:04:49
Size: 4705
Editor: 82-69-40-219
Comment: spelling etc.
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
This pages helps chosing proper version number for packages uploaded in the ppas related to UME. This pages helps choosing proper version number for packages uploaded in the ppas related to UME.
Line 40: Line 40:
This also implies that you shouldn't use a version number that other persons might use in the future; it's best to namespace your version numbers. For example when Ubuntu takes package foo 1.3-2 from Debian and changes it, it will be called 1.3-2ubuntu1. The next Ubuntu change will be 1.3-2ubuntu2. And if Ubuntu is preparing a new release instead of taking it from Debian, it will be called 1.4-0ubuntu1 as to keep the Ubuntu version number below the Debian one (this allows erasing the Ubuntu version with the Debian version when it's in sync). This also implies that you shouldn't use a version number that other people might use in the future; it's best to namespace your version numbers. For example when Ubuntu takes package foo 1.3-2 from Debian and changes it, it will be called 1.3-2ubuntu1. The next Ubuntu change will be 1.3-2ubuntu2. And if Ubuntu is preparing a new release instead of taking it from Debian, it will be called 1.4-0ubuntu1 as to keep the Ubuntu version number below the Debian one (this allows erasing the Ubuntu version with the Debian version when it's in sync).
Line 46: Line 46:
Even when we have commit access to the upstream repository, it makes more sense to allow for packaging updates without incrementing the upstream version (ubuntu1, ubuntu2 etc.). There are almost no packages which are specific to Ubuntu, so try to follow an upstream versionning scheme upstream and an Ubuntu versionning scheme in Ubuntu. Even when we have commit access to the upstream repository, it makes more sense to allow for packaging updates without incrementing the upstream version (ubuntu1, ubuntu2 etc.). There are almost no packages which are specific to Ubuntu, so try to follow an upstream versioning scheme upstream and an Ubuntu versioning scheme in Ubuntu.

This pages helps choosing proper version number for packages uploaded in the ppas related to UME.

Ordering

Incrementing

Versions need to sort properly to allow upgrades. The Version field is covered in the Debian Policy Manual.

It's customary to increment the last part of the version if you're reuploading a changed source into the same repository as it came from.

You can easily compare versions with dpkg's algorithm:

    % dpkg --compare-versions 1.3-2 '<<' 1.3-3 && echo true
    true
    % dpkg --compare-versions 1.3-2 '<<' 1.3-2um1 && echo true
    true
    % dpkg --compare-versions 1.3-2 '<<' 1.3-2~um1 && echo true
    %

(see the dpkg man page for help on the compare-versions flag)

Forking / appending

Usually, when forking, one appends a namespace string; for example Ubuntu forked grub 0.97-29ubuntu18 from Debian's 0.97-29 (and did 8 uploads in Ubuntu).

Backporting

The "~" character is special and allows ordering of a version just before another one; for example 1.3-2~backport12 is a *smaller* version than 1.3-2. This is often useful for backports as you take a source from the next release almost verbatim and put it in the current stable release, but you want people to upgrade to the official (non-backported) source when they actually upgrade to the next release.

To further distinguish between backports, it's customary to list the distribution the backport is aimed at; for example if you backport to gutsy version 1.3-4 from hardy, you could name it 1.3-4~gutsy1 or 1.3-4~710-1 etc.

Each different source has a different version; namespaces

Source identifier

You can take a source from e.g. Debian and put it in Ubuntu verbatim or in a ppa without changing its version number, but if you do change *anything*, change the source version as to uniquely identify your source package. If we didn't follow this rule for Ubuntu, we would be confused when discussing package foo version 1.3-2 because we wouldn't know who's 1.3-2 that is; it would also be terribly confusing when trying to resync between repositories using the same version numbers, but for different things and at different times.

Namespaces

This also implies that you shouldn't use a version number that other people might use in the future; it's best to namespace your version numbers. For example when Ubuntu takes package foo 1.3-2 from Debian and changes it, it will be called 1.3-2ubuntu1. The next Ubuntu change will be 1.3-2ubuntu2. And if Ubuntu is preparing a new release instead of taking it from Debian, it will be called 1.4-0ubuntu1 as to keep the Ubuntu version number below the Debian one (this allows erasing the Ubuntu version with the Debian version when it's in sync).

For the ubuntu-mobile ppa, we usually pick the "um" namespace; for example if you take claws-mail 3.3.0-1ubuntu4 from hardy/universe and change it slightly for UME to prepare a ppa upload for hardy, you could name the source 3.3.0-1ubuntu4um1. It's also acceptable to use a + to split the version in a more readable fashion, but is longer: 3.3.0-1ubuntu4+um1.

Avoid native versioning

Even when we have commit access to the upstream repository, it makes more sense to allow for packaging updates without incrementing the upstream version (ubuntu1, ubuntu2 etc.). There are almost no packages which are specific to Ubuntu, so try to follow an upstream versioning scheme upstream and an Ubuntu versioning scheme in Ubuntu.

Practical guidelines for the UME ppas

  • If you take version 1.2-0ubuntu2 from Ubuntu hardy for the ubuntu-mobile hardy ppa and change it for UME, rename it to 1.2-0ubuntu2+804um1.
  • If you take version 1.2-0ubuntu2 from Ubuntu hardy for the ubuntu-mobile gutsy ppa and change it for UME, rename it to 1.2-0ubuntu2+710um1.
  • If you take version 1.2-0ubuntu2 from Ubuntu hardy for the ubuntu-mobile gutsy ppa and *DO* *NOT* change it for UME, i.e. simple backport, rename it to 1.2-0ubuntu2~710um1; this will make dist-upgrades to hardy pick the original hardy version.
  • If you take version 1.2-0ubuntu2 from Ubuntu hardy for the ubuntu-mobile gutsy ppa and also have to change it for UME, i.e. backport + changes, rename it to 1.2-0ubuntu2~710um1 too but make sure there's a version for hardy with your changes for example 1.2-0ubuntu2+804um1 (in the hardy ppa) so that a dist-upgrade picks the hardy ppa version with your changes.

MobileAndEmbedded/PpaVersioning (last edited 2009-01-05 13:24:58 by 82-69-40-219)