pbuilderrc(5)
π pbuilderrc(5) β the config files for personal package builder, bestie π
okay so real talk: this is the pbuilderrc manual, from the pbuilder family, and it's the one that tells you how to configure your build life. it's long, so buckle up. part 1 starts now β¨
πΈ NAME πΈ
pbuilderrc β configuration files for personal package builder π
π¦ DESCRIPTION π¦
/etc/pbuilderrc is where the default values live β the ones pbuilder reaches for whenever it gets invoked. no cap.
the file itself gets sourced by a shell script, so bestie, it must follow shell script conventions. it's not vibing like a config file, it's vibing like shell. periodt.
the environment variable PBUILDER_OPERATION holds the current operation mode of pbuilder, and you can use it to do conditional configuration. the possible values are:
buildcleancreatedebuilddumpconfigexecuteloginupdate
β¨ FORMAT β¨
this is the main character section, so let's go one by one π
APTCACHE=/var/cache/pbuilder/aptcacheβ where the packages that apt downloads get cached. set this to""and caching is fully turned off. bye cache πAPTCACHEHARDLINK=yesβ whether apt cache handling uses hard links. flip it tonoand hard linking is disabled, and the files get copied instead.
heads up: it's advised to set this to no if you're using user-mode-linux. fr fr.
APTCONFDIR=/etc/aptβ says where the apt configuration files get copied from. by default this value is empty, which lets the usual configuration options do their thing. setting this variable overrides other options, so watch it πARCHITECTURE=dpkg --print-architecture`` β the build architecture, as described indpkg-architecture(1). it's the architecture used when creating the chroot, and it defaults to the system one. the supported values are the ones debootstrap supports, iykyk.AUTOCLEANAPTCACHE=yesβ always run with the--autocleanaptcacheoption. always. no exceptions.AUTO_DEBSIGN=yesβ when this is set toyes,pdebuildwill invoke thedebsigncommand after building π«ΆBASETGZ=/var/cache/pbuilder/base.tgzβ the default location for the archived chroot image to be created and used. this gets overridden by the--basetgzoption.BINDMOUNTS=directories-to-bind-mount[:internal-mountpoint]β when this is set, pbuilder will mount these directories using bind-mount. different directories are space separated, and a colon can optionally specify a mount destination inside the chroot.
do not bind-mount /. i'm serious, bestie π
an example, copy it exactly:
BINDMOUNTS="/home /mnt/test /home/joe/repo:/var/repo"
BUILDDIR=/buildβ the directory inside the chroot where the build happens. this directory will contain the build products; the source packages get unpacked in a subdirectory inside it, named$srcpkg-$ver, with$verbeing the upstream part of the version, without epoch and debian revision.
attention! some directories β like /tmp β are not safe to use, because they can be world-writable, and external users can temper with the build process. not the vibe you want π
BUILDPLACE=/var/cache/pbuilder/build/β the default place where the chroot gets constructed. pbuilder will use the directory$BUILDPLACE$$, which means it uses the directory and the PID to figure out which directory to use. that should get you a unique directory for concurrent runs of pbuilder on one machine.
it's not guaranteed to happen on network shared drives, so be aware of that fact when you're playing with this option on NFS shared beowulf clusters. change it to something like /var/cache/pbuilder/build/$HOSTNAME/ when you're doing that kind of thing π
also: pbuilder clean cleans up this directory. iconic.
BUILDRESULT=/var/cache/pbuilder/result/β the default directory that the build result gets copied over to after the building.
unlike the --buildresult command-line option, the path is not canonicalized, so you should specify a full path, not a relative path. noted π
EATMYDATA=noβ enable or disable the builtin eatmydata support. for this to work, the library of the same architecture as the one inside the chroot has to be installed on the host.CCACHEDIR=β where ccache keeps its cached compiler output. if this is specified, ccache will be installed uponpbuilder createorpbuilder update,/usr/lib/ccachewill be prepended to thePATH,CCACHEDIRwill be bind-mounted in the chroot, andCCACHE_DIR(the ccache variable) will be set toCCACHEDIR. note that files inCCACHEDIRare chowned toBUILDUSERID(1234by default). ccache is disabled by default.BUILDRESULTUID=BUILDRESULTGID=
set the UID and GID of the files built as result. they probably need to be set to numeric UID values, so that it works the same inside the chroot and outside the chroot.
if sudo is used, the values specified by sudo are used. they are SUDO_UID and SUDO_GID. the default value is 0.
BUILDSOURCEROOTCMD=fakerootβ this option is used on invocation of fakeroot fordpkg-buildpackagein pdebuild.BUILDUSERID=1234β the uid to be used inside the chroot. it should ideally not collide with the user-id outside the chroot, so you avoid the user inside the chroot having access to processes owned by the user id outside the chroot. safety first πBUILDUSERNAME=pbuilderβ the user name of the user the build will run as. specifying this will enable the use of fakeroot inside pbuilder.
note that this will require fakeroot to be installed within the chroot, and fakeroot will automatically be installed. and -rfakeroot will be added to DEBBUILDOPTS. cute, it does it for you π
COMPONENTS=mainβ the default distribution components to use. this option is space-delimited, so use quotes when listing multiple components. this option only affects when doingpbuilder createor when--override-configis specified for thepbuilder updateoption.COMPRESSPROG=gzipβ the program to use for compression of thebase.tgz. the default is to use gzip, and any program that can be used to compress data using a pipe can be used.- if set to
"pigz", compression and decompression is gzip compatible but will use all available CPUs. - if set to
"cat", there will be no compression at all (so compression/decompression will be a lot faster but takes much more space on the disk).
- if set to
export http_proxy=http://your-proxy:8080/β defines the proxy for http connection πexport DEBIAN_BUILDARCH=athlonβ uses this variable asDEBIAN_BUILDARCH. this trick can be used for other environmental variables as well. slay.DEBBUILDOPTS=β the options given here will be passed on todpkg-buildpackage. this can be useful e.g. for binary-only builds. the command-line option--debbuildoptswill be appended to any contents specified here but may also be used to reset the list of options.
the default value is to build source and binary package.
DEBOOTSTRAPOPTS=( '--variant=buildd' '--keyring' '/usr/share/keyrings/debian-archive-keyring.gpg' )β when this option is set to--variant=builddpbuilder will invoke$DEBOOTSTRAPwith the--variant=builddoption, which results in debootstrap creating a minimal chroot for buildd instead of trying to create a minimal installation chroot.--keyringis used to specify a keyring for debootstrap.APTKEYRINGS=()β additional keyrings to use for package verification with apt, not used for debootstrap (use$DEBOOTSTRAPOPTSfor that). use this to add (local) signed repositories. by default thedebian-archive-keyringpackage inside the chroot is used.
keyrings are copied into /etc/apt/trusted.gpg.d in the chroot. APT supports it since version 0.7.25.1, firstly available in the Debian release codenamed "squeeze" (released on 2011). for older chroots, use a G hook to run apt-key manually.
DEBOOTSTRAP=debootstrapβ use this option to switch the implementation of debootstrap. known implementations of debootstrap arecdebootstrapanddebootstrap.export DEBIAN_FRONTEND=noninteractiveβ sets the interactiveness of the pbuilder run. setting this value to blank will cause the pbuilder run to be interactive. change this value when noninteractive upgrades do not work.DISTRIBUTION=sidβ the default distribution to use. this option only affects when doingpbuilder createor when--override-configis specified for thepbuilder updateoption.EXTRAPACKAGES="ccache lintian XXX"β extra packages which the system should install in the chroot onpbuilder create. this is a space-delimited list. also, this is installed onpbuilder update. πHOOKDIR=/usr/lib/pbuilder/hooksβ the default location for the user hooks directory. this is overridden with the option--hookdir.
if this is specified, hooks are searched for in the chroot, when running pbuilder. if it is not defined, or is an empty string, hooks are not executed.
for details, see pbuilder(8).
LOGLEVEL=Iβ how much output you want from pbuilder. valid values areE(errors only),W(errors and warnings),I(errors, warnings and informational) andD(everything including some debug messages). pick your chaos level πUSECOLORS=autoβ whether you'd like to see colored output from pbuilder. valid values areauto(to try to automatically detect whether the terminal supports them),yes(to always use colors), andno(to never use colors). and yes, the colors are cute πMIRRORSITE=http://www.jp.debian.org/debianβ the mirror site which contains the main Debian distribution.
note that you cannot really use file:/ kind of URL, because the location needs to be accessible from within the chroot.
OTHERMIRROR=deb http://xxx/xxx/ ./ [| other deb lines... ]β the lines which are added to thesources.list, delimited with|. like:
deb http://local/mirror sid main|deb file:/usr/local/mirror ./
the deb lines here are the ones that will appear at the top of the sources.list inside the chroot. be sure to follow the syntax rules of sources.list(5). these lines appear at the beginning of the constructed sources file, so this is the place to list your local mirror sites; apt will then use them in preference to the ones listed in MIRRORSITE.
to make changes on mirror site effective on update, --override-config needs to be specified.
okay that's part 1 bestie, don't go anywhere β more is coming π
β¨ OPTIONS β¨
okay bestie, here's the whole vibe check on every config option you can set in pbuilderrc. it's giving "control freak but make it useful" π
PDEBUILD_PBUILDER=pbuilderβ tells pdebuild which pbuilder implementation to use. right now you can pickpbuilderorcowbuilderβ choose your fighter! π₯PKGNAME_LOGFILE_EXTENSION=_$(dpkg --print-architecture).buildβ this is the file extension used for the logfile when you turn on thepkgname-logfileoption. it's literally_$(dpkg --print-architecture).buildby default, so it's architecture-aware, slay! ποΈPKGNAME_LOGFILE=yesβ if set toyes, it always runs with the--pkgname-logfileoption, so you get a logfile named after the package. no more guessing which log is which! πPBUILDERROOTCMD=sudo -Eβ this is the command used when pdebuild invokespbuilder build. default issudo -E, so you get root powers with environment preserved. πͺPBUILDERSATISFYDEPENDSCMD=/usr/lib/pbuilder/pbuilder-satisfydependsβ this is the command pbuilder uses to satisfy (aka install) build-dependencies. here are the available implementations you can pick from:pbuilder-satisfydepends-aptβ the newest implementation, which leverage the ability of apt 1.4 to satisfy build dependencies and build conflicts from a .dsc; useful since it's pretty fast and doesn't require the installation of any non-required package in the chroot, nor of dummy packages.pbuilder-satisfydepends-experimentalβ might be useful to pull packages from repositories with a low APT Pin Priority (for example, Debian's experimental or stable-backports).pbuilder-satisfydepends-aptitudeβ will resolve build-dependencies and build-conflicts with aptitude which helps dealing with complex cases but does not support unsigned APT repositories.pbuilder-satisfydepends-gdebiβ will resolve build-dependencies using gdebi, faster than classic implementation, and does not require installation of a dummy package like the aptitude implementation.pbuilder-satisfydepnds-classicβ the "classic" implementation, which was the original implementation used by default until v0.172.
the default is now "aptitude". so if you don't touch anything, you're getting aptitude. periodt.
PBUILDERSATISFYDEPENDSOPT=()β an array of extra flags you want to pass topbuilder-satisfydepends. it's empty by default, so you can add your own spice. πΆοΈSOURCE_ONLY_CHANGES=yesβ decides whether to generate an extra.changesfile for a source-only upload, while still making a full.changesfile for any binary packages you build. default isyes, so you get both! β¨ALLOWUNTRUSTED=noβ if you set this toyes, it allows untrusted (no key installed) and unsigned repositories. β οΈ warning: enabling this could let remote attackers compromise your system. seriously, better to use signed repositories and$APTKEYRINGSto add the key(s). stay safe, bestie! πAPTGETOPT=()β extra flags to give toapt-get. empty by default, so go wild. ποΈAPTITUDEGETOPT=()β extra flags to give toaptitude. also empty by default. ποΈDEBDELTA=noβ set toyesto use debdelta to download needed updates in the chroot, ifdebdeltais already installed. default isno. it's like delta compression for your packages! π¦REMOVEPACKAGES=liloβ lets you specify packages to remove when creatingbase.tgz. default islilo. and leavingliloin the chroot is like keeping a timebomb... π£ so yeah, remove it!TIMEOUT_TIME=2hβ sets the timeout time. the build gets stopped withSIGTERMafter that time. default is2h. so you've got two hours, make them count! β°USEDEVFS=noβ whether to mount a devfs or not. default isno. but heads up: it has no effect on kFreeBSD, because a devfs (and fdescfs for/dev/fd) is always used there. π§USEDEVPTS=yesβ set toyesif you want to mount the/dev/ptsinterface. it's usually a good idea, because tons of software fail miserably when/dev/ptsisn't mounted. default isyes, so you're covered. πUSESYSFS=yesβ whether to mount a sysfs (orlinsysfsfor kFreeBSD) in/sys. default isyes. it has no effect on GNU/Hurd hosts, where sysfs isn't available. but it's usually a good idea because several software require/systo be populated. π³USENETWORK=noβ set toyeswhen you do not want to disable network access during the build. wait, double negative? basically, default isno(network disabled). network isn't available on a Debian buildd, so you might want to keep the default. oh, and disabling network access currently only works on Linux. π§π«USECGROUP=yesβ set toyesto use a cgroup to isolate build processes, so any stray processes from the build get cleaned up afterwards. default isyes. this currently only works on Linux systems running systemd. so systemd girlies, you're set! π§ΌUSESHM=yesβ set toyesto mount the/dev/shmmount point. default isyes. it's usually a good idea so software that expects shm actually works./run/shmwill be configured as a symbolic link to/dev/shm. this option used to be namedUSERUNSHMβ for compatibility, the old name is still supported, and if set it'll override anyUSESHM. it has no effect on GNU/Hurd hosts due to bugs in/hurd/tmpfs; since/devis always bind-mounted, the host's/dev/shmwill be used. π§USE_PDEBUILD_INTERNAL=yesβ when set toyes, thepdebuild-internalimplementation of pdebuild is used. default isyes. so you're already using the internal one! π§USEPROC=yesβ set toyesto mount the/procinterface. default isyes. it's usually a good idea, because many software fail miserably when/procisn't mounted. πADDITIONAL_BUILDRESULTS=(foo "bar*" "baz\ biz")β an array of extra files to copy out of the build area. example default:(foo "bar*" "baz\ biz"). if you need a wildcard (like*.changes), quote it so the wildcard is escaped and not expanded when the config loads, but instead expanded at run time when the additional build artifacts are exported. spaces in file names need to be escaped with a\or a wildcard to match the space. so fancy! πCONFDIR=/etc/pbuilder/conf_filesβ pbuilder copies some config files (like/etc/hostsor/etc/hostname) from the host system into the chroot. if the directory specified here (default/etc/pbuilder/conf_files) exists and contains one of the copied files (without the leading/etc), that file will be copied from here instead of the system one. so you can override stuff! πBUILD_HOME=/nonexistentβ sets what theHOMEenvironment variable points to during builds. default is/nonexistentβ a non-existing directory β to prevent builds from writing toHOME, which is reserved for users. if you need a workingHOME, you can set it to$BUILDDIRinstead. stay out of my home directory! πBINNMU_MAINTAINER=β sets the maintainer name and email in the changelog during binNMU. that value then gets copied to theChanged-Byfield of the.changesfile. default is empty. you can also set it at run time with the--bin-nmu-maintainercommand line option. βοΈ
π AUTHOR π
initial coding and main maintenance is done by Junichi Uekawa <dancer@debian.org>. user hooks code was added by Dale Amon <amon@vnl.com>. the homepage is available at https://pbuilder-team.pages.debian.net/pbuilder/ β go check it out! π
π FILES π
/etc/pbuilderrc, $HOME/.pbuilderrc β these are the config files pbuilder reads. so you know where to put your customizations. πΎ
π SEE ALSO π
/usr/share/doc/pbuilder/pbuilder-doc.html, cowbuilder(8), pbuilder(8), pdebuild(1) β go read these if you want more pbuilder goodness. π
and that's a wrap! this iconic page is from Debian, dated 2016 March, and it's the pbuilderrc(5) manual page. stay slaying, bestie! π
β¨
π¦ where this page comes from
- debian bookworm: pbuilder 0.231 Β· GPL-2.0-or-later
- debian trixie: pbuilder 0.231.1 Β· GPL-2.0-or-later
- epel 10: pbuilder 0.231.1-5.el10_1 Β· GPL-2.0-or-later
- epel 9: pbuilder 0.231.1-4.el9 Β· GPL-2.0-or-later
- fedora 43: pbuilder 0.231.1-6.fc43 Β· GPL-2.0-or-later
- fedora 44: pbuilder 0.231.3-2.fc44 Β· GPL-2.0-or-later
- opensuse-leap 16.0: pbuilder 0.231-bp160.1.4 Β· GPL-2.0-or-later
- ubuntu jammy: pbuilder 0.231build1 Β· GPL-2.0-or-later
- ubuntu noble: pbuilder 0.231build1 Β· GPL-2.0-or-later
- ubuntu questing: pbuilder 0.231.1
- ubuntu resolute: pbuilder 0.231.3 Β· GPL-2.0-or-later
- ubuntu stonking: pbuilder 0.231.3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms