Tuesday, February 12, 2008

Licence fun

If a piece of software wants to link against GPL'd code, it has to be GPL-compatible. To be more accurate, it has to be compatible with that specific GPL version. So far so good.

Now, GPLv2 and GPLv3 are incompatible. As a consequence, code under GPLv2 and GPLv3 cannot be combined. This has nasty consequences.

This time it's not Claws Mail that bites, but it got bitten back by ClamAV. Claws Mail is licenced under GPLv3 or later. It has an optional plugin for email antivirus-scanning that uses libclamav, which is licenced under GPLv2 (only). Do you see it comming? That plugin, even if itself licenced under GPLv2 or later and thus in theory compatible with both sides that it is supposed to connect, is itself illegal.

In fact, you can take the FSF GPL FAQ, section "Combining work with code released under the GNU licenses", read "non-free" or "proprietary" as a synonym for "licenced under GPLv2", and the statements remain valid.

Isn't that ironic, at best?

Now, what is the way out? Colin asked the FSF about the problem, and the options are basically to

  • convince ClamAV to put their library under a licence compatible to GPLv3
  • have libclamav grant Claws Mail specific permission to link libclamav
  • change Claws Mail's licence to GPLv2 or later
It is also possible to
  • roll out ClamAV's functionality into separate processes (fork(), exec() is legal)
  • just drop the ClamAV plugin
Fun, isn't it?

2 comments:

  1. Separating processes could be a solution, but probably not a good one:

    1) clamscan FILE:
    Scanned files: 1
    Infected files: 0
    Data scanned: 0.00 MB
    Time: 3.015 sec (0 m 3 s)

    3 seconds per mail is huge.

    2) clamd and clamdscan FILE
    /home/cleroy/Colino.net/inbox: lstat() failed. ERROR

    Because clamdscan doesn't run as root on my box (and probably numerous others), it can't read in our mailboxes.

    ReplyDelete
  2. Too soon for this story to be here, imo!

    ReplyDelete