Author: Debian Haskell Group

# DHT(1)

## Debian Haskell Group

# NAME

dht -- Debian Haskell Packaging Tools

# SYNOPSIS

./dht subcommand [args..]

# DESCRIPTION

This is the Debian Haskell Team multi purpose tool, combining various more or less useful tools.

Supported subcommands:

- debian2dsc - generate a dsc file from a debian directory
- upgrade - Upgrade a package to the version in the package plan
- tag - Tag a built pakage
- make-all - Rebuilds a set of packages
- what-to-build - Find packages to be built
- mass-change - Apply a change to many packages
- what-to-upgrade - Find packages to be upgraded
- upload - Uploads, tags and pushes

# Subcommands

## dht debian2dsc

Usage: dht debian2dsc [-o output/] [dir ...]

Expects directories containing the contents of the `debian/` directory of a Debian source package (i.e. `control`, `changelog`, `watch`, ...). Uses the watch file to retrieve the upstream tarball (unless it already exists in the local directory), creates a `debian.tar.xz` tarball from the given directory (ignoring the ususal suspects like `_darcs` and `*~`) and creates a corresponding `.dsc` file; all without unpacking the upstream tarball.

## dht upgrade

Usage: dht upgrade [-D dist]

This script will:

- Query the package plan for the desired version number.
- Run debchange to amend the debian/changlog.
- Run cabal-debian --official --upgrade to upgrade the packaging.
- Optimistically mark the package as ready for release
- Commit this to git.

At the end, it will rightfully ask you to review the changes, giving you a helpful link to the diff between the upstream sources.

## dht tag

Usage: dht tag [directory..]

For all given directories, which should be Debian source packages, figure out the current version from debian/changeslog and create a tag, tagging the youngest git commit that changed this particular source package.

## dht make-all

TODO

## dht what-to-build

Usage: dht what-to-build [directory..]

For all given directories (defaults to `p/*/`), check if they are to be built. This means, in particular:

- The latest entry in `debian/changelog` is not `UNRELEASED`, and
- there is no corresponding tag in the git repository.

## dht mass-change

Usage: dht mass-change [-n] [MESSAGE] [ACTION] DIRECTORY ...

This script runs ACTION in each of the given directories. If the ACTION effected a change, it will add MESSAGE to the changelog.

It assumes that all directories are in the same git repository as this script. It ensures that the repository is clean tobegin with, and will commit all changes at once at the end, if there was a change.

## dht what-to-upgrade

Usage: dht what-to-upgrade [directory..]

For all given directories (defaults to `p/*/`), check if they are to be upgraded, i.e. that the package plan lists a newer version than the changelog.

## dht upload

Usage: dht upload foo.changes

Signs the `.changes` file and the corresponding `.dsc` file in a temporary location (to avoid touching the original files), uploads them to the archive using `dput ssh-upload` and tags them in the repository and pushes the tag.

Checks that the distribution is not `UNRELEASED` and that the tag does not exist already (by tagging first).