[Qs] Correct way to annotate patch files
Usecase:
Repo directly stores .patch and .diff files alongside normal code: buildroot, crosstool-ng, etc. It's a mess to maintain proper SPDX for them.
Situation:
- Patch files require license according to reuse-tool (good).
- Patches may already contain some sort of attribution (like mentioning original author), and often default license is inherited after the project (despite author may allow more permissive license).
- Sometimes these patches are aggregations of multiple other patches by different people with different copyright and license terms.
- Patches which add whole new file may already contain SPDX notation inside of it -- resulting in patchfile which contains single overall SPDX on top and multitude of them inside.
- FOSS community convention is to avoid modifying patches at all costs -- so you could temporarily copy patch from maillist into your older repo until you wait on it being merged into upstream master.
- Adding and maintaining separate file
.licensealongside such patch seems like the most reasonable solution -- but again you must enlist multiple copyright/license terms inside of it. Even if you will replace all licenses by license of targeted project -- issue with multiple authors remains. - As mentioned in (2) and (4), patches may already contain attribution and SPDX -- so creating separate .license file is duplication of info, which creates significant maintenance overhead for large number of patches.
- Alternatively -- adding SPDX header into the patch itself will overload patch description by not-so-useful and moreover hard-to-distinguish information block -- which will pollute git history commit message, when patch will be applied on package upstream, instead of storing it as file on e.g. buildroot.
So... what to do? I still want to add SPDX inside patch itself, but result is a total mess and less than satisfactory. Is there any recommended practice or at least additional ideas to try?
Hi @amerlyq. In fairness I'm not really sure what the best approach here is. The easiest solution, as you've observed, is the .license file. But you've also correctly observed that that would override/duplicate work.
Incidentally, I received a similar-ish question an hour ago. Not in terms of the exact contents, but in terms of theme: It's really hard to do REUSE right when you are downstream from someone.
@silverhook Do you have good thoughts on the licensing situation of patches? Do you have thoughts on how to best declare the licensing of patches?
@amerlyq Does support for snippets solve this? To me, it sounds like it might because if a patch has licensing information inside, then every change could simply be a snipped and if there isn't licensing information inside, then REUSE is correct to complain.