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?