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?


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.

|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

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.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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