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 forany,all.fullβ generate build info with all three types of build dependencies. this is an alias forany,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 isdebian/control.-lchangelog-fileβ specifies the changelog file to read info from. the default isdebian/changelog.-ffiles-list-fileβ specifies where the list of files that have been produced by the build lives, instead of usingdebian/files.-Fchangelog-formatβ specifies the format of the changelog. peepdpkg-parsechangelog(1)for the info about alternative formats.-O[filename]β prints the buildinfo file to standard output (or tofilenameif you specified one) instead of writing it todir/source-name_binary-version_arch.buildinfoβ wherediris..by default, orupload-files-dirif-uwas used. π€-uupload-files-dirβ look for the files to be uploaded inupload-files-dirrather than... (dpkg-genbuildinfoneeds to find these files so it can include their sizes and checksums in the.buildinfofile, iykyk π)--always-include-kernelβ by default, theBuild-Kernel-Versionfield will not be written out. specify this option to always write aBuild-Kernel-Versionfield when generating the.buildinfo. supported since dpkg 1.19.0.--always-include-pathβ by default, theBuild-Pathfield 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 aBuild-Pathfield when generating the.buildinfo. π--admindir=dirβ changes the location of the dpkg database. the default location is/var/lib/dpkg.-qβdpkg-genbuildinfomight produce informative messages on standard error, and-qsuppresses 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.buildinfofile, via thebuildinfooption. 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 theBuild-Pathfield. 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.buildinfofile. 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 theBuild-Architecturefield, and the check for the cross-compilation mode.DEB_HOST_ARCHβ sets the host architecture. this affects the filename used for the.buildinfofile, and the check for the cross-compilation mode.DPKG_COLORSβ sets the color mode. the currently accepted values are:auto(default),alwaysandnever. 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:0and1(default). supported since dpkg 1.19.0.
π FILES π
debian/filesβ the list of generated files.dpkg-genbuildinforeads the data here when producing a.buildinfofile.
π₯ 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
- 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