swipl-devel icon indicating copy to clipboard operation
swipl-devel copied to clipboard

License of dtoa.c

Open jamesjer opened this issue 3 years ago • 2 comments

The Fedora project is currently switching from homegrown license identifiers to SPDX license identifiers. As part of that effort, we are auditing the various code bases to determine the exact set of applicable licenses for each. I have been reviewing the swipl code base. You have a few oddball licenses in there, but it is the license of src/os/dtoa.c that concerns me. That license reads:

 * Permission to use, copy, modify, and distribute this software for any
 * purpose without fee is hereby granted, provided that this entire notice
 * is included in all copies of any software which is or includes a copy
 * or modification of this software and in all copies of the supporting
 * documentation for such software.
 *
 * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
 * WARRANTY.  IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY
 * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
 * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.

Notice the "without fee" clause. Other MIT-like licenses use the phrase "with or without fee". This license appears to not grant any permission if a fee is involved. If, for example, somebody makes a Fedora DVD that includes swipl, then charges a nominal fee to cover the cost of making the DVDs, that would be in technical violation of the terms of this license. This is a nonfree license, so it is not permissible to distribute the code in Fedora.

At this point, I have the following options:

  1. Figure out how to build swipl without the code in dtoa.c;
  2. See if the author can be contacted and is willing and able to relicense the code under a free license;
  3. Substitute dtoa.c with functionally equivalent code under a free license (e.g., see the list here); or
  4. Remove the swipl package from Fedora.

I am happy to hear any thoughts you have on the matter.

(Incidentally, src/os/README says "This code is licenced under the LGPL.", but that appears to be false. Besides dtoa.c, the other files all appear to carry the BSD-2-Clause license.)

jamesjer avatar Nov 26 '22 17:11 jamesjer

I see. I'll try to figure this out. Note that you are likely to find this file in other software. Everything can be replaced, but this is quite a bit of work :cry:

I have updated the README. This is a remain of relicensing, now about 10 years ago I think.

JanWielemaker avatar Nov 26 '22 17:11 JanWielemaker

A quick search on "dtoa.c" tells me that a modified version, still holding the same license statement is part of the Python core (https://github.com/python/cpython/blob/main/Python/dtoa.c). Do you know how they will solve the problem? The Python project has more leverage to resolve this and SWI-Prolog can probably either profit from a changed license or copy a new implementation.

JanWielemaker avatar Nov 27 '22 10:11 JanWielemaker