LinuxCommandLibrary

debchange

Update Debian changelog files

TLDR

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

$ debchange [[-n|--nmu]]
copy

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

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

SYNOPSIS

debchange [options] [version]

PARAMETERS

-i, --increment
    Increments the version number, adding a new entry for the next development iteration.

-r, --release
    Creates a new changelog entry suitable for a package release. This typically sets the urgency to 'medium' and the distribution to 'unstable' (or a specified one).

-v version, --version version
    Specifies the exact version number for the new changelog entry, overriding the automatic increment.

-D distribution, --distribution distribution
    Sets the distribution (e.g., unstable, testing, stable, experimental) for the new entry.

-U urgency, --urgency urgency
    Sets the urgency of the change (e.g., low, medium, high, critical, emergency).

-m message, --message message
    Provides the changelog entry message directly on the command line, bypassing the editor.

-A, --append
    Appends the message to the current (topmost) changelog entry instead of creating a new one. Useful for minor additions or corrections.

-P package, --package package
    Specifies the source package name, useful when the current directory doesn't correspond to the package name or when working with multiple source packages.

-e, --edit
    Forces editing the changelog entry in the user's preferred editor (defined by EDITOR or VISUAL environment variables). This is the default behavior for new entries.

--no-conf
    Prevents reading any configuration files, ensuring default behavior or explicitly defined command-line options.

DESCRIPTION

debchange (or its common alias dch) is a crucial utility in the Debian packaging ecosystem. It's part of the devscripts package and is primarily used to automate and standardize the process of updating the debian/changelog file. This file is fundamental for tracking changes, versions, and build information for a Debian package.

The command simplifies adding new entries, specifying the version, distribution, urgency, and the change description itself. It can also manage existing entries, mark releases, or prepare for specific builds. By abstracting the manual editing of the changelog format, debchange helps maintain consistency, reduce errors, and ensures that the changelog adheres to Debian policy, which is essential for proper package maintenance and review. It is often the first command run before building a new Debian package.

CAVEATS

debchange assumes a correctly formatted debian/changelog file. Manual edits that break the format can cause issues.
The EDITOR or VISUAL environment variables must be set for interactive editing.
Be cautious with --message as it bypasses the editor, making it easier to introduce typos or incomplete entries.
It's primarily designed for source package maintainers; direct use by end-users is rare.

WORKFLOW INTEGRATION

debchange is typically the first command run when a package maintainer starts working on a new release or bug fix. After updating the changelog, they would then proceed with building the package using tools like dpkg-buildpackage or debuild.

ENVIRONMENT VARIABLES

The behavior of debchange can be influenced by several environment variables, most notably EDITOR or VISUAL for the text editor, and DEBEMAIL / DEBFULLNAME for setting the maintainer's name and email in new changelog entries.

HISTORY

debchange is part of the devscripts package, which provides a collection of scripts to make the life of a Debian package maintainer easier. It originated as dch (debian changelog) and over time gained more features and robustness to handle various changelog manipulation scenarios, evolving with Debian policy and best practices for package versioning and release management. Its consistent usage has made it a de facto standard tool for Debian developers.

SEE ALSO

dch(1), dpkg-buildpackage(1), debuild(1), dpkg-parsechangelog(1)

Copied to clipboard