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) β€” a Dpkg::Control::Info object. 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 to fakeroot if that's available; otherwise the module will error out πŸ’€
  • as_root β€” a boolean that forces debian/rules target 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 the debian/rules file plus any additional arguments. Defaults to debian/rules πŸ“
⚠️ Note: this option is only relevant for drivers that use debian/rules.
  • rrr_override β€” a string that overrides the Rules-Requires-Root field 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