Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I know generally the answer is "use a PPA", but separate from this...

What is the Ubuntu policy on compatibility across versions of Ubuntu for a given architecture? For example, if a binary in a package is built on 10.04 LTS and the same libraries exist in Ubuntu 12.04 LTS, does Ubuntu guarantee compatibility? Are there any guidelines for ISVs?

I did search quite a bit and find references about compatibility to LSB, other distributions, etc. I'm not finding a document that describes across Ubuntu release versions.

share|improve this question
add comment

2 Answers 2

What makes a binary package incompatible with a library is an API or ABI break.

  • An API break occurs when the interface offered by the library changes in a way that is no longer compatible with the previous version. An example is the addition or the removal of an argument from a method signature.

    API breaks generally require you to adapt your software to the new interface and are avoided as much as possible by library developers.

  • An ABI break occurs when the size or the alignment of data types change, or the low-level conventions (such as calling conventions) change. An example is modifying a function's parameter type from int to size_t. ABI breaks generally are introduced just by bug fixes or by changes to the API.

    ABI breaks require you just to recompile your program with the newest library headers.

Having said that, what's the Ubuntu policy on API and ABI breaks?

  • Newer Ubuntu releases try to offer always the latest software, including the latest software libraries.

  • Newer Ubuntu releases try to be as much backward-compatible as possible. For example, Ubuntu offers both GTK+2 and GTK+3 at the same time.

  • Once an Ubuntu release is made, it is frozen, in the sense that only important bug fixes can reach the archive for that release (there are exceptions and special cases regarding this rule, but such exceptions are limited to a small set of applications).

  • Across updates of a single Ubuntu releases, there are no chances of API breaks. This is implied by the "only bugfixes" policy.

  • As I previously said, some bugfixes can introduce ABI breaks. Whilst being this a rare case, this is possible and if an ABI break is necessary to fix an important bug, it will be introduced.

  • Across Ubuntu major releases, both API and ABI breaks may be introduced. This is because tries to offer always the newest software.

Long story short: whether your program will work across Ubuntu releases really depends on the libraries it uses and the policies around them. Also, you cannot be sure whether your package will be compatible across Ubuntu release updates.

That was the most technical part. Having said this important preface we can fight the problem from a different point of view: consider that 1. many standards exists, 2. free software tries to respect the standards as much as possible, and 3. most libraries (even small and unimportant ones) will very unlikely change their API/ABI across releases.

So, feel free to offer a single binary package for multiple Ubuntu version, but keep an eye on the changelogs. Also, remember to be clear about your package dependencies: e.g. do not say that it depends on GTK+3, but clearly state the ranges (from 3.X to 3.Y). This will help your users prevent serious mistakes.

share|improve this answer
add comment

I might be a little off but let me say what little I know about this. I will use as an example the package nvidia-313 with version 313.18-0ubuntu1~xedgers~raring2

At the basic level, when a package is created for a specific Ubuntu version it hold:

  • Architecture to which it was made for (eg: 32 Bit, 64 Bit)
  • For what release it was made for (eg: 12.04, 12.10, raring, oneric..)
  • What specific version that package is (In my example above you can see raring2, which would mean is either the 3rd version of it if starting from 0 or the 2nd one if starting from 1. This of course depends on the PPA I used and what the maintainer had in mind)

What does all of this guarantee. It guarantees that:

  1. The package will work "correctly" for that specific Ubuntu version, with that specific architecture. This is assuming the libraries that might be used by the package were not manually changed or otherwise tampered with in a clean environment.

  2. The package will know for what architectures an version it is. If it is used in another different one, it will give you a warning or simply fail to install.

  3. Most PPA developers and main repositories of Ubuntu will have a version of a package. It might be the same version (Like an Nvidia 313 for 13.04, 12.10, 12.04...) but when it was packaged, it used specific versions of some other packages (Dependencies or pre-depends) and some specific versions of some libraries it needed for that version of Ubuntu. Hence seeing the same package for different Ubuntu versions.

Will it work if used on a future or older version to the one it was made for, most like not. Some cases it will but at least it will give you a warning. In most of this cases it really depends on the dependencies of said package, since, if it used some libraries for example in 12.04 that have not changed or changed a little when 13.04, this package might even still work correctly on 13.04 (Even if it was made for 12.04), assuming of course it is at least the same architecture to avoid other problems.

To get to a specific question you are making:

if a binary in a package is built on 10.04 LTS and the same libraries exist in Ubuntu 12.04 LTS, does Ubuntu guarantee compatibility?

If the same libraries exist in both, 10.04 and 12.04, with the same version, same architecture (And same pre-dependencies, versions of it, etc..), then it is my believe the package will work in both versions of Ubuntu. Now, this is not very likely since the speed at which any Linux distro changes over a period of a couple of months is huge.

Many libraries change, many updates are made, many improvements are added. So something that did not exist in 10.04 for example, might exist in 12.04 that will eliminate the need for, for example, using less libraries (Like if a packaged used 12 libraries in 10.04, but in 12.04 it would only need 2 to accomplish the same objective). This is also taking into consideration, changes made to the tools that compile and package each app. Many new techniques appear every year, many ways to optimize packages, compress them, read them, etc..

So, basing all of this on my little knowledge, I would guess, the more time exists between a package on different versions of Ubuntu, the less probable a guarantee will exist that the package will work between both Ubuntu versions.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.