dpkg-gencontrol โ generate Debian control files
| Use Case | Command | Description |
|---|---|---|
| ๐ Output control file to stdout | dpkg-gencontrol -O | Print control file to standard output |
| ๐ฆ Set binary package version | dpkg-gencontrol -v1.2.3 | Set version number of generated binary package |
| ๐ฏ Select specific binary package | dpkg-gencontrol -pfoo | Generate info for binary package foo (required for multi-package source) |
| ๐ Override control file field | dpkg-gencontrol -DFoo=bar | Override or add an output control file field |
| ๐๏ธ Remove control file field | dpkg-gencontrol -UFoo | Remove an output control file field |
| ๐ Use custom control file | dpkg-gencontrol -cmycontrol | Specify main source control file (default: debian/control) |
| ๐ Use custom changelog | dpkg-gencontrol -lmyclog | Specify changelog file (default: debian/changelog) |
| ๐งน Generate info for custom build dir | dpkg-gencontrol -Pbuild/foo | Scan build/foo instead of debian/tmp |
| ๐ง Set substitution variable | dpkg-gencontrol -Vname=value | Set an output substitution variable |
dpkg-gencontrol [option...]
dpkg-gencontrol reads information from an unpacked Debian source tree and generates a binary package control file (which defaults to debian/tmp/DEBIAN/control); during this process it will simplify the relation fields.
Thus Pre-Depends, Depends, Recommends and Suggests are simplified in this order by removing dependencies which are known to be true according to the stronger dependencies already parsed. It will also remove any self-dependency (in fact it will remove any dependency which evaluates to true given the current version of the package as installed). Logically it keeps the intersection of multiple dependencies on the same package. The order of dependencies is preserved as best as possible: if any dependency must be discarded due to another dependency appearing further in the field, the superseding dependency will take the place of the discarded one.
The other relation fields (Enhances, Conflicts, Breaks, Replaces and Provides) are also simplified individually by computing the union of the various dependencies when a package is listed multiple times in the field.
dpkg-gencontrol also adds an entry for the binary package to debian/files.
debian/substvars. This option can be used multiple times to read substitution variables from multiple files (since dpkg 1.15.6).debian/control.debian/changelog.debian/files.debian/tmp. This value is used to find the default value of the Installed-Size substitution variable and control file field, and for the default location of the output file.debian/tmp/DEBIAN/control (or package-build-dir/DEBIAN/control if -P was used).deb-substvars(5), deb-src-control(5), deb-changelog(5), deb-control(5).
Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-01 02:08 @216.73.216.239
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)