Brian's Waste of Time

Tue, 25 May 2004

HOWTO Include ASL Licensed Software in GPL(ish) Software

Required IANAL disclaimer:

I am not a lawyer, am not licensed to practice law, and this should not be construed as legal advice. I don't even play a lawyer on TV. I suggest talking with a real intellectual property lawyer if these matters are important to you. The statements made here are my own and do not represent any organization or corporation I may associate with.

Enough people are confused by the FSF saying that the GPL and ASL are incompatible that I thought it would be worth posting. The FSF provides a suggested means of allowing the use of "Non Free" libraries in their GPL FAQ. Basically it entails adding a clause to your license. They even provide boilerplate.

They also say that it is better to reimplement the library than to except it.

The ASF specifically states (and the ASF holds the copyright on all Apache projects) that in their view the ASL is compatible with the GPL.

There is nothing stopping you from using ASL licensed software in a project licensed under the GPL as long as you include said exception (cut and paste it, and put your name in as the copyright holder) in your LICENSE.txt =)

Now, to try to explain why the FSF claims the ASL is incompatible with the GPL... The part of the ASL that the FSF sees as incompatible with the GPL is the license termination clause. Take the following example:

  1. Brian holds a patent on the Fizzywig Sorting Algorithm
  2. Brian writes some code for Struts (which is licensed under the ASL) to optimize how it sorts something.
  3. Brian contributes that code to Struts. It is incorporated into the project (yea!).
  4. Wombat Co. uses Struts to implement their fancy new application.
  5. Brian sues Wombat Co. for a patent violation for the Fizzywig Sorting Algorithm

Now, this suit is bogus anyway as part of making a contribution includes granting a right to use the patent:

Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted.

However, if I pursue the suit anyway, the second part of the patent license clause comes in:

If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.

This means that if I continue to pursue my suit against Wombat Co. for using Struts, which includes code using my patented algorithm, which I contributed to Struts, I lose the right to use patents other people granted to me in regards to Struts.

The FSF says this is an additional constraint over and above those imposed by the GPL, and the GPL specifically forbids the addition of any additional constraints.

If Struts were licensed under the GPL and I sued Wombat Co. for being in violation of my patent (the violating code being contributed to Struts by myself) I would retain all my rights to Struts except for the right to redistribute it:

If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.

Fun stuff, eh? The big problem with the GPL wording is that until a court rules on the patent infringement case, and specifically forbids continued distribution, I can continue to distribute Struts. Afterwards i can then sue everyone using the version I distributed.

2 writebacks [/src] permanent link

Higher Order Advice

This paper is fun. I've thought about aspects in FP before, but never thought hard. These guys have, and they raise some good points about the possibilities of higher order advice and (especially!) pointcuts. Kiczales nixed this in AspectJ, apparently (and I don't want to imagine trying to implement it in Java) but it is very powerful looking stuff.

via Lambda the Ultimate

2 writebacks [/src] permanent link