2

When I fork a repo that contains an Apache 2.0 license and I want to modify things like github-config or the build tools that have been used, it may happen that I want to delete files.

How would I correctly document this?

3
  • Is your question about the bare legal requirements based on the Apache license, or is it about nice and friendly behavior, best practices and the like? Nov 3, 2023 at 17:07
  • Like 'cleanup codebase and remove legacy code for outdated hardware'? Nov 3, 2023 at 23:36
  • @Martin_in_AUT Id say the legal requirements are the minimum but I would definitely be glad to read some advice on best practices :)
    – Wolfone
    Nov 6, 2023 at 9:50

2 Answers 2

3

This question focuses on the requirements (legal, based on the license language) and best practices related to the removal of files in a fork.

Section 4 of the Apache license lists the requirements you need to fulfill when distributing derivative works. Section 4.a. is a no-brainer, just check the paragraph How to apply the Apache License to your work on the webpage of the license.

Section 4.b of the Apache 2 license requires you to clearly indicate in any modified file that you have changed it. Such an indication is obviously irrelevant in files that you are removing from the repo. Therefore it is a best practice to create (or ammend) a Changes.txt file, where you provide a summary of all your changes based on the previous version (which you clearly identify), and where you should list all the files that you have deleted. This list of deleted files is not a strict requirement of the license language, but it definitely helps to document all the changes.

If there is a clear matching between a specific file that you are deleting and (a) one specific author or (b) one specific entry in the Notice file, then the respective copyright, patent, trademark, and attribution notice or entry in the Notice file can be removed (actually: should be removed, the license language states "excluding those notices that do not pertain to any part of the Derivative Works"). If, however, the author is also involved with other files in the repo, which you want to keep, then you must not remove any of this. To err on the side of caution, if there is no clear match between the deleted file and one specific copyright, patent, trademark, and attribution notices or specific entry in the Notice file, then you need to keep all copyright, patent, trademark, and attribution notices and notice file entries. This will take care of Sections 4.c. and 4.d. of the Apache 2 license.

1
  • Great answer! Thank you a lot!
    – Wolfone
    Nov 10, 2023 at 10:25
-1

Firstly, git is your friend, and commit is the documentation of changes itself.

Secondly, you can create a file called CHANGES.TXT or another changelog file and list the removed files.

THIS IS NOT LEGAL ADVICE

2
  • 1
    I downvote, as this answer only reflects section 4.b. of the Apache 2 license, but ignores any potential impact of the removal of files based on Sections 4.c. and 4.d. of the license. Nov 4, 2023 at 22:49
  • This answer also applies to 4.c. and 4.d. 4.c.: "excluding those notices that do not pertain to any part of the Derivative Works" 4.d. is a standard attribution, but the question was only about documenting changes, not attributing itself.
    – Maniues
    Nov 4, 2023 at 22:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.