mercurial-buildpackage(1)

πŸ“¦ version 0.10.2, in debian bookworm

πŸ’– 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-version changelogversion, -f changelogversion β€” 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, -c pbuilderconfigfile β€” uses pbuilder(1) to build the package in a chroot(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 the comp1 tarball.
  • comp2 β€” a branch containing the source from the comp2 tarball.
  • pristine β€” a branch containing additional information for recreating pristine upstream tarballs.
  • upstream β€” the combination of all upstream tarballs, as specified in dpkg-source(1).
  • default β€” the branch for mainline package work. It will have all debian/patches applied and the quilt .pc directory 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 the default branch, or branches created by mercurial-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