this post was submitted on 04 May 2024
20 points (100.0% liked)

Programming

17423 readers
38 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS
 

This might be an odd question to ask, but I want to be sure to understand it correctly. When I clone a project in Github that is licensed under GPL-3.0 license, am I allowed to delete bunch of files that I no longer need?

Someone took an old BCX-BASIC program and converted it into C with some additional work to make it compile in Linux, and a Python GUI. The original Basic program is still included in the project. I want to delete everything besides the .c program, license and an include file. I want to add my own Makefile and just create the commandline executable with gcc. And I might change the name of the application too and either create my own GUI or maybe (if its possible) to integrate the C program in Rust or Zig in example, but have to explore this more.

But the files that were included there, the legacy BASIC program and some other files, are licensed under GPL-3 too. Am I allowed to just delete those files from the project?

top 13 comments
sorted by: hot top controversial new old
[–] Kissaki 12 points 6 months ago

Yes, the GPL allows you to make modifications. The GPL still applies.

The cloned repository still holds the history and deleted files. The files that are still there retain the GPL. If you make additions to the GPL sources, the GPL applies to those too. (Copyleft license.)

You can check the summary of GPL on ChooseALicense to understand your rights and conditions a bit better.

[–] recursive_recursion 11 points 6 months ago* (last edited 6 months ago) (2 children)

yes deleting files wouldn't violate GPL-3.0 to the best of my knowledge as those files would still be under the GPL license,

  • it's just that you wouldn't be using them

if anyone wanted to use a file licensed under any of GPL licenses the user would be required to license any modified or redistibuted files under the same license ("or later") as to not violate the copyleft terms

[–] NekkoDroid 6 points 6 months ago (2 children)

Just a minor clarification/correction: the "or later" part also depends on the license per se. There is a GPL-3.0-only and a GPL-3.0-or-later. Usually you'll find something like "or at your option any later version." if that is the case, but by default you should expect the GPL-3.0-only to apply.

[–] [email protected] 4 points 6 months ago (2 children)

I always found it a bit nebulous to have the "or later" statement / option. Because that is not precise and which GPL is meant to? Everyone can write a new version of the GPL. The "or later" does not specify which, it just implies it would be GNU GPL. It's been a long time since I read and studied the GPLv2, never v3 and I actually never really understood how the "or later" would be allowed.

Licensing is still confusing, even after more than a decade.

[–] [email protected] 7 points 6 months ago (2 children)

Everyone can write a new version of the GPL.

The standard GPL permission statement explicitly clarifies that the license is "as published by the Free Software Foundation" so any later version of the license has to come from the FSF.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The reason for the "or later" clause is to allow the FSF to update the GPL in response to flaws that are discovered. The "or later" clause is controversial because it effectively allows the FSF to change the licensing terms of any software licensed under such a clause, and so some developers who don't trust the FSF with this authority omit this clause. Famously, Linux is licensed only under GPLv2 with no or-later option (Linus has been a vocal opponent of GPLv3)

[–] [email protected] 4 points 6 months ago* (last edited 6 months ago)

The “or later” is optional, the FSF specifically doesn’t have the power to update the terms of every GPL-licensed software because the wrote the clause in such a way that they don’t.

If I give you software licensed under the GPL3, and a GPL3.1 comes out, it doesn’t apply to your copy of the software. Likewise the copyright holder of the work is also not forced to relicense their software under the GPL3.1. And even if they did, copies of the software distributed under the GPL3 would still be licensed under the GPL3.

The “or later” clause simply means that if I received a copy of a GPL3 software, I can redistribute it under the GPL3.1 if I so wish (where “I” in the previous sentence is everyone with a copy of the work, as the GPL gives everyone with a copy redistribution rights)

[–] [email protected] 3 points 6 months ago

Oh that's good to know! Yeah, I never liked the "or later" too. To be fair, the software you licensed won't change the license if a new updated version comes out. It's just a third party can opt-in. So this is not a situation like a software agreement where the publisher can change the agreements at any time with full effect, despite you agreed to a prior agreement. I don't think "or later" is evil, but I personally don't like anything that is not explicit.

[–] recursive_recursion 3 points 6 months ago* (last edited 6 months ago) (1 children)

for the "or later" clause I'm assuming that there is clarification in the license to state that the license must be validated by the GNU organization or states that it must be a later/newer "GNU" based license

  • this is my assumption, I would have to reread (once I'm back home) the license to confirm for sure

The main difference between GPL-2.0 and 3.0 (if I remember correctly) is closure/addressing the Tivoization loophole that exists in GPL-2.0

Licensing is still confusing, even after more than a decade.

  • totally fair, unless you're a lawyer or someone with OCD like me, no person would want to spend time reading all of the licensing terms/clauses
[–] [email protected] 2 points 6 months ago (1 children)

And I appreciate the help in understanding the subject. I am actually someone who reads licenses and sometimes dig into terms to get an understanding of very specific subjects, but got a bit too comfortable lately and need to catch up. I plan on reading the GPLv3 too, but this needs a bit time and effort. So until then I'll ask around.

[–] recursive_recursion 2 points 6 months ago

no worries🤗

[–] recursive_recursion 1 points 6 months ago* (last edited 6 months ago)

that is correct👍

[–] Shareni 1 points 6 months ago

deleting files wouldn't violate GPL-3.0

Unless you delete the license itself

[–] [email protected] 3 points 6 months ago

The old files would still be in the commit history anyway.