After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 776504 - Upgrade license from LGPLv2+ to LGPLv2.1+
Upgrade license from LGPLv2+ to LGPLv2.1+
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other All
: Normal enhancement
: ---
Assigned To: gtkdev
gtkdev
Depends on: 776586
Blocks:
 
 
Reported: 2016-12-26 17:34 UTC by Sébastien Wilmet
Modified: 2017-06-03 08:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
glib/deprecated/: LGPLv2+ -> LGPLv2.1+ (7.86 KB, patch)
2017-01-05 14:15 UTC, Sébastien Wilmet
committed Details | Review
glib/tests/: LGPLv2+ -> LGPLv2.1+ (17.16 KB, patch)
2017-01-05 14:15 UTC, Sébastien Wilmet
committed Details | Review
glib/: LGPLv2+ -> LGPLv2.1+ (122.63 KB, patch)
2017-01-05 14:15 UTC, Sébastien Wilmet
committed Details | Review
gmodule/: LGPLv2+ -> LGPLv2.1+ (23.00 KB, patch)
2017-01-05 14:15 UTC, Sébastien Wilmet
committed Details | Review
gthread/: LGPLv2+ -> LGPLv2.1+ (999 bytes, patch)
2017-01-05 14:15 UTC, Sébastien Wilmet
committed Details | Review
gobject/tests/: LGPLv2+ -> LGPLv2.1+ (2.64 KB, patch)
2017-01-05 14:15 UTC, Sébastien Wilmet
committed Details | Review
gobject/: LGPLv2+ -> LGPLv2.1+ (27.22 KB, patch)
2017-01-05 14:15 UTC, Sébastien Wilmet
committed Details | Review
gio/fam/: LGPLv2+ -> LGPLv2.1+ (1.03 KB, patch)
2017-05-28 12:33 UTC, Sébastien Wilmet
committed Details | Review
gio/gdbus-2.0/codegen/: LGPLv2+ -> LGPLv2.1+ (6.74 KB, patch)
2017-05-28 12:34 UTC, Sébastien Wilmet
committed Details | Review
gio/gvdb/: LGPLv2+ -> LGPLv2.1+ (3.61 KB, patch)
2017-05-28 12:34 UTC, Sébastien Wilmet
committed Details | Review
gio/inotify/: LGPLv2+ -> LGPLv2.1+ (13.91 KB, patch)
2017-05-28 12:34 UTC, Sébastien Wilmet
committed Details | Review
gio/tests/: LGPLv2+ -> LGPLv2.1+ (47.83 KB, patch)
2017-05-28 12:34 UTC, Sébastien Wilmet
committed Details | Review
gio/win32/: LGPLv2+ -> LGPLv2.1+ (8.70 KB, patch)
2017-05-28 12:34 UTC, Sébastien Wilmet
committed Details | Review
gio/xdgmime/: LGPLv2+ -> LGPLv2.1+ (11.08 KB, patch)
2017-05-28 12:34 UTC, Sébastien Wilmet
committed Details | Review
gio/: LGPLv2+ -> LGPLv2.1+ (324.28 KB, patch)
2017-05-28 12:34 UTC, Sébastien Wilmet
committed Details | Review
tests/: LGPLv2+ -> LGPLv2.1+ (26.01 KB, patch)
2017-05-28 12:35 UTC, Sébastien Wilmet
committed Details | Review
Update COPYING file to LGPLv2.1 (17.71 KB, patch)
2017-05-28 12:35 UTC, Sébastien Wilmet
committed Details | Review
docs: LGPL: Library -> Lesser (1.00 KB, patch)
2017-05-28 12:35 UTC, Sébastien Wilmet
committed Details | Review
LGPLv2+ -> LGPLv2.1+: update remaining files (10.48 KB, patch)
2017-06-02 11:22 UTC, Sébastien Wilmet
committed Details | Review

Description Sébastien Wilmet 2016-12-26 17:34:33 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
Comment 1 Emmanuele Bassi (:ebassi) 2017-01-04 17:18:43 UTC
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"
Comment 2 Sébastien Wilmet 2017-01-05 14:14:26 UTC
I'll send a first batch for the following directories:
- glib/
- gmodule/
- gthread/
- gobject/
Comment 3 Sébastien Wilmet 2017-01-05 14:15:09 UTC
Created attachment 342957 [details] [review]
glib/deprecated/: LGPLv2+ -> LGPLv2.1+
Comment 4 Sébastien Wilmet 2017-01-05 14:15:14 UTC
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.
Comment 5 Sébastien Wilmet 2017-01-05 14:15:21 UTC
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
Comment 6 Sébastien Wilmet 2017-01-05 14:15:27 UTC
Created attachment 342960 [details] [review]
gmodule/: LGPLv2+ -> LGPLv2.1+
Comment 7 Sébastien Wilmet 2017-01-05 14:15:34 UTC
Created attachment 342961 [details] [review]
gthread/: LGPLv2+ -> LGPLv2.1+
Comment 8 Sébastien Wilmet 2017-01-05 14:15:41 UTC
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.
Comment 9 Sébastien Wilmet 2017-01-05 14:15:47 UTC
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.
Comment 10 Sébastien Wilmet 2017-01-05 15:54:52 UTC
I've also pushed this branch:
https://git.gnome.org/browse/glib/log/?h=wip/swilmet/LGPLv2.1

where you can see statistics.
Comment 11 Sébastien Wilmet 2017-01-26 11:07:30 UTC
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… ;)
Comment 12 Sébastien Wilmet 2017-05-24 10:29:31 UTC
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.
Comment 13 Philip Withnall 2017-05-25 13:17:13 UTC
Review of attachment 342957 [details] [review]:

Yes.
Comment 14 Philip Withnall 2017-05-25 13:18:17 UTC
Review of attachment 342958 [details] [review]:

Yes.
Comment 15 Philip Withnall 2017-05-25 13:20:50 UTC
Review of attachment 342959 [details] [review]:

Yes.

Whew.
Comment 16 Philip Withnall 2017-05-25 13:21:22 UTC
Review of attachment 342960 [details] [review]:

Yes.
Comment 17 Philip Withnall 2017-05-25 13:21:37 UTC
Review of attachment 342961 [details] [review]:

Yes.
Comment 18 Philip Withnall 2017-05-25 13:22:17 UTC
Review of attachment 342963 [details] [review]:

Yes.
Comment 19 Philip Withnall 2017-05-25 13:22:40 UTC
Review of attachment 342962 [details] [review]:

Yes.
Comment 20 Philip Withnall 2017-05-25 13:23:08 UTC
Thanks for working on this; those patches all look good to me.
Comment 21 Colin Walters 2017-05-25 13:23:44 UTC
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?
Comment 22 Emmanuele Bassi (:ebassi) 2017-05-25 14:03:31 UTC
(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.
Comment 23 Sébastien Wilmet 2017-05-25 15:41:50 UTC
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+
Comment 24 Sébastien Wilmet 2017-05-25 15:47:15 UTC
Thanks for the review.

Yes I'll do a second batch for GIO and to update the COPYING.
Comment 25 Sébastien Wilmet 2017-05-28 12:26:59 UTC
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.
Comment 26 Sébastien Wilmet 2017-05-28 12:33:15 UTC
I've pushed this branch:
https://git.gnome.org/browse/glib/log/?h=wip/swilmet/LGPLv2.1

I'll also attach the patches here.
Comment 27 Sébastien Wilmet 2017-05-28 12:33:40 UTC
Created attachment 352705 [details] [review]
gio/fam/: LGPLv2+ -> LGPLv2.1+

There is only one *.c file in gio/fam/.
Comment 28 Sébastien Wilmet 2017-05-28 12:34:09 UTC
Created attachment 352706 [details] [review]
gio/gdbus-2.0/codegen/: LGPLv2+ -> LGPLv2.1+
Comment 29 Sébastien Wilmet 2017-05-28 12:34:14 UTC
Created attachment 352707 [details] [review]
gio/gvdb/: LGPLv2+ -> LGPLv2.1+
Comment 30 Sébastien Wilmet 2017-05-28 12:34:20 UTC
Created attachment 352708 [details] [review]
gio/inotify/: LGPLv2+ -> LGPLv2.1+
Comment 31 Sébastien Wilmet 2017-05-28 12:34:33 UTC
Created attachment 352709 [details] [review]
gio/tests/: LGPLv2+ -> LGPLv2.1+

A lot of tests in gio/tests/ don't have a license header.
Comment 32 Sébastien Wilmet 2017-05-28 12:34:42 UTC
Created attachment 352710 [details] [review]
gio/win32/: LGPLv2+ -> LGPLv2.1+
Comment 33 Sébastien Wilmet 2017-05-28 12:34:48 UTC
Created attachment 352711 [details] [review]
gio/xdgmime/: LGPLv2+ -> LGPLv2.1+
Comment 34 Sébastien Wilmet 2017-05-28 12:34:57 UTC
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
Comment 35 Sébastien Wilmet 2017-05-28 12:35:02 UTC
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.
Comment 36 Sébastien Wilmet 2017-05-28 12:35:10 UTC
Created attachment 352714 [details] [review]
Update COPYING file to LGPLv2.1
Comment 37 Sébastien Wilmet 2017-05-28 12:35:15 UTC
Created attachment 352715 [details] [review]
docs: LGPL: Library -> Lesser
Comment 38 Philip Withnall 2017-05-29 10:07:01 UTC
Review of attachment 352705 [details] [review]:

++
Comment 39 Philip Withnall 2017-05-29 10:07:15 UTC
Review of attachment 352706 [details] [review]:

++
Comment 40 Philip Withnall 2017-05-29 10:07:26 UTC
Review of attachment 352707 [details] [review]:

++
Comment 41 Philip Withnall 2017-05-29 10:07:46 UTC
Review of attachment 352708 [details] [review]:

++
Comment 42 Philip Withnall 2017-05-29 10:09:10 UTC
Review of attachment 352709 [details] [review]:

++
Comment 43 Philip Withnall 2017-05-29 10:09:23 UTC
Review of attachment 352710 [details] [review]:

++
Comment 44 Philip Withnall 2017-05-29 10:09:38 UTC
Review of attachment 352711 [details] [review]:

++
Comment 45 Philip Withnall 2017-05-29 10:15:18 UTC
Review of attachment 352712 [details] [review]:

Whew. ++
Comment 46 Philip Withnall 2017-05-29 10:15:35 UTC
Review of attachment 352713 [details] [review]:

++
Comment 47 Philip Withnall 2017-05-29 10:16:03 UTC
Review of attachment 352714 [details] [review]:

++
Comment 48 Philip Withnall 2017-05-29 10:16:16 UTC
Review of attachment 352715 [details] [review]:

++
Comment 49 Sébastien Wilmet 2017-05-29 17:56:12 UTC
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
Comment 50 Philip Withnall 2017-05-29 18:27:30 UTC
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).
Comment 51 Sébastien Wilmet 2017-05-29 19:07:14 UTC
Ah, it's possible that some files slipped through the cracks. I'll fix those later this week.
Comment 52 Sébastien Wilmet 2017-06-02 11:22:50 UTC
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
Comment 53 Philip Withnall 2017-06-02 22:29:14 UTC
Review of attachment 353076 [details] [review]:

++, thanks!
Comment 54 Sébastien Wilmet 2017-06-03 08:33:10 UTC
Attachment 353076 [details] pushed as eea0681 - LGPLv2+ -> LGPLv2.1+: update remaining files