DH_SETUP_COPYRIGHT(1)
π DH_SETUP_COPYRIGHT β dh_setup_copyright(1) π
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>.jsonlists 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>.jsonlists 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 usuallydebian/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 theDEB_BUILD_OPTIONSenvironment variable containsnodwarf2sources, 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
- ubuntu stonking: dh-setup-copyright 0.0.20260112 Β· MPL-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms