dh_bugfiles - Linux


Overview

dh_bugfiles automatically creates bug report archives by turning files matching a given pattern into a diff against the files present in the installed Debian package. These archives are usable by the Debian Bug Tracking System (BTS).

Syntax

dh_bugfiles [DEBIAN_EXTRA_ARGS] [debhelper_options]

Options/Flags

  • -b, –build-info
    Shows the installed Debian package’s build information (typically found in /usr/share/doc/package-name/changelog.Debian).

  • -D, –directory=DIR:
    Specifies the directory containing the package source files (default: current directory).

  • -E, –email=EMAIL:
    Appends an "Upstream-Contact" field with the provided email address to the bug report’s description.

  • -p, –pattern=PATTERN:
    Specifies the pattern to match files against (default: debian/*).

  • -s, –summary=SUMMARY:
    Sets the bug report’s summary (default: New ${pkg} bug report).

  • -S, –config=FILE:
    Uses the provided configuration file instead of the one at /usr/share/debhelper/bugfiles.conf.

  • -t, –template=TEMPLATE:
    Uses the provided template for generating the bug report description (default: /usr/share/debhelper/bugfiles.tmpl).

Examples

Create a bug report archive for the foo package:

dh_bugfiles

Create an archive including only files matching the pattern debian/control* and set a custom bug report summary:

dh_bugfiles -p debian/control* -s "Bug with control files in foo package"

Common Issues

  • Missing configuration file: Ensure the file at /usr/share/debhelper/bugfiles.conf exists and is readable.

  • No files match the pattern: Verify the pattern you specified correctly matches the files you want to include.

Integration

Combine dh_bugfiles with the dch command to create a new Debian changelog entry and automatically attach the bug report archive:

dch -b --attach-bug=PATCH.GZ --urgency=medium "Fixed a bug with control files"

Related Commands

  • debhelper – The Debian helper program suite
  • dch – Create and edit Debian changelogs
  • dinstall – Install Debian packages