LinuxCommandLibrary

debchange

Update Debian changelog files

TLDR

Add a new version for a non-maintainer upload to the changelog

$ debchange --nmu
copy

Add a changelog entry to the current version
$ debchange --append
copy

Add a changelog entry to close the bug with specified ID
$ debchange --closes [bug_id]
copy

SYNOPSIS

debchange [options] [version]

PARAMETERS

-a, --append message
    Append message to the last changelog entry.

-b, --bpo
    Create a backport changelog entry.

-c, --closes bugs
    Add closes clauses for the listed bugs. Bugs should be comma-separated.

-e, --edit
    Edit the changelog entry after creation.

-f, --force-bad-version
    Force the creation of a changelog entry even if the version is invalid.

-i, --increment
    Increment the version number.

-n, --new-version version
    Create a new changelog entry with the specified version.

-N, --nmu
    Create a non-maintainer upload (NMU) changelog entry.

-r, --release
    Mark the package as released.

-s, --sign
    Sign the changelog entry with gpg.

-v, --version
    Show program's version number and exit.

-h, --help
    Show this help message and exit.

DESCRIPTION

debchange is a command-line tool used to manage Debian changelog files (debian/changelog). It simplifies tasks such as adding new changelog entries, incrementing package versions, and ensuring proper changelog formatting according to Debian policy.

It automates many tedious steps involved in updating the changelog, reducing the risk of errors and saving time. The tool typically interacts with version control systems and text editors to streamline the changelog management process. debchange ensures the changelog adheres to Debian packaging standards, which is critical for building and distributing Debian packages properly. It supports different workflows, including those for both maintainer uploads and non-maintainer uploads (NMUs). Its versatility makes it invaluable for Debian package maintainers and developers.

CAVEATS

It requires a properly structured debian directory within your package source. Incorrectly formatted changelogs can cause build failures.

CONFIGURATION

debchange can be configured through environment variables and configuration files (e.g., ~/.devscripts). This allows customizing the editor used, GPG signing behavior, and other aspects of its operation.

EXAMPLES

Creating a new changelog entry with the version number 1.0-1:
debchange -n 1.0-1

Appending a message to the last changelog entry:
debchange -a "Fixes a minor bug."

Creating an NMU changelog entry:
debchange -N

HISTORY

debchange has been part of the devscripts package for a significant period. It was developed to standardize and ease Debian changelog management. Its evolution has mirrored the evolving requirements of Debian packaging policy. Over time, features like NMU support and integration with version control systems were added to address common development workflows.

SEE ALSO

dpkg-buildpackage(1), debuild(1), apt(8)

Copied to clipboard