# man > dpkg-genbuildinfo(1)

---
type: CommandReference
command: dpkg-genbuildinfo
mode: man
section: 1
source: man-pages
---

## Quick Reference

- `dpkg-genbuildinfo` — generate .buildinfo file for built Debian source tree
- `dpkg-genbuildinfo --build=any,all` — include build dependencies for binary and arch-indep
- `dpkg-genbuildinfo -c debian/control` — specify custom control file
- `dpkg-genbuildinfo -l debian/changelog` — specify custom changelog file
- `dpkg-genbuildinfo -O` — print .buildinfo to stdout
- `dpkg-genbuildinfo -u ../upload/` — look for files in upload directory
- `dpkg-genbuildinfo --always-include-kernel` — always include Build-Kernel-Version field
- `dpkg-genbuildinfo --always-include-path` — always include Build-Path field

## Name

dpkg-genbuildinfo — generate Debian .buildinfo files

## Synopsis

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

## Options

### Build type selection

- `--build=type` — generate build information for a comma-separated list of components: `any`, `all`, `source`, `binary` (alias for `any,all`), `full` (alias for `any,all,source`, default)

### Input files

- `-c` *file* — read main source control file (default: `debian/control`)
- `-l` *file* — read changelog file (default: `debian/changelog`)
- `-f` *file* — read list of produced files (default: `debian/files`)
- `-F` *format* — specify changelog format (see **dpkg-parsechangelog**(1))

### Output control

- `-O` [*filename*] — print .buildinfo to stdout (or *filename*) instead of default location
- `-u` *dir* — look for files to upload in *dir* (default: `..`)

### Content inclusion

- `--always-include-kernel` — always write **Build-Kernel-Version** field (since dpkg 1.19.0)
- `--always-include-path` — always write **Build-Path** field (since dpkg 1.19.0); by default only written if current directory starts with `/build/`

### Database and misc

- `--admindir=dir` — change dpkg database location (default: `/var/lib/dpkg`)
- `-q`, `--quiet` — suppress informational messages
- `-?`, `--help` — show usage message and exit
- `--version` — show version and exit

## Environment

- `DEB_BUILD_OPTIONS` — enable/disable features via `buildinfo` option (since dpkg 1.18.19); comma-separated list prefixed with `+` or `-`; special feature `all` toggles all others; feature `path` controls unconditional inclusion of **Build-Path**.
- `DPKG_COLORS` — set color mode: `auto` (default), `always`, `never` (since dpkg 1.18.5)
- `DPKG_NLS` — if set to `0` disables Native Language Support (since dpkg 1.19.0)

## Files

- `debian/files` — list of generated files read by **dpkg-genbuildinfo** when producing a .buildinfo file

## See Also

- [deb-buildinfo(5)](https://www.chedong.com/phpMan.php/man/deb-buildinfo/5/markdown)