Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

License of the generated code? #97

Open
juhaase opened this issue Mar 12, 2021 · 4 comments
Open

License of the generated code? #97

juhaase opened this issue Mar 12, 2021 · 4 comments

Comments

@juhaase
Copy link

juhaase commented Mar 12, 2021

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
Copy link
Contributor

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
Copy link
Author

juhaase commented Mar 15, 2021

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:

  • change the license for the template files to something more permissive like the MIT-license
  • add an exception to the LGPL license, similar to the "GNU Bison exception" (a parser generator)

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
Copy link
Contributor

@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
Copy link
Author

juhaase commented Mar 16, 2021

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.
 */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants