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 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?

share|improve this question
1  
I'm really interested in this process also! –  Marco Ceppi Sep 1 '10 at 19:18

3 Answers 3

up vote 8 down vote accepted

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)

share|improve this answer

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

share|improve this answer
2  
Wow thats smart! –  Source Lab Sep 1 '10 at 20:26
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. –  maxschlepzig Sep 1 '10 at 21:01
    
I don't code anything all that often and I'm excited for this. –  aperson Sep 2 '10 at 1:13
    
@maxschlepzig Ask a seperate question on how to import your Hg stuff into Launchpad and I'll answer it. –  Jorge Castro Sep 4 '10 at 12:38

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.

share|improve this answer
    
Scott - is there some sort of documentation on this? –  Bartosz Radaczyński Mar 19 '13 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. –  Scott Ritchie Mar 27 '13 at 3:26
    
Ok, thanks, your suggested naming convention does work well. –  Bartosz Radaczyński Apr 15 '13 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. –  Scott Ritchie Jun 29 '13 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 '13 at 19:12

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.