![]() | ![]() | Building Debian Packages with hg-buildpackage | ![]() |
---|
Welcome to hg-buildpackage, a system that integrates the Debian package build system with Mercurial.
hg-buildpackage is designed to do this for you:
Ability to track changes to both upstream and Debian sources through time
Ability to retrieve any version of the sources from the archive, and build Debian binary and source packages from them.
Generated packages can be built and used by people that have neither Mercurial nor hg-buildpackage installed.
Provide an alternative to systems like dbs and dpatch to help manage patches that Debian applies to packages.
Provide a way to ease collaboration between multiple Debian developers on a single package.
Provide a way to use the merging and brancing features of Mercurial to help merge Debian changes into new versions of upstream packages.
Make it easy to try hg-buildpackage and switch back to normal systems if you don't like it.
hg-buildpackage has these features:
hg-importdsc will import an entire Debian source package into your Mercurial repos, handling both upstream and Debian trees automatically. hg-importdsc can be run repeatedly to import newer versions, maintaining a full change history as it goes along.
hg-importorig can import an upstream tar.gz or a directory into your archive with a single command.
hg-buildpackage can use an existing orig.tar.gz, or can build you one from the Mercurial archive if necessary.
hg-buildpackage works for both Debian-native and normal (upstream) packages.
hg-buildpackage ensures that Mercurial metadata the (.hg and .hgtags) doesn't show up in tar.gz or diff.gz files.
Tight integration with hg_load_dirs for intelligent handling and versioning of file renames upstream.
Autosensing of information wherever possible from Debian changelogs, dsc files, and the Mercurial environment.
hg-markdeb can be used to easily checkpoint development into Mercurial with tags.
Here is a high-level overview of the Debian development process using hg-buildpackage.
You'll start by creating your Mercurial repositories. You'll usually have to create two: one for the package, and a second for the upstream. By convention, these are named package and package.upstream.
Next, it's time to bring your packages into Mercurial. If you have some existing Debian packages, you'll import as much history as you like by using hg-importdsc. Otherwise, to start a new package in hg-buildpackage, you'll use hg-importorig to bring in the upstream sources. Then, you'll use hg pull -u to copy the upstream area to the Debian area.
As you work on your Debian sources, you'll use hg-buildpackage in place of debuild or dpkg-buildpackage (hg-buildpackage passes all its arguments to debuild for you). You can use standard Mercurial commands, such as hg commit or hg log, to commit changes and view history. When you have a final version of a Debian package, you'll upload it and run hg-markdeb to tag the version for future reference.
<<< Building Debian Packages with hg-buildpackage | Getting Started >>> |