NAME¶pbuilder - personal package builder
SYNOPSIS¶pbuilder create [options] pbuilder update [options] pbuilder build [options] .dsc-file pbuilder clean pbuilder login [options] pbuilder execute [options] -- script [script options] pbuilder dumpconfig pbuilder debuild [options]
DESCRIPTION¶Front end program to the pbuilder suite of programs, used for creating and maintaining chroot environment and building Debian package in the chroot environment.
Creates a base.tgz for the specified distribution.
Updates the base.tgz for the specified distribution. Also, by specifying the --override-config option, it is possible to install a new apt-line using the given options and settings in the configuration file for the base.tgz.For example, to switch the distribution of an existing base.tgz to sid, specify the --distribution sid --override-config options to update.
Builds the package specified by .dsc-file in the chroot environment created using the base.tgz
Cleans up the directory specified by the configuration BUILDPLACE and APTCACHE specified in /etc/pbuilderrc
Logs into the chroot, and cleaned up afterwards. Any changes you make will not be kept. Only use this for temporary and debugging purposes. Do not bind-mount filesystems directly inside the chroot. Use --bindmounts option to mount.
Execute a script or command inside the chroot, in a similar manner to loginThe file specified in the command-line argument will be copied into the chroot, and invoked.The remaining arguments are passed on to the script.
Dumps configuration information, used for debugging.
Builds a Debian package from the Debian source directory. The current directory should have the usual debian/ directory.Same as pdebuild --use-pdebuild-internal
OPTIONS¶The command is followed by options of the form --option name which will modify the semantics as explained below. They are applied from left-to-right, and when there are conflicting options, the rightmost options will have effect.
- --basetgz [basetgz-location]
- Specifies the location of base.tgz
- --buildplace [location of build]
- Specifies the location where building and base.tgz
updating and creation takes place. This is a temporary work directory.
- --buildresult [location to put build result]
- Specifies the location the build result gets into after
building. The deb files and other files that have resulted from build is
copied there. Note that the default value is not the current directory, or
.. but another place, /var/cache/pbuilder/result This is to
avoid overwriting already existing deb files with the newly generated
- --mirror [mirror location]
- Specifies the URL of Debian mirror to be specified in
sources.list inside the chroot. This option is only valid when
distribution is being specified, for update and build
targets. The format is something like:
http://http.us.debian.org/debian which should point to your
- --othermirror [deb http://xxx/xxx/ ./ | other deb lines... ]
- The lines which is added to the sources.list, delimited
with | Like deb http://local/mirror stable main|deb
- --distribution [distribution]
- Specifies the distribution used. The supported values are
the ones debootstrap supports, plus experimental which is special cased in
pbuilder. For instance you may use: sid or experimental .
- --architecture [architecture]
- Specifies the build architecture (as described in
dpkg-architecture(1)). It'll be the architecture used when creating
the chroot, defaults to the system one. The supported values are the ones
- --host-arch [architecture]
- Specifies the host architecture (as described in
dpkg-architecture(1)). Defaults to the build architecture. Use this
flag if you are interested in doing a cross architecture build. pbuilder
will make sure the environment is correctly set up, including adding
nocheck to DEB_BUILD_OPTIONS and DEB_BUILD_PROFILES.
- Suppress automatic addition of nocheck to
DEB_BUILD_OPTIONS and DEB_BUILD_PROFILES in case of
cross-building. All the other configuration (adding the architecture to
dpkg, updating the apt cache, installing the cross toolchain, passing
--host-arch to dpkg-buildpackage, etc) is done nonetheless; specify this
flag twice to prevent that from happening too.
- --components [components]
- Specifies the default distribution components to use. eg.
"main contrib non-free". Default is "main".
- Specify to use different apt set up inside the chroot than
it was used for creating the base.tgz. Specify this when you want to do
pbuilder update with a different distribution target set up.
- --http-proxy [proxy]
- Specifies the http proxy URL. Something like
http://xxx.xxx.xxx.xxx:8080/ should do.
- --use-network [yes|no]
- Specify yes when you do not want to disable network
access during build. Network is not available on a Debian buildd, so you
might want to keep the default of no. Disabling network access
currently only works on Linux.
- --aptcache [location of retrieved package files]
- Specifies the location where the packages downloaded by apt
should be cached. Use --aptcache "" if you want caching
to be turned off.
- This option is used in the update target, and enable
the use of debdelta (if it is already installed, otherwise will be
installed the first time this option is used).
- --configfile [configuration file to load]
- Additional configuration file to read after all other
configuration files have been read.
- --hookdir [location of user scripts]
- Specifies the location where scripts for user intervention
during the create and update process are stored. Currently
scripts are executed at only one point, on exit from the chrooted
environment, just before either a create or a build regenerated the
base.tgz file. The script names must be in the form
X<digit><digit><whatever-else-you-want> much like
boot scripts. The scripts must be executable and may be either binaries or
interpreted scripts. If it is a script in other than Bourne Shell or Perl,
it is up to the user to ensure the interpreter was previously installed in
the chrooted environment. Files ending in ~ or .bak are ignored.
and pbuilder create finishes apt-get work with the chroot, before umounting kernel file systems (/proc) and creating the tarball from the chroot.
PBUILDER_OPERATION a string indicating which of the pbuilder command has been called. Possible values are build, clean, create, debuild, dumpconfig, execute, login, update.
BUILDDIR the place where the build happens, the sources are inside a directory named <package>-<version>.
DISTRIBUTION the name of the used distribution, as provided by the DISTRIBUTION config value, or the --distribution command line flag.
BUILD_ARCH contains the build architecture, the architecture the package is building on.
HOST_ARCH contains the host architecture, the architecture the package is building for.
- --debbuildopts [options]
- --profiles [profile1[,profile2]]
- Comma-separated list of build profiles to use during the
build. It overrides a possible DEB_BUILD_PROFILES environment
variable already defined.
- --logfile [file to log]
- Specifies the logfile to create. The messages generated
during execution will be written to the specified file, and the standard
- --loglevel I
- Specify how much output you want from pbuilder, valid
values are E (errors only), W (errors and warnings),
I (errors, warnings and informational) and D (everything
including some debug messages).
- Specify to generate an additional .changes file for a
source-only upload, whilst still producing a full .changes file for any
binary packages built.
- --bin-nmu [changelog message]
- Specify to build a binary-NMU instead of a standard
package. This option takes the changelog message to pass to the binary-NMU
package as parameter.
- --bin-nmu-maintainer [maintainer]
- Specify the maintainer name and email address to be
displayed in the changes file. If no maintainer is provided, it defaults
to the last uploader.
- --bin-nmu-version [version number]
- Specify the number to append to the version in the
binary-NMU package. If no number is provided, it defaults to 1.
- --bin-nmu-timestamp [timestamp]
- Specify the timestamp to use in the generated chagnelog
entry. If no timestamp is provided, it defaults to current time. If you
want to specify the time as a number of seconds since 1970-01-01 00:00:00
UTC, prepend an at sign (@) like @1478786376.
- --bindmounts bind-mount-points
- Bind-mount the specified directories to inside the chroot.
bind-mount-points is a space-delimited list of directories to
bind-mount which should be specified in a space-delimited manner,
surrounded in double quotations, like: "/srv /somedir
- --debootstrapopts --variant=buildd --keyring /usr/share/keyrings/debian-archive-keyring.gpg
- Add extra command-line options to debootstrap.
- --debootstrap debootstrap
- Use specified debootstrap implementation as debootstrap.
Known implementations are cdebootstrap and debootstrap and
default is to use debootstrap.
- Allow untrusted (no key installed) and unsigned
repositories. Warning: Enabling this option may allow remote
attackers to compromise the system. Better use signed repositories and
--keyring to add the key(s).
- --keyring path/to/keyring
- Additional keyrings to use for package verification with
apt, not used for debootstrap (use --debootstrapopts). Use this to
add (local) signed repositories. By default the debian-archive-keyring
package inside the chroot is used. Can be specified multiple times.
- Save the chroot image after exiting from the chroot instead
of deleting changes. Effective for login and execute
- Clean apt cache automatically, to run apt-get autoclean to
only keep the packages which are required for the version of Debian. This
is useful when you keep a aptcache directory for each distribution and
want to keep the size of the aptcache down.
MORE SPECIFIC OPTIONS¶Some options are more involved to pbuilder internal than others. The following options are available.
- --removepackages [packages to remove]
- Removes the packages on creating the base.tgz. Use
this option to remove potentially dangerous or undesirable packages, like
lilo which nobody will need to have inside a chroot.
- --extrapackages [packages to add]
- Adds packages specified as an addition to the default,
which is build-essential by default. This is used in build
and create (after successfully creating the initial chroot) and
- --debemail [maintainer-name <email-address>]
- Alternative option to --logfile option.
Automatically creates a logfile that is named by the .dsc file name, only
really applicable for build target.
- --aptconfdir [APT configuration directory to use]
- Uses the apt configuration file found in the specified
directory as the chroot configuration. /etc/apt is one example, so
that the same configuration can be used inside the chroot.
- --timeout [timeout in sleep time]
- Time out building after sleeping set time. Specify
something like --timeout 10h in the command line. Default is no
- Not using base.tgz for operation. The --buildplace
will not be deleted and reconstructed from a .tar.gz file. Also,
pbuilder will not add its process ID to the --buildplace as
it usually would.
- Program to use for compression of the base.tgz. The default
is to use gzip, and any program that can be used to compress data using a
pipe can be used.
- Build the package twice in a row. Useful to ensure the
package cleans up properly. The resulting packages are the ones from the
- Do not clean the --buildplace if it has the same
contents as the .tar.gz file, and no modifications are done.
- --inputfile filename
- The system-wide configuration file for pbuilder.
- The default settings for pbuilder, used as fallback for all
values that is not specified in /etc/pbuilderrc.
- The personal configuration file for pbuilder, which
overrides settings set in other configuration files.
- pbuilder create
# pbuilder create Distribution is sid. Building the build environment -> running debootstrap /usr/sbin/debootstrap I: Retrieving Release I: Retrieving Packages I: Validating Packages . .
- pbuilder update
# pbuilder update W: /home/dancer/.pbuilderrc does not exist Building the build Environment -> extracting base tarball [/var/cache/pbuilder/base.tgz] . .
- pbuilder build
# pbuilder build dsh_*.dsc I: using fakeroot in build. Current time: Sat Jan 20 12:03:34 JST 2007 pbuilder-time-stamp: 1169262214 Building the build Environment -> extracting base tarball [/home/dancer/DEBIAN/pbuilder/pbuilder/testsuite/tmp.FeeAX18779/testimage] -> creating local configuration . .
BUGS¶This program is starting to have too many options already.
AUTHOR¶Initial coding, and main maintenance is done by Junichi Uekawa <email@example.com>. User hooks code added by Dale Amon <firstname.lastname@example.org>
SEE ALSO¶/usr/share/doc/pbuilder/pbuilder-doc.html, pdebuild(1), pbuilderrc(5)