Debian Codegraph @

ReadMe

raw
1 licenserecon: Check licenses in debian/copyright file against licensecheck.
2
3 lrc parses a valid DEP-5 copyright file and notes the licenses of all files
4 in the source tree. Licensecheck is then run, and the results compared.
5 Differences between licenses and license versions in debian/copyright
6 and the output of licensecheck are reported.
7
8 It should be run in the top level of a cleaned Debian source tree,
9 with a valid DEP-5 copyright file. The source tree should be clean,
10 otherwise results may be contaminated by spurious reports on the build's
11 generated files. It is advisable to run lintian first to ensure correct syntax
12 of debian/copyright.
13
14 The results are indicative only, and not a substitute for manual checking.
15 It is intended to report obvious errors. The design intends to minimise false
16 positives as much as is practical. However, false positives will occur if the
17 spelling of the license short-string is not identical between the file and
18 debian/copyright. This is quite likely with complex licensing such as
19 'and'/'or' constructs and specific exceptions.
20
21 False positives may suppressed by creating a file debian/lrc.config
22 List in the file, the file names and/or directories to be excluded.
23 Also, license aliases can be added.
24 The syntax for the file is described in /usr/share/lrc/lrc.config
25
26 Command line options to be used on every run (maybe --spdx etc with Salsa CI)
27 can be included in debian/lrc.config
28
29 Only files with a copyright header are checked. False negatives may occur if
30 licensecheck cannot determine a file's license. Files named copyright, copying,
31 readme etc. are not checked as they often specify the licenses of other files
32 rather than their own. Autogenerated Autotools' files are not checked,
33 as they do not need to be listed in debian/copyright,
34 and could otherwise appear as a difference.
35
36 EXIT CODES
37 0: No differences found
38 1: Failure to run (no valid debian/copyright)
39 3: License differences found
40
41 SAMPLE OUTPUT
42 Sample output invoking lrc.
43
44 SUCCESS:
45 Parsing Source Tree ....
46 Reading copyright ....
47 Running licensecheck ....
48
49 No differences found
50
51 DIFFERENCES:
52 Parsing Source Tree ....
53 Reading copyright ....
54 Running licensecheck ....
55
56 debian/copyright| licensecheck
57
58 LGPL-2.1+ | GPL-2+ test/src/config/chan.c
59 GPL-2+ | public-domain share/lua/int/dummy.lua
60 GPL-2+ | LGPL-2.1+ modules/access/sr_common.h
61
62 OPTIONS
63 Options are case-insensitive. Invalid options are ignored.
64
65 -? -h or --help
66 Writes this readme file to stdout.
67
68 -l or --long
69 Output is generated for every file where licensecheck detects the license,
70 not just those with license discrepancies.
71
72 -f or --format
73 Formatted output.
74 Outputs the debian/copyright licence, licensecheck license, and filename
75 on three separate lines, followed by one blank line.
76 Headers and summary lines are suppressed. Version info is not output
77 unless specified via -v option.
78
79 -s or --short
80 Where blocks of files with identical license differences would be output,
81 only the first file is shown. Overrides -l (if specified)
82
83 -v or --version
84 Writes the version numbers of licenserecon and licenscheck to stdout, then exits
85
86 -x or --spdx
87 Expects SPDX style license short names. (Default is debian DEP 5 short names)
88
89 SALSA CI PIPELINE
90 lrc can be included in Salsa CI Pipelines by using
91 debian/salsa-ci.yml@debian/licenserecon
92 as the CI/CD configuration file.
93