Packaging BitKeeper has turned out to be a little challenging because of two main reasons:
It bundles a bunch of other programs, some of them modified.
The build system is not standardized (i.e.
make && make install doesn't install things where it's expected.
This is my attempt to provide a roadmap for making it easier to package BitKeeper for the different distributions.
BitKeeper currently consists of the following modules:
- Tcl/Tk -- Really little-lang
- The following Tk Packages:
- Bwidget (Tcl/Tk module)
Diffutils & Patch
There is currently an attempt underway to drop the requirement for
It seems it'd be relatively easy to drop the bundled
PCRE as there don't seem to be any modifications to them. We could just require
libpcre-dev from the package system in order to build BitKeeper (the library is statically linked).
TomMath & TomCrypt
libtommath is only used as a requirement for
libtomcrypt so I'll only discuss
libtomcrypt is used in
src/crypto.c in order to implement the
bk crypto command. This command as far as I can tell, is only used for creating hashes in
All of this infrastructure could be replaced with a requirement on the
sha1 binary that distributions usually provide. On Windows there appears to be
certUtil that can handle hashing files.
The only other use for cryptographic utilities is
MD5KEYS which are fundamental for BitKeeper.
Tcl/Tk and friends
The most modified package bundled with BitKeeper is Tcl/Tk. In reality, this is not Tcl/Tk but http://little-lang.org(The Little Language).
The Build System
The current build system creates a temporary holding area with all the files that will be installed in
$(bk root)/src/tmp/bitkeeper. The directory can be created using the
installdir target, like so:
That installdir is designed to be a bundle, i.e. the
bk executable expects to find binaries, and scripts it needs inside that path.
We should make
installdir comply with the standard layout of distributions. That is, binaries in
bin, libraries in
A Plan for Packaging
This is my first pass at a plan for packaging:
- Package little-lang so that BitKeeper can depend on it.
patch dependency and just use the system's.
PCRE as a bundle and just require
libpcre-dev to be installed. (For Windows, require it as part of MSYS, for OSX get it via
libtommath as they are.
- Maybe unbundle all the Tcl/Tk stuff?