GNOME Bugzilla – Bug 788990
Include licensing information in output from glib-mkenums, glib-genmarshal
Last modified: 2017-10-25 11:39:57 UTC
Hi, I need some authoritative answer what copyright and license information is needed to distribute header and body produced by `glib-genmarshal`. My libraries use either GNU GPLv3+ or AGPLv3+. http://git.savannah.gnu.org/cgit/gsequencer.git I need to proceed a new submission on savannah.gnu.org to split the application. Bests, Joël
Of course, I am not a lawyer, so this must not be construed as legal advice. If you want legal advice, I strongly encourage you to consult a lawyer. The clear intention of the GLib project is that the license of the tools provided by GLib does not propagate to the code generated as the output of those tools; the generated code has the same license as the rest of the project. The generated code contains calls to the GLib API, and once it's compiled, it expects the GLib ABI; this means that the project must comply with the requirements of the GNU Lesser General Public License, either version 2.1 or, at your option, any later version, since GLib falls under those licensing terms.
Hi, I did a license note as following: http://git.savannah.gnu.org/cgit/gsequencer.git/tree/README?h=1.1.x#n193 I hope it meets your demands. regards, Joël
(In reply to Joël Krähemann from comment #2) > Hi, > I did a license note as following: > http://git.savannah.gnu.org/cgit/gsequencer.git/tree/README?h=1.1.x#n193 It looks like you’ve slightly misunderstood. The code generated by glib-genmarshal is under whatever license *your project* is under. In this case, that seems to be the GPLv3. What Emmanuele was saying about the LGPL refers to the fact that by using code generated by glib-genmarshal, your project needs to link against GLib. Since GLib is licensed under the LGPL, that means your project has to comply with the LGPL to be allowed to link against it. Since your project is GPLv3, it does comply. What we could do to GLib is to include a summary of the licensing information in the code generated by glib-mkenums and glib-genmarshal, to make things clearer.
Created attachment 361847 [details] [review] glib-mkenums: Add default comment template if none is provided The fallback code for providing a default comment template only worked if a template file was provided. It didn’t work if individual templates were provided on the command line (and --comment wasn’t). Signed-off-by: Philip Withnall <withnall@endlessm.com>
Created attachment 361848 [details] [review] glib-genmarshal/glib-mkenums: Add comment clarifying licensing Clarify the licensing of the code generated by the two scripts in a comment in the header of each generated file. The intention is that the license of GLib does *not* apply to the generated files; but that they are subject to the linking restrictions of the LGPL, since they link to GLib and GLib is licensed under the LGPL. The generated files themselves are under the license of whatever project they’re generated for. Signed-off-by: Philip Withnall <withnall@endlessm.com>
Review of attachment 361847 [details] [review]:
Review of attachment 361848 [details] [review]: ::: gobject/glib-genmarshal.in @@ +165,1 @@ +def generate_licensing_header(outfile): Nitpick: maybe should be called `generate_licensing_comment()`, since you use it in the `generate_header_preamble()` and `generate_body_preamble()` functions. @@ +165,2 @@ +def generate_licensing_header(outfile): + outfile.write('/* Generated data (by glib-genmarshal). This code is ' Minor nitpicks: - the comment should still say '''This file is generated by glib-genmarshal, do not modify it''' - the comment style should probably follow GLib's own, and thus use: ``` /* ... * ... */ ``` ::: gobject/glib-mkenums.in @@ +383,3 @@ # put auto-generation comment +comment = comment_tmpl.replace('\u0040comment\u0040', + 'Generated data (by glib-mkenums). This code ' Same nitpicks as the comment for glib-genmarshal.
Review of attachment 361848 [details] [review]: ::: gobject/glib-genmarshal.in @@ +165,1 @@ +def generate_licensing_header(outfile): Fair. @@ +165,2 @@ +def generate_licensing_header(outfile): + outfile.write('/* Generated data (by glib-genmarshal). This code is ' I was aiming to standardise the comments between glib-mkenums and glib-genmarshal. How about changing them both to be: This file is generated by (program), do not modify it. This code is… I deliberately didn’t do multi-line comments, because then I’d have to support them in the template file and support C and C++ style versions, and that would be a nightmare.
Comment on attachment 361847 [details] [review] glib-mkenums: Add default comment template if none is provided Attachment 361847 [details] pushed as fcfbaf8 - glib-mkenums: Add default comment template if none is provided
Created attachment 362068 [details] [review] glib-genmarshal/glib-mkenums: Add comment clarifying licensing Clarify the licensing of the code generated by the two scripts in a comment in the header of each generated file. The intention is that the license of GLib does *not* apply to the generated files; but that they are subject to the linking restrictions of the LGPL, since they link to GLib and GLib is licensed under the LGPL. The generated files themselves are under the license of whatever project they’re generated for. Signed-off-by: Philip Withnall <withnall@endlessm.com>
Review of attachment 362068 [details] [review]: Looks good
Attachment 362068 [details] pushed as 9a319a1 - glib-genmarshal/glib-mkenums: Add comment clarifying licensing