Pelagicore / gdbus-codegen-glibmm

Code generator for C++ D-Bus stubs and proxies using Giomm/Glibmm
GNU Lesser General Public License v2.1
23 stars 25 forks source link

License of the generated code? #97

Open juhaase opened 3 years ago

juhaase commented 3 years ago

Hi, I saw this line at the bottom of the README:

"Source code licensed under the LGPL 2.1 (please see source code headers for more.)"

Is this applicable to the generated cpp source/header files? (Because there is no copyright notice in the generated files) Would LGPL 2.1 mean I have to publish the generated sources?

I think it might be helpful to add a paragraph explaining licensing to the README.

erikboto commented 3 years ago

I'd say you're free to license the generated code under which ever license you want, at least it's not determined by the license of gdbus-codegen-glibmm.

IIRC this code was derived from gdbus-codegen, which had a similar question come up on their mailing list: https://mail.gnome.org/archives/desktop-devel-list/2017-March/msg00102.html

I guess you're right that a small section in the README about this could be helpful.

juhaase commented 3 years ago

Thank you for your quick reply. I think I'm probably in the same boat as the person from the mailing list: I'm evaluating if we could use the code generator to generate the dbus interface code for a proprietary project to save us from writing all this boilerplate code.

As I see it, currently all files in the repository are LGPL 2.1 including the template files. Now, if I generate some source/header files, these are probably a "derivative work" of the original template files. Which means they are also LGPL 2.1 and as such would have to be published if used in some software project that is to be distributed.

I don't know if this was the intention all along, but if it's not there might be two possible ways to clarify this:

The Bison exception says:

As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception.

Maybe for the gdbus-codegen-glibmm this could be reworded and shortened like:

As a special exception, you may create a larger work that contains part or all of the gdbus-codegen-glibmm template files and distribute that work under terms of your choice.

Disclaimer: I'm not a copyright lawyer, so I'm not sure if it could work this way.

I sincerely hope I'm not overstepping with these suggestions. If the authors intended the generated files to be copyleft free software I'm fine with that and will of course respect that.

erikboto commented 3 years ago

@mardy you're still at Luxoft right? What do you say about adding a clarification that the license of the template files allow derivative work to be licensed as whatever the user prefers.

juhaase commented 3 years ago

More info: I've jst checked the output of the gdbus-codegen c version. The generated files contain this "license header":

/*
 * Generated by gdbus-codegen 2.56.4. DO NOT EDIT.
 *
 * The license of this code is the same as for the D-Bus interface description
 * it was derived from.
 */