Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I don't even know if it's possible. If I need to create separated packages, please explain why.

share|improve this question
I asked this very same question to the Ubuntu MOTUs a while back, and my answer below is similar to the explanation they gave me. Since then, i've been packaging stuff for various projects (and backports) actively, with their guidance and knowledge. – Thomas Ward Dec 31 '11 at 0:09
additional comment In short, you cannot create a single .deb file that will always work in various Ubuntu versions. This is because of various libraries and versions, as I detail in my answer below. The long explanations exist within my answer below, as well as comparison examples so you can see why building packages separately for each version of Ubuntu is preferred. – Thomas Ward Dec 31 '11 at 0:21
up vote 6 down vote accepted

You will need to create separate packages. This is because of the potential of different library versions being required in various versions of Ubuntu.

As well, when you build the packages into the binaries, it will be building only for the libraries available within that version of Ubuntu.

Subsequently, this is why in debian/changelog you are only allowed to specify one version of Ubuntu at a time on the version line (for example: rkhunter (1.3.8-7~natty1~ppa1) natty; urgency=low - note the natty part changes to maverick, lucid, oneiric, hardy, etc.)

Take a look at the files in my rkhunter backports PPA: Feel free to see what the changelog entries show, and how I named the package version numbers (you can omit the ~ppa# part at the end, but you should append the version of ubuntu to the package names if you're building for more than one version of Ubuntu, and then build each separately).

To better see what I mean, I urge you to compare the actual debian/control files, and the debian/changelog files for the version of rkhunter in my PPA (for Lucid), and compare that to the source version in Oneiric's repos right now, you'll notice the change(s) that had to be done in order to get it to build in Lucid (such changes are common, so when building for Natty, for instance, you'll be specifying newer package versions than in Lucid or Maverick or others. The same is said for building for Oneiric, and backporting to Natty, you sometimes have to specify different versions of build dependencies, among other things, for the older version(s) of Ubuntu)

share|improve this answer
Very usefull!! Thanks! – Enrico Pallazzo Dec 31 '11 at 0:28
@Mr.Pallazzo You're very welcome. Feel free to bug me with any questions you might have, my email address is listed on my launchpad profile (if you login to launchpad), and you can find me in the Ubuntu IRC channels if you need any specific help (nick: Resistance, IRC network: I also recommend the channels #ubuntu-packaging and #ubuntu-motu on if you need any additional assitance :) – Thomas Ward Dec 31 '11 at 0:41
You don't necessarily have to create separate packages. As long as the libraries you used in lucid are still available in latter versions, the package will install on them just fine. – psusi Dec 31 '11 at 17:39
@psusi that is true, but in some cases, a program needs a specific version of a library that only exists in a prior version, which is generally why people create separate package versions for each distro. – Thomas Ward Jan 1 '12 at 1:13
@ThomasWard, library authors and packagers work hard to make sure that does not happen. If a newer version of a library is not backward compatible, then the package name is changed so that both versions can be installed at the same time. This is referred to as an ABI breakage/bump. – psusi Jan 1 '12 at 19:20

Your Answer


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.