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, licensecheck decides 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