[darcs-devel] Changes for Git 0.99
Juliusz Chroboczek
Juliusz.Chroboczek at pps.jussieu.fr
Wed Jul 20 06:14:05 PDT 2005
> If we're tricky enough (too tricky?) perhaps we can even export our
> Haskell sha1 code. It would be interesting to see how the SHA1.lhs
> stacks up against the openssl version... probably not very well,
> given the amount of effort they've apparently put into it.
SHA1 is exactly the kind of code that C is good at. And you're not
going to beat OpenSSL, which has hand-optimised assembler versions on
i686 and up.
There exist piles of massively-tuned library code, and the best thing
is not to compete with it, but link with it. -- S. Peyton-Jones
> But it'd definitely be nice to not require linking with openssl,
> since there are issues with distributing GPL binaries linked with
> openssl if openssl isn't a "standard system library".
I hereby grant you your wish. If you compile Git with
``make MOZILLA_SHA1=1'', you're going to get a completely self-contained
libgit that uses a version of SHA1 that is double-licenced MPL and GPL.
(Which is silly, since it's basically the reference SHA1 code. But
what can you do.)
> Would I also need to update git/cache.h to be the 0.99 version... or I
> guess I'd probably instead want to determine the path to cache.h at
> configure time, and we wouldn't ship the ./git/ directory at all?
Yes, that's the idea (not shipping ./git/). Although your scheme for
finding Git looks overly complicated to me -- I'd just do the
following:
- look for libgit.a and cache.h in ./git/, /usr/local/src/git/ and
/usr/src/git/;
- ask the users to do
$ tar xzf git-0.99.tar.gz
$ (cd git-0.99; make)
$ ln -s `pwd`/git-0.99 /usr/local/src/darcs
before building Darcs.
- bonus points if you can determine whether the libgit.a needs to be
linked against libssl or whether it already contains an SHA1
implementation.
Juliusz
More information about the darcs-devel
mailing list