LinuxCommandLibrary

dch

Add entries to Debian changelog

SYNOPSIS

dch [options] [changelog-entry-text]

PARAMETERS

-i, --increment
    Increments the version number and opens an editor to add a new changelog entry. This is the default action.

-v <version>, --version <version>
    Specifies an exact version string for the new changelog entry instead of incrementing automatically.

-r, --release
    Increments the version number, adds a new entry, and closes the editor, marking the changelog as ready for upload. Often used for final entries before release.

-n, --noconf
    Adds a new changelog entry using the provided changelog-entry-text without opening an editor. Useful for scripting.

-a, --auto
    Attempts to automatically determine the type of version increment (e.g., for a bugfix, a new upstream version, or a new Debian upload) based on existing entries and VCS information.

-u <urgency>, --urgency <urgency>
    Sets the urgency field for the new changelog entry (e.g., low, medium, high, emergency).

-D <distribution>, --distribution <distribution>
    Sets the target distribution for the changelog entry (e.g., unstable, experimental, stable).

-c <file>, --changelog <file>
    Specifies an alternative changelog file to operate on instead of the default debian/changelog.

-U, --upstream
    Creates a new changelog entry specifically for a new upstream version, typically incrementing the upstream part of the version number.

-e, --edit
    Forces opening the editor to add a changelog message, even if changelog-entry-text is provided on the command line.

DESCRIPTION

dch (Debian Changelog) is a powerful utility from the devscripts package designed to assist Debian package maintainers in managing the debian/changelog file. This file is fundamental for tracking all modifications, bug fixes, new features, and other changes introduced to a Debian package throughout its development lifecycle. dch automates the process of adding new entries, intelligently incrementing version numbers, and setting appropriate urgency levels and target distributions. It seamlessly integrates with a user's preferred text editor, allowing for easy composition of changelog entries while handling the required formatting and metadata. By simplifying changelog management, dch ensures compliance with Debian policy requirements and helps maintain a clear, chronological history of package evolution, which is invaluable for both developers and users.

CAVEATS

dch primarily targets Debian's 3.0 (quilt) source package format; its behavior with older or non-standard formats might be less predictable. It relies heavily on environment variables like EDITOR or VISUAL to determine which text editor to use. Incorrect versioning flags can lead to malformed changelog entries that might cause issues with tools like dpkg-buildpackage.

CHANGELOG FORMAT COMPLIANCE

One of dch's primary benefits is ensuring that the debian/changelog file adheres to the strict format detailed in the Debian Policy Manual. This adherence is crucial for other Debian tools, such as dpkg-buildpackage, to correctly parse package versions, maintainer information, and the list of changes, preventing build failures and package rejection.

INTEGRATION WITH EDITORS

By default, dch leverages the user's preferred text editor (determined by the EDITOR or VISUAL environment variables). This integration allows developers to write detailed and expressive changelog messages in a familiar environment, providing flexibility while dch handles the boilerplate generation of headers, timestamps, and maintainer information.

HISTORY

dch is an integral part of the devscripts package, a collection of essential utilities for Debian package development. It has been a cornerstone tool in Debian packaging for many years, evolving to meet the changing needs and policies of the Debian project. Its development reflects the community's continuous effort to streamline and standardize the package maintenance workflow, with a particular focus on correctly managing the critical debian/changelog file for bug fixes, new upstream releases, and general package updates.

SEE ALSO

dpkg-buildpackage(1), debuild(1), dput(1), changelog(5), devscripts(1)

Copied to clipboard