SBUILD(1)                                                                                       Debian sbuild                                                                                       SBUILD(1)

NNAAMMEE
       sbuild - build debian packages from source

SSYYNNOOPPSSIISS
       ssbbuuiilldd  [--hh|----hheellpp  |  --VV|----vveerrssiioonn]  [--vv|----vveerrbboossee  |  --qq|----qquuiieett]  [--DD|----ddeebbuugg] [--AA|----aarrcchh--aallll] [----aarrcchhiivvee==_a_r_c_h_i_v_e] [--dd|----ddiisstt==_d_i_s_t_r_i_b_u_t_i_o_n] [--cc|----cchhrroooott==_c_h_r_o_o_t] [----cchhrroooott--mmooddee==_s_c_h_r_o_o_t_|_s_u_d_o_|_a_u_t_o_p_‐
       _k_g_t_e_s_t_|_u_n_s_h_a_r_e]  [----aarrcchh==_a_r_c_h_i_t_e_c_t_u_r_e]  [----aarrcchh--aannyy  |  ----nnoo--aarrcchh--aannyy]  [----bbuuiilldd==_a_r_c_h_i_t_e_c_t_u_r_e]  [----hhoosstt==_a_r_c_h_i_t_e_c_t_u_r_e]  [----pprrooffiilleess==_p_r_o_f_i_l_e_[_,_._._._]]   [--ss|----ssoouurrccee]  [----ffoorrccee--oorriigg--ssoouurrccee]  [----mmaakkee--bbiinn‐‐
       NNMMUU==_c_h_a_n_g_e_l_o_g_-_e_n_t_r_y]  [----bbiinnNNMMUU==_N_M_U_-_v_e_r_s_i_o_n] [----aappppeenndd--ttoo--vveerrssiioonn==_s_t_r_i_n_g] [----bbiinnNNMMUU--ttiimmeessttaammpp==_t_i_m_e_s_t_a_m_p] [----bbiinnNNMMUU--cchhaannggeelloogg==_c_h_a_n_g_e_l_o_g] [----bbuuiilldd--ddiirr==_d_i_r_e_c_t_o_r_y] [----aadddd--ddeeppeennddss==_d_e_p_e_n_d_e_n_c_y] [----aadddd--ccoonn‐‐
       fflliiccttss==_d_e_p_e_n_d_e_n_c_y]  [----aadddd--ddeeppeennddss--aarrcchh==_d_e_p_e_n_d_e_n_c_y]  [----aadddd--ccoonnfflliiccttss--aarrcchh==_d_e_p_e_n_d_e_n_c_y]  [----aadddd--ddeeppeennddss--iinnddeepp==_d_e_p_e_n_d_e_n_c_y]  [----aadddd--ccoonnfflliiccttss--iinnddeepp==_d_e_p_e_n_d_e_n_c_y]  [--mm|----mmaaiinnttaaiinneerr==_m_a_i_n_t_a_i_n_e_r]   [--ee|----uupp‐‐
       llooaaddeerr==_u_p_l_o_a_d_e_r]  [--kk|----kkeeyyiidd==_k_e_y_-_i_d]  [----ssoouurrccee--oonnllyy--cchhaannggeess]  [----nnoo--ssoouurrccee--oonnllyy--cchhaannggeess]  [--jj|----jjoobbss==_n]  [----ddeebbbbuuiillddoopptt==_o_p_t_i_o_n] [----ddeebbbbuuiillddooppttss==_o_p_t_i_o_n_s] [----ddppkkgg--ssoouurrccee--oopptt==_o_p_t_i_o_n_s] [----ddppkkgg--ssoouurrccee--
       ooppttss==_o_p_t_i_o_n_s]  [----ddppkkgg--ffiillee--ssuuffffiixx==_s_u_f_f_i_x]  [--pp|----ppuurrggee==purge-mode]  [----ppuurrggee--bbuuiilldd==purge-mode]  [----ppuurrggee--ddeeppss==purge-mode]  [----ppuurrggee--sseessssiioonn==purge-mode]  [--bb|----bbaattcchh]]  [--nn|----nnoolloogg]  [----cclleeaann--ssoouurrccee]
       [----nnoo--cclleeaann--ssoouurrccee] [----rruunn--lliinnttiiaann] [----nnoo--rruunn--lliinnttiiaann] [----lliinnttiiaann--oopptt==_o_p_t_i_o_n_s] [----lliinnttiiaann--ooppttss==_o_p_t_i_o_n_s] [----rruunn--ppiiuuppaarrttss] [----nnoo--rruunn--ppiiuuppaarrttss] [----ppiiuuppaarrttss--oopptt==_o_p_t_i_o_n_s] [----ppiiuuppaarrttss--ooppttss==_o_p_t_i_o_n_s] [----ppii‐‐
       uuppaarrttss--rroooott--aarrgg==_o_p_t_i_o_n_s] [----ppiiuuppaarrttss--rroooott--aarrggss==_o_p_t_i_o_n_s] [----rruunn--aauuttooppkkggtteesstt] [----nnoo--rruunn--aauuttooppkkggtteesstt] [----aauuttooppkkggtteesstt--oopptt==_o_p_t_i_o_n_s] [----aauuttooppkkggtteesstt--ooppttss==_o_p_t_i_o_n_s] [----aauuttooppkkggtteesstt--rroooott--aarrgg==_o_p_t_i_o_n_s] [----aauuttoopp‐‐
       kkggtteesstt--rroooott--aarrggss==_o_p_t_i_o_n_s]   [----pprree--bbuuiilldd--ccoommmmaannddss==_s_t_r_i_n_g]   [----cchhrroooott--sseettuupp--ccoommmmaannddss==_s_t_r_i_n_g]   [----cchhrroooott--uuppddaattee--ffaaiilleedd--ccoommmmaannddss==_s_t_r_i_n_g]  [----bbuuiilldd--ddeeppss--ffaaiilleedd--ccoommmmaannddss==_s_t_r_i_n_g]  [----ssttaarrttiinngg--bbuuiilldd--ccoomm‐‐
       mmaannddss==_s_t_r_i_n_g] [----ffiinniisshheedd--bbuuiilldd--ccoommmmaannddss==_s_t_r_i_n_g]  [----bbuuiilldd--ffaaiilleedd--ccoommmmaannddss==_s_t_r_i_n_g]  [----cchhrroooott--cclleeaannuupp--ccoommmmaannddss==_s_t_r_i_n_g]  [----ppoosstt--bbuuiilldd--ccoommmmaannddss==_s_t_r_i_n_g]  [----ppoosstt--bbuuiilldd--ffaaiilleedd--ccoommmmaannddss==_s_t_r_i_n_g]  [----aannyy‐‐
       tthhiinngg--ffaaiilleedd--ccoommmmaannddss==_s_t_r_i_n_g]  [----lloogg--eexxtteerrnnaall--ccoommmmaanndd--oouuttppuutt] [----lloogg--eexxtteerrnnaall--ccoommmmaanndd--eerrrroorr] [----sseettuupp--hhooookk==_h_o_o_k_-_s_c_r_i_p_t] [----bbuuiilldd--ddeepp--rreessoollvveerr==_r_e_s_o_l_v_e_r] [----rreessoollvvee--aalltteerrnnaattiivveess|----nnoo--rreessoollvvee--aalltteerrnnaa‐‐
       ttiivveess] [----eexxttrraa--ppaacckkaaggee==_p_a_c_k_a_g_e_._d_e_b]  [----eexxttrraa--rreeppoossiittoorryy==_s_p_e_c]  [----eexxttrraa--rreeppoossiittoorryy--kkeeyy==_f_i_l_e_._a_s_c]  [----bbuuiilldd--ppaatthh==_s_t_r_i_n_g]  [----ddsscc--ddiirr==_s_t_r_i_n_g]  [----aauuttooppkkggtteesstt--vviirrtt--sseerrvveerr==_s_c_h_r_o_o_t_|_l_x_c_|_c_h_r_o_o_t_|_q_e_m_u_|_s_s_h]
       [----aauuttooppkkggtteesstt--vviirrtt--sseerrvveerr--oopptt==_s_t_r_i_n_g] [----aauuttooppkkggtteesstt--vviirrtt--sseerrvveerr--ooppttss==_o_p_t_i_o_n_s] [----ppuurrggee--eexxttrraa--ppaacckkaaggeess] [----bbdd--uunniinnssttaallllaabbllee--eexxppllaaiinneerr==_d_o_s_e_3_|_a_p_t_|_n_o_n_e] [PPAACCKKAAGGEE[..ddsscc]]

DDEESSCCRRIIPPTTIIOONN
       ssbbuuiilldd rebuilds Debian binary packages from the corresponding Debian source, installing any missing source dependencies.  The build takes place in a dedicated clean build environment, rather than on
       the host system. For an overview of the supported chroot backends see the section CCHHRROOOOTT MMOODDEESS.

       ssbbuuiilldd can fetch the Debian source over a network, or it can use locally available sources.

       sbuild is given a packages to process as the argument PPAACCKKAAGGEE[[..ddsscc]].  This argument is in the form of either a debianized package source directory, a source package name along with a version in  the
       form _p_a_c_k_a_g_e___v_e_r_s_i_o_n, a source package name, or a .dsc file. If no arguments are given, the current working directory is passed as an argument.

       For  arguments  given  as source directories, dpkg-source is first run to produce a source .dsc file. Then, the package is built using the .dsc produced. For arguments in the form _p_a_c_k_a_g_e___v_e_r_s_i_o_n or
       _p_a_c_k_a_g_e, apt is used to download the source package. For arguments given as a .dsc file, sbuild builds the source packages directly. For .dsc files in remote locations, the source packages are down‐
       loaded first, then built.

       It is also possible to run external commands with sbuild. See the section EEXXTTEERRNNAALL CCOOMMMMAANNDDSS for more on this.

       ssbbuuiilldd mails the build logs to a user.  It is configured by the configuration files _/_e_t_c_/_s_b_u_i_l_d_/_s_b_u_i_l_d_._c_o_n_f and _~_/_._s_b_u_i_l_d_r_c.  An example sbuildrc is available in _/_u_s_r_/_s_h_a_r_e_/_d_o_c_/_s_b_u_i_l_d_/_e_x_a_m_p_l_e_s_/_e_x_a_m_‐
       _p_l_e_._s_b_u_i_l_d_r_c.  A custom path to a configuration file can also be specified through setting the SSBBUUIILLDD__CCOONNFFIIGG environment variable to the path of an additional configuration file.

       You can build either using a local package with its .dsc file or a remote one by specifying an explicit dpkg version.

OOPPTTIIOONNSS
       Options set on the command line overwrite settings made in the configuration file.

       --hh, ----hheellpp
              Display this manual.

       --VV, ----vveerrssiioonn
              Print version information.

       ----aadddd--ddeeppeennddss==_d_e_p_e_n_d_e_n_c_y

       ----aadddd--ccoonnfflliiccttss==_d_e_p_e_n_d_e_n_c_y

       ----aadddd--ddeeppeennddss--aarrcchh==_d_e_p_e_n_d_e_n_c_y

       ----aadddd--ccoonnfflliiccttss--aarrcchh==_d_e_p_e_n_d_e_n_c_y

       ----aadddd--ddeeppeennddss--iinnddeepp==_d_e_p_e_n_d_e_n_c_y

       ----aadddd--ccoonnfflliiccttss--iinnddeepp==_d_e_p_e_n_d_e_n_c_y
              These options add a build dependencies to the source package being built, in addition to the build dependency information specified in debian/control.  These dependencies will be concatenated
              directly  to  the  Build-Depends, Build-Conflicts, Build-Depends-Arch, Build-Conflicts-Arch, Build-Depends-Indep and Build-Conflicts-Indep dependencies, respectively.  The options may be used
              any number of times to add multiple dependencies.  The format is identical to the format used in debian/control.  These command line options append to  the  MMAANNUUAALL__DDEEPPEENNDDSS,  MMAANNUUAALL__CCOONNFFLLIICCTTSS,
              MMAANNUUAALL__DDEEPPEENNDDSS__AARRCCHH, MMAANNUUAALL__CCOONNFFLLIICCTTSS__AARRCCHH, MMAANNUUAALL__DDEEPPEENNDDSS__IINNDDEEPP and MMAANNUUAALL__CCOONNFFLLIICCTTSS__IINNDDEEPP configuration variables, respectively. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----aarrcchh==_a_r_c_h_i_t_e_c_t_u_r_e
              Build  using  the architecture specified.  A chroot named _$_d_i_s_t_r_i_b_u_t_i_o_n_-_$_a_r_c_h_-_s_b_u_i_l_d or _$_d_i_s_t_r_i_b_u_t_i_o_n_-_a_r_c_h is searched for, in that order of preference.  The chroot must be installed and con‐
              figured appropriately to build as that architecture, e.g. using _p_e_r_s_o_n_a_l_i_t_y_=_l_i_n_u_x_3_2 to build i386 packages on an amd64 system.  Note that this option  is  equivalent  to  "--host=architecture
              --build=architecture".  This command line option sets the HHOOSSTT__AARRCCHH and BBUUIILLDD__AARRCCHH configuration variables. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----hhoosstt==_a_r_c_h_i_t_e_c_t_u_r_e
              Build  using the host architecture specified.  If $host and $build don't match, a chroot named _$_d_i_s_t_r_i_b_u_t_i_o_n_-_$_b_u_i_l_d_-_$_h_o_s_t_-_s_b_u_i_l_d or _$_d_i_s_t_r_i_b_u_t_i_o_n_-_$_b_u_i_l_d_-_$_h_o_s_t is searched for, falling back to
              _$_d_i_s_t_r_i_b_u_t_i_o_n_-_$_b_u_i_l_d_-_s_b_u_i_l_d or _$_d_i_s_t_r_i_b_u_t_i_o_n_-_$_b_u_i_l_d, in that order of preference.  This option is only useful for cross-building when used together with --build.   This  command  line  option
              sets the HHOOSSTT__AARRCCHH configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----bbuuiilldd==_a_r_c_h_i_t_e_c_t_u_r_e
              Build  using  the build architecture specified.  This option is only useful for cross-building when used together with --host.  If --build is not specified, the default system architecture is
              assumed.  This command line option sets the BBUUIILLDD__AARRCCHH configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       --AA, ----aarrcchh--aallll
              Also build Architecture: all packages. This is the default behaviour for native builds. This option is the opposite of --no-arch-all.  See the section BBUUIILLDD AARRTTIIFFAACCTTSS  for  more  information.
              This command line option sets the BBUUIILLDD__AARRCCHH__AALLLL configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----nnoo--aarrcchh--aallll
              Do  not  build  Architecture:  all  packages. This is the default behaviour for cross builds. This option is the opposite of --arch-all.  See the section BBUUIILLDD AARRTTIIFFAACCTTSS for more information.
              This command line option sets the BBUUIILLDD__AARRCCHH__AALLLL configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----aarrcchh--aannyy
              Build Architecture: any packages. This is the default behavior. This option is the opposite of --no-arch-any.  See the section BBUUIILLDD AARRTTIIFFAACCTTSS for more information.  This command line  option
              sets the BBUUIILLDD__AARRCCHH__AANNYY configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----nnoo--aarrcchh--aannyy
              Do  not  build  Architecture: any packages. This option is the opposite of --arch-any and only useful when used together with --arch-all or --source.  See the section BBUUIILLDD AARRTTIIFFAACCTTSS for more
              information.  This command line option sets the BBUUIILLDD__AARRCCHH__AANNYY configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       --bb, ----bbaattcchh
              Operate in batchmode, i.e. write a build-progress file during execution and files on shutdown to facilitate a clean restart.  This command line option sets the BBAATTCCHH__MMOODDEE configuration  vari‐
              able. See ssbbuuiilldd..ccoonnff(5) for more information.

       --cc, ----cchhrroooott==_c_h_r_o_o_t
              Specifies the chroot to use. The effect of this option depends on the selected chroot mode.  With the sscchhrroooott chroot mode, this option specifies the schroot name or alias to use. If not spec‐
              ified, the default is the first of schroot name or alias that matches _$_d_i_s_t_r_i_b_u_t_i_o_n_-_$_a_r_c_h_-_s_b_u_i_l_d, _$_d_i_s_t_r_i_b_u_t_i_o_n_-_s_b_u_i_l_d, _$_d_i_s_t_r_i_b_u_t_i_o_n_-_$_a_r_c_h or _$_d_i_s_t_r_i_b_u_t_i_o_n that exists.  With the ssuuddoo chroot
              mode,  this option specifies the chroot directory to use.  The directory is either expected in /etc/sbuild/chroot (in buildd sbuild mode) or in the build directory (see --build-dir), prefixed
              with "chroot-" (in user sbuild mode, the default). If not specified, the default is to search for a directory in the respective locations named in the same way as for the schroot mode.   With
              the  uunnsshhaarree  chroot mode, if this option is a path, then it specifies the location of the chroot tarball directly. Otherwise, a tarball with equal basename from ~/.cache/sbuild will be used.
              If not specified, the default is to search for a tarball named in the same way as for the schroot mode under ~/.cache/sbuild.  With the aauuttooppkkggtteesstt chroot mode this option has no effect.  The
              --autopkgtest-virt-server-opts  are  used to pick the chroot in autopkgtest chroot mode.  This command line option sets the CCHHRROOOOTT configuration variable. See ssbbuuiilldd..ccoonnff(5) for more informa‐
              tion.

       ----cchhrroooott--mmooddee==_s_c_h_r_o_o_t_|_s_u_d_o_|_a_u_t_o_p_k_g_t_e_s_t_|_u_n_s_h_a_r_e
              Select the desired chroot mode. Four values are possible: schroot (the default), sudo (which uses sudo to execute chroot in a directory from /etc/sbuild/chroot or ./chroot), autopkgtest which
              uses  the autopkgtest-virt-* binaries (selectable via the --autopkgtest-virt-server option) and unshare (which uses linux namespaces for chroot and doesn't require superuser privileges).  See
              the section CCHHRROOOOTT MMOODDEESS for more information.  This command line option sets the CCHHRROOOOTT__MMOODDEE configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       --dd, ----ddiisstt==_d_i_s_t_r_i_b_u_t_i_o_n
              Explicitly set the distribution for the package build. This will be selecting the correct chroot to use and also sets the value of the Distribution field in the created .changes file. Setting
              this  option  is  necessary  when giving sbuild a .dsc file or a plain source package name to build. In the latter case it specifies the distribution the source package is fetched from.  This
              command line option sets the DDIISSTTRRIIBBUUTTIIOONN configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----aarrcchhiivvee==_a_r_c_h_i_v_e
              Communicate with specified archive.  This command line option sets the AARRCCHHIIVVEE configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       --DD, ----ddeebbuugg
              Enable debug output.

       ----aapptt--cclleeaann
       ----nnoo--aapptt--cclleeaann
              Run (or do not run) apt-get clean in the chroot before executing the build, overriding the default  setting.   This  command  line  option  sets  the  AAPPTT__CCLLEEAANN  configuration  variable.  See
              ssbbuuiilldd..ccoonnff(5) for more information.

       ----aapptt--uuppddaattee
       ----nnoo--aapptt--uuppddaattee
              Run  (or  do  not  run) apt-get update in the chroot before executing the build, overriding the default setting.  This option has no effect on updating the internal sbuild apt repository, the
              repository for extra packages (see --extra-package) and the repositories given via --extra-repository. These are always updated. Thus, this option  only  influences  updates  of  the  default
              repositories of the chroot.  This command line option sets the AAPPTT__UUPPDDAATTEE configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----aapptt--uuppggrraaddee
       ----nnoo--aapptt--uuppggrraaddee
              Run  (or  do  not  run)  apt-get  upgrade  in the chroot before executing the build, overriding the default setting.  This command line option sets the AAPPTT__UUPPGGRRAADDEE configuration variable. See
              ssbbuuiilldd..ccoonnff(5) for more information.

       ----aapptt--ddiissttuuppggrraaddee
       ----nnoo--aapptt--ddiissttuuppggrraaddee
              Run (or do not run) apt-get distupgrade in the chroot before executing the build, overriding the default setting.  This command line option sets the  AAPPTT__DDIISSTTUUPPGGRRAADDEE  configuration  variable.
              See ssbbuuiilldd..ccoonnff(5) for more information.

       --mm, ----mmaaiinnttaaiinneerr==_m_a_i_n_t_a_i_n_e_r
              Specify  the  identity  to  use for GPG signing packages, and also used as the maintainer for binary NMUs.  This does not normally require setting (it defaults to the uploader).  This command
              line option sets the MMAAIINNTTAAIINNEERR__NNAAMMEE configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       --ee, ----uuppllooaaddeerr==_u_p_l_o_a_d_e_r
              Passed to dpkg-genchanges and is used to set the Changed-by: field in the .changes file(s).  This command line option sets the UUPPLLOOAADDEERR__NNAAMMEE configuration  variable.  See  ssbbuuiilldd..ccoonnff(5)  for
              more information.

       --kk, ----kkeeyyiidd==_k_e_y_-_i_d
              Passed  to  debsign and is used to set the key to sign the .changes file(s).  Default is not using any key and not signing the .changes file(s).  This command line option sets the KKEEYY__IIDD con‐
              figuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----ssoouurrccee--oonnllyy--cchhaannggeess
       ----nnoo--ssoouurrccee--oonnllyy--cchhaannggeess
              In addition to the .changes file generated by dpkg-buildpackage, also produce (or don't produce) a .changes file suitable for a source-only upload. If requested by --keyid, this .changes file
              will also be signed by debsign.  This command line option sets the SSOOUURRCCEE__OONNLLYY__CCHHAANNGGEESS configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       --jj, ----jjoobbss==_n
              Number  of  jobs  to  run simultaneously.  Passed through to dpkg-buildpackage.  This command line option appends the appropriate --jj option to the DDPPKKGG__BBUUIILLDDPPAACCKKAAGGEE__UUSSEERR__OOPPTTIIOONNSS configuration
              variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----ddeebbbbuuiillddoopptt==_o_p_t_i_o_n
              Pass the specified option directly to dpkg-buildpackage in addition to the options already passed by sbuild. This option can be passed multiple times (once per dpkg-buildpackage  option)  and
              can  be  freely mixed with the --debbuildopts option. Options will be passed to dpkg-buildpackage in the order that the --debbuildopt and --debbuildopts options are given on the command line.
              This command line option appends to the DDPPKKGG__BBUUIILLDDPPAACCKKAAGGEE__UUSSEERR__OOPPTTIIOONNSS configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----ddeebbbbuuiillddooppttss==_o_p_t_i_o_n_s
              Pass the specified options directly to dpkg-buildpackage in addition to the options already passed by sbuild. The argument will be split by whitespaces and the resulting array passed  to  the
              dpkg-buildpackage  invocation.  If any options contain spaces, use --debbuildopt for them.  This option can be passed multiple times and can be freely mixed with the --debbuildopt option. Op‐
              tions will be passed to dpkg-buildpackage in the order that the --debbuildopt and --debbuildopts options are given on the command line.  This command line option appends  to  the  DDPPKKGG__BBUUIILLDD‐‐
              PPAACCKKAAGGEE__UUSSEERR__OOPPTTIIOONNSS configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----ddppkkgg--ssoouurrccee--oopptt==_o_p_t_i_o_n_s
              Pass  the  specified  option  directly to dpkg-source in addition to the options already passed by sbuild. This is only used when creating a source package from a Debianized source directory.
              This option can be passed multiple times (once per dpkg-source option) and can be freely mixed with the --dpkg-source-opts option. Options will be passed to dpkg-source in the order that  the
              --dpkg-source-opt  and  --dpkg-source-opts  options  are given on the command line.  This command line option appends to the DDPPKKGG__SSOOUURRCCEE__OOPPTTIIOONNSS configuration variable. See ssbbuuiilldd..ccoonnff(5) for
              more information.
              NNOOTTEE:: The '_-_b', '_-_-_b_e_f_o_r_e_-_b_u_i_l_d' and '_-_-_a_f_t_e_r_-_b_u_i_l_d' options will always be passed to dpkg-source, respectively.

       ----ddppkkgg--ssoouurrccee--ooppttss==_o_p_t_i_o_n_s
              Pass the specified options directly to dpkg-source in addition to the options already passed by sbuild. The argument will be split by  whitespaces  and  the  resulting  array  passed  to  the
              dpkg-source invocation. This is only used when creating a source package from a Debianized source directory. If any options contain spaces, use --dpkg-source-opt for them.  This option can be
              passed multiple times and can be freely mixed with the --dpkg-source-opt option.  Options will be passed to dpkg-source in the order that the --dpkg-source-opt and --dpkg-source-opts  options
              are given on the command line.  This command line option appends to the DDPPKKGG__SSOOUURRCCEE__OOPPTTIIOONNSS configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.
              NNOOTTEE:: The '_-_b', '_-_-_b_e_f_o_r_e_-_b_u_i_l_d' and '_-_-_a_f_t_e_r_-_b_u_i_l_d' options will always be passed to dpkg-source, respectively.

       ----ddppkkgg--ffiillee--ssuuffffiixx==_s_u_f_f_i_x
              Add the suffix to the filename of the changes and buildinfo files generated by dpkg.
              NNOOTTEE:: This option is ignored if dpkg-dev in the build environment is too old to support it. At least dpkg-dev 1.18.11 is required.

       ----mmaaiill--lloogg--ttoo==_e_m_a_i_l_-_a_d_d_r_e_s_s
              Send the build log to the specified email address.  This command line option sets the MMAAIILLTTOO configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----mmaaiillffrroomm==_e_m_a_i_l_-_a_d_d_r_e_s_s
              Email address used as the sender address for build logs.  This command line option sets the MMAAIILLFFRROOMM configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       --nn, ----nnoolloogg
              Do not create a package log file in the _$_l_o_g___d_i_r directory and no build log file, but print everything to stdout. Also do not send any log mails.  This command line option sets the NNOOLLOOGG con‐
              figuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----pprrooffiilleess==_p_r_o_f_i_l_e_[_,_._._._]""
              Specify the profile(s) we build, as a comma-separated list. Defaults to the space separated list of profiles in the DDEEBB__BBUUIILLDD__PPRROOFFIILLEESS environment variable when building natively or the ccrroossss
              and nnoocchheecckk profiles when cross-building.  This command line option sets the BBUUIILLDD__PPRROOFFIILLEESS configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       --pp, ----ppuurrggee==_p_u_r_g_e_-_m_o_d_e
              Convenience option to set _p_u_r_g_e_-_m_o_d_e for build directory, build dependencies and session.  This command line option sets the PPUURRGGEE__BBUUIILLDD__DDEEPPSS, PPUURRGGEE__BBUUIILLDD__DDIIRREECCTTOORRYY and PPUURRGGEE__SSEESSSSIIOONN configu‐
              ration variables. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----ppuurrggee--bbuuiilldd==_p_u_r_g_e_-_m_o_d_e
              _p_u_r_g_e_-_m_o_d_e determines if the build directory will be deleted after a build. Possible values are aallwwaayyss (default), nneevveerr, and ssuucccceessssffuull.  This command line option sets the  PPUURRGGEE__BBUUIILLDD__DDIIRREECC‐‐
              TTOORRYY configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----ppuurrggee--ddeeppss==_p_u_r_g_e_-_m_o_d_e
              _p_u_r_g_e_-_m_o_d_e determines if the build dependencies will be removed after a build. Possible values are aallwwaayyss (default), nneevveerr, and ssuucccceessssffuull.  This command line option sets the PPUURRGGEE__BBUUIILLDD__DDEEPPSS
              configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----ppuurrggee--sseessssiioonn==_p_u_r_g_e_-_m_o_d_e
              Purge the schroot session following a build.  This is useful in conjunction with the _-_-_p_u_r_g_e_-_b_u_i_l_d and _-_-_p_u_r_g_e_-_d_e_p_s options when using snapshot chroots, since by default the snapshot will  be
              deleted.  Possible values are aallwwaayyss (default), nneevveerr, and ssuucccceessssffuull.  This command line option sets the PPUURRGGEE__SSEESSSSIIOONN configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       --ss, ----ssoouurrccee
              Build  the source package in addition to the other requested build artifacts. By default, the dsc will not be rewritten because the source package is the input to sbuild, not its output. Even
              when running from an unpacked source tree sbuild will first build the source package using dpkg-source and then pass that on to the sbuild machinery. Use this option only when you  know  what
              you  are doing. This will rewrite the original dsc passed to sbuild.  See the section BBUUIILLDD AARRTTIIFFAACCTTSS for more information.  This command line option sets the BBUUIILLDD__SSOOUURRCCEE configuration vari‐
              able. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----nnoo--ssoouurrccee
              Don't rebuild the source package. This is the default. It is the opposite of --source.  See the section BBUUIILLDD AARRTTIIFFAACCTTSS for more information.  This command line option sets  the  BBUUIILLDD__SSOOUURRCCEE
              configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----ffoorrccee--oorriigg--ssoouurrccee
              When used with in conjunction with -s, this option forces the inclusion of the orig.tar.gz file in the generated .changes file, even in cases where it would not normally be included, i.e. use
              dpkg-buildpackage -sa.  This command line option sets the FFOORRCCEE__OORRIIGG__SSOOUURRCCEE configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----uussee--ssnnaappsshhoott
              Installs the latest snapshot gcc compiler from the _g_c_c_-_s_n_a_p_s_h_o_t package, and alters the build environment to use the snapshot compiler  for  the  build.   Specifically,  this  option  appends
              _/_u_s_r_/_l_i_b_/_g_c_c_-_s_n_a_p_s_h_o_t_/_l_i_b to the value of the LLDD__LLIIBBRRAARRYY__PPAATTHH configuration variable and _/_u_s_r_/_l_i_b_/_g_c_c_-_s_n_a_p_s_h_o_t_/_b_i_n to the value of the PPAATTHH configuration variable.  It also sets the GGCCCC__SSNNAAPP‐‐
              SSHHOOTT configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       --vv, ----vveerrbboossee
              Be verbose, i.e. all information goes to stdout as well as to the log files.

       --qq, ----qquuiieett
              Be quiet.  This is the opposite of --verbose.

       ----mmaakkee--bbiinnNNMMUU==_c_h_a_n_g_e_l_o_g_-_e_n_t_r_y
              With this option, ssbbuuiilldd will create a new changelog entry in debian/changelog of every package built. The version number will be in the format for binary-only NMUs (see --binNMU); the  main‐
              tainer  is  set  to the maintainer name configured for ssbbuuiilldd. _c_h_a_n_g_e_l_o_g_-_e_n_t_r_y will be used as the changelog entry following “Binary-only non-maintainer upload for ARCH -- no source changes”.
              Please note that the versions in the _P_A_C_K_A_G_E___V_E_R_S_I_O_N_[_._d_s_c_] arguments still have to be the unmodified (non-NMU ones) so that the sources can be found. The version number in log files and mails
              will  be  modified  by ssbbuuiilldd automatically.  The --append-to-version option has a similar effect but allows one to specify an arbitrary version suffix instead of a custom changelog entry. To
              have a custom version suffix and a custom changelog entry, use --make-binNMU and --append-to-version at the same time with --binNMU=0.  This option is  incompatible  with  --binNMU-changelog.
              This  option implies --no-arch-all.  This command line option sets the BBIINN__NNMMUU configuration variable and sets the BBIINN__NNMMUU__VVEERRSSIIOONN configuration variable to 1 if it was not set yet, for exam‐
              ple by the --binNMU option. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----bbiinnNNMMUU==_N_M_U_-_v_e_r_s_i_o_n
              The version number of the binary NMU.  This option only has an effect if combined with --make-binNMU and/or with --append-to-version.  _v_e_r_s_i_o_n is a single number for the (+b_n) format used for
              binary NMUs.  If the argument is the empty string or zero, then the +b_n suffix will not be appended.  The +b_n suffix will be appended after the string given via --append-to-version.  This op‐
              tion is incompatible with --binNMU-changelog.  This command line option sets the BBIINN__NNMMUU__VVEERRSSIIOONN configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----aappppeenndd--ttoo--vveerrssiioonn==_s_t_r_i_n_g
              This option is similar to --make-binNMU except that it allows the user to specify an arbitrary string to be appended to the version number (immediately before the '+' in the  Debian  revision
              if  --make-binNMU  is  also provided).  To pass an arbitrary changelog text as well, combine this option with --make-binNMU but be aware that this will also add the +b_n suffix unless you also
              pass --binNMU=0 to disable it.  This option is incompatible with --binNMU-changelog.  This option implies --no-arch-all.  This command line option  sets  the  AAPPPPEENNDD__TTOO__VVEERRSSIIOONN  configuration
              variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----bbiinnNNMMUU--ttiimmeessttaammpp==_t_i_m_e_s_t_a_m_p
              Set  the  timestamp  of the new binNMU changelog entry. By default, the time of the build will be used to generate the binNMU changelog timestamp. This option allows one to use a custom time‐
              stamp instead. The timestamp is either given as an integer in Unix time or as a string in the format compatible with Debian changelog entries (i.e. as it is generated by date -R).   This  op‐
              tion is incompatible with --binNMU-changelog.  This command line option sets the BBIINN__NNMMUU__TTIIMMEESSTTAAMMPP configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----bbiinnNNMMUU--cchhaannggeelloogg==_c_h_a_n_g_e_l_o_g
              Set  the  complete  content  of  a binary-only changelog entry. This option allows full customization of the new changelog entry. It is up to the user to make sure that the changelog entry is
              well-formed. The argument has to include all necessary newlines. Leading and trailing newlines will be stripped.  Sbuild will not interpret any backslash escapes.  This option is incompatible
              with --make-binNMU, --binNMU, --append-to-version and --binNMU-timestamp.  This command line option sets the BBIINN__NNMMUU__CCHHAANNGGEELLOOGG configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----bbuuiilldd--ddiirr==_d_i_r_e_c_t_o_r_y
              Set  the  output directory for the build artifacts created by dpkg-buildpackage and the log file. By default, the current directory is used or, when sbuild is executed from within an unpacked
              source directory, the parent directory.  This command line option sets the BBUUIILLDD__DDIIRR configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----cclleeaann--ssoouurrccee
              When executing sbuild from within an unpacked source tree, execute the debian/rules clean target. This is the default and might require some of the build dependencies installed on  the  host.
              This command line option sets the CCLLEEAANN__SSOOUURRCCEE configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----nnoo--cclleeaann--ssoouurrccee
              When  executing  sbuild  from within an unpacked source tree, do not run the debian/rules clean target before building the source package. Only set this if you start from a clean checkout and
              you know what you are doing.  This command line option sets the CCLLEEAANN__SSOOUURRCCEE configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----rruunn--lliinnttiiaann
              Run lintian after a successful build.  This command line option sets the RRUUNN__LLIINNTTIIAANN configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----nnoo--rruunn--lliinnttiiaann
              Don't run lintian after a successful build.  If sbuild is configured to run lintian by default, this option will prevent lintian being run.  This command line option sets the RRUUNN__LLIINNTTIIAANN con‐
              figuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----lliinnttiiaann--oopptt==_o_p_t_i_o_n_s
              Pass  the  specified option directly to lintian in addition to the options already passed by sbuild. This option can be passed multiple times (once per lintian option) and can be freely mixed
              with the --lintian-opts option.  Options will be passed to lintian in the order that the --lintian-opt and --lintian-opts options are given on the command line.  This command line option  ap‐
              pends to the LLIINNTTIIAANN__OOPPTTIIOONNSS configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----lliinnttiiaann--ooppttss==_o_p_t_i_o_n_s
              Pass the specified options directly to lintian in addition to the options already passed by sbuild. The argument will be split by whitespaces and the resulting array passed to the lintian in‐
              vocation. If any options contain spaces, use --lintian-opt for them.  This option can be passed multiple times and can be freely mixed with the --lintian-opts option. Options will  be  passed
              to  lintian  in the order that the --lintian-opt and --lintian-opts options are given on the command line.  This command line option appends to the LLIINNTTIIAANN__OOPPTTIIOONNSS configuration variable. See
              ssbbuuiilldd..ccoonnff(5) for more information.

       ----rruunn--ppiiuuppaarrttss
              Run piuparts after a successful build.  This command line option sets the RRUUNN__PPIIUUPPAARRTTSS configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----nnoo--rruunn--ppiiuuppaarrttss
              Don't run piuparts after a successful build.  If sbuild is configured to run piuparts by default, this option will prevent piuparts being run.  This command line option sets the  RRUUNN__PPIIUUPPAARRTTSS
              configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----ppiiuuppaarrttss--oopptt==_o_p_t_i_o_n_s
              Pass the specified option directly to piuparts in addition to the options already passed by sbuild. This option can be passed multiple times (once per piuparts option) and can be freely mixed
              with the --piuparts-opts option.  Options will be passed to piuparts in the order that the --piuparts-opt and --piuparts-opts options are given on the command line.  Certain  percent  escapes
              are  supported.  To write a literal percent sign, escape it with another percent sign. See the section OOPPTTIIOONN SSTTRRIINNGG PPEERRCCEENNTT EESSCCAAPPEESS for more information.  This command line option appends to
              the PPIIUUPPAARRTTSS__OOPPTTIIOONNSS configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----ppiiuuppaarrttss--ooppttss==_o_p_t_i_o_n_s
              Pass the specified options directly to piuparts in addition to the options already passed by sbuild. The argument will be split by whitespaces and the resulting array passed to  the  piuparts
              invocation.  If  any  options  contain  spaces, use --piuparts-opt for them.  This option can be passed multiple times and can be freely mixed with the --piuparts-opts option. Options will be
              passed to piuparts in the order that the --piuparts-opt and --piuparts-opts options are given on the command line.  Certain percent escapes are supported. To write a literal percent sign, es‐
              cape  it  with  another percent sign. See the section OOPPTTIIOONN SSTTRRIINNGG PPEERRCCEENNTT EESSCCAAPPEESS for more information.  This command line option appends to the PPIIUUPPAARRTTSS__OOPPTTIIOONNSS configuration variable. See
              ssbbuuiilldd..ccoonnff(5) for more information.

       ----ppiiuuppaarrttss--rroooott--aarrgg==_o_p_t_i_o_n_s
              Add an argument that is used to launch piuparts as root. Without this option, the default is to use "sudo --" to launch piuparts. If an empty string is supplied,  then  piuparts  is  launched
              without any prefixed command.  This option can be specified multiple times.  This command line option appends to the PPIIUUPPAARRTTSS__RROOOOTT__AARRGGSS configuration variable. See ssbbuuiilldd..ccoonnff(5) for more in‐
              formation.

       ----ppiiuuppaarrttss--rroooott--aarrggss==_o_p_t_i_o_n_s
              Add arguments that are used to launch piuparts as root.  Without this option, the default is to use "sudo --" to launch piuparts. If an empty string is supplied,  then  piuparts  is  launched
              without  any  prefixed command.  The argument will be split by whitespaces. To pass options containing whitespaces use the option --piuparts-root-arg.  This command line option appends to the
              PPIIUUPPAARRTTSS__RROOOOTT__AARRGGSS configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----rruunn--aauuttooppkkggtteesstt
              Run autopkgtest after a successful build.  This command line option sets the RRUUNN__AAUUTTOOPPKKGGTTEESSTT configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----nnoo--rruunn--aauuttooppkkggtteesstt
              Don't run autopkgtest after a successful build.  If sbuild is configured to run autopkgtest by default, this option will prevent autopkgtest being run.  This  command  line  option  sets  the
              RRUUNN__AAUUTTOOPPKKGGTTEESSTT configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----aauuttooppkkggtteesstt--oopptt==_o_p_t_i_o_n_s
              Pass the specified option directly to autopkgtest in addition to the options already passed by sbuild. This option can be passed multiple times (once per autopkgtest option) and can be freely
              mixed with the --autopkgtest-opts option.  Options will be passed to autopkgtest in the order that the --autopkgtest-opt and --autopkgtest-opts options are given on the command line.  Certain
              percent escapes are supported. To write a literal percent sign, escape it with another percent sign. See the section OOPPTTIIOONN SSTTRRIINNGG PPEERRCCEENNTT EESSCCAAPPEESS for more information.  This command line op‐
              tion appends to the AAUUTTOOPPKKGGTTEESSTT__OOPPTTIIOONNSS configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----aauuttooppkkggtteesstt--ooppttss==_o_p_t_i_o_n_s
              Pass the specified options directly to autopkgtest in addition to the options already passed by sbuild. The argument will be split by whitespaces and the resulting array passed to the  autop‐
              kgtest invocation. If any options contain spaces, use --autopkgtest-opt for them.  This option can be passed multiple times and can be freely mixed with the --autopkgtest-opts option. Options
              will be passed to autopkgtest in the order that the --autopkgtest-opt and --autopkgtest-opts options are given on the command line.  Certain percent escapes are supported. To write a  literal
              percent  sign, escape it with another percent sign. See the section OOPPTTIIOONN SSTTRRIINNGG PPEERRCCEENNTT EESSCCAAPPEESS for more information.  This command line option appends to the AAUUTTOOPPKKGGTTEESSTT__OOPPTTIIOONNSS configura‐
              tion variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----aauuttooppkkggtteesstt--rroooott--aarrgg==_o_p_t_i_o_n_s
              Add an argument that is used to launch autopkgtest as root. Without this option, the default is to use "sudo --" to launch autopkgtest. If an empty string is  supplied,  then  autopkgtest  is
              launched  without any prefixed command.  This option can be specified multiple times.  This command line option appends to the AAUUTTOOPPKKGGTTEESSTT__RROOOOTT__AARRGGSS configuration variable. See ssbbuuiilldd..ccoonnff(5)
              for more information.

       ----aauuttooppkkggtteesstt--rroooott--aarrggss==_o_p_t_i_o_n_s
              Add arguments that are used to launch autopkgtest as root.  Without this option, the default is to use "sudo --" to launch autopkgtest. If an empty string is  supplied,  then  autopkgtest  is
              launched  without any prefixed command.  The argument will be split by whitespaces. To pass options containing whitespaces use the option --autopkgtest-root-arg.  This command line option ap‐
              pends to the AAUUTTOOPPKKGGTTEESSTT__RROOOOTT__AARRGGSS configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----pprree--bbuuiilldd--ccoommmmaannddss==_s_t_r_i_n_g
              This is the earliest external command which is run right after the chroot session has been initialized and before anything else is done (like installing the build dependencies).  The  command
              is  run  outside of the chroot. This option can be used multiple times to add multiple commands. Certain percent escapes are supported. To write a literal percent sign, escape it with another
              percent sign. See the section EEXXTTEERRNNAALL CCOOMMMMAANNDDSS for more information.  This command line option appends to the EEXXTTEERRNNAALL__CCOOMMMMAANNDDSS configuration variable. See ssbbuuiilldd..ccoonnff(5) for  more  informa‐
              tion.

       ----cchhrroooott--sseettuupp--ccoommmmaannddss==_s_t_r_i_n_g
              Run  these  commands  after  the chroot and variables have been setup but before dependencies are installed. The command is run as root inside of the chroot.  This option can be used multiple
              times to add multiple commands. Certain percent escapes are supported. To write a literal percent sign, escape it with another percent sign. See the section EEXXTTEERRNNAALL CCOOMMMMAANNDDSS for more  infor‐
              mation.  This command line option appends to the EEXXTTEERRNNAALL__CCOOMMMMAANNDDSS configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----cchhrroooott--uuppddaattee--ffaaiilleedd--ccoommmmaannddss==_s_t_r_i_n_g
              Run  these  commands after any of 'apt-get update', 'apt-get upgrade' or 'apt-get dist-upgrade' failed.  This hook is not run for updates of the internal sbuild apt repository, the repository
              for extra packages (see --extra-package) and the repositories given via --extra-repository.  The environment is intact, and the failure can be investigated. Especially %SBUILD_SHELL is useful
              here.  This  option  can  be used multiple times to add multiple commands. Certain percent escapes are supported.  To write a literal percent sign, escape it with another percent sign.See the
              section EEXXTTEERRNNAALL CCOOMMMMAANNDDSS for more information.  This command line option appends to the EEXXTTEERRNNAALL__CCOOMMMMAANNDDSS configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----bbuuiilldd--ddeeppss--ffaaiilleedd--ccoommmmaannddss==_s_t_r_i_n_g
              These commands are run if installing the build dependencies has failed directly after the failed attempt. The  environment  is  intact,  and  the  failure  can  be  investigated.   Especially
              %SBUILD_SHELL  is useful here. The command is run as root inside the chroot. This option can be used multiple times to add multiple commands. Certain percent escapes are supported. To write a
              literal percent sign, escape it with another percent sign. See the section EEXXTTEERRNNAALL CCOOMMMMAANNDDSS for more information.  This command line option appends  to  the  EEXXTTEERRNNAALL__CCOOMMMMAANNDDSS  configuration
              variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----ssttaarrttiinngg--bbuuiilldd--ccoommmmaannddss==_s_t_r_i_n_g
              Run  these  commands  after  dependencies are installed, just before the package build with dpkg-buildpackage starts. The command is run as the root user inside the chroot. This option can be
              used multiple times to add multiple commands. Certain percent escapes are supported. To write a literal percent sign, escape it with another percent sign. See the  section  EEXXTTEERRNNAALL  CCOOMMMMAANNDDSS
              for more information.  This command line option appends to the EEXXTTEERRNNAALL__CCOOMMMMAANNDDSS configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----ffiinniisshheedd--bbuuiilldd--ccoommmmaannddss==_s_t_r_i_n_g
              Run  these  commands  immediately  after the timed package build finishes.  The command is run as the root user inside the chroot.  This option can be used multiple times to add multiple com‐
              mands. Certain percent escapes are supported. To write a literal percent sign, escape it with another percent sign. See the section EEXXTTEERRNNAALL CCOOMMMMAANNDDSS for more information.  This command  line
              option appends to the EEXXTTEERRNNAALL__CCOOMMMMAANNDDSS configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----bbuuiilldd--ffaaiilleedd--ccoommmmaannddss==_s_t_r_i_n_g
              These  commands  are run if dpkg-buildpackage has failed directly after the failed attempt. The environment is intact, and the failure can be investigated.  Especially %SBUILD_SHELL is useful
              here. The command is run as the root user inside the chroot. This option can be used multiple times to add multiple commands. Certain percent escapes are supported. To write a literal percent
              sign,  escape  it  with  another  percent  sign. See the section EEXXTTEERRNNAALL CCOOMMMMAANNDDSS for more information.  This command line option appends to the EEXXTTEERRNNAALL__CCOOMMMMAANNDDSS configuration variable. See
              ssbbuuiilldd..ccoonnff(5) for more information.

       ----cchhrroooott--cclleeaannuupp--ccoommmmaannddss==_s_t_r_i_n_g
              Run these commands when a chroot is cleaned up, before build directory is purged.  The command is run as root inside the chroot. This option can be used multiple times to  add  multiple  com‐
              mands. Certain percent escapes are supported.  To write a literal percent sign, escape it with another percent sign. See the section EEXXTTEERRNNAALL CCOOMMMMAANNDDSS for more information.  This command line
              option appends to the EEXXTTEERRNNAALL__CCOOMMMMAANNDDSS configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----ppoosstt--bbuuiilldd--ccoommmmaannddss==_s_t_r_i_n_g
              Run this command after a successful build. The command is run outside of the chroot. This option can be used multiple times to add multiple commands.  Certain percent escapes  are  supported.
              To write a literal percent sign, escape it with another percent sign. See the section

       ----ppoosstt--bbuuiilldd--ffaaiilleedd--ccoommmmaannddss==_s_t_r_i_n_g
              Exactly  like the above, but when a build fails.  EEXXTTEERRNNAALL CCOOMMMMAANNDDSS for more information.  This command line option appends to the EEXXTTEERRNNAALL__CCOOMMMMAANNDDSS configuration variable. See ssbbuuiilldd..ccoonnff(5)
              for more information.

       ----aannyytthhiinngg--ffaaiilleedd--ccoommmmaannddss==_s_t_r_i_n_g
              Run these commands for all the _-_-_x_x_x_-_f_a_i_l_e_d_-_c_o_m_m_a_n_d_s options.  Especially %SBUILD_SHELL is useful here. This option can be used multiple times to add multiple commands.  Certain  percent  es‐
              capes are supported. To write a literal percent sign, escape it with another percent sign. See the section EEXXTTEERRNNAALL CCOOMMMMAANNDDSS for more information.  This command line option appends to the EEXX‐‐
              TTEERRNNAALL__CCOOMMMMAANNDDSS configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----lloogg--eexxtteerrnnaall--ccoommmmaanndd--oouuttppuutt
              Write output from external commands to the build log.  This command line option sets the LLOOGG__EEXXTTEERRNNAALL__CCOOMMMMAANNDD__OOUUTTPPUUTT configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----lloogg--eexxtteerrnnaall--ccoommmmaanndd--eerrrroorr
              Write error output from external commands to the build log.  This command line option sets the LLOOGG__EEXXTTEERRNNAALL__CCOOMMMMAANNDD__EERRRROORR configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----sseettuupp--hhooookk==_h_o_o_k_-_s_c_r_i_p_t DDEEPPRREECCAATTEEDD
              This option is deprecated. Use of this option will add _h_o_o_k_-_s_c_r_i_p_t to the external commands to run via _c_h_r_o_o_t_-_s_e_t_u_p_-_c_o_m_m_a_n_d_s.  This command line option sets the CCHHRROOOOTT__SSEETTUUPP__SSCCRRIIPPTT configura‐
              tion variable and appends to the EEXXTTEERRNNAALL__CCOOMMMMAANNDDSS configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----bbuuiilldd--ddeepp--rreessoollvveerr==_r_e_s_o_l_v_e_r
              Use  the specified resolver to handle selecting the build dependencies.  Supported resolvers are _a_p_t (the default), _a_p_t_i_t_u_d_e, _a_s_p_c_u_d, _x_a_p_t, and _n_u_l_l.  The apt resolver is the most appropriate
              resolver for most users, for building for unstable, stable and other distributions.  If alternative build dependencies are used (excluding architecture restrictions), only the first  alterna‐
              tive  will  be used; the others will be ignored.  The aptitude resolver is very similar, but smarter and slower, and it will consider all alternatives by default; it is suited to more complex
              situations, such as building packages for the experimental distribution, where packages need installing from multiple suites (_u_n_s_t_a_b_l_e and _e_x_p_e_r_i_m_e_n_t_a_l).  Due to performance and other  issues
              (bug  #139615),  aptitude is not recommended for use by default.  If the dependency situation is so complex that neither apt nor aptitude are able to find a solution, then you can use the as‐
              pcud resolver.  This resolver uses apt-cudf to ask aspcud, a real solver (in the math sense), to find a solution to the installation problem. Since aspcud uses a real solver (an  ASP  solver)
              it will always find a solution if one exists. The solution found by the aspcud resolver can be refined by changing the default optimization criteria through the --aspcud-criteria option.  The
              xapt resolver is intended only for cross-building, and is a temporary transitional feature which will be removed following the complete introduction of multi-arch support. Finally,  the  null
              resolver  is  a  dummy  solver which does not install, upgrade or remove any packages. This allows one to completely control package installation via hooks.  This command line option sets the
              BBUUIILLDD__DDEEPP__RREESSOOLLVVEERR configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----aassppccuudd--ccrriitteerriiaa==_c_r_i_t_e_r_i_a
              Optimization criteria in extended MISC 2012 syntax passed to aspcud through apt-cudf.  Optimization criteria are separated by commas, sorted by decreasing order of priority and  are  prefixed
              with  a  polarity  (+ to maximize and - to minimize).  The default criteria is --rreemmoovveedd,,--cchhaannggeedd,,--nneeww which first minimizes the number of removed packages, then the number of changed packages
              (up or downgrades) and then the number of new packages. A common task is to minimize the number of packages from experimental.  To do this you can add a criteria like  --ccoouunntt((ssoolluuttiioonn,,AAPPTT--RRee‐‐
              lleeaassee::==//aa==eexxppeerriimmeennttaall//))  to the default criteria.  This will then minimize the number of packages in the solution which contain the string _a_=_e_x_p_e_r_i_m_e_n_t_a_l in the _A_P_T_-_R_e_l_e_a_s_e field of the EDSP
              output created by apt. For more help on how to write optimization criteria, see the aapptt--ccuuddff(1) man page. Specifically the help on the --criteria option.  This command line  option  sets  the
              AASSPPCCUUDD__CCRRIITTEERRIIAA configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----rreessoollvvee--aalltteerrnnaattiivveess
              Allow  the  use of alternatives in Build-Depends, Build-Depends-Arch and Build-Depends-Indep.  This is the default for the aptitude dependency resolver.  This command line option sets the RREE‐‐
              SSOOLLVVEE__AALLTTEERRNNAATTIIVVEESS configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----nnoo--rreessoollvvee--aalltteerrnnaattiivveess
              Do not allow the use of alternatives in Build-Depends, Build-Depends-Arch and Build-Depends-Indep.  Note that alternatives for the same package (e.g. different versions)  are  still  allowed.
              This is the default for the apt and xapt dependency resolvers.  This command line option sets the RREESSOOLLVVEE__AALLTTEERRNNAATTIIVVEESS configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----eexxttrraa--ppaacckkaaggee==_p_a_c_k_a_g_e_._d_e_b_|_d_i_r_e_c_t_o_r_y
              Make  _p_a_c_k_a_g_e_._d_e_b  available for build-dependency resolution, by adding it to a temporary archive created by sbuild.  This makes it easier to build packages against locally-built build depen‐
              dencies, without waiting for those packages to enter the main archive, or going through the hassle of maintaining a local archive and making it accessible inside the chroot.   _p_a_c_k_a_g_e_._d_e_b  is
              copied  into the chroot, so it can refer to any path on the host system.  If a directory is passed instead of a regular file, then all regular files inside that directory with a filename that
              ends in _._d_e_b will be added in the same fashion as it is done for individual packages.  This option can be specified multiple times.  This command line option  appends  to  the  EEXXTTRRAA__PPAACCKKAAGGEESS
              configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----eexxttrraa--rreeppoossiittoorryy==_s_p_e_c
              Add  a  repository  to  the  list  of  apt  sources  during  the  package  build.  The repository specification is a line suitable for an apt ssoouurrcceess..lliisstt(5) file. For instance, you might use
              ----eexxttrraa--rreeppoossiittoorryy==""ddeebb hhttttpp::////ddeebb..ddeebbiiaann..oorrgg//ddeebbiiaann eexxppeerriimmeennttaall mmaaiinn"" to allow packages in the experimental distribution to fulfill build-dependencies. Note that the build chroot  must  al‐
              ready  trust the key of this repository or a key must be given with the ----eexxttrraa--rreeppoossiittoorryy--kkeeyy flag (see aapptt--sseeccuurree(8)).  This command line option appends to the EEXXTTRRAA__RREEPPOOSSIITTOORRIIEESS configura‐
              tion variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----eexxttrraa--rreeppoossiittoorryy--kkeeyy==_f_i_l_e_._a_s_c
              Add _f_i_l_e_._a_s_c to the list of trusted keys inside the chroot. The key is read from the filename given, and added to the trusted keys. For more information, see aapptt--sseeccuurree(8).  This flag is par‐
              ticularly  useful  if the target in ----eexxttrraa--rreeppoossiittoorryy is not signed with a key that's trusted by the base chroot.  This command line option appends to the EEXXTTRRAA__RREEPPOOSSIITTOORRYY__KKEEYYSS configuration
              variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----bbuuiilldd--ppaatthh==_s_t_r_i_n_g
              By default the package is built in a path of the following format /build/packagename-XXXXXX/packagename-version/ where XXXXXX is a random ascii string. This option allows  one  to  specify  a
              custom  path  where  the  package  is  built inside the chroot. The sbuild user in the chroot must have permissions to create the path. Common writable locations are subdirectories of /tmp or
              /build. Using /tmp might be dangerous, because (depending on the chroot mode) the /tmp inside the chroot might be a world writable location that can be accessed by processes outside  the  ch‐
              root.  The  directory  /build can only be accessed by the sbuild user and group and should be a safe location.  The buildpath must be an empty directory because the last component of the path
              will be removed after the build is finished.  Notice that depending on the chroot mode (see --chroot-mode), some locations inside the chroot might be bind mounts that are  shared  with  other
              sbuild  instances.  You  must avoid using these shared locations as the build path or otherwise concurrent runs of sbuild will likely fail. With the default schroot chroot mode, the directory
              /build is shared between multiple schroot sessions. You can change this behaviour in /etc/schroot/sbuild/fstab. The behaviour of other chroot modes will vary.  This command line  option  sets
              the BBUUIILLDD__PPAATTHH configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----ddsscc--ddiirr==_s_t_r_i_n_g
              By default the package is built in a path of the following format /build/packagename-XXXXXX/packagename-version/ where packagename-version are replaced by the values in debian/changelog. This
              option allows one to specify a custom packagename-version path where the package is built inside the chroot.  This is useful to specify a static path for different versions  for  example  for
              ccache.  This command line option sets the DDSSCC__DDIIRR configuration variable. See ssbbuuiilldd..ccoonnff(5)ffoorrmoreiinnffoorrmmaattiioonn..

       ----aauuttooppkkggtteesstt--vviirrtt--sseerrvveerr==_s_c_h_r_o_o_t_|_l_x_c_|_c_h_r_o_o_t_|_q_e_m_u_|_s_s_h
              The  autopkgtest  virtualization server. Can be specified with or without the autopkgtest-virt- prefix.  For instance, the following set of command line options will use the autopkgtest-virt-
              schroot chroot mode for a package build: ----cchhrroooott--mmooddee==aauuttooppkkggtteesstt ----aauuttooppkkggtteesstt--vviirrtt--sseerrvveerr==sscchhrroooott ----aauuttooppkkggtteesstt--vviirrtt--sseerrvveerr--oopptt==uunnssttaabbllee--aammdd6644--ssbbuuiilldd This command line option sets the  AAUU‐‐
              TTOOPPKKGGTTEESSTT__VVIIRRTT__SSEERRVVEERR configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----aauuttooppkkggtteesstt--vviirrtt--sseerrvveerr--oopptt==_s_t_r_i_n_g
              Pass  the  specified  option  directly to the respective autopkgtest-virt-* virtualization server in addition to the options already passed by sbuild. This option can be passed multiple times
              (once per autopkgtest-virt-* option) and can be freely mixed with the --autopkgtest-virt-server-opts option.  Options will be passed to the respective autopkgtest-virt-* virtualization server
              in  the  order that the --autopkgtest-virt-server-opt and --autopkgtest-virt-server-opts options are given on the command line.  See the manual pages of the respective autopkgtest-virt-* com‐
              mands for more information.  Certain percent escapes are supported. To write a literal percent sign, escape it with another percent sign. See the section OOPPTTIIOONN  SSTTRRIINNGG  PPEERRCCEENNTT  EESSCCAAPPEESS  for
              more information.  This command line option appends to the AAUUTTOOPPKKGGTTEESSTT__VVIIRRTT__SSEERRVVEERR__OOPPTTIIOONNSS configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----aauuttooppkkggtteesstt--vviirrtt--sseerrvveerr--ooppttss==_o_p_t_i_o_n_s
              Pass  the  specified options directly to the respective autopkgtest-virt-* virtualization server in addition to the options already passed by sbuild. The argument will be split by whitespaces
              and the resulting array passed to the autopkgtest-virt-* invocation. If any options contain spaces, use --autopkgtest-virt-server-opt for them.  This option can be passed multiple  times  and
              can  be  freely  mixed  with  the  --autopkgtest-virt-server-opts  option.  Options  will  be  passed to the respective autopkgtest-virt-* virtualization server in the order that the --autop‐
              kgtest-virt-server-opt and --autopkgtest-virt-server-opts options are given on the command line. See the manual pages of the respective autopkgtest-virt-* commands for more information.  Cer‐
              tain  percent  escapes  are  supported. To write a literal percent sign, escape it with another percent sign. See the section OOPPTTIIOONN SSTTRRIINNGG PPEERRCCEENNTT EESSCCAAPPEESS for more information.  This command
              line option appends to the AAUUTTOOPPKKGGTTEESSTT__VVIIRRTT__SSEERRVVEERR__OOPPTTIIOONNSS configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----ssbbuuiilldd--mmooddee==_m_o_d_e
              Behaviour changes for use in a buildd environment.  This command line option sets the SSBBUUIILLDD__MMOODDEE configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----ssttaattss--ddiirr==_d_i_r_e_c_t_o_r_y
              Directory for writing build statistics to.  This command line option sets the SSTTAATTSS__DDIIRR configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----ppuurrggee--eexxttrraa--ppaacckkaaggeess
              This is an experimental option. Only use when you know what you are doing.  Source packages must be buildable with only their build dependencies, all packages  marked  as  Essential:yes,  the
              build-essential  package  and  their transitive dependencies installed. But by default, most chroots will also include Priority:required packages and apt as well as their transitive dependen‐
              cies. This option will try to remove all additional packages that are not strictly required for the build right after build dependencies were installed. This currently works best with the as‐
              pcud  resolver. The apt resolver will not make as much effort to remove all unneeded packages and will keep all providers of a virtual package and all packages from any dependency alternative
              that happen to be installed. The aptitude and xapt resolver do not implement this feature yet. The removed packages are not (yet) added again after the build finished. This can have  undesir‐
              able  side  effects like lintian not working (because there is no apt to install its dependencies) or bare chroots becoming totally unusable after apt was removed from them. Thus, this option
              should only be used with throw-away chroots like schroot provides them where the original state is automatically restored after each build. This command line option sets the PPUURRGGEE__EEXXTTRRAA__PPAACCKK‐‐
              AAGGEESS configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

       ----bbdd--uunniinnssttaallllaabbllee--eexxppllaaiinneerr==_d_o_s_e_3_|_a_p_t_|_n_o_n_e
              If the build dependencies cannot be satisfied by the chosen resolver, sbuild will run the selected method to give a better explanation why the build dependencies cannot be installed. Possible
              arguments for this option are dose3 (the default), apt and none. To disable this feature, pass none or the empty string.  Depending on the resolver, the dose3 explainer might report a  depen‐
              dency  situation  as  satisfiable even if the chosen resolver found it to be unsatisfiable. This is especially likely to happen if the apt resolver (the default) is used. Such disparities can
              have two reasons: either the understanding of the involved dependency situation of the apt and dose3 solver differs (this is a bug) or the apt solver was unable to find a solution if the  de‐
              pendency situation is not trivial (for example if it involves packages from multiple repositories). In the former case, please report the disparity as a bug against the resolvers. In the lat‐
              ter case, use a resolver that is more likely to find a solution like the aptitude or aspcud resolvers. Especially the aspcud resolver should find a solution if and only if  the  dose3  solver
              also finds one. This command line option sets the BBDD__UUNNIINNSSTTAALLLLAABBLLEE__EEXXPPLLAAIINNEERR configuration variable. See ssbbuuiilldd..ccoonnff(5) for more information.

CCHHRROOOOTT MMOODDEESS
       The  main  purpose of sbuild is to build Debian packages in a clean chroot environment. Provisioning and managing these chroot environments is not done by sbuild itself but by multiple backends. The
       default backend (or chroot mode) is schroot which is an suid binary that allows regular users to enter a chroot environment. But sbuild also allows one to build packages in a qemu  virtual  machine,
       lxc, lxd or on a remote host reached by ssh using the autopkgtest backend. The backend can be chosen using the ----cchhrroooott--mmooddee command line argument or the _$_c_h_r_o_o_t___m_o_d_e configuration parameter.

       sscchhrroooott
              The  default  and  recommended chroot mode. It is also used on Debian buildd machines.  The easiest way to set up sbuild for use with the schroot backend is by using sbuild-createchroot which
              will also write out the necessary schroot configuration files in /etc. To use the chroots, the current user has to be added to the sbuild group, for example by running sbuild-adduser.  Updat‐
              ing these schroot backends can be done using sbuild-update. See the respective man pages for more information about how to use these programs.  Schroot supports chroots from directories, tar‐
              balls, filesystem images and block devices.  Schroot provides ephemeral chroots either by unpacking a tarball into a temporary directory, by using an overlay filesystem for directory  chroots
              or  by using btrfs or lvm snapshots. Chroots usable by schroot are defined by configuration files in /etc/schroot/chroot.d/. When building for a specific distribution and architecture, sbuild
              will choose the chroot that is named (or has the alias) _$_d_i_s_t_r_i_b_u_t_i_o_n_-_$_a_r_c_h_-_s_b_u_i_l_d, _$_d_i_s_t_r_i_b_u_t_i_o_n_-_s_b_u_i_l_d, _$_d_i_s_t_r_i_b_u_t_i_o_n_-_$_a_r_c_h or _$_d_i_s_t_r_i_b_u_t_i_o_n, in that order of preference.  The  used  chroot
              name can be overridden using the -c or --chroot options.

       ssuuddoo   This  chroot mode is deprecated and only provided for backwards compatibility and testing purposes. It operates by plainly entering the chosen chroot directory using "sudo chroot". Thus, this
              backend also does not provide ephemeral chroots. The sudo chroot mode searches for a symlink or directory located at _/_e_t_c_/_s_b_u_i_l_d_/_c_h_r_o_o_t_/ or in the current directory,  prefixed  with  _c_h_r_o_o_t_-.
              The expected names are resolved in the same order as for the schroot chroot mode and can be overridden using the -c or --chroot options.

       aauuttooppkkggtteesstt
              This  is  an  experimental chroot mode that allows one to build packages in any chroot supported by autopkgtest. This allows one to build packages in lxc or lxd containers, a qemu virtual ma‐
              chine or on a remote host via ssh. Which autopkgtest server to use is determined via the ----aauuttooppkkggtteesstt--vviirrtt--sseerrvveerr option. Since autopkgtest (in contrast to schroot) does not maintain a  reg‐
              istry of available containers or (virtual) machines, it is necessary to manually specify them using the ----aauuttooppkkggtteesstt--vviirrtt--sseerrvveerr--ooppttss== command line argument. To avoid having to manually type
              the right container or machine name every time when sbuild is executed, percent escapes are permitted.

       uunnsshhaarree
              This backend allows one to build packages inside chroots provided by arbitrary tarballs without superuser privileges. This allows one to set up an arbitrary build environment  without  having
              to  become  root.  Building packages with schroot also doesn't require sudo (schroot is suid root) but setting up and updating chroots requires superuser permissions. The unshare backend only
              makes use of two small suid binaries (newuidmap and newgidmap). This backend allows arbitrary tarballs containing chroot environments to be used for package building. The default tarball  lo‐
              cation is in ~/.cache/sbuild/. The expected names are resolved in the same order as for the schroot chroot mode and can be overridden using the -c or --chroot options.

              On  buster  and  earlier Debian releases, unprivileged userns clones (/proc/sys/kernel/unprivileged_userns_clone) were disabled by default by means of a Debian-specific kernel patch. On these
              systems, root is required for enabling them. This can also done permanently by setting kernel.unprivileged_userns_clone=1 in /etc/sysctl.d/.

BBUUIILLDD AARRTTIIFFAACCTTSS
       Sbuild is meant to be used to build architecture specific binary packages from a given source package. In addition, sbuild is also able to generate architecture independent binary packages  as  well
       as to rebuild the original source package that was used as input. In summary, sbuild is able to build architecture specific binary packages, architecture independent binary packages and source pack‐
       ages. What ends up being built is determined by the configuration variables BBUUIILLDD__AARRCCHH__AANNYY, BBUUIILLDD__AARRCCHH__AALLLL and BBUUIILLDD__SSOOUURRCCEE, respectively. See ssbbuuiilldd..ccoonnff(5) for a detailed explanation of these con‐
       figuration variables.

       By default, during native compilation, BBUUIILLDD__AARRCCHH__AANNYY and BBUUIILLDD__AARRCCHH__AALLLL are set to true while BBUUIILLDD__SSOOUURRCCEE is set to false.  During cross-compilation, BBUUIILLDD__AARRCCHH__AALLLL defaults to false.  This behav‐
       iour can be changed either by using command line options or by modifying the configuration variables in your _~_/_._s_b_u_i_l_d_r_c. The relevant command line options to change the  values  of  BBUUIILLDD__AARRCCHH__AANNYY,
       BBUUIILLDD__AARRCCHH__AALLLL and BBUUIILLDD__SSOOUURRCCEE are ----aarrcchh--aannyy//----nnoo--aarrcchh--aannyy, ----aarrcchh--aallll//----nnoo--aarrcchh--aallll and ----ssoouurrccee//----nnoo--ssoouurrccee, respectively.

       The values of BBUUIILLDD__AARRCCHH__AANNYY, BBUUIILLDD__AARRCCHH__AALLLL and BBUUIILLDD__SSOOUURRCCEE change the parameter that dpkg-buildpackage is called with. The following table displays the argument passed to dpkg-buildpackage in the
       last column depending on the configuration options in the first three columns.

       BBUUIILLDD__AARRCCHH__AANNYY   BBUUIILLDD__AARRCCHH__AALLLL   BBUUIILLDD__SSOOUURRCCEE   dpkg-buildpackage flag
       ────────────────────────────────────────────────────────────────────────
       false            false            false          invalid
       false            false            true           -S
       false            true             false          -A
       false            true             true           -g
       true             false            false          -B
       true             false            true           -G
       true             true             false          -b
       true             true             true           no option

EEXXTTEERRNNAALL CCOOMMMMAANNDDSS
       Support to run external commands during an sbuild run is provided. A set of external commands can be run at various stages of a build. Providing commands to run is done through the  appropriate  op‐
       tions given on the command line and through the use of the configuration files. In the configuration file, the list of commands to run are placed in a hash of arrays of arrays of strings correspond‐
       ing to the commands to run.

       There are several sets of commands. All command are run inside the chroot as root except for the  _p_r_e_/_p_o_s_t_-_b_u_i_l_d_- commands which are run as the user running sbuild outside of the chroot. To  run  an
       external command as another user than the root user, prefix your command with _r_u_n_u_s_e_r _-_u _s_b_u_i_l_d _-_-.

       Here is a summary of the ordering, user, internal/external to chroot for each command hook

       The  following table shows each command hook in the context of the tasks sbuild performs. The column _r_o_o_t shows whether the command is run as root (yes) or not (no).  The column _c_h_r_o_o_t shows whether
       the command is run inside our outside the chroot. The working directory inside the chroot is the one marked with <<<<BBUUIILLDDDDIIRR>>>> inside  the  log.  By  default,  this  is  a  directory  of  the  format
       //bbuuiilldd//ppaacckkaaggeennaammee--XXXXXXXXXXXX// where XXXXXXXXXXXX is a random ascii string.  Otherwise, it is the directory set by ----bbuuiilldd--ppaatthh or by the BBUUIILLDD__PPAATTHH configuration option.  The working directory outside of the
       chroot is $HOME. The remaining columns show the percent escapes that are defined in each command.  Percent escapes that are available in all commands (%%%%, %%aa, %%bb, %%ss) are omitted.  The  value  _m_a_y_b_e
       in  the  column  for  the  %%dd and %%pp escapes means that the value can not relied upon to be defined in these stages.  More specifically, these escapes will not be defined at these points if the user
       specified a source package name without a version on the command line. In that case, the version will only become known after the source package has been retrieved in the "Fetch  and  unpack  source
       package" stage.

       command/action                         root   chroot    %c    %e    %d,%p
       ──────────────────────────────────────────────────────────────────────────
       Initialise chroot session
       ----pprree--bbuuiilldd--ccoommmmaannddss                   no     outside   no    yes   maybe
       Setup the chroot and variables
       ----cchhrroooott--sseettuupp--ccoommmmaannddss                yes    inside    no    no    maybe
       Update and upgrade packages
       ----cchhrroooott--uuppddaattee--ffaaiilleedd--ccoommmmaannddss        yes    inside    no    no    maybe
       Fetch and unpack source package
       Install Dependencies
       ----bbuuiilldd--ddeeppss--ffaaiilleedd--ccoommmmaannddss           yes    inside    no    no    yes
       ----ssttaarrttiinngg--bbuuiilldd--ccoommmmaannddss              yes    inside    no    no    yes
       Run dpkg-buildpackage
       ----bbuuiilldd--ffaaiilleedd--ccoommmmaannddss                yes    inside    no    no    yes
       ----ffiinniisshheedd--bbuuiilldd--ccoommmmaannddss              yes    inside    no    no    yes
       Run lintian (if configured)
       ----cchhrroooott--cclleeaannuupp--ccoommmmaannddss              yes    inside    yes   no    yes
       Cleanup build files and dependencies
       Run piuparts (if configured)
       Run autopkgtest (if configured)
       Close schroot session
       ----ppoosstt--bbuuiilldd--ccoommmmaannddss                  no     outside   yes   yes   yes
       ----ppoosstt--bbuuiilldd--ffaaiilleedd--ccoommmmaannddss           no     outside   yes   yes   yes

       The commands can be given in the configuration files. They can be given as strings or as a list of arguments. For example, to run "foo" and "bar" with arguments before a build starts, specifying the
       "foo" command as a list and "bar" as a string, one could do this:

       $$eexxtteerrnnaall__ccoommmmaannddss == {{
           ""pprree--bbuuiilldd--ccoommmmaannddss"" ==>> [[
               [[''ffoooo'',, ''aarrgg11'',, ''aarrgg22'']],,
               ''bbaarr aarrgg11 aarrgg22 aarrgg33'',,
           ]],,
       }};;

       Hash keys for commands to run at other stages have the same name as their corresponding command-line option name without the preceding '--'.

       Here's an example of how to do the same with the previous example, except using the _-_-_p_r_e_-_b_u_i_l_d_-_c_o_m_m_a_n_d_s option.

       $$ ssbbuuiilldd \\
             ----pprree--bbuuiilldd--ccoommmmaannddss==''ffoooo aarrgg11 aarrgg22'' \\
             ----pprree--bbuuiilldd--ccoommmmaannddss==''bbaarr aarrgg11 aarrgg22 aarrgg33''

       Note that all these commands are executed through the shell in "/bin/sh". If specifying the command as a list in the config file, very few shell facilities are supported: no redirection, no  command
       concatenation  with  ; and so on. When passing a string (in the config file or on the commandline), the string is passed as-is to the shell. So all shell facilities are available, given that you es‐
       cape everything properly, as you would in an interactive shell.

       Besides running external commands, sbuild can also detect the use of certain percent escapes given as arguments. These are used to allow for a command to be supplied with a certain argument  depend‐
       ing on the escape given.  For example, it could be possible to have an external command be given the path to a .changes file.

       Here is a listing of keywords and a description of what it's converted to.

       %%%%     Used to escape a '_%'.

       %%dd, %%SSBBUUIILLDD__DDSSCC
              These escapes are converted to the absolute path to a package's .dsc file.

       %%cc, %%SSBBUUIILLDD__CCHHAANNGGEESS
              These  escapes are converted to the absolute path to a package's source .changes file. This is the .changes file generated by the dpkg-buildpackage invocation and not the source-only .changes
              file that might've been produced additionally via --source-only-changes. This variable is only set after the build is finished, i.e in  ----cchhrroooott--cclleeaannuupp--ccoommmmaannddss,  ----ppoosstt--bbuuiilldd--ccoommmmaannddss,  and
              ----ppoosstt--bbuuiilldd--ffaaiilleedd--ccoommmmaannddss.

       %%aa, %%SSBBUUIILLDD__HHOOSSTT__AARRCCHH
              These escapes are converted to the debian name of the architecture the build is being built for (e.g amd64, armhf).

       %%ee, %%SSBBUUIILLDD__CCHHRROOOOTT__EEXXEECC
              These  escapes  are  converted  to a command which can be executed on a host and can be given arguments which will then be executed inside the chroot. Standard input and output of the process
              started inside the chroot are connected to the program executed on the host. Thus, this command can also be used to copy data into the chroot and out of the chroot. The working  directory  of
              the process started inside the chroot is the root directory of the chroot. The process is started as the root user.  This variable is not set if the external command is run inside the chroot.
              Thus this escape is only available for ----pprree--bbuuiilldd--ccoommmmaannddss, ----ppoosstt--bbuuiilldd--ccoommmmaannddss, and ----ppoosstt--bbuuiilldd--ffaaiilleedd--ccoommmmaannddss.

       %%bb, %%SSBBUUIILLDD__BBUUIILLDD__DDIIRR
              These escapes are converted to the absolute path to the build directory inside the chroot.

       %%pp, %%SSBBUUIILLDD__PPKKGGBBUUIILLDD__DDIIRR
              These escapes are converted to the absolute path to the package build directory inside the chroot.

       %%ss, %%SSBBUUIILLDD__SSHHEELLLL
              This is converted to a command to spawn an interactive "bash" shell

       %%SSBBUUIILLDD__BBUUIILLDD__AARRCCHH
              This escape is converted to the Debian name of the architecture that the build is being run on (e.g amd64, armhf).

       Percent escapes are only substituted when an appropriate value is defined for them. At other times, it is left unchanged. In practice this means that there are only two escapes that are  not  avail‐
       able  in all external commands: %%cc and %%ee. For example, a .changes file is only defined at the end of a build, so using _%_c will only be substituted for post-build-commands and post-build-failed-com‐
       mands.

       Here's an example of using an escape to run a program foo on a .changes file after a build is done.

       $$ ssbbuuiilldd ----ppoosstt--bbuuiilldd--ccoommmmaannddss \\
             ''ffoooo %%SSBBUUIILLDD__CCHHAANNGGEESS''

       And here's an example that will spawn an interactive shell to investigate the problem whenever the build failed:

       $$ ssbbuuiilldd ----bbuuiilldd--ffaaiilleedd--ccoommmmaannddss ''%%SSBBUUIILLDD__SSHHEELLLL''

       The following example would copy a file from the host into the chroot:

       $$ ssbbuuiilldd ----pprree--bbuuiilldd--ccoommmmaannddss \\
             ''ccaatt bblluubb..ttxxtt || %%SSBBUUIILLDD__CCHHRROOOOTT__EEXXEECC sshh --cc ""ccaatt >> bblluubb..ttxxtt""''

       One final note, external commands are processed in the order they are given.  Also, the commands given in a configuration file are processed first, then the commands given through the  command  line
       options.

OOPPTTIIOONN SSTTRRIINNGG PPEERRCCEENNTT EESSCCAAPPEESS
       Besides  for external command strings, percent escapes can also be used in custom options passed to piuparts, autopkgtest and the chosen autopkgtest-virt server.  This is for example useful for com‐
       municating the right chroot backend to piuparts or autopkgtest depending on the distribution or architecture the source package was built for.

       Here is a listing of keywords and a description of what it's converted to.

       %%%%     Used to escape a '_%'.

       %%aa, %%SSBBUUIILLDD__HHOOSSTT__AARRCCHH
              These escapes are converted to the debian name of the architecture the build is being built for (e.g amd64, armhf).

       %%rr, %%SSBBUUIILLDD__DDIISSTTRRIIBBUUTTIIOONN
              The distribution that the source package was built for. This is the value recorded in debian/changelog or the value passed via the --dist option.  Mnemonic: the rr is the first letter in  "re‐
              lease".

       Here is an example that will run piuparts with the right schroot chroot:

       $$ ssbbuuiilldd ----rruunn--ppiiuuppaarrttss \\
             ----ppiiuuppaarrttss--ooppttss==""----sscchhrroooott==%%rr--%%aa--ssbbuuiilldd""

       Or an example of running autopkgtest with the right schroot chroot:

       $$ ssbbuuiilldd ----rruunn--aauuttooppkkggtteesstt ----aauuttooppkkggtteesstt--rroooott--aarrggss== \\
             ----aauuttooppkkggtteesstt--ooppttss==""---- sscchhrroooott %%rr--%%aa--ssbbuuiilldd""

       To achieve the same effect via the configuration file, add the following:

       $$aauuttooppkkggtteesstt__rroooott__aarrggss == '''';;
       $$ppiiuuppaarrttss__ooppttss == [[ ''----sscchhrroooott==%%rr--%%aa--ssbbuuiilldd'' ]];;
       $$aauuttooppkkggtteesstt__ooppttss == [[ ''----'',, ''sscchhrroooott'',, ''%%rr--%%aa--ssbbuuiilldd'' ]];;

       The  --autopkgtest-root-args option and the $autopkgtest_root_args configuration variable are set to the empty string because the default is to run autopkgtest with "sudo --" in front of it which is
       not needed with the schroot autopkgtest backend.

LLOOCCAALL AARRCCHHIIVVEE
       The apt and aptitude resolvers create a local archive for installing build dependencies.  This is an internal implementation detail of the build dependency resolver, which is not user  configurable,
       and is intended to be entirely transparent to the user.  The local archive exists only transiently during the package build.  It does not persist across builds, and it is only used to store the dum‐
       my dependency packages created for a single build.

       The dependency resolvers do the following:

       •      Create a dummy dependency package.  This contains the Build-Depends (and optionally Build-Depends-Arch and Build-Depends-Indep) as Depends,  and  Build-Conflicts  (and  optionally  Build-Con‐
              flicts-Arch and Build-Conflicts-Indep) as Conflicts.

       •      Install the dummy dependency package into the local archive,

       •      Generate the _P_a_c_k_a_g_e_s, _S_o_u_r_c_e_s and _R_e_l_e_a_s_e files.

       •      Write a _s_o_u_r_c_e_s_._l_i_s_t file for the local archive into _/_e_t_c_/_a_p_t_/_s_o_u_r_c_e_s_._l_i_s_t_._d.

       •      Inject  the lists directly into _/_v_a_r_/_l_i_b_/_a_p_t_/_l_i_s_t_s.  This step is to save running updating all apt sources which is undesirable during a build; apt and aptitude do not support updating a sin‐
              gle source at present.

       •      Regenerate the apt caches to ensure everything is in sync.

       •      Install the dummy dependency package with apt or aptitude; the dummy package is pulled from the local apt archive, while all its dependencies  are  pulled  from  the  regular  configured  apt
              sources.

       At the end of the build, the local archive is removed, along with the rest of the build tree.

EEXXAAMMPPLLEESS
       Before  you  use sbuild for the first time, you have to do some setup depending on the chroot mode you are using. The default chroot mode is schroot. To use sbuild with the schroot backend, you need
       to add your user to the sbuild group and create a schroot chroot. The latter can be accomplished by using sbuild-createchroot(8). After this one time setup, you can now use sbuild to build  packages
       like this:

       % ssbbuuiilldd --dd uunnssttaabbllee bbaasshh

       Or on a .dsc:

       % ssbbuuiilldd --dd uunnssttaabbllee bbaasshh..ddsscc

       Or from within an unpacked source package (the -d parameter is not necessary here because the distribution is inferred from debian/changelog):

       % ssbbuuiilldd

EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS
       The following environment variables are used by ssbbuuiilldd:

       HOME   The home directory of the user.

       LOGNAME
              Used in lockfiles.

       SBUILD_CONFIG
              Path to an additional configuration file on top of the system wide and user specific ones.

FFIILLEESS
       _/_e_t_c_/_s_b_u_i_l_d_/_s_b_u_i_l_d_._c_o_n_f
              Configuration, maintained by the system administrator.  This may be used to override the defaults.

       _/_e_t_c_/_s_b_u_i_l_d_/_c_h_r_o_o_t
              Directory containing symbolic links to chroots.  This is only used for sudo chroot access; schroot access uses the schroot chroot configuration.

       _~_/_._s_b_u_i_l_d_r_c
              User-specific  configuration.  A  custom  path  to a configuration file can also be specified through setting the SSBBUUIILLDD__CCOONNFFIIGG environment variable to the path of an additional configuration
              file.

       _/_v_a_r_/_l_i_b_/_s_b_u_i_l_d
              Build trees, archive signing keys, build statistics and lock files.

AAUUTTHHOORRSS
       Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>.

       ssbbuuiilldd is based on debbuild, written by James Troup <james@nocrew.org> and has been modified by
       Ben Collins <bcollins@debian.org>,
       Ryan Murray <rmurray@debian.org>,
       Francesco Paolo Lovergine <frankie@debian.org>,
       Michael Banck <mbanck@debian.org>, and
       Roger Leigh <rleigh@debian.org>

CCOOPPYYRRIIGGHHTT
       Copyright © 1998-2000 Roman Hodek <roman@hodek.net>
       Copyright © 1998-1999 James Troup <troup@debian.org>
       Copyright © 2003-2006 Ryan Murray <rmurray@debian.org>
       Copyright © 2001-2003 Rick Younie <younie@debian.org>
       Copyright © 2003-2004 Francesco Paolo Lovergine <frankie@debian.org>
       Copyright © 2005      Michael Banck <mbanck@debian.org>
       Copyright © 2005-2009 Roger Leigh <rleigh@debian.org>

SSEEEE AALLSSOO
       ssbbuuiilldd..ccoonnff(5),  ssbbuuiilldd--aabboorrtt(1),  ssbbuuiilldd--aadddduusseerr(8),  ssbbuuiilldd--aapptt(1),  ssbbuuiilldd--cchheecckkppaacckkaaggeess(1),  ssbbuuiilldd--ccrreeaatteecchhrroooott(8),  ssbbuuiilldd--ddiissttuuppggrraaddee(1),  ssbbuuiilldd--hhoolldd(1),  ssbbuuiilldd--sseettuupp(7).   ssbbuuiilldd--sshheellll(1),
       ssbbuuiilldd--uunnhhoolldd(1), ssbbuuiilldd--uuppddaattee(1), ssbbuuiilldd--uuppggrraaddee(1), sscchhrroooott(1),

Version 0.85.0                                                                                 04 January 2023                                                                                      SBUILD(1)
