flatpak / flatpak-builder

Tool to build flatpaks from source
GNU Lesser General Public License v2.1
139 stars 91 forks source link

Please clarify license: LGPL or GPL? #34

Open smcv opened 7 years ago

smcv commented 7 years ago

flatpak-builder is mostly LGPL-2+ or LGPL-2.1+, but src/builder-utils.c says:

top of file:

 * This file 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.

middle of file:

 * This code is based on debugedit.c from rpm, which has this copyright:
 *
 *
 * Copyright (C) 2001, 2002, 2003, 2005, 2007, 2009, 2010, 2011 Red Hat, Inc.
 * Written by Alexander Larsson <alexl@redhat.com>, 2002
 * Based on code by Jakub Jelinek <jakub@redhat.com>, 2001.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.

If Red Hat, Inc. is really the only copyright holder, then Red Hat is free to relicense this code to LGPL-2+ or LGPL-2.1+. If that is what you want to do, please keep the copyright notice, but replace the license grant with an appropriate LGPL license grant, or a note that it has been relicensed with Red Hat's permission.

Alternatively, if you are intentionally leaving this code GPL, that means that flatpak-builder as a whole is effectively GPL-2+. This is the interpretation I've chosen to follow for now in Debian, because it's the most conservative and it doesn't rely on anyone deliberately relicensing anything. However, if this is the case, then the license grant at the top of src/builder-utils.c is misleading, and the top-level directory ought to contain a copy of the GPL as well as the LGPL (perhaps the GPL text in COPYING.GPL, the LGPL text in COPYING.LGPL, and a note/summary about what is going on in COPYING).

There also seems to be some confusion about the LGPL. GNU has published the Library General Public License, version 2, and the Lesser General Public License, versions 2.1 and 3 (with a note that these count as later versions of the Library General Public license for the purposes of the "any later version" license grant). Some flatpak-builder source files declare that they are under the Lesser General Public License version 2 or any later version, but strictly speaking, that license does not exist. The two combinations that make sense are the Library General Public License, version 2 or any later version (LGPL-2+) or the Lesser General Public license, version 2.1 or any later version (LGPL-2.1+).

I have no opinion on whether you should prefer L(ibrary)GPL-2+ or L(esser)GPL-2.1+, but you should probably pick one or the other, and write license grants accordingly. If you tell me which one you were aiming for, I can provide a patch.

alexlarsson commented 7 years ago

I wrote the initial version of debugedit.c for rpm many years ago. It has since got some changes in the version i based the flatpak code on, so i kep the current rpm license on the code. A while ago i sent a mail to the rpm developers about relicensing it, but didn't get a reply.

smcv commented 7 years ago

Thanks, I'll prepare a PR to make the situation clearer.