16

I have a program that needs to be recompiled for every ubuntu version.

Currently I am packaging it using Ubuntu's PPA just for the current distribution.

Eventually, I have to provide packages for the previous ubuntu version.

I am not sure how to accomplish this.

How does the Ubuntu PPA build server works - does it just look at the distribution field in the most current changelog entry (in the debian/changelog file) to determine for what distribution the package should be build?

The debian specification allows to add multiple distributions into the distribution field. But this does not seam to help me.

Some ubuntu documents talk about encoding the distribution name into the version number (in the debian changelog file).

But how does this work in practice? A new version of the program is available, then what? Do I add for each distribution a new changelog entry and the PPA buildserver builds automatically for each distribution new packages after dput'ing it up? Or does the PPA buildserver just looks at the first changelog entry?

1
  • 2
    I'm really interested in this process also! Sep 1, 2010 at 19:18

3 Answers 3

10

The way to go is to upload once for every Ubuntu version.

Launchpad won't build packages for Ubuntu versions that are no longer supported, and only build a package for one specific version of Ubuntu. The targeted version is (as you already know) specified in the changelog file, by the newest entry!

Remember to be aware that the packages your program depends on might not be available at the same version across all versions of Ubuntu.

You also talk about "multi-architecture" (architecture = CUP type, eg. x86, LPIA, AMD64) this makes no difference since every package uploaded is build for all available architectures as long as you have Architecture: any in the package definition (debian/control) file, this also allows you to make the package depend on different packages for different architectures (be defining the package more than once)

1
  • So, in order to get a linear changelog, I would first add the version for one ubuntu version to the top of the changelog file, upload that and then add the same version for a different ubuntu version to the top of the file and then upload that?
    – Hjulle
    Jul 22, 2021 at 7:47
10

Launchpad has a new feature currently in beta which allows you to build your package for multiple ubuntu versions at once without any extra work. You can even automatically build your packages every day. https://help.launchpad.net/Packaging/SourceBuilds/GettingStarted alt text

3
  • 1
    That sounds interesting. I can't directly use that, since I am not using bzr nor launchpad for repository hosting (I am using Mercurial). But! Perhaps it is feasible to create a bzr Repository at launchpad and dump the latest changesets from my main repository in there, every time I want to trigger a new package build. Sep 1, 2010 at 21:01
  • I don't code anything all that often and I'm excited for this.
    – aperson
    Sep 2, 2010 at 1:13
  • @maxschlepzig Ask a seperate question on how to import your Hg stuff into Launchpad and I'll answer it. Sep 4, 2010 at 12:38
6

Regarding the naming conventions, the standard is to do something like this:

  • 1.0-0ubuntu1 for the package that ends up in Ubuntu's official archive
  • 1.0-0ubuntu1~lucidppa1 for the version of that package you put in your PPA for lucid
  • 1.0-0ubuntu1~karmicppa1 for the version of that package for Karmic

The reason is that a ~ in the version field represents "less than nothing" for a version number. So if someone adds your PPA at Karmic, they'll get the ~karmicppa1 package. When they then upgrade to Lucid (and readd your PPA), it'll be replaced with the Lucid PPA package. If your package then gets into the official archive, the transition away from your PPA will go smoothly.

The other advantage is that putting the release in the version field makes it clear which release the files apply to (and subtly reminds you to upload one per release). You may also need different branches for each Ubuntu release for when you have different dependencies, for instance.

6
  • Scott - is there some sort of documentation on this? Mar 19, 2013 at 21:18
  • The ~ and stuff is probably labelled somewhere obscure. The rest are just conventions I've observed among other developers, not official documented practice. Mar 27, 2013 at 3:26
  • Ok, thanks, your suggested naming convention does work well. Apr 15, 2013 at 7:46
  • I should add that sometimes this is further extended to put an additional ~ before the ppa: 1.0-0ubuntu1~karmic1~ppa1 The reason for this is that an official stable release update to Karmic might be released as 1.0-0ubuntu1~karmic1, and we want the PPA version to be less than that. Jun 29, 2013 at 0:36
  • Had to ask in #launchpad on Freenode, and apparently this is semi-documented on the LaunchPad Wiki under Building a Source Package. Thanks for the info about this convention, it's quite helpful ^_^
    – TrinitronX
    Dec 16, 2013 at 19:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .