dpkg-genbuildinfo(1) dpkg suite dpkg-genbuildinfo(1)

# [NAME](#NAME)

dpkg-genbuildinfo - generate Debian .buildinfo files

# [SYNOPSIS](#SYNOPSIS)

**dpkg-genbuildinfo** \[*option*...]

# [DESCRIPTION](#DESCRIPTION)

**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 program was introduced in dpkg 1.18.11.

# [OPTIONS](#OPTIONS)

[**--build=type**](#build=)

Specifies the build *type* from a comma-separated list of components.

The allowed values are:

[**any**](#any)

Generate build information including unqualified build dependencies (**Build-Depends**) and architecture specific build dependencies (**Build-Depends-Arch**).

[**all**](#all)

Generate build information including unqualified build dependencies (**Build-Depends**) and architecture independent build dependencies (**Build-Depends-Indep**).

[**source**](#source)

Effectively ignored; generate build information with just the unqualified build dependencies (**Build-Depends**).

[**binary**](#binary)

Generate build information with all three types of build dependencies. This is an alias for **any,all**.

[**full**](#full)

Generate build information with all three types of build dependencies. This is an alias for **any,all,source**, and the same as the default case when no build option is specified.

[**-ccontrolfile**](#c)

Specifies the main source control file to read information from. The default is **debian/control**.

[**-lchangelog-file**](#l)

Specifies the changelog file to read information from. The default is **debian/changelog**.

[**-ffiles-list-file**](#f)

Specifies where is the list of files that have been produced by the build, rather than using **debian/files**.

[**-Fchangelog-format**](#F)

Specifies the format of the changelog. See [**dpkg-parsechangelog**(1)](/man/os/dpkg/dpkg-parsechangelog.1) for information about alternative formats.

[**-O**\[*filename*\]](#O)

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**](#u)

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**](#always)

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**](#always~2)

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**](#admindir=)

Change the location of the **dpkg** database. The default location is */var/lib/dpkg*.

[**-q**](#q)

**dpkg-genbuildinfo** might produce informative messages on standard error. **-q** suppresses these messages.

**-?**, **--help**

Show the usage message and exit.

[**--version**](#version)

Show the version and exit.

# [ENVIRONMENT](#ENVIRONMENT)

[**DEB\_BUILD\_OPTIONS**](#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. 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**](#DEB_BUILD_PROFILES)

If set, it will be used as the active build profile(s) to use when generating the .buildinfo file. It is a space separated list of profile names, without any exclamation marks.

[**DEB\_BUILD\_ARCH**](#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**](#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**](#DPKG_COLORS)

Sets the color mode. The currently accepted values are: **auto** (default), **always** and **never**.

Supported since dpkg 1.18.5.

[**DPKG\_NLS**](#DPKG_NLS)

If set, it will be 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](#FILES)

[**debian/files**](#debian/files)

The list of generated files. **dpkg-genbuildinfo** reads the data here when producing a **.buildinfo** file.

# [SEE ALSO](#SEE_ALSO)

[**deb-buildinfo**(5)](/man/os/dpkg/deb-buildinfo.5).

2026-09-09 1.23.11-dirty

---

Document: dpkg-genbuildinfo(1) from dpkg 1.23.11-r2 (Chainguard OS)
Source: https://git.dpkg.org/git/dpkg/dpkg.git
