Skip to content

[R-pkg-devel] GPL + other licence

6 messages · David Sterratt, Kasper Daniel Hansen, Brian G. Peterson +2 more

#
Dear all,

I'd appreciate help with a licence conundrum I have with the geometry
package (https://davidcsterratt.github.io/geometry/) that I maintain.

The geometry package contains some functions (e.g. convhulln(),
delaunayn()) that wrap the Qhull library (http://www.qhull.org), which
has its own, non-GPL, licence. The geometry package includes this source
code, and wraps it in C files that have GPL licence headers.

The geometry package also has functions that are not derived from Qhull
code and which are licensed under GPL, including a number of functions
that are ports of the Matlab distmesh package, and some other useful
functions to do with triangulation and coordinate systems (e.g.
tsearch() and cart2bary()).

I inherited this situation when I took over maintaining the package 8
years ago, though I have added functions to both Qhull-derived and GPL
categories.

In October last year I submitted the latest version of the geometry
package, which adds quite a bit of useful functionality:
https://github.com/davidcsterratt/geometry/blob/master/pkg/NEWS

I received the following response from the CRAN maintainers:

  For the license. It is CRAN policy that a package has to have a single
  license. Can you manage to convince all copyright hoders (e.g. of
  Qhull) to relicense under GPL?

I tried persuading the author of Qhull. He replied:

  There's only one license and that's the one included with the code
  (COPYING.txt). Several years ago, I tried to clarify the license with
  the Univ. of Minn. but had no success. So I think the best approach is
  to keep the original license as is. It has not been an issue so far.

At the same time as I wrote to the Qhull maintainer, I wrote to the CRAN
maintainers:

  I have written to the Qhull maintainer, but I doubt he will want to
  change the license, since Qhull is used in proprietary software such
  as MATLAB. Assuming this is the case, we'll have to create a new
  package - I would need help with managing the change for dependent
  packages.

The CRAN maintainers replied:

  Please try to find out how this can work.

In principle I could create a package containing only the functions
derived from Qhull (but still with GPL headers in the wrapper C files,
see e.g.,
https://github.com/davidcsterratt/geometry/blob/master/pkg/src/Rconvhulln.c
But wouldn't this package still have to have two licenses, due to the
GPL headers?

I don't want to start on any package splitting without having a plan
agreed that I know will be OK for CRAN. It would be quite a bit of work,
as there are a number of packages that depend on geometry, so I would
have to check all the revdeps for functions that they call in the
geometry package. I would have to then perhaps write wrapper functions
in the geometry package to make sure any functions moved to a new
package still worked when called from revdeps.

I know the CRAN maintainers are busy, so any help from the list would be
much appreciated.

Best wishes,

David.

--
David C Sterratt, Senior Research Associate
Institute for Adaptive and Neural Computation, School of Informatics
University of Edinburgh, 10 Crichton Street, Edinburgh EH8 9AB, Scotland, UK
http://homepages.inf.ed.ac.uk/sterratt - tel: +44 131 651 1739
3 days later
#
There are 3 solutions.  (1) You (get permission) to change the library to
GPL.  (2) You get permission to change the license of the R code to
whatever license the library is released under.  (3) you split the package.

You have investigated (1) and it does not work.  I would suggest thinking
about (2) provided the license of the library is decent.  This is what we
did with Rgraphviz some years ago; Graphviz itself is licensed under the
Eclipse public license and there was no way I could get a company to change
the license of that code.

I would do whatever I can to avoid splitting the package.

Best,
Kasper

On Fri, Apr 6, 2018 at 8:44 PM, David C Sterratt <david.c.sterratt at ed.ac.uk>
wrote:

  
  
#
I'm not a lawyer, but I don't see why the entire package can't be
released under GPL, while also respecting the QHull license for the
QHull code and the derived QHull portions.

Many existing R packages released under GPL, and R itself, include BSD
and MIT licensed code.

The QHull license is a very permissive license, basically BSD or MIT-
like in its permissions.

BSD and MIT code may be included in GPL'd code, as long as its license
(inclusion of the copyright notice, etc.) is also included where
required.

GPL applies to the entire work, in this case the R package.  I think
you should discuss this with the CRAN maintainers and release the
package under GPL.

Regards,

Brian
#
On Tue, Apr 10, 2018 at 2:45 AM, Kasper Daniel Hansen
<kasperdanielhansen at gmail.com> wrote:
For completeness: (4) you find a license that is compatible with both
the license of QHull and the license of the existing R package.

  
    
1 day later
#
I agree with Brian. This type of license is classified by the Free
Software Foundation as "lax" or "permissive" because it does not
prevent incorporation of the code into proprietary software.

Here is what Richard Stallman has to say: https://www.gnu.org/licenses/
license-compatibility.en.html

"[L]ax licenses are usually compatible with any copyleft license. In
the combined program, the parts that came in under lax licenses still
carry them, and the combined program as a whole carries the copyleft
license." 

Hence you can license your package under the GPL.

Martyn
On Tue, 2018-04-10 at 08:14 -0500, Brian G. Peterson wrote:
#
Thanks to all for your helpful replies.

It seems reasonable to consider that the whole package is indeed
licensed under GPL >= 3, and I can therefore remove the LICENSE file.
The Qhull COPYING.txt notice is included in the inst/doc directory, as
required by the Qhull licence, so I think all should be OK.

If the CRAN maintainers are happy with this proposal, that will resolve
a major R-packaging headache, so thanks again.

Best wishes,

David.
On Wed 11 Apr 2018 at 16:58 BST, Martyn Plummer <plummerm at iarc.fr> wrote:

            
--
David C Sterratt, Senior Research Associate
Institute for Adaptive and Neural Computation, School of Informatics
University of Edinburgh, 10 Crichton Street, Edinburgh EH8 9AB, Scotland, UK
http://homepages.inf.ed.ac.uk/sterratt - tel: +44 131 651 1739