Skip to content

RFC script to find package licenses

Thomas Petazzoni buildroot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest0 of 2 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 2 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Buildroot] [RFC 0/2] script to find package licenses

Hello,

Quoted 27 lines · Rahul Bedarkar

Legal information is a kind of thing that we can't automate completely. But we want it to be correct when new package is added or version bumps.

This patch set attempts to add a script to find license information from package source files to verify or correct legal info for buildroot packages.

Legal information may get outdated with version bumps or even may not get correct in first place if source package does not provide any license files. In such cases, we need to look into file header to get that information. But it could be very difficult if there are number of source files.

find-licenses script scans package source files for known licenses to find under which license package is released. It aggregates license information for all source files found in a package.

For finding license, we rely on file's license header. Generally most of packages use standard license headers which helps us to detect license of packages.

Currently it supports notable licenses. But we can later add other licenses based on regx.

Script outputs licenses found on standard output file-wise, directory- wise and final aggregation of all licenses found. It also lists files which don't have license header. Directory-wise license listing will be useful when different components are licensed under different license.

Quoted 6 lines

Since final license list is just aggregation of licenses found for all source files, we can not surely say if package is dual or multi-licensed or different components are licensed under different license. That's why we can't use final license list directly in our package .mk file, but it at least helps us to find or verify license information quickly.

Thanks for this proposal. However, there are already some tools that do the same thing I believe. I'm thinking especially at the tools used by the Fossology project (https://www.fossology.org/). It is surely more complicated to install and use that your Python script, but it is also a lot more complete, and even more importantly: maintained by other people.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com