Skip to content
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

SPDX license identifier #14206

Merged
merged 12 commits into from
Jul 27, 2018
Merged

SPDX license identifier #14206

merged 12 commits into from
Jul 27, 2018

Conversation

hudokkow
Copy link
Member

@hudokkow hudokkow commented Jul 20, 2018

Description

Clean up the mess with copyright notices and replace with an SPDX license identifier. It allows better overview of licenses, for both humans and compliance software. Done following the example of the Linux Kernel folks.

Motivation and Context

Modernization. Replaces #13927

How Has This Been Done/Tested?

  1. Run scancode on master branch ./scancode -l -n 16 ../kodi --html ../kodi_licenses.html.
  2. Identify all licenses spewed by it.
  3. Group files with same license.
  4. Confirm group by group, file by file if detected license is correct. Many are false positives because an expression or phrase triggers them. That's the case for all detected gpl-1.0-plus, triggered by http://www.gnu.org/copyleft/gpl.html.
  5. If license is not clear (missing text, ambiguous interpretation, etc.) try to confirm with original author/sources. That was the case with xbmc/platform/win32/dxerr.h and xbmc/platform/win32/dxerr.cpp that looked like MS-PL licensed files but were indeed MIT licensed.
  6. After initial assessment, pick a license group and change notice.
  7. Loop.
  8. Finally, take care of the biggest group, in our case GPL-2.0-or-later. Patterns are easy to find and sed is a very good friend.
  9. Select a random sample of files and have a look to see if everything is OK.

Current licenses under xbmc/ (as seen on SPDX licenses list):

License FSF Free/Libre OSI Approved GPLv2 Compat
BSD-3-Clause ✔️ ✔️ ✔️
BSD-4-Clause ✔️
GPL-2.0-only ✔️ ✔️ ✔️
GPL-2.0-or-later ✔️ ✔️ ✔️
LGPL-2.1-or-later ✔️ ✔️ ✔️
MIT ✔️ ✔️ ✔️
Unlicense (Public Domain) ✔️ ✔️

Last two commits uniformize our copyright line. Instead of a gazillion variations, we now have:

 *  Copyright (C) 2002-2018 Team Kodi
 *  Copyright (C) 2003-2018 Team Kodi
 *  Copyright (C) 2005-2018 Team Kodi
 *  Copyright (C) 2006-2018 Team Kodi
 *  Copyright (C) 2007-2018 Team Kodi
 *  Copyright (C) 2008-2018 Team Kodi
 *  Copyright (C) 2009-2018 Team Kodi
 *  Copyright (C) 2010-2018 Team Kodi
 *  Copyright (C) 2011-2018 Team Kodi
 *  Copyright (C) 2012-2018 Team Kodi
 *  Copyright (C) 2013-2018 Team Kodi
 *  Copyright (C) 2014-2018 Team Kodi
 *  Copyright (C) 2015-2018 Team Kodi
 *  Copyright (C) 2016-2018 Team Kodi
 *  Copyright (C) 2017-2018 Team Kodi
 *  Copyright (C) 2018 Team Kodi

Third-party copyright lines were not touched.

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)

@hudokkow hudokkow added Type: Feature non-breaking change which adds functionality Type: Cleanup non-breaking change which removes non-working or unmaintained functionality Type: Improvement non-breaking change which improves existing functionality v18 Leia No Jenkins do not run automatic Jenkins builds on this PR labels Jul 20, 2018
@natethomas
Copy link
Member

Nice work. I can't imagine how long this took to do.

@hudokkow hudokkow changed the title Spdx license identifier SPDX license identifier Jul 21, 2018
@hudokkow hudokkow force-pushed the spdx_license_identifier branch 2 times, most recently from f04c06d to 594d1d3 Compare July 23, 2018 10:57
@jenkins4kodi jenkins4kodi added the Rebase needed PR that does not apply/merge cleanly to current base branch label Jul 24, 2018
@hudokkow hudokkow removed the Rebase needed PR that does not apply/merge cleanly to current base branch label Jul 24, 2018
@xbmc xbmc deleted a comment from jenkins4kodi Jul 24, 2018
@CvH
Copy link
Contributor

CvH commented Jul 25, 2018

@hudokkow how do you "label" your *.jpg, *.png ... (media) files ? Currently (If I got this right) they are not covered by any licence at all. Shouldn't they have some Media Licence (like CC ...) and should be declared ?

@hudokkow
Copy link
Member Author

hudokkow commented Jul 25, 2018

@CvH, I haven't gotten around to those yet. This PR only deals with xbmc/ dir (roughly 43% of the almost 8500 files we're tracking).

As for your question, REUSE Initiative states:

All source files which are included in the final build of your project (verbatim, modified, partially, or in compiled form) must have copyright and license information contained within them. If it is not possible to add a header to the file, either because the file is a binary or because the format does not support comments, you must provide the information separately in one of three ways:

You may include a textfile called FILENAME.license in which you store your regular comment header with all the necessary information to convey the license information about the file called FILENAME.

If you have many such files, but each have the same copyright notice and license, you may instead use the DEP-5/copyright file format, and place a single copyright notice documenting those files.

If you have a way of automatically generating an inventory of included files in SPDX format (see practice 3), you may use this and do not need to separately include a .license file or DEP-5/copyright file.

reuse tool has a lint mode that does wonders to tell you what files are missing a copyright/license notice. Unfortunately I only found it after manually digging for all the files missing license and/or copyright notice. 😞

@jenkins4kodi jenkins4kodi added the Rebase needed PR that does not apply/merge cleanly to current base branch label Jul 25, 2018
@hudokkow hudokkow force-pushed the spdx_license_identifier branch 2 times, most recently from f3e4481 to 1f6c3aa Compare July 25, 2018 17:23
@hudokkow hudokkow removed the Rebase needed PR that does not apply/merge cleanly to current base branch label Jul 25, 2018
@xbmc xbmc deleted a comment from jenkins4kodi Jul 25, 2018
@hudokkow hudokkow force-pushed the spdx_license_identifier branch 3 times, most recently from 67b1218 to 1e87684 Compare July 25, 2018 18:12
@garbear
Copy link
Member

garbear commented Jul 25, 2018

This PR is awesome. The commits are a good breakdown of our code's licenses. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
No Jenkins do not run automatic Jenkins builds on this PR Type: Cleanup non-breaking change which removes non-working or unmaintained functionality Type: Feature non-breaking change which adds functionality Type: Improvement non-breaking change which improves existing functionality v18 Leia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants