RPMSIGN(8)
π RPMSIGN(8) β like, the rpm signing manual but make it make sense
okay bestie, welcome to rpmsign, aka RPM Package Signing β¨ it's the little tool that puts your cryptographic John Hancock on packages so everybody knows it's really you and not some random gremlin on the internet. let's get into it π
πΈ SYNOPSIS πΈ
signing packages, the whole vibe
rpmsign --addsign|--resign [rpmsign-options] PACKAGE_FILE ...
rpmsign --delsign PACKAGE_FILE ...
rpmsign --delfilesign PACKAGE_FILE ...
rpmsign-options (the lil extras)
[--rpmv3] [--fskpath KEY] [--signfiles]
β¨ DESCRIPTION β¨
so <pink>**--addsign**</pink> and <pink>**--resign**</pink>? both of them do the exact same thing: they generate and insert brand-new signatures for every package PACKAGE_FILE you hand them, and they replace any existing signatures while they're at it π
there are two of them for historical reasons β literally no behavioural difference right now, it's giving twins who dress identical.
to actually create a signature, rpmsign needs to verify the package's checksum. which means β and this is important, bestie β packages with a MD5/SHA1 checksum cannot be signed in FIPS mode. no cap. π
rpmsign --delsign PACKAGE_FILE ...
deletes all signatures from each package PACKAGE_FILE you give it. bye bye signatures π
rpmsign --delfilesign PACKAGE_FILE ...
deletes all IMA and fsverity file signatures from each package PACKAGE_FILE. also bye π
π₯ SIGN OPTIONS π₯
--rpmv3β force RPM V3 header+payload signature addition. ngl these are expensive and redundant baggage on packages that already have a separate payload digest (aka packages built withrpm >= 4.14).rpmsignwill auto-detect when V3 signatures are actually needed, but you can use this to force them into existence if your packages absolutely must be fully signature-verifiable withrpm < 4.14, or for other interoperability reasons. it's giving "I know it's extra but I have my reasons" π«Ά--fskpath KEYβ used with--signfiles, use file signing keyKEY.--certpath CERTβ used with--signverity, use file signing certificateCERT.--verityalgo ALGβ used with--signverity, to specify the signing algorithm.sha256andsha512are supported, withsha256being the default if you don't specify this argument. this can also be specified with the macro%_verity_algorithm. π¦--signfilesβ sign package files. the macro%_binary_filedigest_algorithmmust be set to a supported algorithm before building the package. the supported algorithms areSHA1,SHA256,SHA384, andSHA512, which are represented as2,8,9, and10respectively. the file signing key (RSA private key) must be set before signing the package, and it can be configured on the command line with--fskpathor the macro%_file_signing_key. β--signverityβ sign package files with fsverity signatures. the file signing key (RSA private key) and the signing certificate must both be set before signing the package. the key can be configured on the command line with--fskpathor the macro%_file_signing_key, and the cert can be configured on the command line with--certpathor the macro%_file_signing_cert. π
π CONFIGURING SIGNING KEYS π
okay so to sign packages you need your own public and secret key pair β go read the GnuPG manual, it's a whole thing. and then, rpm(8) has to be configured to find GnuPG and the right keys using these macros:
%_gpg_nameβ the name of the "user" whose key you wanna use to sign your packages. typically this is the only configuration you actually need. iconic, low maintenance π%_gpg_pathβ the location of your GnuPG keyring, if it's not the default$GNUPGHOME.%__gpgβ the path of the GnuPG executable. normally pre-configured, so don't stress.
for example, to be able to use GnuPG to sign packages as the user "John Doe <jdoe@foo.com>" from the key rings located in /etc/rpm/.gpg using the executable /opt/bin/gpg, you'd include:
%_gpg_path /etc/rpm/.gpg
%_gpg_name John Doe <jdoe@foo.com>
%__gpg /opt/bin/gpg
in a macro configuration file, typically ~/.config/rpm/macros. see Macro Configuration in rpm(8) for more details. π§
π SEE ALSO π
popt(3), rpm(8), rpmdb(8), rpmkeys(8), rpm2cpio(8), rpmbuild(8), rpmspec(8)
rpmsign --help β and listen, because rpm supports customizing the options via popt aliases, it's literally impossible to guarantee that what's described in the manual matches what's actually available. so yeah. check it yourself, bestie. π
http://www.rpm.org/ <URL:http://www.rpm.org/>
π AUTHORS π
shoutout to the legends who built this:
- Marc Ewing
<marc@redhat.com> - Jeff Johnson
<jbj@redhat.com> - Erik Troan
<ewt@redhat.com> - Panu Matilainen
<pmatilai@redhat.com> - Fionnuala Gunter
<fin@linux.vnet.ibm.com> - Jes Sorensen
<jsorensen@fb.com>
and that's the whole page, babe π brought to you by Red Hat, Inc, living under the manual name RPMSIGN(8) β mwah, go sign something π β¨π
π¦ where this page comes from
- debian trixie: rpm 4.20.1+dfsg-3 Β· GPL-2.0-or-later
- nixpkgs unstable: rpm 4.20.1
- opensuse-leap 16.0: rpm 4.20.1-160000.4.1 Β· GPL-2.0-or-later
- opensuse-leap 16.0: rpm 4.20.1-160000.4.1 Β· GPL-2.0-or-later
- opensuse-leap 16.0: rpm 4.20.1-160000.4.1 Β· GPL-2.0-or-later
- opensuse-leap 16.0: rpm 4.20.1-160000.4.1 Β· GPL-2.0-or-later
- ubuntu questing: rpm 4.20.1+dfsg-3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms