DH_...LICY(1)
π DH_...LICY(1) π
okay bestie, welcome to Debhelper for CLI (Common Language Infrastructure) β yes that's the whole manual family, and this page right here is the one and only dh_cligacpolicy. pull up a chair, grab a strawberry π, we're doing policy files today.
β¨ NAME β¨
dh_cligacpolicy β creates and installs a CLI policy file for a package π
πΈ SYNOPSIS πΈ
dh_cligacpolicy [debhelper options] [-n]
that's it. that's the whole vibe. π
π¦ DESCRIPTION π¦
so dh_cligacpolicy is a debhelper program, and its whole job β its main character energy, if you will β is creating, compiling, and installing policy files for a Debian package. π
and the way it does this is lowkey iconic: it automatically includes the postinst and prerm commands you need to get those policies installed into the system. you don't have to hand-write them. it just... does it. slay.
π OPTIONS π
-n,--noscriptsβ do not touch thepostinst/prermscripts. hands off, bestie. π
π FILE FORMAT π
okay this is the part where you actually pay attention, because this is where the magic happens.
the file uses the debian/cligacpolicy files (either policyassemblies or debian/packagename.cligacpolicy) to generate the policy file. and yes, it supports multiple versions of the policy β including mapping multiple versions to a single file. iconic behavior honestly.
the file format of the cligacpolicy file consists of five properties per line, each one separated by whitespace. five. count 'em. β
- Keyfile β a path, from the package root, to the
.snkfile used to sign the assembly. π - Assembly β the name of the assembly, without the
.dllextension. for example, forlog4net.dll, uselog4net. (notlog4net.dll. we said what we said. π) - Version Range β can be a single four-part version, such as
1.2.3.4, or a full range, such as1.2.3.4-1.2.6.7. for a single line, the first two numbers must be identical. to have an assembly apply to multiple versions, such as1.2.0.0to2.4.0.0, there needs to be one line for each version range. no shortcuts, bestie. π - Assembly version β the version of the assembly being built. π οΈ
- Priority β defines the priority of the policy files. typically, each version will increase the priority and contains all the policy controls for prior versions. π
and the little quality-of-life details: the fields can be separated with spaces or tabs. comments start the line with # characters, and blank lines are ignored. so go ahead, leave yourself lil notes. we love a documented girlie. β¨
β οΈ NOTES β οΈ
bestie. listen. this command is not idempotent. π
dh_prep should be called between invocations of this command. otherwise, it may cause multiple instances of the same text to be added to maintainer scripts. and nobody wants that. run your dh_prep. fr fr. π«Ά
π EXAMPLE π
for the log4net 1.2.10.0 version, a policy file is used to map all versions from 1.2.8.0 to 1.2.9.99 into the current version. cute, right? here's what that line looks like:
debian/log4net.snk log4net 1.2.8.0-1.2.9.99 1.2.10.0 10
five fields. whitespace-separated. exactly like we said. periodt. π
π SEE ALSO π
also, fun fact, this program is a part of cli-common-dev. π«Ά
π AUTHOR π
Dylan R. E. Moonfire <debian@mfgames.com> β thank you for your service, legend. π«‘β¨
and that's the page, bestie! this lil beauty ships as part of perl v5.40.1, dated 2025-08-16. go forth and make policy files, you absolute icon. πππ¦πΈπ ππβ
π¦ where this page comes from
- ubuntu resolute: cli-common-dev 0.11 Β· GPL
- ubuntu stonking: cli-common-dev 0.11 Β· GPL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms