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.cruftfiles can already handle. don't pull out a whole shell script when a.cruftfile 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 topackage. 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
- ubuntu stonking: dh-cruft 0.9.87 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms