O Construtor Pessoal: pbuilder
Anterior
Próxima

O Construtor Pessoal: pbuilder

Usando o pbuilder como construtor de pacotes, você pode construir pacotes de denrto de uma gaiola (chroot). Você pode contruir pacotes binarios sem usar o pbuilder, porém você deve ter todas as dependências da compilação instaladas no seu sistema primeiro. Entretando, pbuilder permite o empacotador checar as dependências da compilação porque o pacote é embutido com uma instalação mínima do Ubuntu, e as dependências da compilação são baixadas de acordo com o arquivo debian/control.

A seguir vem um pequeno guia para instalar, usar e atualizar um ambiente pbuilder, porém, existem diversos detalhes sobre o uso do pbuilder que fogem do escopo desde guia. A página de manual do pbuilder contém diversas informações e devem ser consultadas caso você tenha problemas ou precise de maiores informações.

Instalando e configurando um ambiente pbuilder

The first, and perhaps most obvious, thing to do is to install pbuilder. If you want to create a pbuilder for a release newer than the one you currently have installed, you will need to manually install the debootstrap .deb (from packages.ubuntu.com) from the newer release. To create a pbuilder execute:

sudo pbuilder create --distribution <distro> \
	--othermirror "deb http://archive.ubuntu.com/ubuntu <distro> universe multiverse"
		

where <distro> is the release you want (edgy for instance) to create the pbuilder for. If you would like to create more than one pbuilder environment you can append the --basetgz flag with the desired location for the compressed pbuilder environment. The default is /var/cache/pbuilder/base.tgz. If you do choose to use --basetgz you will need to use it with the other pbuilder commands so pbuilder knows which compressed build environment to use.

Nota

Creating a pbuilder environment will take some time as debootstrap essentially downloads a minimal Ubuntu installation.

Usando o pbuilder

Now that you have a running pbuilder you can build binary packages from the source package by invoking:

sudo pbuilder build *.dsc

This will build all the source packages in the current directory. The resulting .debs and source packages can be found in /var/cache/pbuilder/result/ (which can be changed with the --buildresult flag).

Atualizando o pbuilder

You should always have a current pbuilder whenever you are testing your source packages, especially when you are building for a development release that is rapidly changing, to ensure that the dependencies are properly found. To update your pbuilder, use:

sudo pbuilder update

If you would like to upgrade you pbuilder to a new release you can use pbuilder update in combination with the --distribution flag:

sudo pbuilder update --distribution <newdistro> --override-config
Anterior
Próxima
Principal