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://git.debian.org/git/pbuilder/pbuilder.git cd pbuilder make 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
- The result will be found at
Note: If you are on Ubuntu or another GNU/Linux distribution, run
sudo pbuilder create --mirror http://http.us.debian.org/debian --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 root@savannah:/#
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,
BASETGZ=/media/forge/debian/pbuilder/sid-base.tgz BUILDPLACE=/media/forge/debian/pbuilder/build CCACHEDIR=/media/forge/debian/pbuilder/ccache BASEPATH=/media/forge/debian/pbuilder/base.cow COWBUILDER_BASE=/media/forge/debian/pbuilder/ DISTRIBUTION=sid BUILDRESULT=/media/forge/debian/pbuilder/results APTCACHE=/media/forge/debian/pbuilder/aptcache DEBEMAIL="Your Name <email@example.com>" #AUTOCLEANAPTCACHE=yes
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