SCAN-COPYRIGHTS(1p)
β¨ NAME β¨
scan-copyrights β it scans your source files and spits out lines you can drop straight into debian/copyright files π
πΈ SYNOPSIS πΈ
# in source package directory
scan-copyrights > debian/copyright.new
meld debian/copyright{,.new}
okay so like, you run it in your source package dir, dump the output into debian/copyright.new, and then meld the old and the new against each other and vibe-check the diff. iconic workflow tbh π«Ά
π¦ DESCRIPTION π¦
This command calls up the licensecheck command to go sniff out license and copyright info from your source files. Then it parses whatever licensecheck hands back and generates the Files information for your debian/copyright files, following the Debian specs over at https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ β no cap, that's the whole job. π
π Tweaking results π
Your results are tweakable, and you've got three ways to do it, bestie:
- Changing the list of files to scan or ignore. (By default,
licensecheckdecides which file gets scanned and which one doesn't.) Go read "Selecting or ignoring files to scan" in Dpkg::Copyright::Scanner β¨ - Specifying information for individual files or directories β stuff like copyright values, or telling it to straight up skip a file. See "Filling the blanks" in Dpkg::Copyright::Scanner π
- Tweaking the copyright entries that get created by grouping and coalescing information. See "Tweak copyright entries" in Dpkg::Copyright π
π BUGS π
π Reliability π
Extracting license and copyright data out of unstructured comments is not reliable. Periodt. You, the user, must check the files manually whenever no copyright info turns up or whenever the license is unknown. Do not skip this step, I am begging π
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 on how 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. different needs, different vibes, yk? π¦
π Corrupted package.json or toml files π
Some packages contain test files with invalid package.json or Cargo.toml files. scan-copyright cannot deal with them, so you must tell scan-copyright to skip these files. See "Selecting or ignoring files to scan" in Dpkg::Copyright::Scanner for the deets π
π 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 ]
see those "no info for" lines? that's the manual-check callout doing its thing, do not ignore them π
π SUPPORT π
For support, please contact the author. they're the realest for that fr fr π«Ά
β SEE ALSO β
licensecheck"licensecheck2dep5"from the"cdbs"package
π AUTHOR π
Dominique Dumont <dod@debian.org> π
and that's a wrap, bestie π
this little page lives in the User Contributed Perl Documentation manual as SCAN-COPYRIGHTS(1p), brought to you by perl v5.42.3, dated 2026-08-30 β go forth and copyright-scan responsibly, mwah πβ¨
π¦ where this page comes from
- ubuntu stonking: libconfig-model-dpkg-perl 3.026 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms