zlib icon indicating copy to clipboard operation
zlib copied to clipboard

Provide separate LICENSE file

Open aleksandaratanasov opened this issue 4 years ago • 3 comments

Currently the only license information can be found inside zlib.h. This makes automatically extracting license information (e.g. when using zlib as a dependency to another project) more difficult then it should be. Will it be possible to create such a file?

If CMake is used as the main project the contents of the license can easily be pasted into both the header and the LICENSE file using configure_file that replaces the respective license placeholder in each file.


Here is a little of background info to anyone interested:

Currently I am working with an old code base that has a lot of custom code that breaks the build with modern compilers. While the API should remain the same I am trying to reduce the clutter and provide interfaces to various popular external solutions (such as zlib). While I do read every bit of license information there is for each dependency I add, I create (in CMake) a procedure that traverses the top level directory of each dependency and searches for anything with LICENSE, COPYING and COPYRIGHT (case insensitive), grabs its contents and dumps it into the final license (not pretty but for now this will do). Further plans may change the procedure to just copy each license file, rename it according to the name of the dependency and paste it in a separate folder. By doing so I ensure that whoever adds a dependency and as long as the dependency has a standard project structure (on github most licensed projects have a license file in their root directory) it will not be forgotten when the product is shipped.

aleksandaratanasov avatar Sep 09 '21 15:09 aleksandaratanasov

Copyright and license information can also be found inside README

minchai23 avatar Sep 10 '21 01:09 minchai23

Ok, maybe I should have phrased things differently. 🤣 Will it be possible to separate the information completely? This does not mean remove it from the current locations of course. As you have pointed out the information is inside README and also inside the zlib.h. The issue I'm having with this approach is that the license (or another type of information) is mixed with something else that needs to be filtered out. The main reason why many libraries keep their license info also in a separate file is for the purpose of easier distribution. A lot of licenses require you to include them into the final product. All of this should be done in the easiest possible way. A README file is a bad place to store the license information (many projects just reference it there) since any project, that inherits zlib probably also has a README with a very fine-tuned and project-specific structure hence the inability to just drop the content of the README (without any extensive filtering) into your own README.

aleksandaratanasov avatar Sep 10 '21 10:09 aleksandaratanasov

I have the same need/request as @aleksandaratanasov- having a separate LICENSE file would reduce the amount of searching/reading/processing required to review this info. Is it worth creating a PR to explain the proposal?

mostynb avatar May 18 '22 22:05 mostynb

Resolved by 352cb28d12baf02863ff5d4d96be0587ced419a1.

tbeu avatar Oct 07 '22 20:10 tbeu