table of contents
SCAN-COPYRIGHTS(1p) | User Contributed Perl Documentation | SCAN-COPYRIGHTS(1p) |
NAME¶
scan-copyrights - Scan source file and print lines for debian/copyright files
SYNOPSIS¶
# in source package directory scan-copyrights > debian/copyright.new meld debian/copyright{,.new}
DESCRIPTION¶
This commands use "licensecheck" command to scan license and copyright information from source files. The output of licensecheck is parsed to generate the Files information of "debian/copyright" files according to Debian specifications <https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/>
Tweaking results¶
Results can be tweaked either by:
- Changing the list of files to scan or ignore. (By default, licensecheck will decide which file to scan or not.) See "Selecting or ignoring files to scan" in Dpkg::Copyright::Scanner
- Specifying information for individual files or directories, such as copyright values, or to skip this file. See "Filling the blanks" in Dpkg::Copyright::Scanner.
- Tweaking the copyright entries created by grouping and coaslescing information. See "Tweak copyright entries" in Dpkg::Copyright.
BUGS¶
Reliability¶
Extracting license and copyright data from unstructured comments is not reliable. User must check manually the files when no copyright info is found or when the license is unknown.
The required changes can be stored in "debian/fill.copyright.blanks.yml" so that future runs of scan-copyrights will be more accurate. Please see "Filling the blanks" in Dpkg::Copyright::Scanner for instructions to write this file.
Extracting information from Cargo.toml¶
Copyright and information is extracted from "Cargo.toml" files, but Cargo workspace information is ignored. The command "cargo metadata" cannot be used as it produces information for packages, whereas "debian/copyright" expects information for files.
Corrupted package.json or toml files¶
Some packages contain test file with invalid "package.json" or "Cargo.toml" files. "scan-copyright" cannot deal with them and you must tell "scan-copyright" to skip these files. See "Selecting or ignoring files to scan" in Dpkg::Copyright::Scanner for details.
Examples¶
In pan source directory:
$ scan-copyright no info for ./uulib/fptools.h, check manually this file no info for ./uulib/fptools.c, check manually this file no info for ./uulib/uustring.h, check manually this file no info for ./uulib/crc32.h, check manually this file no info for ./pan/data/defgroup.h, check manually this file no info for ./pan/general/time-elapsed.h, check manually this file [ snip ] Files: * Copyright: 1994-2001, by Frank Pilhofer. License: GPL-2+ Files: pan/* Copyright: 2002-2006, Charles Kerr <charles@rebelbase.com> License: GPL-2 Files: pan/data/cert-store.cc Copyright: 2011, Heinrich Muller <henmull@src.gnome.org> 2002-2006, Charles Kerr <charles@rebelbase.com> License: GPL-2 Files: pan/data/cert-store.h Copyright: 2002-2006, Charles Kerr <charles@rebelbase.com> 2011, Heinrich Muller <henmull@src.gnome.org> License: GPL-2 [ snip ]
SUPPORT¶
For support, please contact the author.
SEE ALSO¶
licensecheck, "licensecheck2dep5" from "cdbs" package
AUTHOR¶
Dominique Dumont <dod@debian.org>
2025-04-10 | perl v5.40.1 |