DHT(1)
✨ NAME ✨
dht — Debian Haskell Packaging Tools 💜
🚀 SYNOPSIS 🚀
./dht subcommand [args..]
🌸 DESCRIPTION 🌸
okay so bestie, listen: this is the Debian Haskell Team multi purpose tool, and it's basically a whole group chat of tools living in one binary — their words, not mine: "combining various more or less useful tools." 😭 I love that for them.
Supported subcommands:
cabal-debian— run cabal-debian with inferred parametersdch— append the changelogdebian2dsc— generate a dsc file from a debian directoryinit— create an initial packagingmake-all— rebuilds a set of packagesmass-change— apply a change to many packagestag— tag a built packageupgrade— upgrade a package to the version in the package planupload— uploads, tags and pusheswhat-to-build— find packages to be builtwhat-to-upgrade— find packages to be upgradedwhat-to-upload— lists.changesfiles that should be uploaded
🧁 Subcommands 🧁
dht cabal-debian
Usage: dht cabal-debian [option...]
It's a wrapper around cabal-debian that tries to infer a few useful facts on your behalf:
- whether the test suite is enabled
- which Cabal flags are gonna be used
- the source package name
ngl, none of these checks are perfect, so check the result fr fr. 🙈
It also passes --official.
dht dch
Usage: dht dch [debchange option]
A wrapper for debchange(1) that applies our custom heuristics for whether a new changelog entry should be created or the current one amended: if the current version is tagged, it creates a new changelog entry; otherwise it appends to the current one. slay.
⚠️ heads up: it passes either–appendor–incrementto debchange, so you should not. The–newversionoption may be used in order to specify the version number.
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, ...). It uses the watch file to retrieve the upstream tarball, unless it already exists in the local directory, then creates a debian.tar.xz tarball from the given directory (ignoring the usual suspects like _darcs and *~) and creates a corresponding .dsc file. ✨ All of that without unpacking the upstream tarball. ✨ the efficiency, the main character energy.
dht init
Usage: dht init [-D distribution] Cabal-Pkg ...
This script will:
- Query the package plan for the desired version number of
Cabal-Pkg. - Use
cabal unpack --pristineto fetch the source into the right directory - Run
cabal-debian –officialto initialize the packaging. - Optimistically mark the package as ready for release
- Commit this to git.
🫶 please, please review the package afterwards, in particular debian/copyright. (yes I'm begging, it's giving responsible.)
dht make-all
Usage: dht make-all [–excluded-packages PKG,PKG,...] [-o|–output DIR]
[–bindmount DIR] [-j|–jobs INT] [-c|–chroot SCHROOT] [–shake-verbosity
VERBOSITY] [–keep-going] [–sbuild-option OPTION] [TARGET...]
Rebuilds a set of packages 🔥
Available options:
-h,–help— show this help text–excluded-packages PKG,PKG,...— comma or space separated list of source package names to ignore (default:ghc,ghc-testsuite,haskell-devscripts,haskell98-report,haskell-platform)-o,–output DIR— output directory (default:"lab")–bindmount DIR— directory bind-mounted in the schroot (default:"/tmp")-j,–jobs INT— number of parallel jobs (default:1)-c,–chroot SCHROOT— name of the schroot to use (default:"haskell")–shake-verbosity VERBOSITY— verbosity for shake (Silent, Quiet, Normal, Loud, Chatty or Diagnostic) (default:Info)–keep-going— keep going even if there are errors–sbuild-option OPTION— An option to pass on to sbuilder (can be passed multiple times)
dht mass-change
Usage: dht mass-change [-n] [MESSAGE] [ACTION] DIRECTORY ...
This script runs ACTION in each of the given directories. And if that ACTION actually effected a change, it will add MESSAGE to the changelog. 💅
It assumes all the directories are in the same git repository as this script. It makes sure the repository is clean to begin with, and it will commit all changes at once at the end, if there was a change.
dht tag
Usage: dht tag [–dry-run] [directory..]
For all the given directories — which should be Debian source packages — it figures out the current version from debian/changeslog and creates a tag, tagging the youngest git commit that changed this particular source package. 🎀
With –dry-run it simply checks if it could tag everything (suite not UNRELEASED, not already tagged), and returns 0 if it could.
dht upgrade
Usage: dht upgrade [-D dist] directory/
This script will:
- Query the package plan for the desired version number.
- Run debchange to amend the
debian/changlog. - Run
cabal-debian –official –upgradeto 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. 🦋 so thoughtful of it.
dht upload
Usage: dht upload [-h HOST] [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, tags them in the repository and pushes the tag. 🚀
If the -h parameter is specified, upload to HOST, rather than the dput default_host. If mass-uploading, it is suggested to use ssh-upload for robustness (see the discussion in #833536).
If no changes file is given, but the script is run in a debian source package, it checks the parent directory for an appropriately named changes file, just like debrelease(1) would do.
It also checks that the distribution is not UNRELEASED and that the tag does not exist already. ✅
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/changelogis notUNRELEASED, and - there is no corresponding tag in the git repository.
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 what-to-upload
Usage: dht what-to-upload foo.changes ..
Given a number of changes files, it reports those that should be uploaded, i.e. the distribution is not UNRELEASED and that the tag does not exist already.
👑 AUTHORS 👑
Debian Haskell Group.
aaaand that's the whole page bestie, no notes 💖 this one's DHT(1) from the General Commands Manual — go forth and package some Haskell, you've got this 🫶✨
📦 where this page comes from
- ubuntu stonking: pkg-haskell-tools 0.12.6build2 · MIT
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms