You are not logged in.

#1 2024-12-31 22:31:52

porcelain1
Member
Registered: 2020-01-18
Posts: 100

Copyright, software licenses: common practices and tutorials

hey, Happy New Year

first of all, my current connection to Arch is the fact that MSYS2 uses pacman. regardless, I'm resorting to you, because I know many tech-savvy people inhabit here, and I'm not connected to any other community besides some IRC channels.

basically, I'm looking for some text that explains all sorts of stuff regarding copyright and software licenses. I've spent one hour googling and I couldn't find anything

so if anyone know of any text that deals with such concerns, please link me!!

or tell me how to learn this stuff! am I supposed to search for individual stuff? can I generally trust the answers I find?

specifically, I'd like to learn about this stuff, in no particular order:

- What is copyright?
- What am I supposed to write at the top of every single source code file of my project? Is there a standardized format?
- How can I put my e-mail in a way that I don't receive spam?
- Should I update the copyright year every year, even though the code has not changed?
- What is SPDX and should I care about it?
- Why some software include the entirety of their licenses at the top of every single code there? Is this better?
- If I copied code from a tutorial, is the code mine or from the tutorial's author? Or both? What if I translated every single code from the tutorial to another programming language? What if I changed the code to suit my needs, slightly?
- What is the granularity of code that belongs to me and someone else? Is this a line-by-line basis, maybe git blame can help? Or nobody cares about this?
- If someone's code is completely replaced over years, does this person still has copyright?
- How to use code from some blog or scientific publication that doesn't seem to have any particular license?
- Is it enough to attribute libraries in the description of a website where the executable is hosted, or should the executable contain built-in attribution information and show them when prompted to do so? Context: HTML5 games.
- What if I have a file called LICENSE at the root of my project, but I have files copied from other projects with different licenses inside my project?
- Is there some person who holds copyright over the license text itself? lol
- Is there any pitfall, any trick, any caveat, any trap I should be aware of?
- How does software licenses work with code generators? (I'M NOT TALKING ABOUT AI) Like, do I hold copyright only over the template/DSL code, or does the generated code has some copyright too? What about pieces of code the code generator spits that are hard-coded inside it? Am I supposed to discover the authors of the hard-coded pieces of code? I'm talking about stuff like yacc, lex, Ragel, m4 and personal code generators etc.
- Am I supposed to give attribution to every dependency my dependencies have, recursively? Is there some tool to collect such information? Or just immediate dependencies?
- How to give attribution at all? Is this free text, or do I have to follow a standard way to word it?
- If I make some mistakes, and they go unnoticed for maybe years, will I be punished some way, or is it a no-brainer fix?

I have more hairy issues I'd like to address, but they are future problems, and I'm not in the mood to list them immediately...

I can choose a license myself, so I'm not looking for opinions, advocacy, etc.

Last edited by porcelain1 (2024-12-31 22:35:38)


Behemoth, wake up!

Offline

#2 2025-01-01 19:47:08

mpan
Member
Registered: 2012-08-01
Posts: 1,367
Website

Re: Copyright, software licenses: common practices and tutorials

porcelain1 wrote:

basically, I'm looking for some text that explains all sorts of stuff regarding copyright and software licenses. I've spent one hour googling and I couldn't find anything

so if anyone know of any text that deals with such concerns, please link me!!

Books with academic/insitutional commentaries on the law and court verdicts for lawyers, specific to your particular location (only). Those are nearly exclusively paper books, so no links. A good keyword for titles would be “compendium.” Other than that you are left with general public commentaries, which are usually biased to some extent, or acquiring knowledge with time, finding, judging and learning from good commentaries from lawyers.

porcelain1 wrote:

can I generally trust the answers I find?

Generally no, including this one. Even if we ignore plain myths and misconceptions, in which most of the population believes: everybody, and that does include individual lawyers, has their blind spots, biases, outdated information, misinterpretations, and holes knowledge. That also includes my reply.

If you have any concerns, ask a professional advisor in your own location.

All responses below refer to copyright as understood in most jurisdictions in the Berne convention. More or less, as small variations do exist. This is why you should only consult your local legal advisors.

porcelain1 wrote:

- What is copyright?

Copyright (on Wikipedia)

porcelain1 wrote:

- What am I supposed to write at the top of every single source code file of my project? Is there a standardized format?

Nothing. No.

porcelain1 wrote:

- How can I put my e-mail in a way that I don't receive spam?

I don’t see how that relates to copyright, so I skip that. It’s an entire separate topic mandating its own thread.

porcelain1 wrote:

- Should I update the copyright year every year, even though the code has not changed?

Copyright is a right that simply exists. It doesn’t require any updating. If you mean a copyright notice: no.

porcelain1 wrote:

- What is SPDX and should I care about it?

SPDX. If you want to use it, usually people just limit it to using the licensing part of it and marking files with SPDX-License-Identifier.

porcelain1 wrote:

- Why some software include the entirety of their licenses at the top of every single code there? Is this better?

Depends on the context. In proprietary environments: as a threat and to ensure favourable court case outcomes. In FOSS: either an ideological statement, or because the code depends on another work that has such a requirement in its licensing terms.

porcelain1 wrote:

- If I copied code from a tutorial, is the code mine or from the tutorial's author? Or both?

Depends if it’s a copyrightable work. If it is: it is owned by the author, you need a license to use it, and the licensing terms determine ownership and what you can do with the code. If it’s not, then the question becomes irrelevant, as there is no copyright on the original code. Nearly universally snippets in tutorials are not meeting threesholds to be copyrightable works. But nearly, not absolutely.

porcelain1 wrote:

What if I translated every single code from the tutorial to another programming language? What if I changed the code to suit my needs, slightly?

Assuming the original was a copyrightable work: you created a derivative work.

porcelain1 wrote:

- What is the granularity of code that belongs to me and someone else? Is this a line-by-line basis, maybe git blame can help? Or nobody cares about this?

There is no definition. It’s a collective work. If a need arises to make distinction, the court is going to decide. It’s possible a work is not separatable, which often is the case with code. If large, logical sections are written by different people, IMO git blame sounds reasonable. But it sounds to me: the court may think otherwise.

porcelain1 wrote:

- If someone's code is completely replaced over years, does this person still has copyright?

Assuming the new code isn’t a derivative work and licensing doesn’t state otherwise: no.

porcelain1 wrote:

- How to use code from some blog or scientific publication that doesn't seem to have any particular license?

You ask the owner for the license.

porcelain1 wrote:

- Is it enough to attribute libraries in the description of a website where the executable is hosted, or should the executable contain built-in attribution information and show them when prompted to do so? Context: HTML5 games.

Depends entirely on the licensing terms you accepted.

porcelain1 wrote:

- What if I have a file called LICENSE at the root of my project, but I have files copied from other projects with different licenses inside my project?

A commonly used practice is concatenating all licenses into the single file, optionally marking which refers to what (if needed).

porcelain1 wrote:

- Is there some person who holds copyright over the license text itself? lol

Yes. The entity, that wrote the license.

porcelain1 wrote:

- Is there any pitfall, any trick, any caveat, any trap I should be aware of?

Yes

porcelain1 wrote:

- How does software licenses work with code generators? (I'M NOT TALKING ABOUT AI) Like, do I hold copyright only over the template/DSL code, or does the generated code has some copyright too? What about pieces of code the code generator spits that are hard-coded inside it? Am I supposed to discover the authors of the hard-coded pieces of code? I'm talking about stuff like yacc, lex, Ragel, m4 and personal code generators etc.

Please focus: this fragment includes extremely subtle differences between almost identical concepts, all refering to almost the same object.

Computer-generated code itself never meets criteria for a copyrightable work. Only Homo Sapiens may be an author of a work.⁽¹⁾ Also only a person may be an owner. So far I never heard about a computer program being given personhood.⁽²⁾

Templates, or other works used for generation, may be copyrightable works. If a sufficiently large portion of the generated code includes them (with very broad meaning of “includes”), then such generated code is simply a derived work. However, this is where things got murky. I never seen a commentary or source giving a reasonable, sourced explanation of what — legally — is the status. It usually remains within the realm of unwritten social agreement, and not seens as something worth pursuing in court.

As for your copyright over the generated code: depends on how much input there was from you. You will not be able to have copyright over even an extremely complex generated program, if your only input was selecting a few totally obvious parameters. On the opposite end, even small code with little conscious input from you, may be a copyrightable work if e.g. you had to make choices about which version to use. You mentioned you don’t want to talk about “AI”, but in fact it’s very relevant here: as the debate on copyrightability of generative smortnets’ outputs is circling around that concept and strongly leaning towards accepting it.

porcelain1 wrote:

- Am I supposed to give attribution to every dependency my dependencies have, recursively? Is there some tool to collect such information? Or just immediate dependencies?

That depends on the licensing terms you accepted.

porcelain1 wrote:

- How to give attribution at all? Is this free text, or do I have to follow a standard way to word it?

That depends ont he licensing terms you accepted. If there is no preference, you should use some reasonable one. There is no standard. Just make it clear, who is the owner. Creative Commons expresses their opinion with some advice: practices for attribution.

porcelain1 wrote:

- If I make some mistakes, and they go unnoticed for maybe years, will I be punished some way, or is it a no-brainer fix?

That falls within expiration of civil liability claims in your jurisdiction. Only tangentially related to copyright. Fixing is always a good idea.

Strictly speaking in some jurisdictions copyright violations are also a part of criminal law. But I can’t imagine that e.g. missing attribution would be enough for somebody to file charges, much less for the court to not dismiss or to sentence anybody.

____
⁽¹⁾ Yes, there have been famous attempts to gain copyright on works created by non-human animals. For example the unnamed macaque, that triggered a camera producing a “selfie.”
⁽²⁾ However, personhood may be given to inanimate physical objects. It’s a very rare exception, but that does happen: for example Whanganui river is a person.


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#3 2025-01-08 16:34:18

porcelain1
Member
Registered: 2020-01-18
Posts: 100

Re: Copyright, software licenses: common practices and tutorials

thx for the response!! I ended spending the past few days studying all this stuff. I've come to have similar views you expressed. I still don't have a complete picture, but I think I can now act in a more coordinated way. time to get my hands dirty!

mpan wrote:
porcelain1 wrote:

- What am I supposed to write at the top of every single source code file of my project? Is there a standardized format?

Nothing. No.

I checked a couple dozen projects, of varying popularity and age, almost every put the entire academic license (MIT or BSD) on top of each file. only musl and Lua (sort of) did not. I've read that warranty disclaimers only work when they are "clearly demarcated", hence why caps-lock is used, so I believe the "safe" option is to indeed add warranty disclaimers -- thus the entire academic license -- at the top of every file.

yet, it is all muddy. a Website is "protected" by a single Terms of Use/Service linked at the bottom of every page.

mpan wrote:
porcelain1 wrote:

- Is it enough to attribute libraries in the description of a website where the executable is hosted, or should the executable contain built-in attribution information and show them when prompted to do so? Context: HTML5 games.

Depends entirely on the licensing terms you accepted.

I decided I will go extra mile and add built-in license information inside the graphical executable. I saw that most american Android apps I have installed contain extensive listings of licenses, while brazillian apps, none did this at all. lol. I learned that this is called software bill of materials (SBOM), however only languages with package managers have automated ways to produce them, so for now I will generate it in an ad-hoc way. I checked Lethal Company, its SBOM appeared incomplete, but I guess this is because game engines and their built-in third-party libraries might allow to publish without proper attribution. Rocket League has an extensive credits like when a movie ends, it mentions some technology, but nothing really formal.

mpan wrote:
porcelain1 wrote:

- What if I have a file called LICENSE at the root of my project, but I have files copied from other projects with different licenses inside my project?

A commonly used practice is concatenating all licenses into the single file, optionally marking which refers to what (if needed).

I've seen that GitHub parses the pattern LICENSE.* to match several files for several licenses. two repos do this: sail and libsixel. I will employ this when I get to maintain several software in a single repo, but for the SBOM, I will create a separate file and LICENSE will just be the my license

mpan wrote:
porcelain1 wrote:

- How does software licenses work with code generators? (I'M NOT TALKING ABOUT AI) Like, do I hold copyright only over the template/DSL code, or does the generated code has some copyright too? What about pieces of code the code generator spits that are hard-coded inside it? Am I supposed to discover the authors of the hard-coded pieces of code? I'm talking about stuff like yacc, lex, Ragel, m4 and personal code generators etc.

Please focus: this fragment includes extremely subtle differences between almost identical concepts, all refering to almost the same object.

Computer-generated code itself never meets criteria for a copyrightable work. Only Homo Sapiens may be an author of a work.⁽¹⁾ Also only a person may be an owner. So far I never heard about a computer program being given personhood.⁽²⁾

Templates, or other works used for generation, may be copyrightable works. If a sufficiently large portion of the generated code includes them (with very broad meaning of “includes”), then such generated code is simply a derived work. However, this is where things got murky. I never seen a commentary or source giving a reasonable, sourced explanation of what — legally — is the status. It usually remains within the realm of unwritten social agreement, and not seens as something worth pursuing in court.

As for your copyright over the generated code: depends on how much input there was from you. You will not be able to have copyright over even an extremely complex generated program, if your only input was selecting a few totally obvious parameters. On the opposite end, even small code with little conscious input from you, may be a copyrightable work if e.g. you had to make choices about which version to use. You mentioned you don’t want to talk about “AI”, but in fact it’s very relevant here: as the debate on copyrightability of generative smortnets’ outputs is circling around that concept and strongly leaning towards accepting it.

I also noticed that several compilers include exception clauses/statements that discuss generated input. I might have to adapt some when I get to write my compilers.

mpan wrote:
porcelain1 wrote:

- How to give attribution at all? Is this free text, or do I have to follow a standard way to word it?

That depends ont he licensing terms you accepted. If there is no preference, you should use some reasonable one. There is no standard. Just make it clear, who is the owner. Creative Commons expresses their opinion with some advice: practices for attribution.

thx for the link, this is useful indeed.

Last edited by porcelain1 (2025-01-08 17:06:24)


Behemoth, wake up!

Offline

#4 2025-01-08 18:54:31

mpan
Member
Registered: 2012-08-01
Posts: 1,367
Website

Re: Copyright, software licenses: common practices and tutorials

porcelain1 wrote:

I checked a couple dozen projects, of varying popularity and age, almost every put the entire academic license (MIT or BSD) on top of each file. only musl and Lua (sort of) did not. I've read that warranty disclaimers only work when they are "clearly demarcated", hence why caps-lock is used, so I believe the "safe" option is to indeed add warranty disclaimers -- thus the entire academic license -- at the top of every file.

yet, it is all muddy. a Website is "protected" by a single Terms of Use/Service linked at the bottom of every page.

Your question contained word “supposed,” implying some kind of an obligation. Copyright is automatic⁽¹⁾ and you don’t have to do anything, or write anything, or place it anywhere, to enjoy the ownership. A website is protected not because there is a link. It is, simply is. With or without a link.

Also note that a licence is not what gives you copyright. It’s exactly opposite. Licence, a synonym for permission, is what the owner gives to others. It’s owner’s permission to use the work in ways described in the licence agreement.

Yes, adding a copyright notice or, if the licence text is short, the entire agreement is widespread. Sometimes as a deterrent, sometimes as an ideological statement, sometimes because the work owner is themselves bound by another licence that requires them to do so. In the case of MIT or BSD licences it’s typically the latter two options. The idea is to make any recipient aware, to the full extent possible, about the rights granted to them. Copyright notices, without licensing terms, may also be attached for purely informational reasons. Both the notice and licensing terms may also be used in court to fight argument of ignorance.

Historically some jurisdictions did require copyright notices and not placing one on a work could have legal consequences. This is how the cult classic Night of the Living Dead happened to be in the public domain and available on Wikimedia Commons. The distributor made a mistake while editing the title card. Similarly all photographs by Polish citizens or published in Poland before 1994 without such a notice are in the public domain. But this is a historical exception, which doesn’t apply to works created nowadays. This historical requirement is where the common format “Copyright © YEARs OWNER” comes from: it was used in USA before copyright became automatic.

Warranty disclaimers (and similar) are completely separate from copyright. It just happens a single agreement is used to cover both topics.
____
⁽¹⁾ Again, with the qualification I made earlier, about the Berne convention.

Last edited by mpan (2025-01-08 19:00:36)


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#5 2025-01-08 21:07:10

porcelain1
Member
Registered: 2020-01-18
Posts: 100

Re: Copyright, software licenses: common practices and tutorials

mpan wrote:
porcelain1 wrote:

I checked a couple dozen projects, of varying popularity and age, almost every put the entire academic license (MIT or BSD) on top of each file. only musl and Lua (sort of) did not. I've read that warranty disclaimers only work when they are "clearly demarcated", hence why caps-lock is used, so I believe the "safe" option is to indeed add warranty disclaimers -- thus the entire academic license -- at the top of every file.

yet, it is all muddy. a Website is "protected" by a single Terms of Use/Service linked at the bottom of every page.

Your question contained word “supposed,” implying some kind of an obligation. Copyright is automatic⁽¹⁾ and you don’t have to do anything, or write anything, or place it anywhere, to enjoy the ownership. A website is protected not because there is a link. It is, simply is. With or without a link.

Also note that a licence is not what gives you copyright. It’s exactly opposite. Licence, a synonym for permission, is what the owner gives to others. It’s owner’s permission to use the work in ways described in the licence agreement.

Yes, adding a copyright notice or, if the licence text is short, the entire agreement is widespread. Sometimes as a deterrent, sometimes as an ideological statement, sometimes because the work owner is themselves bound by another licence that requires them to do so. In the case of MIT or BSD licences it’s typically the latter two options. The idea is to make any recipient aware, to the full extent possible, about the rights granted to them. Copyright notices, without licensing terms, may also be attached for purely informational reasons. Both the notice and licensing terms may also be used in court to fight argument of ignorance.

Historically some jurisdictions did require copyright notices and not placing one on a work could have legal consequences. This is how the cult classic Night of the Living Dead happened to be in the public domain and available on Wikimedia Commons. The distributor made a mistake while editing the title card. Similarly all photographs by Polish citizens or published in Poland before 1994 without such a notice are in the public domain. But this is a historical exception, which doesn’t apply to works created nowadays. This historical requirement is where the common format “Copyright © YEARs OWNER” comes from: it was used in USA before copyright became automatic.

Warranty disclaimers (and similar) are completely separate from copyright. It just happens a single agreement is used to cover both topics.
____
⁽¹⁾ Again, with the qualification I made earlier, about the Berne convention.

I decided I will use this SPDX just because it is shorter and I'm lazy lol

further, it finally ticked for me:

if an entity fails to understand the file header, then the entity probably cannot start a lawsuit against me due implied warranties, because either permission to copy was not granted, or it understood the license which requires it to indemnify me. it is XOR. all or nothing. this is hypothetical, of course. I don't know

I also suppose that ordeal of "innocent copyright infringement" is less problematic exactly due to Berne convention. regardless, my permissive license allows derivative work to be proprietary, so it really is just a nitpick to complain about proper attribution.


Behemoth, wake up!

Offline

Board footer

Powered by FluxBB