dpkg-genbuildinfo(1)

πŸ’… NAME πŸ’…

ok so this is dpkg-genbuildinfo from the dpkg suite, and it's literally the program that generates Debian .buildinfo files. that's the whole gig. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

dpkg-genbuildinfo [option...]

🌸 DESCRIPTION 🌸

okay bestie, picture this: your source tree is already unpacked and built, right? dpkg-genbuildinfo just waltzes in, reads all the info from that tree and from the files it generated, and then writes you a Debian control file that describes the whole build environment plus all the build artifacts. that file is your .buildinfo file. slay. πŸ“¦πŸ’–

also fun fact: this program was introduced in dpkg 1.18.11, so it's been serving looks for a minute.


✨ OPTIONS ✨

  • --build=type β€” tells it which build type you want, given as a comma-separated list of components. the allowed values are, and I cannot stress this enough, listed right below πŸ‘‡
    • any β€” generate build info that includes the unqualified build dependencies (Build-Depends) and the architecture specific build dependencies (Build-Depends-Arch).
    • all β€” generate build info that includes the unqualified build dependencies (Build-Depends) and the architecture independent build dependencies (Build-Depends-Indep).
    • source β€” lowkey ignored, fr. it generates build info with just the unqualified build dependencies (Build-Depends).
    • binary β€” generate build info with all three types of build dependencies. this is an alias for any,all.
    • full β€” generate build info with all three types of build dependencies. this is an alias for any,all,source, and it's the same as the default case when no build option is specified.
  • -ccontrolfile β€” specifies the main source control file to read info from. the default is debian/control.
  • -lchangelog-file β€” specifies the changelog file to read info from. the default is debian/changelog.
  • -ffiles-list-file β€” specifies where the list of files that have been produced by the build lives, instead of using debian/files.
  • -Fchangelog-format β€” specifies the format of the changelog. peep dpkg-parsechangelog(1) for the info about alternative formats.
  • -O[filename] β€” prints the buildinfo file to standard output (or to filename if you specified one) instead of writing it 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 it can include their sizes and checksums in the .buildinfo file, iykyk πŸ”)
  • --always-include-kernel β€” by default, the Build-Kernel-Version field will not be written out. specify this option to always write a Build-Kernel-Version field when generating the .buildinfo. supported since dpkg 1.19.0.
  • --always-include-path β€” by default, the Build-Path field only gets written if the current directory starts with an allowed pattern. on Debian and derivatives, that 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 β€” changes the location of the dpkg database. the default location is /var/lib/dpkg.
  • -q β€” dpkg-genbuildinfo might produce informative messages on standard error, and -q suppresses those messages. quiet queen behavior 🀫
  • -?, --help β€” show the usage message and exit.
  • --version β€” show the version and exit.

🌈 ENVIRONMENT 🌈

  • DEB_BUILD_OPTIONS β€” you can use this variable to enable or disable various features that affect the info included in the .buildinfo file, via the buildinfo option. 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. supported since dpkg 1.18.19. 🫢
  • DEB_BUILD_PROFILES β€” if it's set, it gets used as the active build profile(s) when generating the .buildinfo file. it's a space separated list of profile names, without any exclamation marks. no ! allowed, periodt.
  • DEB_BUILD_ARCH β€” sets the build architecture. this affects the value for the Build-Architecture field, and the check for the cross-compilation mode.
  • DEB_HOST_ARCH β€” sets the host architecture. this affects the filename used for the .buildinfo file, and the check for the cross-compilation mode.
  • DPKG_COLORS β€” sets the color mode. the currently accepted values are: auto (default), always and never. supported since dpkg 1.18.5. 🎨
  • DPKG_NLS β€” if set, it gets used to decide whether to activate Native Language Support, also known as internationalization (or i18n) support. the accepted values are: 0 and 1 (default). supported since dpkg 1.19.0.

πŸŽ€ FILES πŸŽ€

  • debian/files β€” the list of generated files. dpkg-genbuildinfo reads the data here when producing a .buildinfo file.

πŸ”₯ SEE ALSO πŸ”₯

deb-buildinfo(5) β€” go read it, bestie, it's the whole other half of the lore.


πŸ’€ real talk though: every flag above is doing actual work, so don't go renaming things or assuming extra behavior. what you see is what you get, and what you get is exactly what's documented. no cap.

and that's the page!! brought to you by dpkg suite, version 1.23.11-dirty, dated 2026-09-09 β€” mwah, ily, go build something iconic πŸ§šπŸ’œπŸ“

πŸ“¦ where this page comes from