Size: 8327
Comment: licensed: add new tool
|
Size: 8626
Comment: Add (soon to be in Debian) cargo-lichking tool.
|
Deletions are marked like this. | Additions are marked like this. |
Line 93: | Line 93: |
=== cargo-lichking === Automated license checking for rust. cargo lichking is a Cargo subcommand that checks licensing information for dependencies, based on [[http://www.dwheeler.com/essays/floss-license-slide.html|David A. Wheeler's compatibility graph]]. {{{ cargo lichking check ]]] |
Contents
Command-line tools in Debian
Reviewing upstream packages to write debian/copyright files is tedious but important manual work. It is done during initial packaging and after every new upstream release.
Making initial copyright file construction and subsequent review/update easier will improve Debian's software quality.
Starting with Stretch (Debian 9) there are significantly improved tools over previous releases to help.
licensecheck
licensecheck from licensecheck (and older versions of devscripts) can scan source code and report found copyright holders and known licenses. Its approach is to detect licenses with a dataset (medium:~200 regexes) of regex patterns and key phrases (parts) and to reassemble these in detected licenses based on rules. In that sense this is somewhat similar to the combined approaches of Fossology/nomos and Ninka (see below for these tools). It also detects copyright statements. It output results in plain text (with customizable delimiter) or a Debian copyright file format. Written in Perl.
licensecheck --check '.*' --recursive --deb-machine --lines 0 *
scan-copyrights
scan-copyrights from libconfig-model-dpkg-perl can update an existing copyright file from rescanning the source. It can also create one from scratch. Written in Perl, using licensecheck.
cme
Config::Model can update Debian copyright files using the cme command (from cme or libconfig-model-dpkg-perl less than 2.063). Written in Perl, using licensecheck.
cme update dpkg-copyright
Usage is detailed in Config::Model wiki
licensecheck2dep5
A script from cdbs can create a copyright file by tidying output from licensecheck: Written in Perl, using #licensecheck.
licensecheck --check '.*' --recursive --copyright --deb-fmt --lines 0 * | /usr/lib/cdbs/licensecheck2dep5
license-reconcile
license-reconcile compares the existing copyright with the source code and reports discrepancies. Written in Perl, using licensecheck.
debmake
debmake -k also compares the existing copyright with the source code and reports discrepancies.
debmake -cc generates a new copyright file from the source code.
decopy
decopy is a tool that "automates creating and updating the debian/copyright files." It also "aims to detects as many licenses as possible" which makes it a tool for license detection too. It uses python-debian to handle Debian machine readable copyright files. Its approach to detect licenses is the same as license-checker. Written in Python, using python-debian.
licensee
licensee from ruby-licensee checks LICENSE files and returns known license names. This is the tool used by Github to provide a summary license indication on a repository main page. Its approach is to search for typical LICENSE file names or some package manifest (NPM, Bower, Gemfile, etc) and perform an exact or approximate license text matching against the set of common licenses texts as published at https://choosealicense.com (small: ~20). It output results in YAML format. Written in Ruby.
check-all-the-things
Wrapper for some of the other tools listed here.
check-all-the-things -f copyright
cargo-lichking
Automated license checking for rust. cargo lichking is a Cargo subcommand that checks licensing information for dependencies, based on David A. Wheeler's compatibility graph.