debsig-verify(1)
β¨ debsig-verify β¨
okay bestie, sit down, hydrate, and let me tell you about debsig-verify π β it's the dpkg suite's little bouncer that checks IDs at the door of your Debian packages. no cap.
πΈ NAME πΈ
debsig-verify β verify signatures for a Debian format package π«Ά
π SYNOPSIS π
debsig-verify [option...] deb
π DESCRIPTION π
so this program is part of a whole security model that verifies the source and validity of a Debian format package β you know her, you love her, she's commonly called a deb π¦
it implements the verification specs laid out in the document "Package Verification with dpkg: Implementation", which is the more complete reference for the whole verification procedure, iykyk.
generally it takes one argument β the deb file that needs verifying. then it:
- checks the origin signature of the deb
- finds its Public Key ID (long format, bestie, LONG)
- uses that ID as the name for a policy subdirectory
and if that subdirectory doesn't exist? π verification fails immediately. like, instantly. no second chances. periodt.
in that subdirectory, the program finds one or more files named with the .pol file extension β that's an XML format policy definition. this file has three main parts:
- Origin β Information about the origin of this policy.
- Selection β Rules used to decide if this policy is pertinent to this deb's verification.
- Verification β Rules that are used to actually verify the deb.
the policy files reference OpenPGP keyrings by a filename, and those keyrings get looked up inside a subdirectory of the OpenPGP keyring directory. that subdirectory has the same name as the policy subdirectory (which, remember, was already determined by the Origin's Public Key ID β¨).
after it parses the entire file, the program checks the Origin ID against the Public Key ID of the origin signature in the deb. if those match β which they should, otherwise something is really wrong π β it moves on to the Selection rules.
the Selection rules decide whether this policy is even suitable for verifying this deb. if they fail, the program just goes to the next policy, no drama. but if they pass? it commits to that policy for verification, and no other policies get referenced. main character policy energy, honestly π
the last verification step rides on the Verification rules. they're similar in format to the Selection rules but usually way more constrained. if they fail β program exits with a non-zero status. if they pass β exits with a zero status. slay π
π OPTIONS π
-q,--quietβ makes the program send no output at all, other than fatal errors. super useful when another program is calling it and you're only relying on the exit value, fr fr.-v,--verboseβ makes the program send more output while it runs, so you can follow along with every step it takes trying to verify the deb. it's giving commentary track π-d,--debugβ outputs even MORE info than-v. mainly for debugging, bestie.--helpβ outputs the usage information for the program.--versionβ outputs the version information for the program. this includes the policy format version. this option does not require any other arguments β¨--list-policiesβ outputs a list of the policies that passed the Selection phase of the verification process. in other words, the ones that could potentially verify the deb. the output is one line showing the directory selected by the origin signature, and then a single line for any policy files in that directory that pass the Selection rules. > heads up: this option will NOT verify the deb. it's just window shopping ποΈ--use-policypolicy β takes one argument: the name of the policy file (as shown by the--list-policiesoption). note that this is just a file, not a full path β you cannot specify arbitrary policies. this option is useful if more than one policy applies to potentially verifying the deb. the program will then use this policy, and only this policy, to try and verify the deb.--policies-dirdirectory β use a different directory when looking up for policies.--keyrings-dirdirectory β use a different directory when looking up for OpenPGP keyrings.--rootdirectory β use a different root directory when looking up for policies and OpenPGP keyrings.
π₯ EXIT STATUS π₯
0β the requested operation completed successfully. π iconic.1β general non-success exit value. this happens for non-verification operations.10β either no signatures are contained in the deb, or no origin signature was found. π11β an origin signature was found, but it doesn't have a corresponding subdirectory in the policies directory. π12β the origin was found, and it is present. however, no policies were found that passed the selection phase of the process. thus, no verification was performed.13β the package failed the verification phase of the process. more than likely this happens because of a bad signature, or because not all criteria of the verification block of the policy were passed. π14β an internal error occurred. this is an unrecoverable error. either the deb is corrupt, the OpenPGP backend failed abnormally, or some other uncontrollable failure. genuinely the worst timeline.
π¦ ENVIRONMENT π¦
DEBSIG_GNUPG_PROGRAMβ the name (or pathname) of the GnuPG program to use.
π§ FILES π§
/etc/debsig/policies/β directory containing the policy (.pol) definitions./etc/debsig/policies/*/*.polβ XML format policy files./usr/share/debsig/keyrings/β directory containing the OpenPGP keyrings (*.pgp) that coincide with the policies./usr/share/debsig/keyrings/*/*.pgp/usr/share/debsig/keyrings/*/*.gpgβ OpenPGP format keyrings for use by the policies.
note: the .gpg extensions are the legacy names, used because of the prevalence of one of the OpenPGP implementations. these keyrings must be in OpenPGP keyring format, and not some tool specific format (such as GnuPG keybox databases). no shortcuts, bestie π
ββοΈ
β SEE ALSO β
and that's the whole vibe check π this was debsig-verify(1) from the dpkg suite, version 0.34 β go forth and verify those debs, you gorgeous genius, you π«Άβ¨πΈ
π¦ where this page comes from
- ubuntu resolute: debsig-verify 0.34 Β· GPL-2.0-or-later
- ubuntu stonking: debsig-verify 0.34 Β· GPL-2.0-or-later
- Copyright Β© 2000 Ben Collins <bcollins@debian.org>
- Copyright Β© 2014-2016 Guillem Jover <guillem@debian.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms