pdebuild(1)

πŸŽ€ pdebuild β€” the pbuilder way of doing debuild πŸ’–

okay bestie, welcome to pdebuild(1) β€” this is a pbuilder manual page and honestly it's a whole vibe. it's the little helper that goes and grabs root for you so you can build Debian packages without ✨drama✨.


🌸 SYNOPSIS 🌸

pdebuild [pdebuild options] -- [pbuilder options]

πŸ’… DESCRIPTION πŸ’…

so, pdebuild is basically a convenience program for pbuilder. it gets the appropriate root privilege for you, then invokes pbuilder while you're sitting in a Debian source directory. iconic behavior, no cap.

⚠️ bestie, you must be inside the source tree that contains the debian directory. like, that's the whole thing. no debian dir, no build.

by default, the build log file gets stored in ../<package>_<version>_<arch>.build. yes, in the parent directory. that's just where it lives. πŸ¦‹


✨ PDEBUILD OPTIONS ✨

okay so these options have the form --option name and they modify how the operation behaves, as explained below. they get applied from left to right, and when options conflict, the option that appears later takes precedence. (last one wins, periodt. πŸ‘‘)

  • --buildsourceroot [fakeroot] β€” the command used to gain root privilege for invoking debian/rules clean. yes, it defaults to fakeroot, wild but true.
  • --pbuilderroot [sudo -E] β€” the command used to gain root privilege for invoking pbuilder. default is sudo -E, she's simple like that.
  • --pbuildersatisfydepends [/usr/lib/pbuilder/pbuilder-satisfydepends] β€” the command used to satisfy (i.e. install) build-dependencies. it's giving "please get me my build deps." 🫢
  • --architecture β€” set the architecture. lowkey important: this is currently required when it doesn't match the host architecture.
  • --auto-debsign β€” invoke debsign at the end of the pdebuild process. auto-signing, so slay. ✨
  • --debsign-k [key-id] β€” pass the -k option to debsign to specify which key-id to sign with. tell her which key, she'll use it. πŸ”‘
  • --buildresult [Directory for build results] β€” the place where the build result is stored.
    • note that for pdebuild, buildresult needs to be specified as a pdebuild option on the command-line, not as a pbuilder option. (iykyk, this trips everyone up 😭)
    • note that the default value for buildresult is what is defined for pbuilder, which is /var/cache/pbuilder/result and not .
  • --configfile [Extra config file to use] β€” the configuration file is used, and passed on to pbuilder. share the config, bestie. πŸ’œ
  • --debbuildopts [options to pass to dpkg-buildpackage] β€” the space-delimited list of options are passed to dpkg-buildpackage. this option appends to the pbuilder option --debbuildopts and may also be used to reset the list of options by passing the empty string.
    • multiple options are delimited with spaces.
    • note that for pdebuild, dpkg-source is used to build the source package which is given to pbuilder. this option has no effect on the arguments used to build this source package, but it will control whether the clean target is run first as usual, and any options for dpkg-genchanges will be passed on. it's giving "different job, same flag name" πŸ’€
  • --use-pdebuild-internal β€” uses a different implementation of pdebuild, which calls clean and build inside the chroot, using bind-mounts.
    • pdebuild-internal tries to run debian/rules clean inside the chroot. to do so, the working directory is passed on inside the chroot, in the form of bind-mounting and debuild is run.
    • > ⚠️ this option will not protect the working directory and its parent directories from the build scripts. read that again. it's real.
  • --logfile [file to log] β€” specifies the build logfile to create. the messages generated during execution will be written to the file, as well as standard output. double duty, we love. πŸ“
  • --pbuilder [pbuilder] β€” specifies which command to invoke as pbuilder.
  • --help β€” show a brief help message. when in doubt, ask. πŸ™ˆ
  • -- [pbuilder options] β€” after the -- symbol, an arbitrary number of pbuilder options can be specified. see pbuilder(8) for a full list of options.
    • there is an exception: --buildresult needs to be specified as a pdebuild option before the -- in order to be effective. ⭐

🌈 FILES 🌈

  • /etc/pbuilderrc β€” the configuration file for pbuilder, used in pdebuild.
  • /usr/share/pbuilder/pbuilderrc β€” the default configuration file for pbuilder, used in pdebuild.
  • ${HOME}/.pbuilderrc β€” configuration file for pbuilder, used in pdebuild. it overrides /etc/pbuilderrc. home turf wins, always. 🏠

🧚 EXAMPLES 🧚

pdebuild

$ pwd
/home/dancer/DEBIAN/cowdancer/cowdancer
$ ls debian/rules
debian/rules
$ pdebuild
dh clean
   dh_testdir
   dh_auto_clean
   dh_autoreconf_clean
   dh_clean
     .
     .
     .
dpkg-source: info: using source format '3.0 (native)'
dpkg-source: info: building cowdancer in cowdancer_0.84.tar.xz
dpkg-source: info: building cowdancer in cowdancer_0.84.dsc
     .
     .
     .

look at her go. she's building. she's clean. she's everything. πŸ¦‹βœ¨


πŸ’€ BUGS πŸ’€

pdebuild will accept all options that pbuilder accepts as pdebuild option. however, unless the option is documented in the manual page, it may be ignored. so like… just because she'll take it doesn't mean she'll do anything with it. 😭


πŸ‘‘ AUTHOR πŸ‘‘

initial coding and main maintenance is done by Junichi Uekawa <dancer@debian.org>. legend behavior fr fr.

the homepage is http://pbuilder.alioth.debian.org β€” go show some love. 🫢


πŸ”₯ SEE ALSO πŸ”₯

/usr/share/doc/pbuilder/pbuilder-doc.html, pbuilder(8), pbuilderrc(5)


okay that's the whole page bestie, you ate that. this was the Debian version of pdebuild(1), dated 2006 May 24 β€” yes she's a vintage icon and she still serves. mwah πŸ’…πŸ’–πŸŽ€