DH-EXEC-INSTALL(1)
β¨ DH-EXEC-INSTALL(1) β¨
okay bestie, sit down, we're talking about dh-exec-install β part of the dh-exec manual family, and it's literally the one that installs your files (and sometimes renames them, which is the whole β¨ moment β¨). π
πΈ NAME πΈ
dh-exec-install β install (and possibly rename) files. that's it, that's the job. π
π¦ SYNOPSIS π¦
#! /usr/bin/dh-exec
debian/default.conf => /etc/my-package/start.conf
=> /usr/bin/runme
usr/bin/*
[linux-any kfreebsd-any] some-arch-specific-file /usr/lib/foo/
look at that syntax. gorgeous. no notes. π
π DESCRIPTION π
so here's the tea: this program is a sub-command of dh-exec(1). which means you do NOT run it directly. nope. never. it gets run through dh-exec, which automatically runs all the available sub-commands when you run it bare β or you can be explicit and do dh-exec --with=install. your call, both slay. π«Ά
it's meant for the dh_install(1) family of files and those alone, fr fr. if it peeks at its input and goes "bestie this is not one of mine," it does absolutely nothing β just echoes the contents right back at you. no drama. if you wanna know the full list of files it recognises, scroll down to the FILE TYPES section. π
so what's the actual point? it extends dh_install(1)'s functionality in two ways:
- it lets you specify a destination filename
- it gives you a way to move (instead of copy) a file to a single package
the first one? that's the special syntax moment. the " => " mark sitting between a source and a destination means install this source file under this destination name. periodt.
for obvious reasons (and yeah, they're obvious π), the source must not be a wildcard, and the destination in this case must be a file, not a directory. don't try it. it's giving chaos.
the second extension has a simpler vibe: any filename prefixed with "=>" gets moved instead of copied to the package. this is how you move one file out of a directory into one package and install all the rest of the files in that same dir into another package. chef's kiss, honestly. π
wanna know how lines get filtered? go read the FILTERING section of dh-exec(1). and btw β any non-comment lines without a filter just get left alone. untouched. unbothered. living their truth. β¨
π RESTRICTIONS π
okay this part is the buzzkill but we have to talk about it.
because of the way executable scripts get called from dh(1), there is no way to know what options were used for the original dh_install(1). which means... the --sourcedir option of dh_install(1) will not work correctly when dh-exec-install is in use.
β οΈ so like, don't be surprised. it's not a bug, it's just how the plumbing works. noted and respected. π
π FILE TYPES π
the program supports dh_install(1) and dh_installmanpages(1) files only. that's the whole list. don't come at it with anything else. π
π§ IMPLEMENTATION π§
okay so internally, how does the renaming actually go down? she's clever, watch this:
it creates a temporary directory under debian/tmp/, and copies the file there β or moves it there, if the source was under debian/tmp/ to begin with β with the new name. π¦
and why does she do it this way? so that dh_install(1) can do the real copying itself, which means all of its options keep working, even when renaming is involved. iconic behaviour honestly.
the temporary directory lives under debian/tmp so that dh_prep(1) will clean it up when the clean target gets to run. which means no extra code is needed anywhere to clean up the renamed files. zero. zilch. she handles it. π
π ENVIRONMENT π
DH_EXEC_SCRIPTDIRβ tells you which directory the command-specific scripts should be sought for. if you don't specify it, scripts get searched for in/usr/share/dh-exec/. easy. π
β FILES β
$DH_EXEC_SCRIPTDIR/dh-exec-install-*β the various scripts for the higher-level program. yep, all of them. β¨
π VERSIONS π
- the sub-command was introduced in dh-exec version 0.1.
- support for
dh_installmanpages(1)files was added in version 0.13.
look at her growing up. π₯Ή
π₯ SEE ALSO π₯
dh(1), dh-exec(1), dh_install(1), dh_installmanpages(1), dh_prep(1), debhelper(7)
go read those too, bestie, iykyk. π
and that's the whole page!! this came from the dh-exec manual, dated 2024-02-27, and honestly? she ate. go install something and rename it, you've got this. πβ¨ππ¦
π¦ where this page comes from
- debian trixie: dh-exec 0.30 Β· GPL-3.0-or-later
- ubuntu noble: dh-exec 0.29build1 Β· GPL-3.0-or-later
- ubuntu questing: dh-exec 0.30
- ubuntu resolute: dh-exec 0.31 Β· GPL-3.0-or-later
- ubuntu stonking: dh-exec 0.31 Β· GPL-3.0-or-later
- Copyright 2011-2024 Software Freedom Conservancy, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms