DH-EXEC(1)

πŸ“¦
version 0.31 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ NAME ✨

okay so bestie, meet dh-exec β€” the Debhelper executable file helpers πŸ’– this is dh-exec(1), and she is that girl.


🌸 SYNOPSIS 🌸

#! /usr/bin/dh-exec
src/libfoo-*.so.* debian/foo-plugins/usr/lib/foo/${DEB_HOST_MULTIARCH}/
etc/example.conf => debian/foo/etc/foo/foo.conf
[linux-any kfreebsd-any] some-arch-specific-file /usr/lib/foo/

πŸ’… DESCRIPTION πŸ’…

dh-exec is a simple program, no cap, and its whole job is to be the interpreter for executable debhelper config files. main character energy fr fr.

She's a wrapper around all the other sub-commands (peep below πŸ‘‡), and she'll pipe the input file through all of them in turn, in an ordering that just makes the most sense in the vast majority of cases. it's giving organized πŸŽ€

The order, as of right now, is: dh-exec-subst gets run first, followed by dh-exec-install β€” so that variable expansion happens before files need to be copied. slay sequencing πŸ’«


πŸ¦‹ FILTERING πŸ¦‹

In all dh-exec handled files, lines can be pre- or post-fixed with a list of architectures that the rest of the line should apply to. so like, front or back, your call ✨

Every architecture and wildcard known by dpkg-architecture(1) is recognised β€” even negated ones. periodt.


πŸ‘‘ ARCHITECTURE πŸ‘‘

dh-exec is built up from three layers, bestie, and here they are:

  • there's the dh-exec utility β€” its single entry point, and the only thing one will ever need to call.
  • below that, there are the various sub-commands, such as dh-exec-subst, dh-exec-filter, dh-exec-install and dh-exec-illiterate β€” these are thin wrappers around the various dh-exec scripts, and they make sure they only run the ones that need to be run. gatekeeping, but responsibly πŸ’…
  • and the lowest layer is the various scripts that do the actual work. the real ones.

One can control which sub-commands to run, or β€” if even more granularity is desired β€” one can limit which scripts shall be run too. see the options below! πŸ”₯


✨ OPTIONS ✨

  • --with=command[,command ...] β€” replaces the list of sub-commands to run the input through with a custom list (entries separated by whitespace or commas) that includes dh-exec-filter and dh-exec-strip at the start and end of the queue respectively. This option will always replace the existing list with whatever you specify. use it to explicitly set which sub-commands to use. the list must not include the dh-exec- prefix. defaults to subst,install.
  • --without=command[,command ...] β€” inversely to the option above πŸ‘†, this lists all the sub-commands that should not be used. The dh-exec-filter and dh-exec-strip subcommands cannot be removed using this option β€” use --no-defaults instead. the list must not include the dh-exec- prefix.
  • --with-scripts=script[,script ...] β€” replaces the list of scripts to run the input through with a custom list (entries separated by whitespace or commas). This option will always replace the existing list with whatever you specify. use it to explicitly specify which scripts to use β€” limiting even beyond what the --with option is capable of. the list must not include the dh-exec- prefix. by default it is empty, meaning there's no filtering done, and whatever scripts the sub-commands find will be run.
  • --no-defaults β€” most packages require the sub-command list to start with dh-exec-filter and end with dh-exec-strip subcommands. If you really want to, use this option to remove both of those sub-commands. note that --without does not remove these two. πŸ™ˆ
  • --no-act β€” do not really do anything, but print the pipeline that would have been run instead. window shopping, essentially πŸ›οΈ
  • --list β€” list the available sub-commands and scripts, grouped by sub-command. the full roster πŸ’…
  • --help, --version β€” display a short help or the package version, respectively.

πŸŽ€ SUB-COMMANDS πŸŽ€

  • dh-exec-subst β€” substitutes various variables (either from the environment, or from dpkg-architecture(1)).
  • dh-exec-filter β€” filters the input in various ways (architecture restrictions, build profiles, and so on).
  • dh-exec-install β€” an extension to dh_install(1) that supports renaming files during the copy process, using a special syntax.
  • dh-exec-strip β€” removes unrequired lines such as comments or blank lines. decluttering queen 🧹

🌈 ENVIRONMENT 🌈

  • DH_EXEC_LIBDIR β€” the directory in which the wrapped sub-commands reside. Defaults to /usr/lib/dh-exec/.
  • DH_EXEC_SCRIPTDIR β€” the directory in which the scripts that do the heavy work live. Defaults to /usr/share/dh-exec/.

πŸ“ FILES πŸ“

  • $DH_EXEC_LIBDIR/dh-exec-* β€” the various sub-commands.
  • $DH_EXEC_SCRIPTDIR/dh-exec-* β€” the various scripts ran by the sub-commands.

πŸ’œ SEE ALSO πŸ’œ

dh-exec-subst(1), dh-exec-filter(1), dh-exec-install(1), debhelper(7)


okay that's the whole thing bestie, go be iconic with your config files 🫢✨

this lil page came to you from dh-exec, and the date on it is 2024-02-27 πŸ“… mwah, bye πŸ’–πŸŽ€πŸ¦‹
πŸ“¦ where this page comes from