Dpkg::BuildDriver(3perl)
π Dpkg::BuildDriver β like, the manual, but make it make sense
okay so bestie, welcome to Dpkg::BuildDriver(3perl) from libdpkg-perl β¨ this is the little class that drives the build of a Debian package, and I'm gonna walk you through it like we're texting at 2am π«Ά
πΈ NAME πΈ
Dpkg::BuildDriver β the thing that drives the build of a Debian package π
π¦ DESCRIPTION π¦
So dpkg-buildpackage uses this class to drive the build of a Debian package. That's literally its whole job, and it ate π
β οΈ Note: this is a private module, which means its API can change at any time. No cap. Don't build your whole personality around it staying the same π
π METHODS π
β¨ $bd = Dpkg::BuildDriver->new(%opts)
Creates a shiny new Dpkg::BuildDriver object π It'll load a build driver module as requested in the Build-Drivers field of the $opts{ctrl} Dpkg::Control::Info object β and if that field isn't present, it just falls back to loading the default debian-rules driver. lowkey graceful, honestly.
Options, bestie:
ctrl(required) β aDpkg::Control::Infoobject. It's required, so likeβ¦ don't forget it πroot_cmdβ a string with the gain-root-command to use when you need to execute a command with root-like rights. If it's needed and unset, it defaults tofakerootif that's available; otherwise the module will error out πas_rootβ a boolean that forcesdebian/rulestarget calls as root-like, even if they'd normally not need to be executed as root-like. This option applies to all targets globally π
β οΈ Note: this option is only relevant for drivers that use debian/rules.
debian_rulesβ an array containing the command to execute thedebian/rulesfile plus any additional arguments. Defaults todebian/rulesπ
β οΈ Note: this option is only relevant for drivers that use debian/rules.
rrr_overrideβ a string that overrides theRules-Requires-Rootfield value π
β οΈ Note: this option is only relevant for drivers that use debian/rules.
β¨ $bd->pre_check()
Runs build-driver-specific checks before anything else β like a vibe check but for your build π₯
It runs after the init hook, and before dpkg-source --before-build.
β οΈ Note: this is an optional method that can be omitted from the driver implementation. no pressure π
β¨ $bool = $bd->need_build_task($build_task, binary_task)
Returns whether we need to use the build task. That's it, that's the method π
β οΈ Note: this method is needed for as long as we support building as root-like. Once that's not needed, this method will be deprecated π«
β¨ $bd->run_build_task($build_task, $binary_task)
Executes the build task for the build. go off, king π
β οΈ Note: this is an optional method, needed for as long as we support building as root-like. Once that's not needed, this method will be deprecated π«
β¨ $bd->run_task($task)
Executes the given task for the build. simple, iconic, does what it says on the tin π¦
π§ CHANGES π§
πΈ Version 0.xx
This is a private module. that's the whole changelog, bestie π
anyway, that's the page!! this was Dpkg::BuildDriver(3perl) from libdpkg-perl, version 1.23.11-dirty, dated 2026-09-09 π mwah, go build something iconic πβ¨
π¦ where this page comes from
- arch rolling: dpkg 1.23.11-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms