DH_CRUFT(1)

πŸ’… dh_cruft(1) β€” the manual page, but make it make sense

okay bestie, this is dh_cruft, and it lives in section 1 of the manual (you know, the "User Contributed Perl Documentation" corner of the world). it's a debhelper situation, it's giving ✨build pipeline✨, and honestly? it just installs cruft info files into your package build dirs. iconic behaviour, zero notes.


🌸 NAME 🌸

dh_cruft β€” drop those cruft files right into your package build directories, no cap πŸ’–


✨ SYNOPSIS ✨

dh_cruft [debhelper options]

that's it. that's the whole summoning ritual. you bring the debhelper options (whatever ones you already vibe with), it does the thing. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so, dh_cruft is a debhelper program β€” like, one of the little helper besties that debhelper runs for you β€” and its whole job is installing information files that cruft(-ng) uses, straight into your package build directories. it takes the files, it puts them where cruft can find them, it moves on with its life. main character energy, but make it build systems. πŸ’…


πŸŽ€ FILES πŸŽ€

these are the files it's obsessed with. read them, love them, name your directories with a trailing slash. ⭐

πŸ“ debian/package.cruft

this one gets installed into usr/share/cruft/rules/package inside the package build directory. what's it for? registering runtime files as belonging to this package. that's the whole assignment.

⚠️ heads up bestie: for clarity, directories should end with a /. like, actually. do it.

🧹 debian/package.purge

this one gets appended to usr/share/cruft/rules/package in the package build directory β€” so it's not replacing anything, it's joining the party.

same deal as above: it registers runtime files as belonging to this package, and for clarity, directories should end with a /. 🌈

but wait, there's more β€” a snippet also gets appended to postrm with the rm -rf commands needed to actually yeet these files during the purge phase. so when it's purge o'clock, the cleanup is already handled. 😭 so thoughtful.

some basic templating is implemented too: the #VERSION# tag gets replaced by the basic upstream version. cute, right? πŸ“

πŸ” debian/package.explain

this should be a POSIX shell script that dynamically generates a list of files owned by this package. dynamic. on demand. serving looks. πŸ’œ

it gets installed as usr/libexec/cruft/pkg/package in the package build directory.

okay but real talk: these scripts should not be used for the simplistic cases that .cruft files can already handle. don't pull out a whole shell script when a .cruft file would've eaten. πŸ™ˆ

the output of these scripts can contain three kinds of records, and here they are:

  • /PATH β€” the files matched. this one is mandatory, babes. you literally cannot skip it. πŸ’€
  • @/PATH β€” this allows indirect ownership lookup, i.e. the following files belong to the package owning this one file. plot twist! ownership by association! ✨
  • package β€” all of the following files belong to package. and that's it, that's the rules of the group chat. πŸ‘‘

🌈 SEE ALSO 🌈

  • debhelper(1)
  • this program is a part of debhelper. fr fr, it's a card-carrying member.
  • cruft(8)

πŸ‘‘ AUTHOR πŸ‘‘

Alexandre Detiste <alexandre.detiste@gmail.com> β€” thank you for your service, king 🫢


and that's the whole page, bestie!! πŸ’–

sign-off time: this beauty came out of perl v5.40.1, dated 2026-07-03, and yeah β€” the page title is DH_CRUFT(1), in case you were wondering what to yell into the void. go forth, install your cruft, end with a / on your directories, periodt. πŸŽ€βœ¨

πŸ“¦ where this page comes from