Subject: [Wocky] More on Gaim dependency architecture

From: Greg Hudson <[email-masked]>
Date: Thu, 15 Dec 2005 18:38:58 -0500

I looked into how Gaim handles dependencies on non-ubiquitous external
libraries today.  Here are my conclusions:

  * Gaim dynamically loads its own plugins, including protocol
    plugins.  There is no issue with needing to know function
    signatures for this kind of loading, since Gaim gets to define the
    plugin ABI itself.  Gaim is generally tolerant of failure to load
    any given plugin, and just doesn't offer the plugin's
    functionality.

  * Protocol plugins with dependencies are nothing new.  The Zephyr,
    silc, and Bonjour plugins all have dependencies on external
    libraries.  The Unix binary packaging strategy is to build the
    protocol plugin so that it links against the external library, and
    then put the resulting plugin in a separate package so that the
    core gaim package doesn't have to depend on libsilc or whatnot.

  * However, all of those protocol plugin dependencies are mandatory.
    You cannot have a Gaim Zephyr plugin without libzephyr.  For our
    work, the GSSAPI or Cyrus SASL dependency would be optional.  Unix
    binary packagers would want to be able to distribute the Jabber
    plugin without making it depend on Kerberos libraries.

  * Gaim has solved this problem in the past with SSL.  What they did
    was create a separate plugin purely for SSL support (two of them,
    actually, for different external SSL libraries) and a layer in the
    core code which takes care of loading the plugin and offering or
    not offering SSL support as available.  I think we would need to
    do the same thing for SASL.  The existing built-in DIGEST-MD5 code
    could be moved into this new layer, and we could have plugins to
    wrap either libgssapi_krb5 or libsasl2 or both.

  * It will be substantially easier to write this new layer if we
    don't have to worry about supporting security layers, and just
    rely on SSL to take care of protecting the data stream.  But I'm
    willing to do it either way.  I don't think the Gaim developers
    would care.