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'm packaging software at work and the scope has increased to have Lucid-based as well as Karmic-based versions. Right now I just build inside a Karmic vm using git-buildpackage calling debuild, but I've looked into pbuilder so I can do it more easily with chroots, since having one vm for Karmic and another for Lucid seems a little out of place. I've looked around for documentation but it's been very cryptic to me so far. The packages already have git repos set up, it's mostly just the use of pbuilder that's got me stuck.

How can I get this set up easily, preferably to the point where I can script it for other developers here.

share|improve this question

If you could be more specific about the problems you are facing, I might be able to give you a better answer.

You might want to look as the pbuilder-dist script in the ubuntu-dev-tools Install ubuntu-dev-tools package. It greatly helps with managing multiple pbuilders for different target environments. As an example, to create a Karmic pbuilder run:

pbuilder-dist karmic create

You can use your newly created Karmic pbuilder with:

pbuilder-dist karmic build /path/to/package.dsc

The package.dsc can is generated when you build the source package with git-buildpackage -S

There is also a git-pbuilder wrapper around pbuilder for git-buildpackage I have no experience with it. My understanding is that, DIST=karmic git-pbuilder create should create you initial Karmic pbuilder. You should then be able to build the package in that pbuilder with:

git-buildpackage --git-dist=karmic --git-pbuilder

See man git-pbuilder and man git-buildpackage for more info.

share|improve this answer
Will using -S still work correctly if it's a package that's built to not have a source tarball included? (closed source). The dpkg-buildpackage manpage wasn't clear. – Daenyth May 4 '11 at 14:19
Based on my testing, -S does not work for that case. Is there a way I can change it so that the source is used for pbuilder but dput will not upload it? – Daenyth May 4 '11 at 18:06
up vote 1 down vote accepted

I wasn't able to configure changeroots that worked for this, so I've been using a lucid vm alongside my karmic vm, building on either as needed.

share|improve this answer

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.