If an R package's licence X is, do all the content in that package have to be licenced under X? [closed]

你。 提交于 2019-12-10 04:37:05

问题


Hope the question above is clear.

Now my case: For my package, i'm using several libraries (jars). Each library has been licenced under one of these: Apache v2, BSD or LPGL.

Edit [some clarification] I have my own java classes packed in a jar. These import classes (dynamic linking) from the libraries mentioned here [End Edit]

Question 1: Can i pack all these libraries in a single package?
Question 1a: If yes, under what licence Apache, BSD, LGPL or any other?
Question 1b: If yes, would it be enough to put all the library names in a NOTICE and to write under what licence is a library licenced together?

Question 2: Or do i have to create for each type of licence a separate package and put libraries in it according to their licence type?


回答1:


You can't use a single license for your package. Instead, in your DESCRIPTION put "License: file LICENSE" and describe the individual licenses in that file.




回答2:


R itself is licensed under the GPL. It contains other functionality released under different licences, such a PCRE which is licensed under BSD. The R sources contain separate licence files for the different components as well as copyright statements/acknowledgements.

Edit [some clarification] So in and of itself, if you are redistributing libraries as part of your package you need to preserve their licence details and respect the licence under which they were distributed. Your package can have whatever licence you want as long as it is not in conflict with the licences of the libraries you are redistributing (unlikely given the ones you cite). You make clear what licence your package is under in the DESCRIPTION file (as Hadley mentions in his answer), but you should make sure a LICENCE, or COPYING file is included in the top level of the package source so it is clear what code is under what licence etc. [End edit]

The problem you are going to have is that unless we have some lawyers hereabouts who are coders, any advice given should be taken with a big pinch of salt. If you are worried about this, you should seek expert advice.




回答3:


You are focused on packaging. While a collection of packages can be considered a compilation and not a derivative work, allowing redistribution under relaxed conditions, the software that depends on them is likely a derivative work, and copyright places stronger restrictions on its redistribution.

If you are talking Apache 2 and LGPL 2+ or 3+ for the libraries: all of these licences are GPLv3-compatible. The GPL3+ could be a common denominator that allows you to redistribute a derivative work based on those libraries (your solution 1a).

However, if all you do is linking, the LGPL and the Apache licence have an exemption that lets you redistribute your software as if it wasn't a derivative, and the BSD lets you licence the derivative with very few conditions.

This allows you to go with option 1b. You should have a NOTICE file that describes under which package the files you distribute are, and what licence each of them is under. Ship the licences as well, in individual files for the longer ones.




回答4:


Assuming the LGPL files aren't just LGPL-2 [which is not GPL-3 compatible] but LGPL-2 (or any higher version), LGPL-2.1, or LGPL-3 then all those licenses should be GPL-3 compatible and you could release your R package with an overall GPL-3 license.

I have packages (optparse, argparse) on CRAN under an overall GPL (>=2) license that combines GPL (>=2) code with code under the GPL-compatible Python license which contains a mandatory license notice.

Here is a good resource that the FSF directed me to about incorporating gpl-compatible code with mandatory copyright notices with GPL code: http://www.softwarefreedom.org/resources/2007/gpl-non-gpl-collaboration.html

In terms of making CRAN happy it turns out if the overall package is GPL'ed that they do not like in the DESCRIPTION that the license field says LICENSE or (GPL >= 2) + LICENSE where LICENSE contains all the permissive copyright notices you need to preserve. In particular they forced me to remove such a LICENSE file. However they seemed okay that in DESCRIPTION under Author you give a high-level description of where you got all the software from, under License say GPL-3 and then under Copyright say "See file (inst/)COPYRIGHTS. In (inst/)COPYRIGHTS you can include all the copyright notices you are required to preserve. I use the Debian Package Copyright Format http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ but you don't need to. You can also look at the COPYRIGHT file in the R source for formatting ideas. "Writing R Extensions" specifically mentions inst/COPYRIGHTS as a place package authors can place additional information so it might preferable for the file to be called that rather than NOTICE which CRAN might complain about or LICENSE which CRAN complains about if it contains permissive licenses for an overall GPL project.

It would also be a good idea to preserve all the original copyright notices in any source files where they are contained. The softwarefreedom.org page has suggestions for that if you are also directly modifying that source file with GPL'ed enhancements but if you aren't changing the included source files you can often leave them untouched.



来源:https://stackoverflow.com/questions/4314708/if-an-r-packages-licence-x-is-do-all-the-content-in-that-package-have-to-be-li

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!