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

Request to add brief documentation on the license of files output by the protobuf compiler #540

Open
jafingerhut opened this issue Jan 27, 2025 · 3 comments

Comments

@jafingerhut
Copy link
Contributor

jafingerhut commented Jan 27, 2025

e.g. the C, C++, Python, and Rust files that are now checked into this repository, and in general what the license status is of source files output by Protobuf.

I am certain that GCC somewhere mentions specifically that the assembly and binaries it produces can be released under a proprietary license.

I am nearly certain the same is true for code generated by tools like Bison and flex.

Hopefully the same is true for Protobuf, but having a link to a specific section of the Protobuf documentation explaining its policy on this question would be helpful.

@Dscano
Copy link
Contributor

Dscano commented Jan 28, 2025

Hi Andy,

I did some quick research on Protobuf:

  • According to Wikipedia, protobuf is licensed under the BSD License.
  • The license in the protobuf repository is available here, which essentially outlines the same terms as the BSD License.
  • For more detailed information on the BSD License, you can find the documentation here.

So, from my understanding, to summarize:

Redistribution and use in both source and binary forms, with or without modification, are permitted, but the following conditions must be met:
Redistributions of source code and binary must retain the copyright notice, conditions, and disclaimer as stated in the "BSD License documentation." The names of Google or its contributors cannot be used for endorsement without prior written consent

@jafingerhut
Copy link
Contributor Author

Thanks for that info, Davide.

Bison outputs source code files with a GPL v2 license header in them, but also a paragraph beginning "As a special exception ...", like found here: https://spdx.org/licenses/archive/archived_ll_v2.4/Bison-exception-2.2.html

I was wondering whether the source code files output by the Protobuf compiler protoc might have a similar exception.

Even if they don't have such an exception, and the output source files of protoc are BSD licensed, that should be perfectly fine for including in software released under a proprietary license.

@antoninbas
Copy link
Member

There is a note for this in the protobuf license file:

Code generated by the Protocol Buffer compiler is owned by the owner
of the input file used when generating it. This code is not
standalone and requires a support library to be linked with it. This
support library is itself covered by the above license.

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

3 participants