unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: micah anderson <micah@riseup.net>
To: Carl Worth <cworth@cworth.org>,
	"Jeffrey C. Ollie" <jeff@ocjtech.us>,
	Not Much Mail <notmuch@notmuchmail.org>
Subject: Re: [PATCH] Use libgcrypt for hashing.
Date: Fri, 08 Jan 2010 15:43:52 -0500	[thread overview]
Message-ID: <871vi0ba46.fsf@lillypad.riseup.net> (raw)
In-Reply-To: <87zl67rwxi.fsf@yoom.home.cworth.org>

[-- Attachment #1: Type: text/plain, Size: 2491 bytes --]

On Fri, 27 Nov 2009 22:22:01 -0800, Carl Worth <cworth@cworth.org> wrote:
> On Fri, 27 Nov 2009 21:28:03 -0600, "Jeffrey C. Ollie" <jeff@ocjtech.us> wrote:
> > Instead of including a private implementation of the SHA1 hash, use
> > libgcrypt.  This means less code of our own to maintain and it will be
> > easier to switch to a different hash function like SHA256.
> 
> I don't believe we have a significant code-maintenance burden with
> libsha1.c. And as for different hash functions, the only use of sha-1 in
> notmuch is as a fallback in the case of a message not including a
> Message-ID header.
> 
> So I don't see it as important at all to try to remove this code.

Its good that this is not a burden to maintain for the notmuch project,
even better that Mikhail, the libsha1 maintainer, is currently active in
this project and has volunteered to maintain the in-tree copy. 

However, the problem that has been raised is about the code-maintenance
burden that distributions face. In fact, this is not an unique problem
to notmuch, if it was it wouldn't be such a big deal. The reality is
that the more projects which cargo-cult around 'convenience copies' of
code, the more of a burden is placed on the distributors.

In some ways, the notmuch project and the role of distributors are at
cross-purposes on this issue, each side has an argument that makes sense
From their individual perspectives.

> > libgcrypt was chosen because it has a fairly simple API, it's well
> > tested (it's used in gnutls and gnupg2), and it's licensed under the
> > LGPL.
> 
> What might make more sense is an option to compile against an existing
> library (if present) but not to introduce an error in the build if the
> library is not present, (in which case just build the builtin libsha1.c
> code).

This makes the most sense, and resolves the issue in a way that both
sides of the issue benefit!

> But if that wouldn't solve the problem you were trying to solve, (to
> actually remove libsha1.c), then maybe we don't need to do anything for
> now?

I think from a distribution point-of-view, if you are providing a
mechanism to link against libgcrypt, while still maintaining this
embedded code-copy for convenience's-sake, actually removing libsha1.c
is not so necessary. It does mean an exception must be noted on the
distribution side that indicates that although this code exists, its not
being used, but that is a negligible burden.

micah

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

  reply	other threads:[~2010-01-09 21:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-28  3:28 [PATCH] Use libgcrypt for hashing Jeffrey C. Ollie
2009-11-28  3:31 ` Mikhail Gusarov
2009-11-28  3:59   ` Ingmar Vanhassel
2009-11-28  5:43     ` Jeffrey Ollie
2009-11-28  5:52       ` Alexander Botero-Lowry
2009-11-28  5:41   ` Jeffrey Ollie
2009-11-28  6:43     ` Carl Worth
2009-11-28  7:38       ` Jeffrey Ollie
2009-11-28  6:23   ` Carl Worth
2009-11-28  6:22 ` Carl Worth
2010-01-08 20:43   ` micah anderson [this message]
2010-01-14 22:16     ` Carl Worth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871vi0ba46.fsf@lillypad.riseup.net \
    --to=micah@riseup.net \
    --cc=cworth@cworth.org \
    --cc=jeff@ocjtech.us \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).