kaitai-io / kaitai_struct

Kaitai Struct: declarative language to generate binary data parsers in C++ / C# / Go / Java / JavaScript / Lua / Nim / Perl / PHP / Python / Ruby
https://kaitai.io
3.91k stars 193 forks source link

Add licenses to the formats in KSY repo #264

Open KOLANICH opened 6 years ago

KOLANICH commented 6 years ago

Not all the formats in the repo have license metadata property. You can either add it or apply some license by default for the files in the kaitai-io/kaitai_struct_formats repo where license is not mentioned

GreyCat commented 6 years ago

Yeah, it's a known problem. Lots of my older specs miss them and, unfortunately, sometimes I forgot to ask the contributors to add it. We can't decide for them, so we should work towards getting this clear.

GreyCat commented 6 years ago

Checklist to fix / resolve:

GreyCat commented 6 years ago

A big question about adding licensing info goes to:

If you don't want / can't commit it yourself, you can just state it here, I'll add it for you.

LogicAndTrick commented 6 years ago

I'm fine with using CC0 for quake_mdl.

koczkatamas commented 6 years ago

I am also fine with CC0, but I need to check first if I copied any licensed material (eg. as comment or doc field) by mistake.

KOLANICH commented 6 years ago

GPL-3.0+ doesn't look valid

Really?

GFDL-1.3 doesn't look valid

It is not in the database, but the spec author added that later version also can be used. So I added a plus there.

koczkatamas commented 6 years ago

Oh about dex: I used CC-BY-SA-3.0 because the original documentation the ksy based on was licensed with CC-BY-SA-3.0.

Should we change this? Or remove the documentation parts which were copied from there?

GreyCat commented 6 years ago

@KOLANICH GPL-3.0+ is actually a license expression, not just a license identifier, as it is expected by current parser (and, anyway, even GPL-3.0 is not whitelisted there). Probably we need to fix the parser.

GreyCat commented 6 years ago

@koczkatamas dex is ok, it's just that CC-BY-SA-3.0 should be whitelisted in the parser.

adventureloop commented 6 years ago

@GreyCat CC0 is fine

GreyCat commented 6 years ago

@adventureloop Thanks for a swift reply! Will add it now :)

KOLANICH commented 6 years ago

Also there are very slick questions. We need to know answers to them (=consult a good lawer) and put them into Readme.md.

Let we have some spec. It is copyrighted by corporations, it is explicitly written there. Is the ksy file (or any other product) based on this spec copyrighted by the spec copyright holders? Does it mean that everyone wanting to develop low-level things for PC platform is legally required to have a business agreement with Intel? Is the ksy file with docs borrowed from the spec copyrighted by the spec holders? Is the ksy file reverse-engineered from open source software with a viral license source code legally required to share the same license? Is a ksy file based on a spec or source code considered derived work? Is it legal to create a ksy based on a spec and put a public domain-like license there (I use Unlicense)? If it is not legal, how about putting the doc strings taken from the spec/code into a separate file licensed under a needed license, and putting the description into a file licensed under public-domain like license and making the KSC link the 2 files together when generating the code? Will it change anything?

moritonal commented 6 years ago

Hi @GreyCat feel free to license the dns_packet as CC0, hell, you did as much work on it as I did with your comments if I remember right. Glad to see this project alive and well, I'll try put some time aside at some point to catch up.

GreyCat commented 6 years ago

@Glitch0011 Thanks!

GreyCat commented 6 years ago

Also there are very slick questions. We need to know answers to them (=consult a good lawer) and put them into Readme.md

I believe that, unfortunately, it won't be that simple. There are several major reasons for that: all copyright terms are slightly different, there are multiple countries involved which have somewhat different copyright laws, etc, etc. There would be no "100% guaranteed" rules. Even if we'll seek lawyer's advice, it would be for a particular case, not en masse.

Is the ksy file with docs borrowed from the spec copyrighted by the spec holders?

It's not "copyrighted by the spec holders", it is definitely infringing someone's copyright, if there were no explicit permissions given that one can copy the text from a spec, and it's substantial enough to not be treated as "fair use". One the other hand, even if you don't copy the text directly, there's a still a chance of getting a lawsuit (and even winning one — see, for example, the infamous Whelan US decision — although in modern practice usually an abstaction-filtration-comparison test takes precedence after CA vs Altai case).

Is the ksy file reverse-engineered from open source software with viral license legally required to share the same license?

This is open source software, and it's much easier just to ping relevant author directly and ask, if in doubt. That's good in many aspects: (1) people getting praise and recognition for their past work they deserve, (2) people feeling that it was not in vain, (3) people getting to know about Kaitai Struct formats project (and may be they would want to contribute and use it themselves), (4) getting their definitive opinion is a 99.9% guarantee that no surprise lawsuits would be filed.

I mean is it legal to create a ksy based on a spec and put a public domain-like license there?

When a corporation publishes a spec, it is usually done for some purpose, and it sometimes even outlines what they seem to be appropriate to do with it. Creation of software that uses that spec is usually legal, but direct copying of a spec text is usually not — although, again, all that stuff should be decided on case-by-case basis.

(I use Unlicense)

May be that's not a very good idea — at least FSF, OSI and Fedora project lawyers recommend using CC0 over Unlicense.

If it is not legal, how about putting doc strings into a separate file licensed under a proprietary license, and putting the description into a file ticensed under public-domain like license and making KSC link the 2 files together when generating the code?

I heavily doubt that would work. You're still copying and distributing slightly modified version of copyright-protected text that you don't have the right to distribute. One may invent crazier variants of your idea, like specifying text positions to copy from a verbatim spec file — i.e., literally, like:

- id: foo
  type: u2
  doc:
    file: some_crazy_format_spec.html
    pos-start: 1000
    pos-end:  1080

but I doubt that anyone would use such an atrocity :) And, anyway, even that's still not 100% guarantee.

KOLANICH commented 6 years ago

One may invent crazier variants of your idea, like specifying text positions to copy from a verbatim spec file

It's a very good idea

1 transform a pdf into a plain text 2 find the corresponding substrings in plain text by offsets 3 find these strings in pdf and navigate to them in a pdf viewer