dpkg-genbuildinfo â generate Debian .buildinfo files
| Use Case | Command | Description |
|---|---|---|
| đĻ Generate default .buildinfo | dpkg-genbuildinfo | Reads built source tree, generates build info file |
| đī¸ Specify build type | dpkg-genbuildinfo --build=type | Set build type: any, all, source, binary, full |
| đ Use custom control file | dpkg-genbuildinfo -c debian/control | Read main source control info from custom path |
| đ Output to stdout | dpkg-genbuildinfo -O | Print buildinfo to standard output (or -O filename) |
| đ§ Always include kernel version | dpkg-genbuildinfo --always-include-kernel | Force Build-Kernel-Version field output |
| đ Always include build path | dpkg-genbuildinfo --always-include-path | Force Build-Path field output |
| đ Suppress messages | dpkg-genbuildinfo -q | Quiet mode â suppress informative stderr messages |
| â Show help | dpkg-genbuildinfo --help | Display usage message and exit |
dpkg-genbuildinfo [option...]
dpkg-genbuildinfo reads information from an unpacked and built Debian source tree and from the files it has generated and generates a Debian control file describing the build environment and the build artifacts (.buildinfo file).
âąī¸ This command was introduced in dpkg 1.18.11.
--build=type
đ Specifies the build type from a comma-separated list of components.
The allowed values are:
-ccontrolfile
đ Specifies the main source control file to read information from. The default is debian/control.
-lchangelog-file
đ Specifies the changelog file to read information from. The default is debian/changelog.
-ffiles-list-file
đ Specifies where is the list of files that have been produced by the build, rather than using debian/files.
-Fchangelog-format
đ Specifies the format of the changelog. See dpkg-parsechangelog(1) for information about alternative formats.
-O[filename]
đ¨ī¸ Print the buildinfo file to standard output (or filename if specified) rather than to dir/source-name_binary-version_arch.buildinfo (where dir is .. by default or upload-files-dir if -u was used).
-uupload-files-dir
đ Look for the files to be uploaded in upload-files-dir rather than .. (dpkg-genbuildinfo needs to find these files so that it can include their sizes and checksums in the .buildinfo file).
--always-include-kernel
đ§ By default, the Build-Kernel-Version field will not be written out.
Specify this option (since dpkg 1.19.0) to always write a Build-Kernel-Version field when generating the .buildinfo.
--always-include-path
đ By default, the Build-Path field will only be written if the current directory starts with an allowed pattern.
On Debian and derivatives the pattern matches on /build/ at the start of the pathname.
Specify this option to always write a Build-Path field when generating the .buildinfo.
--admindir=dir
đī¸ Change the location of the dpkg database. The default location is /var/lib/dpkg.
-q
đ dpkg-genbuildinfo might produce informative messages on standard error. -q suppresses these messages.
-?, --help
â Show the usage message and exit.
--version
âšī¸ Show the version and exit.
DEB_BUILD_OPTIONS
đ§ This variable can be used to enable or disable various features that affect the information included in the .buildinfo file, via the buildinfo option (since dpkg 1.18.19). This option contains a comma-separated list of features, prefixed with the '+' or '-' modifiers, to denote whether to enable or disable them. The special feature "all" can be used to enable or disable all other features. The feature "path" controls whether to unconditionally include the Build-Path field.
DPKG_COLORS
đ¨ Sets the color mode (since dpkg 1.18.5). The currently accepted values are: auto (default), always and never.
DPKG_NLS
đ If set, it will be used to decide whether to activate Native Language Support, also known as internationalization (or i18n) support (since dpkg 1.19.0). The accepted values are: 0 and 1 (default).
debian/files
đ The list of generated files. dpkg-genbuildinfo reads the data here when producing a .buildinfo file.
đĄ Generated from dpkg 1.21.1 (2025-09-09)
Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-03 16:30 @216.73.216.51
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)