The command is followed by options of the form --optionname 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
This option will define the default distribution and apt-lines when used in pbuilderupdate and
pbuildercreate--buildplace[locationofbuild]
Specifies the location where building and base.tgz updating and creation takes place. This is a
temporary work directory.
A subdirectory of that directory using the current PID of the process is used.
--buildresult[locationtoputbuildresult]
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 ones.
--mirror[mirrorlocation]
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 favourite mirror.
This option can optionally be omitted, and left blank, in which case, this part is skipped.
Note that these URLs specified to pbuilder will be used from within the chroot, and specifying
file:/somewhere/ will most probably fail.
--othermirror[debhttp://xxx/xxx/./|otherdeblines...]
The lines which is added to the sources.list, delimited with | Like debhttp://local/mirrorstablemain|debfile:/usr/local/mirror./
The deb lines here are the ones that will appear at the top of the sources.list inside the chroot.
Be sure to follow the syntax rules of sources.list(5). These lines appear at the beginning of the
constructed sources file, so this is the place to list your local mirror sites; apt will then use
them in preference to the ones listed in --mirror.--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 buildarchitecture (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 debootstrap supports.
--host-arch[architecture]
Specifies the hostarchitecture (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.
--no-auto-cross
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".
--override-config
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 pbuilderupdate with a different distribution target set up.
--distribution,--components,--mirror,--othermirror options are only valid when
--override-config option is specified in update target, or when pbuildercreate is being called.
--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[locationofretrievedpackagefiles]
Specifies the location where the packages downloaded by apt should be cached. Use --aptcache"" if
you want caching to be turned off.
--debdelta
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[configurationfiletoload]
Additional configuration file to read after all other configuration files have been read.
--hookdir[locationofuserscripts]
Specifies the location where scripts for user intervention during the create and update process
are stored. Scripts are executed inside the chroot. 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.
Although it may not seem necessary, pbuilder--update does not invoke the hooks if --hookdir is
empty, so if you want to avoid running hooks, run pbuilder with --hookdir""
If there is a distribution hook, for example, if there was a file sid inside the hook directory,
and the script was creating the chroot for sid distribution, pbuilder will call debootstrap with
that as the 4th parameter in the chroot creation process. This allows for use of custom
debootstrap hook script.
A<digit><digit><whatever-else-you-want> is for build target. It is executed before build starts;
after unpacking the build system, and unpacking the source, and satisfying the build-dependency.
B<digit><digit><whatever-else-you-want> is executed after build system finishes building,
successfully, before copying back the build result.
C<digit><digit><whatever-else-you-want> is executed after build failure, before cleanup.
D<digit><digit><whatever-else-you-want> is executed before unpacking the source inside the chroot,
after setting up the chroot environment. Create $TMP, and $TMPDIR if necessary.
This is called before build-dependency is satisfied. Also useful for calling apt-getupdateE<digit><digit><whatever-else-you-want> is executed after pbuilderupdate
and pbuildercreate finishes apt-get work with the chroot, before umounting kernel file systems
(/proc) and creating the tarball from the chroot.
F<digit><digit><whatever-else-you-want> is executed just before user logs in, or program starts
executing, after chroot is created in login or execute target.
G<digit><digit><whatever-else-you-want> is executed just after debootstrap finishes, and
configuration is loaded, and pbuilder starts mounting /proc and invoking apt-getinstall in create
target.
H<digit><digit><whatever-else-you-want> is executed just after unpacking the chroot, mounting proc
and any bind mount specified in BINDMOUNTS. It's executed for every target that requires the
unpacked chroot. It's useful if you want to dynamically change the chroot guts before anything
starts using it.
I<digit><digit><whatever-else-you-want> is executed after build system finishes building,
successfully, after copying back the build results.
In your hook the following environment variables are available:
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]
List of options that are passed on to dpkg-buildpackage. Multiple flags are additive and are
appended to the value of DEBBUILDOPTS as specified in pbuilderrc. To clear the list of options,
pass the empty string, e.g. --debbuildopts "".
Multiple options are delimited with spaces, like --debbuildopts "-j100 -E"
--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[filetolog]
Specifies the logfile to create. The messages generated during execution will be written to the
specified file, and the standard output.
--loglevelI
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).
--binary-arch
Specify to build only architecture specific targets instead of all targets. This instructs
pbuilder to respect only Build-Depends, Build-Depends-Arch, Build-Conflicts, Build-Conflicts-Arch
source relationships, and calls dpkg-buildpackage with -B.
Setting --debbuildopts after this option will re-set some parts of the effects.
Use this option rather than using --debbuildopts-B.
--binary-indep
Specify to build only architecture independent targets instead of all targets. This instructs
pbuilder to respect only Build-Depends, Build-Depends-Indep, Build-Conflicts, Build-Conflicts-
Indep source relationships, and calls dpkg-buildpackage with -A.
Setting --debbuildopts after this option will re-set some parts of the effect.
Use this option rather than using --debbuildopts-A.
--source-only-changes, --no-source-only-changes
Specify whether or not 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[changelogmessage]
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[versionnumber]
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.
--bindmountsbind-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/someotherdir"--debootstrapopts--variant=buildd--keyring/usr/share/keyrings/debian-archive-keyring.gpg
Add extra command-line options to debootstrap.
Specify multiple options through multiple instance of this option, for example:
--debootstrapopts--arch=arm--debootstrapopts--variant=buildd--debootstrapdebootstrap
Use specified debootstrap implementation as debootstrap. Known implementations are cdebootstrap,
qemu-debootstrap and debootstrap and default is to use debootstrap.--allow-untrusted
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).
--keyringpath/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.
Keyrings are copied into /etc/apt/trusted.gpg.d in the chroot. APT supports it since version
0.7.25.1, firstly available in the Debian release codenamed "squeeze" (released on 2011). For
older chroots, use a G hook to run apt-key manually.
--save-after-login--save-after-exec
Save the chroot image after exiting from the chroot instead of deleting changes. Effective for
login and execute session.
--autocleanaptcache
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.
--help
Show a brief help message.