[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Sane versioning scheme for localy recompiled packages


several people and even some distributions are recompiling debian
packages for some reason or another (e.g. different gcc flags). It
would be nice if there were a consistent way to change the version of
a package to reflect it not being the pristine debian deb.

Currently no nice scheme exists and several used schemes are flawed:

- append suffix:

  1.2 -> 1.2.local.1
  1.2-3 -> 1.2-3.local.1

  This is the worst scheme, security updates, NMUs, recompile NMUs and
  even maintainer uploads can break the ordering.

- append debian revision with 4th part:

  1.2 -> 1.2-0.0.0.local.1
  1.2-3 -> 1.2-3.0.0.local.1

  Security updates mess up the ordering:
  1.2-3 << 1.2-3sarge1 << 1.2-3sarge1.0.0.local.1 << 1.2-3.0.0.local.1

- append -0a0.local.1 for native versions, a0.local.1 for debian
  revisions ending in a digit and 0a0.local.1 otherwise:

  1.2 -> 1.2-0a0.local.1
  1.2-3 -> 1.2-3a0.local.1
  1.2-3b -> 1.2-3b0a0.local.1

  This is nearly perfect as long as there is no upload with a debian
  revision ending in 'a':
  1.2-3 << 1.2-3a << 1.2-3a0a0.local.1 << 1.2-3a0.local.1
  While you might argue about the legality of 1.2-3a it is not
  impossible to upload such a package.

I'm proposing to define a special char '#' that compares lower than
all other chars except '~' and 'end of version' for the use of
recompiling packages by non Debian entities. In fact '#' would start a
new part of the version giving:

[<epoch>]:<upstream version>[-<debian revision][#<non debian revision>]

The 'non debian revision' would default to ("",0) just like the debian
revision if missing.

Further '#local.1' should be reserved for local use and
'#<distributor>.1' should be recommended for distributions to use.


PS: '#' was picked at random example since it doesn't appear in any
version in main.

Reply to: