I’ve patched a bug in some code that is no longer being supported by it’s owner but I would like to provide this to other members of the community.
A git.patch file technically contains copyright source code (in order to show what is removed/changed), does this make it illegal if I don’t have permission from the owner?
Would this be considered “fair use”?
2
This is a very hard question, and only a specialised lawyer will be able to give you an answer. I will just address the technical aspect of your question.
Technical solution of your problem
The easiest technical solution to your problem is to use another patch format. The patch and diff utilities support several formats, and an especially interesting one for you is the format generated by diff -e
:
-e --ed
Output an ed script.
An ed script is a small programm deleting lines in a file and inserting some other lines, much like what the nowadays usual unified patch format describes. However unlike the latter, ed scripts do not contain contextual information. Technically the ed script contains only your work, so you may see it as an adequate way to distribute your patches. It seems that git-diff does not support the production of patches as ed scripts, so you will need to manually produce them, the easiest way to do so is probably to diff two directories containing the original and the modified version of the source code.
As a side note, I am asking why not bring the original code owner in the discussion? Has the original code owner any good reasons to refuse you to distribute patches? There is chances that you can reach an agreement on how to distribute patches on this code, as it seems to me that you add value to the existing software at no cost for the product owner and without eating their bread.
3
This is not going to be something that can easily be answered. Typically, I would recommend “staying clear” of the issue (don’t publicly distribute the patch).
You have (as far as I can tell) two real questions that need answering. First, are the little snippits of code in a diff in violation of copyright laws if publicly distributed. I would tend to lean towards “no” as long as the code isn’t giving away any core functionality. For example if diff shows entire classes and functions then it probably would cause a problem. If it shows a line or two here and there then it probably isn’t a problem.
The second question is do you have the rite to modify and distribute those modifications. The answer to that is usually “no way”. Closed source usually means exactly that. Only a “select” group of people have the rite to modify and/or distribute those modifications. The only exceptions that I can think of to this would be some license that was closed source but allowed you to distribute modifications to other licence holders. There are a few software titles that have a license like this.
So basically the answer is that you “probably” do not have the legal rite to distribute your modifications rather they infringe on copyright rules or not. So it becomes a moot point. Even if you could distribute, the question of rather your patches violate copyright is one that would probably have to be answered via trial as it would be unclear, and highly dependent on the overall content of the patches.
1
If the project was released under an open-source license, then that license gives you permission to make modifications to the code and to distribute those modifications.
Most closed-source and proprietary licenses do not give you permission to make changes or to distribute (a changed version of) the software.
If you don’t have permission to make changes, you are violating the rights of the copyright holder if you create (and distribute) a patch.
3