Closed privefl closed 2 years ago
No, not a stated requirement from our end. Rcpp
is GPL (>= 2) as is R, so the aggregate will be GPL'ed but the actual software you write and combine with it can be whatever is compatible.
To look at numbers, you can start with db <- tools::CRAN_package_db()
, feed that into tools::package_dependencies(...)
to find reverse dependencies of Rcpp
, index the db
accordingly and then tabulate the License:
field.
The result is not all that pretty or clean (in the 'too many "spelling variants" of the same license) but you will see plenty of GPL'ed packages, and a fair number of MIT licenses and alike. Including some Apache 2 as for this package.
But MIT and Apache are compatible with GPL only one-way, right? E.g. I read
Apache 2 software can therefore be included in GPLv3 projects, because the GPLv3 license accepts our software into GPLv3 works. However, GPLv3 software cannot be included in Apache projects. (https://www.apache.org/licenses/GPL-compatibility.html)
As @eddelbuettel said, I listed the license information for packages that depend directly on Rcpp
> db <- tools::CRAN_package_db()
> p <- sapply(db$Package, FUN=function(x){ "Rcpp" %in% tools::package_dependencies(x, db)})
> db1 <- db[p,]
> table(db1$License)
AGPL | file LICENSE Apache License
1 1
Apache License (>= 2.0) Apache License (>= 2)
1 1
Apache License 2.0 BSD_2_clause + file LICENCE
4 1
BSD_2_clause + file LICENSE BSD_3_clause + file LICENSE
5 5
BSL-1.0 EPL (>= 1.0)
2 1
FreeBSD GPL
1 5
GPL (>= 2.0) GPL (>= 2)
1 72
GPL (>= 2) | file LICENSE GPL (>= 3)
2 10
GPL-2 GPL-2 | file LICENSE
12 1
GPL-3 GPL-3 | file LICENSE
22 1
LGPL-3 MIT + file LICENCE
3 1
MIT + file LICENSE MPL-2.0
44 1
MPL-2.0 | file LICENSE
1
>
since Rcpp is GPL, this aggregate will be GPL, but part of it (this package) can be any GPL compatible protocol. It is ok for a GPL aggregate to include an Apache or MIT part.
https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html ... In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. ...
To avoid causing more confusion, we will change the license to GPL-3 for better compatibility with dependencies such as Rcpp. Thank you for the discussion.
Your count is (way) too small up there. We are at almost 2500 packages.
> library(data.table)
> db <- data.table(as.data.frame(tools::CRAN_package_db()), key="Package")
> rcpp <- data.table(Package=tools::package_dependencies("Rcpp", db=db, reverse=TRUE)[[1]], key="Package")
> rcppdb <- db[rcpp]
> dim(rcppdb)
[1] 2499 66
> tt <- table(rcppdb$License)
> tt[order(tt, decreasing=TRUE)]
GPL (>= 2) GPL-3
737 601
MIT + file LICENSE GPL-2
349 220
GPL (>= 3) GPL
216 39
BSD_3_clause + file LICENSE GPL-3 | file LICENSE
29 27
GPL-2 | GPL-3 Apache License 2.0
24 20
LGPL-3 GPL (>= 2) | file LICENSE
18 17
AGPL-3 BSD_2_clause + file LICENSE
15 14
GPL (>= 2.0) CC0
14 13
GPL (>= 3) | file LICENSE GPL (>= 3.0)
10 9
Apache License (== 2.0) GPL-2 | file LICENSE
7 7
LGPL (>= 3) MPL-2.0
6 6
LGPL AGPL-3 | file LICENSE
5 4
Apache License (>= 2.0) Apache License (>= 2)
4 4
CeCILL-2 GNU General Public License
4 4
LGPL-3 | Apache License 2.0 Apache License
4 3
Apache License 2.0 | file LICENSE Artistic License 2.0
3 3
CC BY-NC-SA 4.0 CeCILL
3 3
file LICENSE LGPL (>= 2)
3 3
LGPL-3 | file LICENSE MIT + file LICENCE
3 3
AGPL (>= 3) Apache License (== 2.0) | file LICENSE
2 2
BSD_3_clause + file LICENCE BSL-1.0
2 2
GNU General Public License (>= 3) LGPL (>= 2.1)
2 2
LGPL-2.1 ACM
2 1
AGPL | file LICENSE Artistic-2.0
1 1
BSD 3-clause License + file LICENSE BSD_2_clause + file LICENCE
1 1
CC BY 4.0 CC BY-SA 4.0
1 1
EPL (>= 1.0) EUPL
1 1
EUPL (>= 1.2) FreeBSD
1 1
GPL (>= 2.1) GPL-2 | GPL-3 | MIT + file LICENSE
1 1
GPL-2 | LGPL-2.1 | MPL-1.1 GPL-2 | MIT + file LICENSE
1 1
GPL-3 | BSD_2_clause + file LICENSE GPL-3 | LGPL-2.1
1 1
LGPL (>= 2.0, < 3) LGPL (>= 2.0, < 3) | file LICENSE
1 1
LGPL (>= 2) | file LICENSE LGPL (>= 3.0)
1 1
LGPL-2 LGPL-2 | Apache License 2.0
1 1
Mozilla Public License Version 2.0 MPL (== 2.0)
1 1
MPL (>= 2.0) MPL (>= 2)
1 1
MPL (>= 2) | file LICENSE MPL (>= 2) | GPL (>= 2) | file LICENSE
1 1
MPL-2.0 | file LICENSE Unlimited
1 1
>
That shows that GPL (in my forms) dominates, that MIT/BSD are clearly present, and that there are over 40 Apache licensed packages --- just among those using Rcpp!
So to repeat, you are not required to change your license. CRAN won't care.
That said, I personally like and prefer GPL (>= 2) for work I do as an open source contributor -- I like other people to enjoy it and I like them to reciprocate under the same terms. I do not think I want work I do in my spare time to end up in a closed source project from which no code improvements may flow back so to me BSD, MIT, ... never had any appeal. (That said I do have a day job where I write MIT-licensed open source software as well as some parts that remain closed. It all depends on cicumstances.)
So to make a long story short, at best @privefl and I could appeal to you to change your license to be closer to the model R itself uses. That was always a strong enough reason for me, but it is not anything enforced by license terms as initially claimed here.
@eddelbuettel Thank you for the detailed code example and clear explanation! We are new to the open-source license and the main reason for choosing Apache is its first option for GitHub LICENSE file templates. Open source is a great thing, we learn from and give back to the community, and we have learned a lot from the discussion.
Ahhh, thanks for the context! Yes, there are a few other (decent) sites out there to make an informed license choice, sadly all this gets a little overloaded with "politics" (i.e. python/julia has much more use of MIT/BSD and sometimes refuses to include GPL code; over here in R land (as in my personal view) GPL is often seen as much more foundational). After all it is a little personal: I care about my rights as author and user.
Maybe have a look here: https://choosealicense.com/
@eddelbuettel Thank you for your suggestion, this site is exactly what we needed. 😄 I've read your book and a lot of example code, but I didn't expect to be able to chat with you in such a simple way.
All good. Forgot to add a point to my preceding post: It's best to not be judgemental; most people who contribute to open source on their own time and motivating and all we should care about is that the license choice keep things can inter-operate and use each other (i.e. are license-compatible too).
After that, it's personal preferences. Just how some crazy people may use an OS I would not use or an editor I would not deploy :grinning:
Beware that if you're linking to the code from {Rcpp}, which you do, you have to use a GPL license. Right, @eddelbuettel?