Can I copy-paste Wayland generated header in my own library header?

ferreiradaselva ferreiradaselva at protonmail.com
Mon Dec 4 10:59:02 UTC 2017


Hi,


>-------- Original Message --------
>From: ppaalanen at gmail.com
>To: ferreiradaselva <ferreiradaselva at protonmail.com>
>
> Hi,
>
> first, IANAL, of course.
>
> The copyrights header you get in the generated headers and code comes
> from the XML files. It is the license of the XML protocol
> specification. I'm not sure if it applies to the generated code or not,
> I'd like to think it does, but I don't see much difference given how
> they are meant to be used.


To me, it makes sense to consider that the copyrights apply to the headers, too.


> Personally I would have no problem whatsoever for you to do what you
> want. Also the MIT license is very liberal, and you might want to read
> the dissection here:
> https://writing.kemitchell.com/2016/09/21/MIT-License-Line-by-Line.html


I've seen that link. I will talk about MIT bellow.


> I would add annotations in your files to clearly document which parts
> are verbatim/modified copies of the generated stuff, and from where and
> how they were generated - perhaps generating and piecing together the
> files could be part of your project's build from source even if your
> distributables are just more source. I would also keep the (generated)
> license blurbs with notes on which part of the file they apply to.


I like the idea of adding annotations stating where that piece of code come from. I will do that.


> I don't know ZLIB license, or why you picked that instead of MIT, for
> instance.
>
> Since the whole purpose of wayland-protocols is that you take the XML
> file, run it through wayland-scanner, and include the compiled product
> of that in your program binaries, there is no intention to change or
> affect your license. Even totally closed source proprietary programs
> are just fine using anything generated by wayland-scanner from
> wayland-protocols.
>
> I also see no reason to even attempt to forbid e.g. modifications to
> the generated code or even the XML itself.


Both ZLIB and MIT are very similar, and with similar popularity, the difference is that ZLIB is a bit more clear, and more permissive, since it doesn't state that "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software." This statement in MIT mean that a user making an application must state somewhere that they are using such library under MIT. I already state in repository that Wayland is used, but the end-user *likely* won't do that (for whatever reason). Does the Wayland development community feel like that's a problem?


> Mind, that while libwayland-client tries hard to maintain backwards
> compatiblity, it is not guaranteeing forward compatibility. Code
> generated with a newer wayland-scanner may not work with an older
> libwayland-client. This has been necessary to fix bugs.
>
> We encourage all projects to run wayland-scanner as part of their build
> and match the wayland-scanner with the libwayland version they require
> minimum, instead of storing the generated code in VCS. That way
> distributions can choose a more recent libwayland minimum version with
> any bug fixes in the generated code.


Currently, I'm trying to give the user less work as possible. The whole premise is "you just need to grab these two files (source and header) into your build system and link to the right libraries to have a window framework ready." Backwards compatiblity is good enough for me (and I believe it will be for the end-user).


> Thanks,
> pq


Thank you. And sorry about this boring subject about licenses, it's that I'm trying to offer an open-source project that might be useful for other people, too :)


More information about the wayland-devel mailing list