8000 Introduce comprehensive COPYRIGHT file by dlech · Pull Request #4432 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content

Introduce comprehensive COPYRIGHT file #4432

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 51 commits into from
Closed

Conversation

dlech
Copy link
Contributor
@dlech dlech commented Jan 26, 2019

MicroPython (including git submodules) currently includes over 5000 source code files that contain over 30 distinct licenses and 100s of copyright holders.

This is an attempt to summarize all of that information in a useful form. The COPYRIGHT file uses the standard Debian copyright file format (aka DEP5), which is both human-readable and machine-readable. The initial file was created with tools that parsed all source code files and then was manually cleaned up.

Although this cannot be claimed to be a definitive solution for license compliance, it should be a useful guide for anyone who redistributes MicroPython in binary form.

Also see: #4363 (comment)

dlech added 30 commits January 25, 2019 00:58
Add new COPYRIGHT file that sumerizes copyrights and licenses of source
code files.

This file was generated with the command:

    licensecheck --check '.*' --ignore '.*(\.png|\.jpg|\.ico|\.gif|\.dat|\.pem|\.der|\.cer|\.p8|\.p12|\.x509_ca|\.key_1024|\.key_2048|\.key_4096|\.RES|\.gz)' --recursive --deb-machine --lines 0 * > COPYRIGHT
This adds the files that were skipped by licensecheck. These files were
found using the command:

    git ls-files --recurse-submodules *.png *.jpg *.ico *.gif *.dat *.pem *.der *.cer *.p8 *.p12 *.x509_ca *.key_1024 *.key_2048 *.key_4096 *.RES *.gz
The licensecheck tool is not perfect, so clean up some obvious errors.
… submodule

All files not in a submodule and without an explicit license header are implied to covered under the top-level LICENSE file. Use `*` to indicate this instead of individually listing files. Some files with different license terms were found and moved to their own sections accordingly.
All files without an explicit license header are covered under the license given in lib/axtls/www/index.html as per the README.
This submodules doesn't have a top-level license file, so there are a number of files that don't have an explicit or implicit license. Also, licensing on the Adobe font files is not clear.
Files without an explicit license header are assumed to be covered under the top-level LICENSE file in the lib/libffi submodule.
It is assumed that any file without an explicit license header is covered by the top level COPYING file in the lib/lwip submodule.

Non-standard variations on the BSD license are given explicitly.
It is assumed that any file without an explicit license is covered by the top-level LICENSE file in the lib/nrfx submodule.
The removed "or CC0" was a false positive from the licensecheck tool.
Note: the file drivers/cc3000/src/patch.c looks like it contains compiled binary code from an unknown source.
Note most of the files in this directory are coverd under the top-level * copyright.
Note: some files refer to an unknown "BSD-style" license.
@dpgeorge
Copy link
Member

Thanks for making a good start on this issue.

There are two main problems with how it's done here:

  1. The copyright holders are not 100% accurate for uPy code (excluding submodules) because the copyright line in the header of the files is not up to date.
  2. The list is long and not easy to read. At the least it would be good to sort it into sections, like uPy core, ports and then submodules, and also place tooling code at the end (code that won't be included in a binary).

It might also be a good idea to separate the issues of license and copyright. Licensing is arguably more important for someone looking to use the code, and including copyright info with licensing info makes it harder to read. So a comprehensive list of licenses would just list source code and corresponding license (no copyright holder), and copyright could be found in the source files themselves (which are known because they are pointed to from the license listing).

@dlech
Copy link
Contributor Author
dlech commented Jan 26, 2019

It might also be a good idea to separate the issues of license and copyright

In that case, I think adding SPDX license identifiers to files would be a better solution.

One thing I am wondering about though is that if you separate the license from the copyright, it makes complying with the requirement "Redistributions in binary form must reproduce the above copyright notice" more difficult.

@dpgeorge
Copy link
Member

if you separate the license from the copyright, it makes complying with the requirement "Redistributions in binary form must reproduce the above copyright notice" more difficult.

Yes that's true, but hopefully there are not that many cases of this (?). MIT doesn't require this, so with MIT you only need to know the copyright if you're copying the source code, and then the copyright is already there in the code.

@dlech
Copy link
Contributor Author
dlech commented Jan 27, 2019

but hopefully there are not that many cases of this (?)

This comes from the BSD 3/4-clause license, so based on my findings, this would include:

  • drivers/cc3000
  • drivers/wiznet5k
  • lib/axtls
  • lib/cmsis
  • lib/berkeley-db-1.xx
  • lib/lwip (this one is a real mess of variations of BSD-like licenses and many copyright holders)
  • lib/nrfx (some files are Apache 2.0 licensed)
  • lib/stm32lib
  • lib/tinytest
  • ports/cc3200 (only certain files)
  • ports/stm32 (only certain files)

from: #4363 (comment)

eg if berkeley-db is used then UC Berkeley must be mentioned in advertising material

I found this (more specifically, ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change) which seems to indicate that this no longer applies.

July 22, 1999

To All Licensees, Distributors of Any Version of BSD:

As you know, certain of the Berkeley Software Distribution ("BSD") source
code files require that further distributions of products containing all or
portions of the software, acknowledge within their advertising materials
that such products contain software developed by UC Berkeley and its
contributors.

Specifically, the provision reads:

"     * 3. All advertising materials mentioning features or use of this software
      *    must display the following acknowledgement:
      *    This product includes software developed by the University of
      *    California, Berkeley and its contributors."

Effective immediately, licensees and distributors are no longer required to
include the acknowledgement within advertising materials.  Accordingly, the
foregoing paragraph of those BSD Unix files containing it is hereby deleted
in its entirety.

William Hoskins
Director, Office of Technology Licensing
University of California, Berkeley

@dlech
Copy link
Contributor Author
dlech commented Jan 27, 2019

So, excluding MIT and BSD licensed files, we are left with the following...

Simple permissive licenses (similar to MIT):

  • CodeSourcery
    • lib/nrfx/mdk/*_common.ld
  • ISC
    • drivers/cc3000/src/patch.c
  • FatFs
    • extmod/vfs_fat_diskio.c
    • lib/oofatfs/*
    • ports/cc3200/fatfs/*
  • Public domain
    • lib/libffi/src/dlmalloc.c
  • SunPro
    • lib/libm/*
  • Zlib
    • extmod/uzlib/*

Extensive licenses (the really long ones):

  • Apache 2.0
    • lib/nrfx/mdk/*
    • ports/zephyr/Makefile.zephyr
    • ports/zephyr/src/Makefile
    • ports/zephyr/src/zephyr_getchar.c
    • ports/zephyr/src/zephyr_getchar.h
  • GPL (2 or 3 and/or later)
    • lib/axtls/config/scripts/config/*
    • lib/libffi/doc/libffi.text
    • lib/libffi/libtool-ldflags
    • lib/libffi/m4/*
    • lib/libffi/msvcc.sh (or LGPL 2.1 or MPL 1.1)
    • lib/libffi/testsuite/*
    • lib/libffi/texinfo.tex
    • ports/cc3200/FreeRTOS/* (with FreeRTOS exception)
  • LGPL 3
    • ports/esp32/espneopixel.c
    • ports/esp8266/espneopixel.c
    • tools/dfu.py

Unknown license:

  • drivers/cc3000/src/patch.c (seems to contain compiled code from unknown source in byte array)
  • extmod/crypto-algorithms/sha256.c
  • extmod/crypto-algorithms/sha256.h
  • extmod/re1.5/compilecode.c
  • extmod/re1.5/dumpcode.c
  • extmod/re1.5/re1.5.h
  • extmod/re1.5/recursiveloop.c
  • lib/berkeley-db-1.xx/docs/*.ps (Adobe font files)
  • ports/stm32/pybcdc.inf_template

(Note: * globs may not be exact - read as, "most, but not necessarily all")

And I'm sure I've missed some things given the sheer number of files to process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0