GNOME Bugzilla – Bug 776504
Upgrade license from LGPLv2+ to LGPLv2.1+
Last modified: 2017-06-03 08:33:19 UTC
The COPYING file contains currently the LGPLv2 (GNU Library General Public License). A lot of source files in GLib have this in their license header: * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. Note the problem: "Lesser" and "version 2". It should either be "Library" or "version 2.1". So I propose to upgrade the license to the LGPLv2.1+, i.e. the GNU Lesser General Public License version 2.1 or later. This bug is *not* about upgrading to the LGPLv3. I think the consensus for GLib was to stay at the LGPLv2/v2.1, see the following thread about the (L)GPLv3: https://mail.gnome.org/archives/desktop-devel-list/2010-July/thread.html#00049 So I think the proposal here is not controversial and can be done in any case. If in the future the GLib project wants to upgrade to the LGPLv3 or the dual license (GPLv2|LGPLv3-or-later), another bug can be filed. The scripts smart-c-comment-substitution and multi-line-substitution can be useful to change license headers: https://github.com/swilmet/gnome-c-utils
This is a pet peeve of mine as well, and yes: the license notices should use "Lesser General Public License version 2.1 or later". The proposal is not controversial at all: - the LGPL is (like the GPL) a per-project license, not a per-file one (like the BSD licenses) - the actual license is in the COPYING file, which contains the terms of the Library General Public License version 2 - the Lesser General Public License version 2.1 clearly falls under the "or later" clause since it's literally the same license, with a different name It would be good to have a patch that: - updated the COPYING file to the Lesser General Public License, version 2.1 as published by the Free Software Foundation - updated all license blurbs to refer to the "Lesser General Public License, version 2.1 or later"
I'll send a first batch for the following directories: - glib/ - gmodule/ - gthread/ - gobject/
Created attachment 342957 [details] [review] glib/deprecated/: LGPLv2+ -> LGPLv2.1+
Created attachment 342958 [details] [review] glib/tests/: LGPLv2+ -> LGPLv2.1+ There are other tests in glib/tests/ that are licensed under a BSD-style license, and other tests that don't have any license header.
Created attachment 342959 [details] [review] glib/: LGPLv2+ -> LGPLv2.1+ All glib/*.{c,h} files have been processed, as well as gtester-report. 12 of those files are not licensed under LGPL: gbsearcharray.h gconstructor.h glibintl.h gmirroringtable.h gscripttable.h gtranslit-data.h gunibreak.h gunichartables.h gunicomp.h gunidecomp.h valgrind.h win_iconv.c Some of them are generated files, some are licensed under a BSD-style license and win_iconv.c is in the public domain. Sub-directories inside glib/: deprecated/: processed in a previous commit glib-mirroring-tab/: already LGPLv2.1+ gnulib/: not modified, the code is copied from gnulib libcharset/: a copy pcre/: a copy tests/: processed in a previous commit
Created attachment 342960 [details] [review] gmodule/: LGPLv2+ -> LGPLv2.1+
Created attachment 342961 [details] [review] gthread/: LGPLv2+ -> LGPLv2.1+
Created attachment 342962 [details] [review] gobject/tests/: LGPLv2+ -> LGPLv2.1+ A lot of tests in gobject/tests/ don't have a license header. And some tests are licensed under a BSD-style license.
Created attachment 342963 [details] [review] gobject/: LGPLv2+ -> LGPLv2.1+ All gobject/*.{c,h} files have been processed. gmarshal.c and gmarshal.h don't have a license header.
I've also pushed this branch: https://git.gnome.org/browse/glib/log/?h=wip/swilmet/LGPLv2.1 where you can see statistics.
Can the above patches be merged on master? I'm waiting for a review before processing the rest of the glib repo. (yes, it was boring to do, so it'll be boring to review, if you want to review it file by file… ;)
ping Those patches took me more time than you may think, to verify that every file is covered. There are lots of exceptions: license headers written slightly differently, BSD-style licenses, no license at all, etc. I would prefer if the patches are reviewed before conflicts start to appear. Thanks in advance.
Review of attachment 342957 [details] [review]: Yes.
Review of attachment 342958 [details] [review]: Yes.
Review of attachment 342959 [details] [review]: Yes. Whew.
Review of attachment 342960 [details] [review]: Yes.
Review of attachment 342961 [details] [review]: Yes.
Review of attachment 342963 [details] [review]: Yes.
Review of attachment 342962 [details] [review]: Yes.
Thanks for working on this; those patches all look good to me.
I'm not opposed to this, but it'd be good to clarify exactly *why* we're doing it. I didn't quite get that from the LGPLv3 thread. Anyways, it looks like ebassi mentioned in comment #1 that the COPYING file is canonical, but you're not updating it?
(In reply to Colin Walters from comment #21) > I'm not opposed to this, but it'd be good to clarify exactly *why* we're > doing it. I didn't quite get that from the LGPLv3 thread. Mostly for clarification purposes. As soon as we included Lesser GPL v2.1 code, the aggregate license of GLib became Lesser GPL v2.1+ automatically (because of the compatibility of Library and Lesser GPL, and because of the "and later version" clause). As I said, the COPYING file *is* the license we use, but the licensing blurbs have to match — and they most definitely must point to *existing* licenses. GLib's COPYING file uses the Library GPL v2, but a bunch of files have a licensing blurb that says "Lesser GPL v2.1+"; or "Library GPL v2.1+" (which does not exist); or "Lesser GPL v2+" (which does not exist either). Assuming we fix everything to use a single licensing blurb, we should either pick Library GPL v2+ (in line with the extant COPYING file), or Lesser GPL v2.1+ (in line with what people have contributed and the clear intent of each contributor), since those two are the only existing licenses with those names and versions. Given that Lesser GPL v2.1 supersedes the Library GPL v2; and that the former clarifies the latter when it comes to linking; and that the former seems to be the common choice for new files; then we should fix every licensing blurb to be "Lesser GPL v2.1+". This is covered by the "and at your option any later version" clause. > Anyways, it looks like ebassi mentioned in comment #1 that the COPYING file > is canonical, but you're not updating it? I assume Sébastien will add a new commit for that — at least, that's what I understood from the "a first batch" in comment 2. In any case, yes: we should update the COPYING file, as I said in comment 1.
Attachment 342957 [details] pushed as e7a6cd1 - glib/deprecated/: LGPLv2+ -> LGPLv2.1+ Attachment 342958 [details] pushed as 95cad9c - glib/tests/: LGPLv2+ -> LGPLv2.1+ Attachment 342959 [details] pushed as f9faac7 - glib/: LGPLv2+ -> LGPLv2.1+ Attachment 342960 [details] pushed as ca82612 - gmodule/: LGPLv2+ -> LGPLv2.1+ Attachment 342961 [details] pushed as feacdab - gthread/: LGPLv2+ -> LGPLv2.1+ Attachment 342962 [details] pushed as 308bc41 - gobject/tests/: LGPLv2+ -> LGPLv2.1+ Attachment 342963 [details] pushed as 6b948d9 - gobject/: LGPLv2+ -> LGPLv2.1+
Thanks for the review. Yes I'll do a second batch for GIO and to update the COPYING.
To explain a little the method used to see if all LGPL license headers have been updated: In a certain directory: $ git grep -i "GNU Library" and $ git grep -i "Library General" should return nothing. And $ git grep -i "version 2" should return only "version 2.1" in the relevant results.
I've pushed this branch: https://git.gnome.org/browse/glib/log/?h=wip/swilmet/LGPLv2.1 I'll also attach the patches here.
Created attachment 352705 [details] [review] gio/fam/: LGPLv2+ -> LGPLv2.1+ There is only one *.c file in gio/fam/.
Created attachment 352706 [details] [review] gio/gdbus-2.0/codegen/: LGPLv2+ -> LGPLv2.1+
Created attachment 352707 [details] [review] gio/gvdb/: LGPLv2+ -> LGPLv2.1+
Created attachment 352708 [details] [review] gio/inotify/: LGPLv2+ -> LGPLv2.1+
Created attachment 352709 [details] [review] gio/tests/: LGPLv2+ -> LGPLv2.1+ A lot of tests in gio/tests/ don't have a license header.
Created attachment 352710 [details] [review] gio/win32/: LGPLv2+ -> LGPLv2.1+
Created attachment 352711 [details] [review] gio/xdgmime/: LGPLv2+ -> LGPLv2.1+
Created attachment 352712 [details] [review] gio/: LGPLv2+ -> LGPLv2.1+ Sub-directories inside gio/ already processed in a previous commit: - fam/ - gdbus-2.0/ (which contains only codegen/) - gvdb/ - inotify/ - tests/ - win32/ - xdgmime/ Other sub-directories inside gio/: - completion/: no license headers - kqueue/: not LGPL, BSD-style license
Created attachment 352713 [details] [review] tests/: LGPLv2+ -> LGPLv2.1+ gen-casefold-txt.pl and gen-casemap-txt.pl are licensed under GPLv2+, so they are not touched by this commit. A lot of *.c files in tests/ don't have a license header.
Created attachment 352714 [details] [review] Update COPYING file to LGPLv2.1
Created attachment 352715 [details] [review] docs: LGPL: Library -> Lesser
Review of attachment 352705 [details] [review]: ++
Review of attachment 352706 [details] [review]: ++
Review of attachment 352707 [details] [review]: ++
Review of attachment 352708 [details] [review]: ++
Review of attachment 352709 [details] [review]: ++
Review of attachment 352710 [details] [review]: ++
Review of attachment 352711 [details] [review]: ++
Review of attachment 352712 [details] [review]: Whew. ++
Review of attachment 352713 [details] [review]: ++
Review of attachment 352714 [details] [review]: ++
Review of attachment 352715 [details] [review]: ++
Thank you for the review. Attachment 352705 [details] pushed as 57cd1b4 - gio/fam/: LGPLv2+ -> LGPLv2.1+ Attachment 352706 [details] pushed as 0fedc90 - gio/gdbus-2.0/codegen/: LGPLv2+ -> LGPLv2.1+ Attachment 352707 [details] pushed as ae4bac0 - gio/gvdb/: LGPLv2+ -> LGPLv2.1+ Attachment 352708 [details] pushed as 6000f25 - gio/inotify/: LGPLv2+ -> LGPLv2.1+ Attachment 352709 [details] pushed as d9a44b6 - gio/tests/: LGPLv2+ -> LGPLv2.1+ Attachment 352710 [details] pushed as 408381b - gio/win32/: LGPLv2+ -> LGPLv2.1+ Attachment 352711 [details] pushed as 90afd3b - gio/xdgmime/: LGPLv2+ -> LGPLv2.1+ Attachment 352712 [details] pushed as 3bf4a72 - gio/: LGPLv2+ -> LGPLv2.1+ Attachment 352713 [details] pushed as f6c44ec - tests/: LGPLv2+ -> LGPLv2.1+ Attachment 352714 [details] pushed as 2d51054 - Update COPYING file to LGPLv2.1 Attachment 352715 [details] pushed as cc8b3d6 - docs: LGPL: Library -> Lesser
I think there might be a few instances still left. Looking through `git grep "version 2" | grep -v "version 2\.1"`, gio/gnetworking.h.in still seems to need fixing, at least. There might be others (I have not checked thoroughly).
Ah, it's possible that some files slipped through the cracks. I'll fix those later this week.
Created attachment 353076 [details] [review] LGPLv2+ -> LGPLv2.1+: update remaining files For the files in gio/ (but not in gio/ sub-directories), only the *.[ch] files were handled in commit 3bf4a720c315b5015c8d51edf0b458348f796674. For the modified files in glib/tests/markups/, I've tested that `make check` still succeeds. After this commit, $ git grep -in "GNU Library" and $ git grep -in "Library General" return only results in COPYING files and in glib/libcharset/. The latter was not updated because it's a copy. $ git grep -in "version 2" | grep -iv "version 2\.1" now doesn't return any LGPL license header. - glib-gettextize.in: GPL - glib/gen-unicode-tables.pl: GPL - glib/gnulib/: a copy - glib/libcharset/: a copy - m4macros/attributes.m4: GPL - po/po2tbl.sed.in: GPL - tap-driver.sh: GPL - tests/*.pl: GPL
Review of attachment 353076 [details] [review]: ++, thanks!
Attachment 353076 [details] pushed as eea0681 - LGPLv2+ -> LGPLv2.1+: update remaining files