DH_...LICY(1)

πŸ“¦
version 0.11 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– 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 the postinst/prerm scripts. 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 .snk file used to sign the assembly. πŸ”‘
  • Assembly β€” the name of the assembly, without the .dll extension. for example, for log4net.dll, use log4net. (not log4net.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 as 1.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 as 1.2.0.0 to 2.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