DH_SETUP_COPYRIGHT(1)

πŸ“¦ version 0.0.20260112, in ubuntu stonking

okay bestie, welcome to the dh_setup_copyright page, straight outta the User Contributed Perl Documentation section 🫢 this is a debhelper program and she's lowkey a baddie, let me tell you everything ✨


🌸 NAME 🌸

dh_setup_copyright β€” extracts the source file names out of DWARF debug info inside ELF binaries, by running dwarf2sources πŸ’…


✨ SYNOPSIS ✨

dh_setup_copyright [debhelper options] [-Xitem] [--copyrightfile=file]
[--blacklist=packages] [--buildsuffix=regex] [-- params]

like, that's the whole vibe. go off πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so dh_setup_copyright is a debhelper program, and what she does is generate the list of source file names used to build every binary β€” and on top of that she pulls the licenses from any sources that are part of other packages. no cap.

the source file list gets extracted from DWARF debug information by running dwarf2sources(1) on every ELF binary in the package, and then the output gets saved to:

  • /usr/share/doc/<package>/<binary>_bin2sources_<arch>.json
  • /usr/share/doc/<package>/<binary>_metadata_<arch>.json

and literally, here's the tea on what each one is:

  • /usr/share/doc/<package>/<binary>_bin2sources_<arch>.json lists all the source files used to build a binary by extracting data from DWARF debug information. it's giving receipts πŸ“‹
  • /usr/share/doc/<package>/<binary>_metadata_<arch>.json lists all the source files, licenses, copyrights, plus the other source packages used during build, and their versions. she's the main character of metadata fr fr πŸ‘‘

πŸ’… OPTIONS πŸ’…

  • -Xitem, --exclude=item β€” skips any files that contain item anywhere in their filename so they don't get extracted 🚫. and bestie, you can use this option multiple times to build up a whole list of things to exclude. stack 'em up 🧚
  • --copyrightfile=file β€” the path to the copyright file, which is usually debian/copyright. yk, the usual spot πŸŽ€
  • --blacklist=packages β€” a list of binary packages to ignore. these packages won't be processed at all, soz to them πŸ’€
  • --buildsuffix=regex β€” the build suffix to strip off of package versions βœ‚οΈ

πŸ“ NOTES πŸ“

if the DEB_BUILD_OPTIONS environment variable contains nodwarf2sources, this whole procedure gets skipped. that's it, she's out, no dwarf2sources today πŸ™ˆ

πŸ‘€ SEE ALSO πŸ‘€

and also, and I cannot stress this enough: this program is a part of debhelper 🌈


🫢 AUTHOR 🫢

Walter Lozano <walter.lozano@collabora.com> β€” give her her flowers πŸ’


and that's the page, gorgeous ✨ she's from perl v5.40.1, dated 2026-01-12, and filed under DH_SETUP_COPYRIGHT(1) β€” go forth and extract those source file names, bestie, you got this πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from