pbuilder User's Manual

Usage and operations

Junichi Uekawa

documentation in progress


Table of Contents

1. Introducing pbuilder
1. Aims of pbuilder
2. Using pbuilder
1. Creating a base chroot image tar-ball
2. Updating the base.tgz
3. Building a package using the base.tgz
4. Facilitating Debian Developers' typing, pdebuild
5. Configuration Files
6. Building packages as non-root inside the chroot
7. Using pbuilder for back-porting
8. Mass-building packages
9. Auto-backporting scripts
10. Using pbuilder for automated testing of packages
11. Using pbuilder for testing builds with alternate compilers
3. Using User-mode-linux with pbuilder
1. Configuring user-mode-linux
2. Configuring rootstrap
3. Configuring pbuilder-uml
4. Considerations for running pbuilder-user-mode-linux
5. Parallel running of pbuilder-user-mode-linux
6. Using pbuilder-user-mode-linux as a wrapper script to start up a virtual machine
4. Frequently asked questions
1. pbuilder create fails
2. Directories that cannot be bind-mounted
3. Logging in to pbuilder to investigate build failure
4. Logging in to pbuilder to modify the environment
5. Setting BUILDRESULTUID for sudo sessions
6. Notes on usage of $TMPDIR
7. Creating a shortcut for running pbuilder with a specific distribution
8. Using environmental variables for running pbuilder for specific distribution
9. Using special apt sources lists, and local packages
10. How to get pbuilder to run apt-get update before trying to satisfy build-dependency
11. Different bash prompts inside pbuilder login
12. Creating a chroot reminder
13. Using /var/cache/apt/archives for the package cache
14. pbuilder back ported to stable Debian releases
15. Warning about LOGNAME not being defined
16. Cannot Build-conflict against an essential package
17. Avoiding the "ln: Invalid cross-device link" message
18. Using fakechroot
19. Using debconf inside pbuilder sessions
20. nodev mount options hinder pbuilder activity
21. pbuilder is slow
22. Using pdebuild to sponsor package
23. Why is there a source.changes file in ../?
24. amd64 and i386-mode
25. Using tmpfs for buildplace
26. Using svn-buildpackage together with pbuilder
5. Troubleshooting and development
1. Reporting bugs
2. Mailing list
3. IRC Channel
4. Information for pbuilder developers
6. Other uses of pbuilder
1. Using pbuilder for small experiments
2. Running little programs inside the chroot
7. Experimental or wishlist features of pbuilder
1. Using LVM
2. Using cowdancer
3. Using pbuilder without tar.gz
4. Using pbuilder in a vserver
5. Usage of ccache
8. Reference materials
1. Directory structure outside the chroot
2. Directory structure inside the chroot
9. Minor archaeological details
1. Documentation history
2. Possibly inaccurate Background History of pbuilder
2.1. The Time Before pbuilder
2.2. Birth of pbuilder
2.3. And the second year of its life
2.4. Fifth year of pbuilder

List of Tables

5.1. Directory structure of the testsuite
8.1. Directory Structure outside the chroot
8.2. Directory Structure inside the chroot

Chapter 1. Introducing pbuilder

Table of Contents

1. Aims of pbuilder

1. Aims of pbuilder

pbuilder stands for Personal Builder, and it is an automatic Debian Package Building system for personal development workstation environments. pbuilder aims to be an easy-to-setup system for auto-building Debian packages inside a clean-room environment, so that it is possible to verify that a package can be built on most Debian installations. The clean-room environment is achieved through the use of a base chroot image, so that only minimal packages will be installed inside the chroot.

The Debian distribution consists of free software accompanied with source. The source code within Debian's "main" section must build within Debian "main", with only the explicitly specified build-dependencies installed.

The primary aim of pbuilder is different from other auto-building systems in Debian in that its aim is not to try to build as many packages as possible. It does not try to guess what a package needs, and in most cases it tries the worst choice of all if there is a choice to be made.

In this way, pbuilder tries to ensure that packages tested against pbuilder will build properly in most Debian installations, hopefully resulting in a good overall Debian source-buildability.

The goal of making Debian buildable from source is somewhat accomplished, and has seen good progress. In the past age of Debian 3.0, there were many problems when building from source. More recent versions of Debian is much better.

Chapter 2. Using pbuilder

There are several simple commands for operation. pbuilder create, pbuilder update, and pbuilder build commands are the typical commands used. Let us look at the commands one by one.

1. Creating a base chroot image tar-ball

pbuilder create will create a base chroot image tar-ball (base.tgz). All other commands will operate on the resulting base.tgz If the Debian release to be created within chroot is not going to be "sid" (which is the default), the distribution code-name needs to be specified with the --distribution command-line option.

debootstrap [1] is used to create the bare minimum Debian installation, and then build-essential packages are installed on top of the minimum installation using apt-get inside the chroot.

For fuller documentation of command-line options, see the pbuilder.8 manual page. Some configuration will be required for /etc/pbuilderrc for the mirror site [2] to use, and proxy configuration may be required to allow access through HTTP. See the pbuilderrc.5 manual page for details.

2. Updating the base.tgz

pbuilder update will update the base.tgz. It will extract the chroot, invoke apt-get update and apt-get dist-upgrade inside the chroot, and then recreate the base.tgz (the base tar-ball).

It is possible to switch the distribution which the base.tgz is targeted at at this point. Specify --distribution sid --override-config to change the distribution to sid. [3]

For fuller documentation of command-line options, see the pbuilder.8 manual page

3. Building a package using the base.tgz

To build a package inside the chroot, invoke pbuilder build whatever.dsc. pbuilder will extract the base.tgz to a temporary working directory, enter the directory with chroot, satisfy the build-dependencies inside chroot, and build the package. The built packages will be moved to a directory specified with the --buildresult command-line option.

The --basetgz option can be used to specify which base.tgz to use.

pbuilder will extract a fresh base chroot image from base.tgz. (base.tgz is created with pbuilder create, and updated with pbuilder update). The chroot is populated with build-dependencies by parsing debian/control and invoking apt-get.

For fuller documentation of command-line options, see the pbuilder.8 manual page

4. Facilitating Debian Developers' typing, pdebuild

pdebuild is a little wrapper script that does the most frequent of all tasks. A Debian Developer may try to do debuild, and build a package, inside a Debian source directory. pdebuild will allow similar control, and allow package to be built inside the chroot, to check that the current source tree will build happily inside the chroot.

pdebuild calls dpkg-nside class="command">pbuilder aims to be an easy-to-setup system for auto-building Debian packages inside a clean-room environment, so that it is possible to verify that a package can be built on most Debian installations. The clean-room environment is achieved through the use of a base chroot image, so that only minimal packages will be installed inside the chroot.

The Debian distribution consists of free software accompanied with source. The source code within Debian's "main" section must build within Debian "main", with only the explicitly specified build-dependencies installed.

The primary aim of pbuilder is different from other auto-building systems in Debian in that its aim is not to try to build as many packages as possible. It does not try to guess what a package needs, and in most cases it tries the worst choice of all if there is a choice to be made.

In this way, pbuilder tries to ensure that packages tested against pbuilder will build properly in most Debian installations, hopefully resulting in a good overall Debian source-buildability.

The goal of making Debian buildable from source is somewhat accomplished, and has seen good progress. In the past age of Debian 3.0, there were many problems when building from source. More recent versions of Debian is much better.

Chapter 2. Using pbuilder

There are several simple commands for operation. pbuilder create, pbuilder update, and pbuilder build commands are the typical commands used. Let us look at the commands one by one.

1. Creating a base chroot image tar-ball

pbuilder create will create a base chroot image tar-ball (base.tgz). All other commands will operate on the resulting base.tgz If the Debian release to be created within chroot is not going to be "sid" (which is the default), the distribution code-name needs to be specified with the --distribution command-line option.

debootstrap [1] is used to create the bare minimum Debian installation, and then build-essential packages are installed on top of the minimum installation using apt-get inside the chroot.

For fuller documentation of command-line options, see the pbuilder.8 manual page. Some configuration will be required for /etc/pbuilderrc for the mirror site [2] to use, and proxy configuration may be required to allow access through HTTP. See the pbuilderrc.5 manual page for details.

2. Updating the base.tgz

pbuilder update will update the base.tgz. It will extract the chroot, invoke apt-get update and apt-get dist-upgrade inside the chroot, and then recreate the base.tgz (the base tar-ball).

It is possible to switch the distribution which the base.tgz is targeted at at this point. Specify --distribution sid --override-config to change the distribution to sid. [3]

For fuller documentation of command-line options, see the pbuilder.8 manual page

3. Building a package using the base.tgz

To build a package inside the chroot, invoke pbuilder build whatever.dsc. pbuilder will extract the base.tgz to a temporary working directory, enter the directory with chroot, satisfy the build-dependencies inside chroot, and build the package. The built packages will be moved to a directory specified with the --buildresult command-line option.

The --basetgz option can be used to specify which base.tgz to use.

pbuilder will extract a fresh base chroot image from base.tgz. (base.tgz is created with pbuilder create, and updated with pbuilder update). The chroot is populated with build-dependencies by parsing debian/control and invoking apt-get.

For fuller documentation of command-line options, see the pbuilder.8 manual page

4. Facilitating Debian Developers' typing, pdebuild

pdebuild is a little wrapper script that does the most frequent of all tasks. A Debian Developer may try to do debuild, and build a package, inside a Debian source directory. pdebuild will allow similar control, and allow package to be built inside the chroot, to check that the current source tree will build happily inside the chroot.

pdebuild calls dpkg-nside class="command">pbuilder aims to be an easy-to-setup system for auto-building Debian packages inside a clean-room environment, so that it is possible to verify that a package can be built on most Debian installations. The clean-room environment is achieved through the use of a base chroot image, so that only minimal packages will be installed inside the chroot.

The Debian distribution consists of free software accompanied with source. The source code within Debian's "main" section must build within Debian "main", with only the explicitly specified build-dependencies installed.

The primary aim of pbuilder is different from other auto-building systems in Debian in that its aim is not to try to build as many packages as possible. It does not try to guess what a package needs, and in most cases it tries the worst choice of all if there is a choice to be made.

In this way, pbuilder tries to ensure that packages tested against pbuilder will build properly in most Debian installations, hopefully resulting in a good overall Debian source-buildability.

The goal of making Debian buildable from source is somewhat accomplished, and has seen good progress. In the past age of Debian 3.0, there were many problems when building from source. More recent versions of Debian is much better.

Chapter 2. Using pbuilder

There are several simple commands for operation. pbuilder create, pbuilder update, and pbuilder build commands are the typical commands used. Let us look at the commands one by one.

1. Creating a base chroot image tar-ball

pbuilder create will create a base chroot image tar-ball (base.tgz). All other commands will operate on the resulting base.tgz If the Debian release to be created within chroot is not going to be "sid" (which is the default), the distribution code-name needs to be specified with the --distribution command-line option.

debootstrap [1] is used to create the bare minimum Debian installation, and then build-essential packages are installed on top of the minimum installation using apt-get inside the chroot.

For fuller documentation of command-line options, see the pbuilder.8 manual page. Some configuration will be required for /etc/pbuilderrc for the mirror site [2] to use, and proxy configuration may be required to allow access through HTTP. See the pbuilderrc.5 manual page for details.

2. Updating the base.tgz

pbuilder update will update the base.tgz. It will extract the chroot, invoke apt-get update and apt-get dist-upgrade inside the chroot, and then recreate the base.tgz (the base tar-ball).

It is possible to switch the distribution which the base.tgz is targeted at at this point. Specify --distribution sid --override-config to change the distribution to sid. [3]

For fuller documentation of command-line options, see the pbuilder.8 manual page

3. Building a package using the base.tgz

To build a package inside the chroot, invoke pbuilder build whatever.dsc. pbuilder will extract the base.tgz to a temporary working directory, enter the directory with chroot, satisfy the build-dependencies inside chroot, and build the package. The built packages will be moved to a directory specified with the --buildresult command-line option.

The --basetgz option can be used to specify which base.tgz to use.

pbuilder will extract a fresh base chroot image from base.tgz. (base.tgz is created with pbuilder create, and updated with pbuilder update). The chroot is populated with build-dependencies by parsing debian/control and invoking apt-get.

For fuller documentation of command-line options, see the pbuilder.8 manual page

4. Facilitating Debian Developers' typing, pdebuild

pdebuild is a little wrapper script that does the most frequent of all tasks. A Debian Developer may try to do debuild, and build a package, inside a Debian source directory. pdebuild will allow similar control, and allow package to be built inside the chroot, to check that the current source tree will build happily inside the chroot.

pdebuild calls dpkg-nside class="command">pbuilder aims to be an easy-to-setup system for auto-building Debian packages inside a clean-room environment, so that it is possible to verify that a package can be built on most Debian installations. The clean-room environment is achieved through the use of a base chroot image, so that only minimal packages will be installed inside the chroot.

The Debian distribution consists of free software accompanied with source. The source code within Debian's "main" section must build within Debian "main", with only the explicitly specified build-dependencies installed.

The primary aim of pbuilder is different from other auto-building systems in Debian in that its aim is not to try to build as many packages as possible. It does not try to guess what a package needs, and in most cases it tries the worst choice of all if there is a choice to be made.

In this way, pbuilder tries to ensure that packages tested against pbuilder will build properly in most Debian installations, hopefully resulting in a good overall Debian source-buildability.

The goal of making Debian buildable from source is somewhat accomplished, and has seen good progress. In the past age of Debian 3.0, there were many problems when building from source. More recent versions of Debian is much better.

Chapter 2. Using pbuilder

There are several simple commands for operation. pbuilder create, pbuilder update, and pbuilder build commands are the typical commands used. Let us look at the commands one by one.

1. Creating a base chroot image tar-ball

pbuilder create will create a base chroot image tar-ball (base.tgz). All other commands will operate on the resulting base.tgz If the Debian release to be created within chroot is not going to be "sid" (which is the default), the distribution code-name needs to be specified with the --distribution command-line option.

debootstrap [1] is used to create the bare minimum Debian installation, and then build-essential packages are installed on top of the minimum installation using apt-get inside the chroot.

For fuller documentation of command-line options, see the pbuilder.8 manual page. Some configuration will be required for /etc/pbuilderrc for the mirror site [2] to use, and proxy configuration may be required to allow access through HTTP. See the pbuilderrc.5 manual page for details.

2. Updating the base.tgz

pbuilder update will update the base.tgz. It will extract the chroot, invoke apt-get update and apt-get dist-upgrade inside the chroot, and then recreate the base.tgz (the base tar-ball).

It is possible to switch the distribution which the base.tgz is targeted at at this point. Specify --distribution sid --override-config to change the distribution to sid. [3]

For fuller documentation of command-line options, see the pbuilder.8 manual page

3. Building a package using the base.tgz

To build a package inside the chroot, invoke pbuilder build whatever.dsc. pbuilder will extract the base.tgz to a temporary working directory, enter the directory with chroot, satisfy the build-dependencies inside chroot, and build the package. The built packages will be moved to a directory specified with the --buildresult command-line option.

The --basetgz option can be used to specify which base.tgz to use.

pbuilder will extract a fresh base chroot image from base.tgz. (base.tgz is created with pbuilder create, and updated with pbuilder update). The chroot is populated with build-dependencies by parsing debian/control and invoking apt-get.

For fuller documentation of command-line options, see the pbuilder.8 manual page

4. Facilitating Debian Developers' typing, pdebuild

pdebuild is a little wrapper script that does the most frequent of all tasks. A Debian Developer may try to do debuild, and build a package, inside a Debian source directory. pdebuild will allow similar control, and allow package to be built inside the chroot, to check that the current source tree will build happily inside the chroot.

pdebuild calls dpkg-nside class="command">pbuilder aims to be an easy-to-setup system for auto-building Debian packages inside a clean-room environment, so that it is possible to verify that a package can be built on most Debian installations. The clean-room environment is achieved through the use of a base chroot image, so that only minimal packages will be installed inside the chroot.

The Debian distribution consists of free software accompanied with source. The source code within Debian's "main" section must build within Debian "main", with only the explicitly specified build-dependencies installed.

The primary aim of pbuilder is different from other auto-building systems in Debian in that its aim is not to try to build as many packages as possible. It does not try to guess what a package needs, and in most cases it tries the worst choice of all if there is a choice to be made.

In this way, pbuilder tries to ensure that packages tested against pbuilder will build properly in most Debian installations, hopefully resulting in a good overall Debian source-buildability.

The goal of making Debian buildable from source is somewhat accomplished, and has seen good progress. In the past age of Debian 3.0, there were many problems when building from source. More recent versions of Debian is much better.

Chapter 2. Using pbuilder

There are several simple commands for operation. pbuilder create, pbuilder update, and pbuilder build commands are the typical commands used. Let us look at the commands one by one.

1. Creating a base chroot image tar-ball

pbuilder create will create a base chroot image tar-ball (base.tgz). All other commands will operate on the resulting base.tgz If the Debian release to be created within chroot is not going to be "sid" (which is the default), the distribution code-name needs to be specified with the --distribution command-line option.

debootstrap [1] is used to create the bare minimum Debian installation, and then build-essential packages are installed on top of the minimum installation using apt-get inside the chroot.

For fuller documentation of command-line options, see the pbuilder.8 manual page. Some configuration will be required for /etc/pbuilderrc for the mirror site [2] to use, and proxy configuration may be required to allow access through HTTP. See the pbuilderrc.5 manual page for details.

2. Updating the base.tgz

pbuilder update will update the base.tgz. It will extract the chroot, invoke apt-get update and apt-get dist-upgrade inside the chroot, and then recreate the base.tgz (the base tar-ball).

It is possible to switch the distribution which the base.tgz is targeted at at this point. Specify --distribution sid --override-config to change the distribution to sid. [3]

For fuller documentation of command-line options, see the pbuilder.8 manual page

3. Building a package using the base.tgz

To build a package inside the chroot, invoke pbuilder build whatever.dsc. pbuilder will extract the base.tgz to a temporary working directory, enter the directory with chroot, satisfy the build-dependencies inside chroot, and build the package. The built packages will be moved to a directory specified with the --buildresult command-line option.

The --basetgz option can be used to specify which base.tgz to use.

pbuilder will extract a fresh base chroot image from base.tgz. (base.tgz is created with pbuilder create, and updated with pbuilder update). The chroot is populated with build-dependencies by parsing debian/control and invoking apt-get.

For fuller documentation of command-line options, see the pbuilder.8 manual page

4. Facilitating Debian Developers' typing, pdebuild

pdebuild is a little wrapper script that does the most frequent of all tasks. A Debian Developer may try to do debuild, and build a package, inside a Debian source directory. pdebuild will allow similar control, and allow package to be built inside the chroot, to check that the current source tree will build happily inside the chroot.

pdebuild calls dpkg-nside class="command">pbuilder aims to be an easy-to-setup system for auto-building Debian packages inside a clean-room environment, so that it is possible to verify that a package can be built on most Debian installations. The clean-room environment is achieved through the use of a base chroot image, so that only minimal packages will be installed inside the chroot.

The Debian distribution consists of free software accompanied with source. The source code within Debian's "main" section must build within Debian "main", with only the explicitly specified build-dependencies installed.

The primary aim of pbuilder is different from other auto-building systems in Debian in that its aim is not to try to build as many packages as possible. It does not try to guess what a package needs, and in most cases it tries the worst choice of all if there is a choice to be made.

In this way, pbuilder tries to ensure that packages tested against pbuilder will build properly in most Debian installations, hopefully resulting in a good overall Debian source-buildability.

The goal of making Debian buildable from source is somewhat accomplished, and has seen good progress. In the past age of Debian 3.0, there were many problems when building from source. More recent versions of Debian is much better.

Chapter 2. Using pbuilder

There are several simple commands for operation. pbuilder create, pbuilder update, and pbuilder build commands are the typical commands used. Let us look at the commands one by one.

1. Creating a base chroot image tar-ball

pbuilder create will create a base chroot image tar-ball (base.tgz). All other commands will operate on the resulting base.tgz If the Debian release to be created within chroot is not going to be "sid" (which is the default), the distribution code-name needs to be specified with the --distribution command-line option.

debootstrap [1] is used to create the bare minimum Debian installation, and then build-essential packages are installed on top of the minimum installation using apt-get inside the chroot.

For fuller documentation of command-line options, see the pbuilder.8 manual page. Some configuration will be required for /etc/pbuilderrc for the mirror site [2] to use, and proxy configuration may be required to allow access through HTTP. See the pbuilderrc.5 manual page for details.

2. Updating the base.tgz

pbuilder update will update the base.tgz. It will extract the chroot, invoke apt-get update and apt-get dist-upgrade inside the chroot, and then recreate the base.tgz (the base tar-ball).

It is possible to switch the distribution which the base.tgz is targeted at at this point. Specify --distribution sid --override-config to change the distribution to sid. [3]

For fuller documentation of command-line options, see the pbuilder.8 manual page

3. Building a package using the base.tgz

To build a package inside the chroot, invoke pbuilder build whatever.dsc. pbuilder will extract the base.tgz to a temporary working directory, enter the directory with chroot, satisfy the build-dependencies inside chroot, and build the package. The built packages will be moved to a directory specified with the --buildresult command-line option.

The --basetgz option can be used to specify which base.tgz to use.

pbuilder will extract a fresh base chroot image from base.tgz. (base.tgz is created with pbuilder create, and updated with pbuilder update). The chroot is populated with build-dependencies by parsing debian/control and invoking apt-get.

For fuller documentation of command-line options, see the pbuilder.8 manual page

4. Facilitating Debian Developers' typing, pdebuild

pdebuild is a little wrapper script that does the most frequent of all tasks. A Debian Developer may try to do debuild, and build a package, inside a Debian source directory. pdebuild will allow similar control, and allow package to be built inside the chroot, to check that the current source tree will build happily inside the chroot.

pdebuild calls dpkg-nside class="command">pbuilder aims to be an easy-to-setup system for auto-building Debian packages inside a clean-room environment, so that it is possible to verify that a package can be built on most Debian installations. The clean-room environment is achieved through the use of a base chroot image, so that only minimal packages will be installed inside the chroot.

The Debian distribution consists of free software accompanied with source. The source code within Debian's "main" section must build within Debian "main", with only the explicitly specified build-dependencies installed.

The primary aim of pbuilder is different from other auto-building systems in Debian in that its aim is not to try to build as many packages as possible. It does not try to guess what a package needs, and in most cases it tries the worst choice of all if there is a choice to be made.

In this way, pbuilder tries to ensure that packages tested against pbuilder will build properly in most Debian installations, hopefully resulting in a good overall Debian source-buildability.

The goal of making Debian buildable from source is somewhat accomplished, and has seen good progress. In the past age of Debian 3.0, there were many problems when building from source. More recent versions of Debian is much better.

Chapter 2. Using pbuilder

There are several simple commands for operation. pbuilder create, pbuilder update, and pbuilder build commands are the typical commands used. Let us look at the commands one by one.

1. Creating a base chroot image tar-ball

pbuilder create will create a base chroot image tar-ball (base.tgz). All other commands will operate on the resulting base.tgz If the Debian release to be created within chroot is not going to be "sid" (which is the default), the distribution code-name needs to be specified with the --distribution command-line option.

debootstrap [1] is used to create the bare minimum Debian installation, and then build-essential packages are installed on top of the minimum installation using apt-get inside the chroot.

For fuller documentation of command-line options, see the pbuilder.8 manual page. Some configuration will be required for /etc/pbuilderrc for the mirror site [2] to use, and proxy configuration may be required to allow access through HTTP. See the pbuilderrc.5 manual page for details.

2. Updating the base.tgz

pbuilder update will update the base.tgz. It will extract the chroot, invoke apt-get update and apt-get dist-upgrade inside the chroot, and then recreate the base.tgz (the base tar-ball).

It is possible to switch the distribution which the base.tgz is targeted at at this point. Specify --distribution sid --override-config to change the distribution to sid. [3]

For fuller documentation of command-line options, see the pbuilder.8 manual page

3. Building a package using the base.tgz

To build a package inside the chroot, invoke pbuilder build whatever.dsc. pbuilder will extract the base.tgz to a temporary working directory, enter the directory with chroot, satisfy the build-dependencies inside chroot, and build the package. The built packages will be moved to a directory specified with the --buildresult command-line option.

The --basetgz option can be used to specify which base.tgz to use.

pbuilder will extract a fresh base chroot image from base.tgz. (base.tgz is created with pbuilder create, and updated with pbuilder update). The chroot is populated with build-dependencies by parsing debian/control and invoking apt-get.

For fuller documentation of command-line options, see the pbuilder.8 manual page

4. Facilitating Debian Developers' typing, pdebuild

pdebuild is a little wrapper script that does the most frequent of all tasks. A Debian Developer may try to do debuild, and build a package, inside a Debian source directory. pdebuild will allow similar control, and allow package to be built inside the chroot, to check that the current source tree will build happily inside the chroot.

pdebuild calls dpkg-nside class="command">pbuilder aims to be an easy-to-setup system for auto-building Debian packages inside a clean-room environment, so that it is possible to verify that a package can be built on most Debian installations. The clean-room environment is achieved through the use of a base chroot image, so that only minimal packages will be installed inside the chroot.

The Debian distribution consists of free software accompanied with source. The source code within Debian's "main" section must build within Debian "main", with only the explicitly specified build-dependencies installed.

The primary aim of pbuilder is different from other auto-building systems in Debian in that its aim is not to try to build as many packages as possible. It does not try to guess what a package needs, and in most cases it tries the worst choice of all if there is a choice to be made.

In this way, pbuilder tries to ensure that packages tested against pbuilder will build properly in most Debian installations, hopefully resulting in a good overall Debian source-buildability.

The goal of making Debian buildable from source is somewhat accomplished, and has seen good progress. In the past age of Debian 3.0, there were many problems when building from source. More recent versions of Debian is much better.

Chapter 2. Using pbuilder