Translation(s): none


Once you have succesfully created the deb package and made sure it is lintian clean, it is time to make sure it builds properly. For that you use pbuilder. This step will help you find out if you missed any build dependencies in debian/control file.

You will find more detailed information about pbuilder here:

The last link is not needed for the following, but goes into detail.

Install and Setup

First install pbuilder

apt-get install pbuilder

Note for other GNU/Linux users:

git clone git://
cd pbuilder
sudo make install

You must use sudo for pbuilder. Hence you must make an entry in the sudoers file. As root run


and add the following entry:

user_name ALL=(ALL) NOPASSWD: /usr/sbin/pbuilder

Now you need to set up a base tarball that will contain your chroot environment:

sudo pbuilder create


Note: If you are on Ubuntu or another GNU/Linux distribution, run

sudo pbuilder create --mirror --distribution sid

and copy the base.tgz to another location for you to work in a debian environment.

sudo pbuilder --login --save-after-login --basetgz <path to your base.tgz file>

Note down the temporary build directory root which you can use to copy files to and from. For example,

$ sudo pbuilder --login
I: Building the build Environment
I: extracting base tarball [/media/forge/debian/pbuilder/sid-base.tgz]
I: creating local configuration
I: copying local configuration
I: mounting /proc filesystem
I: mounting /run/shm filesystem
I: mounting /dev/pts filesystem
I: Mounting /media/forge/debian/pbuilder/ccache
I: policy-rc.d already exists
I: Obtaining the cached apt archive contents
I: entering the shell
File extracted to: /media/forge/debian/pbuilder/build/26975


Your debian environment is at /media/forge/debian/pbuilder/build/26975. Any file you copy there will be available to debian chroot.

You may create /root/.pbuilderrc if you want set options for pbuilder, for example if you want to keep pbuilder files in an external hard drive,

DEBEMAIL="Your Name <email@yourprovide.domain>"


Now it is time to build the package you already created again, this time with pbuilder. For that you will use the dsc file you created with dpkg-buildpackage

sudo pbuilder build ruby-devise_2.1.2-1.dsc

ruby-devise_2.1.2-1 is an example. You need to replace it with your package.

The result will be found in


Again you have to make sure it is lintian clean:

cd /var/cache/pbuilder/result
lintian -iIEcv --pedantic --color auto ruby-devise_2.1.2-1*.changes