{
    "mode": "man",
    "parameter": "dpkg-genbuildinfo",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/dpkg-genbuildinfo/1/json",
    "generated": "2026-05-30T05:16:38Z",
    "synopsis": "dpkg-genbuildinfo [option...]",
    "sections": {
        "NAME": {
            "content": "dpkg-genbuildinfo - generate Debian .buildinfo files\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "dpkg-genbuildinfo [option...]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "dpkg-genbuildinfo reads information from an unpacked and built Debian source tree and from\nthe files it has generated and generates a Debian control file describing the build\nenvironment and the build artifacts (.buildinfo file).\n\nThis command was introduced in dpkg 1.18.11.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "--build=type\nSpecifies the build type from a comma-separated list of components.\n\nThe allowed values are:\n\nany Generate build information including unqualified build dependencies (Build-Depends)\nand architecture specific build dependencies (Build-Depends-Arch).\n\nall Generate build information including unqualified build dependencies (Build-Depends)\nand architecture independent build dependencies (Build-Depends-Indep).\n\nsource\nEffectively ignored; generate build information with just the unqualified build\ndependencies (Build-Depends).\n\nbinary\nGenerate build information with all three types of build dependencies.  This is an\nalias for any,all.\n\nfull\nGenerate build information with all three types of build dependencies.  This is an\nalias for any,all,source, and the same as the default case when no build option is\nspecified.\n",
            "subsections": [
                {
                    "name": "-c",
                    "content": "Specifies the main source control file to read information from. The default is\ndebian/control.\n",
                    "flag": "-c"
                },
                {
                    "name": "-l",
                    "content": "Specifies the changelog file to read information from. The default is debian/changelog.\n",
                    "flag": "-l"
                },
                {
                    "name": "-f",
                    "content": "Specifies where is the list of files that have been produced by the build, rather than\nusing debian/files.\n",
                    "flag": "-f"
                },
                {
                    "name": "-F",
                    "content": "Specifies the format of the changelog. See dpkg-parsechangelog(1) for information about\nalternative formats.\n",
                    "flag": "-F"
                },
                {
                    "name": "-O",
                    "content": "Print the buildinfo file to standard output (or filename if specified) rather than to\ndir/source-namebinary-versionarch.buildinfo (where dir is .. by default or upload-\nfiles-dir if -u was used).\n",
                    "flag": "-O"
                },
                {
                    "name": "-u",
                    "content": "Look for the files to be uploaded in upload-files-dir rather than ..  (dpkg-genbuildinfo\nneeds to find these files so that it can include their sizes and checksums in the\n.buildinfo file).\n",
                    "flag": "-u"
                },
                {
                    "name": "--always-include-kernel",
                    "content": "By default, the Build-Kernel-Version field will not be written out.\n\nSpecify this option (since dpkg 1.19.0) to always write a Build-Kernel-Version field when\ngenerating the .buildinfo.\n",
                    "long": "--always-include-kernel"
                },
                {
                    "name": "--always-include-path",
                    "content": "By default, the Build-Path field will only be written if the current directory starts\nwith an allowed pattern.\n\nOn Debian and derivatives the pattern matches on /build/ at the start of the pathname.\n\nSpecify this option to always write a Build-Path field when generating the .buildinfo.\n\n--admindir=dir\nChange the location of the dpkg database. The default location is /var/lib/dpkg.\n",
                    "long": "--always-include-path"
                },
                {
                    "name": "-q -q",
                    "content": "these messages.\n\n-?, --help\nShow the usage message and exit.\n",
                    "flag": "-q"
                },
                {
                    "name": "--version",
                    "content": "Show the version and exit.\n",
                    "long": "--version"
                }
            ]
        },
        "ENVIRONMENT": {
            "content": "DEBBUILDOPTIONS\nThis variable can be used to enable or disable various features that affect the\ninformation included in the .buildinfo file, via the buildinfo option (since dpkg\n1.18.19).  This option contains a comma-separated list of features, prefixed with the ‘+’\nor ‘-’ modifiers, to denote whether to enable or disable them.  The special feature “all”\ncan be used to enable or disable all other features.  The feature “path” controls whether\nto unconditionally include the Build-Path field.\n\nDPKGCOLORS\nSets the color mode (since dpkg 1.18.5).  The currently accepted values are: auto\n(default), always and never.\n\nDPKGNLS\nIf set, it will be used to decide whether to activate Native Language Support, also known\nas internationalization (or i18n) support (since dpkg 1.19.0).  The accepted values are:\n0 and 1 (default).\n",
            "subsections": []
        },
        "FILES": {
            "content": "",
            "subsections": [
                {
                    "name": "debian/files",
                    "content": "The list of generated files.  dpkg-genbuildinfo reads the data here when producing a\n.buildinfo file.\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "deb-buildinfo(5).\n\n\n\n1.21.1                                       2025-09-09                         dpkg-genbuildinfo(1)",
            "subsections": []
        }
    },
    "summary": "dpkg-genbuildinfo - generate Debian .buildinfo files",
    "flags": [
        {
            "flag": "-c",
            "long": null,
            "arg": null,
            "description": "Specifies the main source control file to read information from. The default is debian/control."
        },
        {
            "flag": "-l",
            "long": null,
            "arg": null,
            "description": "Specifies the changelog file to read information from. The default is debian/changelog."
        },
        {
            "flag": "-f",
            "long": null,
            "arg": null,
            "description": "Specifies where is the list of files that have been produced by the build, rather than using debian/files."
        },
        {
            "flag": "-F",
            "long": null,
            "arg": null,
            "description": "Specifies the format of the changelog. See dpkg-parsechangelog(1) for information about alternative formats."
        },
        {
            "flag": "-O",
            "long": null,
            "arg": null,
            "description": "Print the buildinfo file to standard output (or filename if specified) rather than to dir/source-namebinary-versionarch.buildinfo (where dir is .. by default or upload- files-dir if -u was used)."
        },
        {
            "flag": "-u",
            "long": null,
            "arg": null,
            "description": "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)."
        },
        {
            "flag": "",
            "long": "--always-include-kernel",
            "arg": null,
            "description": "By default, the Build-Kernel-Version field will not be written out. Specify this option (since dpkg 1.19.0) to always write a Build-Kernel-Version field when generating the .buildinfo."
        },
        {
            "flag": "",
            "long": "--always-include-path",
            "arg": null,
            "description": "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 Change the location of the dpkg database. The default location is /var/lib/dpkg."
        },
        {
            "flag": "-q",
            "long": null,
            "arg": null,
            "description": "these messages. -?, --help Show the usage message and exit."
        },
        {
            "flag": "",
            "long": "--version",
            "arg": null,
            "description": "Show the version and exit."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "deb-buildinfo",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/deb-buildinfo/5/json"
        }
    ]
}