mercurial-buildpackage(1)
π mercurial-buildpackage(1) β the girlies' guide π
okay so bestie, this is a User Commands situation, section 1, and the whole point is: you take source code that lives in a Mercurial repo and you turn it into a .deb package. That's it, that's the vibe. β¨
β¨ NAME β¨
mercurial-buildpackage β build a .deb package from source code under Mercurial control. no cap, that's literally her whole job. π
πΈ SYNOPSIS πΈ
mercurial-buildpackage [option] ...
π¦ DESCRIPTION π¦
So mercurial-buildpackage builds a .deb package from inside a Mercurial repository. That's the whole thing. π
It builds the package either by using pbuilder(1) or in-place, depending on which options you pass. Pick your fighter, babe. π«Ά
π OPTIONS π
--version,-Vβ prints the version and dips. bye bestie π--verbose,-vβ turns the verbosity UP. you can stack this one several times, so go feral. π₯--no-check-dependencies,-dβ skips the whole "are you missing build dependencies" check. no thoughts, head empty. π--include-source,-s,-saβ forces upstream source to be included. come through, tarball π--from-versionchangelogversion,-fchangelogversion β pulls in *all the changelog entries starting from *changelogversion. the way that it just gathers them all up. iconic.--source-only,-Sβ builds the source only. just the source. nothing else. periodt. β- *
--configfile*pbuilderconfigfile,-cpbuilderconfigfile β usespbuilder(1)to build the package in achroot(8)specified by pbuilderconfigfile. it's giving sandbox realness π
π EXAMPLES π
okay these two are the moment, fr fr:
mercurial-buildpackage
Silently builds a package in-place using debian/rules and dpkg-genchanges(1). The complete build log gets placed in ../package_version_arch.build. lowkey tidy of her π
mercurial-buildpackage -s -f 1.2-3 -c /home/jps/lenny-pbuilderrc
Builds a backport package for the Lenny release using pbuilder. The source and all changelog entries since 1.2-3 are included in the package. slay π
π REPOSITORY LAYOUT π
Let's pretend your package is called mypack. The package repository should be created with a totally regular:
hg init mypack
If mypack is a native package, then your repository only has the usual default branch, and mercurial-buildpackage will only touch the .hgtags file when mercurial-tagversion(1) gets invoked to tag a release of mypack. cute, minimal, no drama. β¨
If mypack is a non-native package, then it'll have a bunch of upstream tarballs, as specified in dpkg-source(1). Let's say the upstream tarballs are mypack_1.0.orig.tar.gz, mypack_1.0.orig-comp1.tar.bz2 and mypack_1.0.orig-comp2.tar.gz, and that you therefore use package format 3.0 (quilt). mercurial-buildpackage will then maintain the following branches:
mypackβ a branch containing the source from the main tarball.comp1β a branch containing the source from thecomp1tarball.comp2β a branch containing the source from thecomp2tarball.pristineβ a branch containing additional information for recreating pristine upstream tarballs.upstreamβ the combination of all upstream tarballs, as specified indpkg-source(1).defaultβ the branch for mainline package work. It will have alldebian/patchesapplied and the quilt.pcdirectory included as part of the repository.
So each upstream tarball gets its own branch, which together with the pristine branch are used by mercurial-pristinetar(1) to recreate pristine upstream tarballs. π§
The upstream branch is used by mercurial-importorig(1) to merge new upstream versions into the mainline default branch; and by mercurial-port(1) to make alternative packages of selected upstream versions β for instance, for backporting. she does it all, honestly. π
In general, you should leave alone all the branches dealing with upstream sources, and only work in thedefaultbranch, or branches created bymercurial-port(1)for porting. don't touch what you don't understand bestie, i'm protecting you π«Ά
π₯ OPERATIONAL OUTLINE π₯
π In-place building π
fakeroot debian/rules clean
dpkg-source -i.hg -b mypack ..
debian/rules build
debian/rules binary
dpkg-genchanges > ../mypack_1.0-2_i386.changes
πΈ Chroot building πΈ
fakeroot debian/rules clean
dpkg-source -i.hg -b mypack ..
pbuilder --build --configfile ~/etc/sid-pbuilderrc ../mypack_1.0-2.dsc
π AUTHOR π
Jens Peter Secher <jpsecher@gmail.com> β the icon, the legend, the moment. π
π THANKS π
The ideas for this package originate from John Goerzen's hg-buildpackage. giving credit where credit is due, we love to see it π
β SEE ALSO β
dpkg-source(1), pbuilder(1), mercurial-importorig(1), mercurial-importdsc(1), mercurial-tagversion(1), mercurial-pristinetar(1), mercurial-port(1).
mercurial-buildpackage 0.10.1... December 2009 β yeah bestie, that's the version and the date, and that's a wrap πβ¨ go build something gorgeous, ily, mwah ππ¦
π¦ where this page comes from
- debian bookworm: mercurial-buildpackage 0.10.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms