4

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?

Zanna
  • 72,312
Daenyth
  • 768

2 Answers2

5

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.

Zanna
  • 72,312
1

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.

Daenyth
  • 768